I'm starting this post so that anyone else wondering this may find it easily. As I searched for about 20 min with no luck on how this is done in unity. and obviously I've seen the Turn mesh rendering on/off at certain distances, but I want to know what the most efficient way of doing that.
I have 2 - 3 models per object. I'm no coder so making them blend together is not exactly something I can just pull from nowhere.
here's the model breakdown
Full Detail (Usually one or two Textures)
Medium Detail (Usually one Texture, and only used on a few higher poly models (Like a few buildings))
Billboard (Yes i made a billboard for most objects, one tex for them as well)
here's how they are structured
Main object IS the high poly
then has sub-objects for the lower variants.
please tell me the most efficient way to make them change, and the best way to calculate a players distance from them.
Using Vector3.Distance should be efficient enough.... but if it's not you can use OcclusionArea's to determine which objects are visible or
check renderer.isVisible to determine if the object is actually visible first.
I forgot to mention I'm using Unity Basic. So if that helps, Also an example please? here's how I thought to handle it.
Make 2 Scripts and attach them to the player.
The first script would be to handle large structures with 3 LODs and with a higher distance.
and it would find them using a Tag called LODHigh
And the second, would handle ones with only 2 LODs for smaller objects.
and they would be defined using a Tag LODLow
I'm new to java and Unity, which is why I purposely chose a project that would require very little code. So an example of what I described would be much appreciated . or an alternative .
I think the second would be easier to learn but the first one is better for your workflow.