This is a web based asset database that allows the user to upload a 3D models onto the website and into a database that can later be viewed and downloaded.
For that I used SQlite, Flask and web dev such as html and css.
Files will be stored inside of a project folder called mesh.
- Flask==3.0.3
- Flask-SQLAlchemy==3.1.1
- numpy==1.26.3
- SQLAlchemy==2.0.29
- Clone repo:
git clone git@github.com:NCCA/msccavepipelineandtdproject24-Nonanike.git
- Run
pip install -r requirements.txt
- Run
python app.py
- Copy this address and enter it into a browser
http://127.0.0.1:5000
or
simply click
on the that link from above to open it automatically in a browser.
-
To upload 3D model:
-
Click on 'Add your 3D Mesh' on the left side bar
-
Choose a file you want to add to the database. Important: you can only upload 'obj', 'fbx' or 'usd'
-
Add author, description and the date if you wish it to be added to the database
-
Clik 'Submit'
-
-
To view the database and download any 3D meshes:
-
Click on 'Database: view and download' on the left side bar
-
Choose a file you want to download and click 'Download'
-
/web_based_asset_database
/app.py
/requirements.txt
/mesh
/scripts
/addToDataBase.py
/CreateDatabase.sql
/static/css
/main.css
/templates/
/addMesh.html
/index.html
/layout.html
/viewDatabase.html
/Core
/__init__.py
/Connection.py
/Functions.py
/tests
/test_app.py
/test_Database.py
/testMesh
Design a database Meshes with and a schema.
I want it to support OBJ, FBX and USD formats.
This database is going to be simple and should look like this:
| Name | Type | Attributes |
|---|---|---|
| ID | Integer | PRIMARY KEY AUTOINCREMENT |
| MeshData | Blob | NOT NULL |
| Name | Text | NOT NULL |
| Type | Text | NOT NULL |
| Author | Text | NOT NULL |
| Description | Text | NOT NULL |
| Date | Text | NOT NULL |
Build a simple website using html, css and Flask that will allow for files upload.
Make sure to write tests and that they all pass.
Make another page that allows the user to download the 3D models.
Add the scrolling page with 3D meshes and their turntables by using WebGL and it's library three.js.
Clean up the interface with html and css.
This project went according to the original plan almost completely. In the end the main functionality was implemented succesfully and an useful pipeline tool was created.
Originally, I also wanted to have a seperate page for just viewing the actual mesh by using WebGL three.js library. Unfortunetly, it did not work according to my plan.
For any future improvements it would be good to implement Dockerfile in the project as well. I tried it and it did not work for me this time so I want to exlpore this further. I would also like to learn more about WebGL three.js library and its use because it seems useful and I am sure it would be beneficial for any future projects.
In conclusion, I fullfied most of my fundamental objectives and successfully implemented the pipeline tool that can be used in production. There is also room for improvement but the main mechanics works well.
