StaticModelGroup question

Hi all,

Looking for more clarification towards the StaticModelGroup -
Am I able to effectively update the position of the node constantly with Rigidbodies?
Currently, when testing my project, I can display 1024 nodes as a test perfectly fine but when I give each of them a random linear velocity and set their mass to 1.0f, the performance tanks completely.

Am I wrong in thinking that SMG’s work like this? Are they designed to be static, or am I doing something wrong?

They are.
Just use StaticModel by default and don’t touch StaticModelGroup unless you really need it.

Gotcha.
Recommend any optimisation tips for ~1k moving objects? Would only updating the objects in the view be the way to go or is there something clever that I can do with Urho?

Are you talking about 1k simultaneously moving physical objects?

Yep, All going different directions, different speeds. Not much in terms of collision except 4 walls and a floor/ceiling.

1k of awake dynamic objects will always be relatively slow.
Physics calculations are quite complex on their own, so you will probably have bottleneck there and only tests on the target hardware could give you information.
Prefer simple dynamic shapes (spheres and cylinders are the best), don’t know other advices.

1 Like

Doesn’t the static in StaticModelGroup simply refer to them not being usable for AnimatedModel situations? I think the nodes can be transformed all you like.

They can.
It doesn’t mean that this is better or faster than simple separate nodes.

Yeah the StaticModelGroup will LOD as one big drawable, and receive light and cull as one big drawable, which will in some cases be exactly not what you want. It’s not worth using before you run into a severe rendering CPU bottleneck, and confirm it is the case.

2 Likes