Loading custom objects? #8
-
I have an object .stl file which I have build using a 3D CAD software. Can that be imported into the scene? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I have implemented a class named TriangleMesh to load arbitrary .obj files as triangle meshes. So, first convert your .stl file to a .obj format. However, the rendering is quite slow because we need to loop for every triangle of the mesh, and Python loops are very slow. A bounding volume hierarchy acceleration structure could be implemented, but I think renders will still take a lot of time. If you want to render arbitrary triangle meshes, Python isn't the language to work with. An implementation in a compiled language like C++ should be needed for speed. |
Beta Was this translation helpful? Give feedback.
I have implemented a class named TriangleMesh to load arbitrary .obj files as triangle meshes. So, first convert your .stl file to a .obj format.
However, the rendering is quite slow because we need to loop for every triangle of the mesh, and Python loops are very slow. A bounding volume hierarchy acceleration structure could be implemented, but I think renders will still take a lot of time.
If you want to render arbitrary triangle meshes, Python isn't the language to work with. An implementation in a compiled language like C++ should be needed for speed.