Realize instances in geometry nodes simulatuon

Hello!

Is it possible to realize instances after a geometry nodes simulation? I am doing basic scale and rotation animation and I want to export to a game engine with the animated instances.

Thanks for your time

Hello !
Yes you should be able to realize instances whenever you want in the tree, the simulation doesn’t make any differences.
Obviously you must make sure nothing is supposed to alter the instances after the realize, like rotate instances or scale instances nodes …

1 Like

Sorry my question wasn’t very clear. What i mean by realize instances is not the node. But I want to convert the simulation to separate instanced objects. With their animated transforms.
So that i can export them to a game engine in an fbx file, while still retaining the optimsation of instancing.

lol ok that’s much more clear indeed :slight_smile:
I don’t think it’s possible right away… I’m not even sure how to convert each frame of the simulation to it’s own object, even more keeping instances and such…

But, this seems reasonably doable with python if you are experienced with it…
The first thing I would do is to drop the instances and replace them with a face or a point with the rotation stored as an attribute, and eventually do the instancing shenanigans with python…

The remaining bits is how to convert the simulation, which could be just a matter of applying the modifier each needed frames…

That said, I recall an operator called Make instances real, which can convert particles in their own objects, it might be worth checking if you can export instances that way so it’s a bit simpler !

Good luck !

1 Like

I made a script. But it only works with object info node with instances checked on. Its also not the most efficient because it realizes the instance each frame. Instead of using a substitute object like a triangle. Anyway I used chatGPT to make so it is probably incredibly flawed but it works.
It only works with simulation nodes if you instance on points after the simulation.
So overall, it’s kind of limiting.

Here is the GPL free code on GitHub

1 Like

Cool, well done ! Obviously since this is pretty hackish having something that is clunky, un-optimized and case specific seems logical…

I’m sure it’s possible to make something better but this probably mean much more work and maybe it’s not worth it…

It’s true that exporting data out of GN was never discussed yet and it’s more about expanding the core functionalities for now. But it sound like a logical step we’ll be getting into eventually !

1 Like

yea it would be much easier to do if making instances real worked in geo nodes with all instances. Currently it only works with object info nodes. Which doesnt make sense as there are many forms of instances in geo nodes. But make instances real doesnt recognize these.

For a developer to implement doesnt theoretically sound too difficult. I am not a dev so I dont really know. But the information is there it just needs to be baked down properly.

I made report on it: https://projects.blender.org/blender/blender/issues/126406