Can I do instances scattered on surface with a LOD switching through geometry nodes?

I mean an instance on point switching to another decimated model once it’s far enough from a camera? Have anyone tried to do it with geometry nodes for Evee render?

Yes, this is doable - Instance on Points has the “Instance Index” input socket… You should be able to use the camera position and instance position to determine the distance to the camera of the instance and then map that to an instance index.

e.g.:


… here the collection has 3 instances going from lowest LOD to highest.

Good luck!

5 Likes

Thank you very much zeroskilz . It works somehow. Really like how simple end elegant the solution is.

I am having one issue although. How can I do lods for collection of items? I mean not a collection as lod1,2,3, of same item but rather a collection of items each having its own lod1,2,3 etc ?

Still just index math:


… same as before, just needs to take into account how many collections you are using.

What GN is missing are nodes to deal with nested collections… If you had a collection which contained all those collections, choosing Separate Children would just split out the collections which will each be treated as a single instance, which isn’t very helpful in this type of situation…
There’s currently no way to do a recursive separation of children that I know of.

Good luck.

4 Likes

Thank you very much zeroskils. it took me couple days to finally figure out your node setup . At least I hope so :slight_smile: I see what numbers I should multiply on and what map range I have to set to get desirable objects order.

Still deep down I am not sure I understand well enough this index calculation. By multiplying randomly we give few objects same index as in different collection and thus make them appear together in same order set by the map range node? Am I right?

I also wonder if we could set an index value to certain object , change its order in the list somehow?

Kinda… Use the spreadsheet to figure out what’s going on.
Collection 0 is instance index 0,1 and 2… collection 1 is instance 3,4 and 5… collection 2 is instance 6,7 and 8.
So, Random integer selects the collection - multiply by number of LOD objects per collection to get to the correct 1st instance index… range calculation then just offsets to the correct LOD index.

Good luck!

1 Like

thanks again zeroskilz.

And I figured out how to change an object original index . By just giving a proper corresponding number for the object name :grinning: