Stride Forums Archive

Code-generated models in editor

3 posts, 1911 views, 2015-08-25 to 2015-08-26

Mylan719 2015-08-25 #1

Hello,
I am just trying out paradox engine, I have read few samples and tried to google the answer but I cant find anything so:
I want to try some generating alogorithms based on L-systems. That means I have to generate 3d model from code.
What I tried so far was I made script for entity and I added the model from the code.
Next thing I tried was overloading the LoadContent function of Game class.
That worked, but I would like to know if there is a way to add code-generated entity to the scene, so that it will be visible from paradox 3d editor.

Toaster 2015-08-25 #2

Currently I don’t think this is possible. You might be able to use a script attached to an empty entity. Then when the script initializes generate the mesh for the entity, but I don’t think the paradox editor runs scripts.

xen2 (Virgile) 2015-08-26 #3 in reply to #1

You might want to check the code for “ProceduralModelAsset”.
It is a good example of how we could create a specific asset that generates a runtime Model at compile time.