I’m struggling to get the lightmaps for instanced foliage mesh LOD steps to render. I receive the same warning after building lighting as other developers have pointed out:
Landscape Instanced meshes don’t yet support unique static lighting for each LOD, lighting on LOD 1+ may be incorrect
Researching this lead me to experimenting with and ultimately rejecting the following approaches:
Dynamic lighting with ray traced soft shadows - I did not love the look and saw a major performance hit
No LODs on foliage - lights well but not performant
Create lightmaps that work well across all LOD steps - I haven’t been able to achieve this yet
This makes me think it’s worth adding this to the engine myself. However, I’m new to lightmapping so I’d like to know if this is a bad idea before I get into it. Creating more lightmaps would create a larger footprint for static lighting. Are there any other drawbacks to adding per-LOD render data such that unique lightmaps for LOD steps on instanced foliage meshes can be used?
Ok this is a very specific kind of foilage, due to your artstyle.
Not sure why these trees need LoDs at all, because they should be allready below the polycount most tree models have for their lowest LoD (excluding sprite card trees).
Here’s an example of what i would do, if LoDs were really neccessary:
For LoD0 to LoD1, i’d say there is not much change in shape, more like taking out an edge loop.
If you carefully planning this, you can make them use the same UV shape.
Starting at LoD1 for UV editing, then create LoD0 by using things like Knife tool that work non-destructive on the UV islands.
The low to high workflow ensures that the outer shape of the UV island remains the same.
For LoD2, since at some point you cannot prevent a change in shape anymore, i’d recomend using a different part on the same Lightmap UV space.
While you currently cannot make the LoDs using a completly different lightmap, you can make it’s UV island use a different space on the same Lightmap.
Ofc. in this example you could even try to fit the LoD0 and LoD1 to the LoD2 island shape, but at some point texture distortion wins.