Im trying to create a big scene in max using the osg helpers and i found out that managing some of them are a bit tedious. In concrete, im trying to use LODs for some geometry that is very used (trees and so), and when i clone the object as an 'instance' the references to the geometries in the cloned lods are not instanced (still points to the original object), so i have to manually instance each object and replace the LODs parameters. I also tried to code this behaviour in the plugin, but my max skd knowlendge is not that good. Is there any way to implement this? It would be very usefull for instancing lots of LODs and changing properties like distances for all of them. The exported file size would also be smaller as they are all instances...
Several months ago I've faced the same issue. The current instancing OSG_LOD method doesn't work the way I wanted.
I’ve tried your “manually approach” but by scripting. The problem was that MAX script wasn’t able to recognize the OSG_HELPER (OSG_GROUP, OSG_LOD, etc.) class. I remember I received an unknown class error so I couldn't access the LOD children.
Perhaps someone has found a work around to this problem…
These posts are pretty old, but I wanted to say I've submitted some code to work around the problems you were having.
My code was accepted and commited in revisions 178 & 179, but it has not made it's way into a release version of the installer yet (as of 0.99). I'm assuming it will be in the next one.
Anyway, the way to get properly instanced nodes with this code is to:
Create the group of geometry that you want to use as each LOD node, and a helper that references each of these nodes.
You will then package those into a 3DS MAX group (and you'll probably want to close the group once you've got them arranged exactly how you want, so you don't move them accidentally relative to each other.
You can now clone-instance the group as much as you like and it should behave as a normal instance would within MAX.
Just putting this here for reference if anyone else stumbles upon this problem.
Log in to post a comment.