This demo uses Python to interact with the Echo3D API. It access all 3d models in a user account given the api key and security key, and let the user to choose which 3d model to render. Once the user has made a choice, the Python demo will attempt to retrieve the 3d model and render it. If the render is successful, a new window will pop out displaying the rendered 3d model. User can also rotate the 3d model by mouse dragging.
Python 3.8.16
vedo
pyrender
-
Download and install Python 3.8.16 from https://www.python.org/downloads/release/python-3816/. By default, pip (a Python package installation tool) should also come with it.
-
Run the following commands:
pip install vedo
pip install pyrender
Above commands should install
vedo
andpyrender
to your Python environment. After that, you should be able to run the main demo.
- Register for a FREE account at echo3D.
- Upload any 3D models to the console. Currently, this Python demo only supports
obj
andglb
file format. - Copy your API key from the top of the console.
- Copy your security key by clicking the
Security
button from the left sidebar of the console.
-
Install all required packages and follow the Echo3D API instructions as described above.
-
Clone this repo.
-
Open a terminal and
cd
to this repo. Make sure that Python 3.8.16 is properly installed by running the commandpython --version
. You can also check ifvedo
andpyrender
are installed by running the commandpip list
. -
Run the command as follows:
python main.py [API_KEY] [SECURITY_KEY]
where
[API_KEY]
is your Echo3D API key from the top of the console, and[SECURITY_KEY]
is your security key by clicking theSecurity
button from the left sidebar of the console. -
A prompt showing a list of available 3d models will appear. Enter an integer number to choose which 3d model to retrieve and render.
-
A new window will pop up displaying the rendered model.