YO @Deltakosh , @sebavan and @PirateJC
Hey guys, Does the then instances support LOD like regular instances do ?
No, a thin instance is really just a matrix that allows to draw a mesh at another location/with another rotation/scaling. To be fast, all the matrices are passed in a single draw call to the GPU and so no LOD is possible.
What if we do something like this? We can change the buffers.
For example, we have 4 buffers (for 4 LODs) and 4 meshes that correspond to each LOD.
And the buffers change depending on the user’s position. So the positions for creating instances change in the buffers at each step. And as a result, we have some kind of LOD analog for ThinInstances. Will this work?
I’m not sure how it would work when you have several instances at different depth that would need a different LOD each?
Not sure if I understand properly but i quess yes)
If we have 4 LODs levels for model we will have 4 buffers that are changes when we move by scene. If we close enough to instance we add placement of it in a buffer that are represents instances on LOD0 and remove the same placement from buffers for LOD1, LOD2, LOD3. And the same when we move further from instance
So, you will have to loop over all entries of the 4 buffers to calculate the distance between the instance and the camera, and decide to keep the instance in this buffer or move it to another buffer. I think it could work, but with more instances, the loops could become a bottleneck…
Yes. I agree. I think using chunking could be a solution for this bottleneck in case of thousands of instances. For sure it will not work for all cases. But for some of them approach could works pretty good