I'm using Blender to create m3g files and then I load them in a java program.
Which is the best way to find an object (a Mesh
) in the World
? (How should I "build" a world?)
Should I create separate classes for every object and then add them to one World
object or should I assign IDs to the objects in Blender and find them in the program by ID?
Or export every object to a separate M3G file?
(Or some other way?)
Q1. If you know the ID of the
Mesh
(MESH_ID
), then:Q2. Load a basic
World
:Then use the API to create and add more objects into the world The API documentation covers this in depth:
Q3. Assign them in Blender, then use the
find
method to get the exact instance ofObject3D
you need.Q4. If you plan on reusing meshes (for different applications), organize them into separate files, load them separately during initialization of an application, and then insert them into the world.