I have a scene where rigid bodies are spawned one at a time; pushed and pulled by forces.
It’s too expensive for iPads, so I need to bake/export the results to a file for cheaper playback.
Because there are like 300 beads (the rigid bodies), the spawner is highly desirable. Having to place all 300 beads in a neat single file line prior to the animation starting, is not desirable at all.
i’d probably first try to record their positions and playback moving the transforms…
maybe particle system could be used also? how complicated those “paths” are? (could you show some gif?)
At present, no paths are used & no particles. The spheres are rigid bodies, moving through the tubes using manually placed push & pull forces, no splines. I understand this might not be the ideal method, but it works. The remaining issue is just performance for mobile.
just to post here also,
i’d probably try baking that anim in 3ds max, or saving as point cache file (there’s players for that in store and forum)
you could also try using object pooling, reduce physics quality settings, disable those objects that are already stuck,
maybe instead of huge meshcollider tube, try placing box colliders to block the walls… maybe even use different collision layers, so each layer has less objects to compare collisions with (not sure if that really help here though…)
*update,
if 3ds max not really working, then i’d try saving their positions into file that playback from there…
every frame save x,y,z and maybe rotation if needed… then just playback from that array.
or you could try export those positions for 3ds max,
create animation from those (using custom maxscript, if cannot find ready ones),
bake that movement into animation/pointcache in 3ds max…
Thank you for your input, but for the purpose of keeping this thread moving, I have to state that I’m not looking to redo the simulation in Max or Maya, I am only looking to bake/cache/export the realtime physics that are currently in the Unity scene now.
just to keep this updated : )
“In the 2017.1 comes a new editor feature: GameObjectRecorder. It allows to record any properties on a GameObject and its children.”