how to select stuff to flatten?

I am working on ways to speed up my UI. The thing i have way to many whingeing components. The slow down happens because i am using 150 geom nodes to display the UI and thats not including the scene!

I was thinking of some how collapsing many of the unchaining nodes together but the trick is that i already have a good nodePath hierarchy, i need to mark some staff that should not be flattened that changes every frame or changes at once with all the other stuff.

Is there a better way then just pick my geoms reparent them to a temp node flatten and then reparent it back and hide all the geoms i marked?

Try :

  1. create a NodePathCollection
  2. add up those nodes to the collection
  3. stash the collection
  4. flatten
  5. unstash the collection

I didn’t try it, but I hope flatten works only for unstashed nodes.

how about rigid body combiner… shouldnt it work fine in that case,too?

rbc is good to flatten geometry that would change its positions but this is not the case. I also dont want to change the nodepath structure.

The ModelNode was created for this purpose. ModelNodes will not be touched by the flatten operation, depending on the preserveTransform() flag you apply to them.

The nodes below a ModelNode may still be flattened with each other, though.

David

I should also add that flattenMedium() may also be your best choice here: it’s different from flattenStrong() in that it will not destroy the hierarchy. flattenMedium() will not combine sibling nodes together.

David