Skip to content
Discussion options

You must be logged in to vote

Hi

Currently, it is not possible to add a Mesh to a Scene once it has been loaded.

One nice workaround is, if you have your scene description in a Python dict, you can dynamically add your loaded mesh to the scene description and then load the scene. You can find an example here (last cell of the "Procedural mesh" section).

If you're dealing with a XML scene description, you can save your mesh to a PLY using Mesh.write_to_ply and then either add it to your XML file or you can read the contents of the XML file and edit the string to add your mesh and then use mitsuba.load_string.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@matthiasschwartz
Comment options

Answer selected by matthiasschwartz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants