HLOD generate partial magenta/pink textures

Hello,

We are building HLODs of our large foliage meshes and struggle with certain part of our meshes that get generated with a magenta color. We have done extensive search and testing solution discussed both here on EPS and the public forums, but are unable to find a solution. See generated HLOD below.

[Image Removed]

What we have tried so far:

1) Make sure Light Map Coordinate Index is 0 on the StaticMesh

[Image Removed]

2) In the HLOD layer setting, disabled Reuse Mesh Lightmap UVs and enabled Group Identical Meshes for Baking

[Image Removed]

3) Set the Texture Sizing Type to Automatic – From Mesh Screen Size.

[Image Removed]

4) Ensured that there are no material differences between the correct built tree canopies and the faulty ones (they use the same master material).

5) We have disabled almost everything on the material settings tab in the HLOD layer to try to build out the most basic of material possible, yet we get this faulty texture.

[Image Removed]

Looking for support of how to resolve this issue.

Thanks

Fredrik

[Attachment Removed]

Hi Fredrik,

It looks like you’ve tried all of the common solutions which is great, that narrows things down.

It’s possible you are still running out of UV space. Could you try setting the Texture Sizing Type to Use TextureSize for all material properties, and inputting an extremely large texture size just to rule this out?

We have also seen some edge case interactions with HLODs and Virtual Textures. If you have VTs enabled in your project, could you test building the HLOD again with VTs disabled just to try rule this out?

Outside of those suggestions, you may need to share the problematic asset(s) for us to debug this further.

Thanks,

Hayden

[Attachment Removed]

Hi Hayden,

Thank you for your swift reply.

I tried bumping up the size to 4k. That seem to have solved the problem. However, a drawback to this setting is that all grids now generate a 4k texture regardless of the size of the grid content.

[Image Removed] Here in a small grid only containing 3 trees it generates a massive 4k texture. Preferably, a solution with dynamic texture size would be the best. I will continue to try different texture type settings to see which would suit our use case. Potentially, we might need to rethink and combine the different HLOD layers.

I was curious to why it was running out of UV space when the pink color is in fact part of the generated texture. Should be plenty of space to UV wrap or maybe I simply misunderstand how the HLOD generation works.

[Image Removed]Low res picture from an early HLOD generation

/Fredrik

[Attachment Removed]

Hi again Hayden,

I experimented a bit more with the different settings related to texture size. The “From Texel Density” option seem to work fairly good as it generates larger texture for larger grid content and smaller texture for smaller grid content. Downside is that it wants to push the large grids all the way up to 8k, however, might not be such a big issue if we can cap this with some scripting to like 2k.

I will look into a repro project. We are currently busy with a milestone so won’t really have time to look at this until next year. I think I can also try other things such as as temporary switching the material on the trees to a more basic version with just color. We have only had this issue on the trees, never on the terrain below.

Let’s keep the thread open and I’ll get back to you.

Thanks

Fredrik

Fredrik

[Attachment Removed]

Hi Fredrik,

It sounds like you have a couple of paths forward to experiment with.

I’ll keep this case open, looking forward to hearing your findings.

Thanks,

Hayden

[Attachment Removed]

Hi Fredrik,

Thanks for getting back to me with your results.

I absolutely agree, the high texture size is not a viable long term solution, but it does help identify the issue.

What’s probably happening is that the higher texture size is hiding a border smearing issue during HLOD generation. There could be any number of material and HLOD layer settings interactions that could be causing this issue.

What I think a good next step would be, is if you could send through a minimal repro project, probably just containing your foliage assets in a level with the HLOD layer asset, for me to debug further on my side.

Thanks,

Hayden

[Attachment Removed]