I’ve been working on an large scale world for my survival game Atajrubah. I’ve been using it thus far with no issue. The result it produces when it works well speaks for itself.
Lately though I’ve come across a strange bug when painting foliage meshes onto my landscape .I’m using only dynamic lights and rebuilding the lighting seems to help but breaks soon after navigating to a new area.
I’ve got quite a lot of foliage geometry painted but I also have LOD and Culling setup. I’m using 4.1.1 built from source , any help that can be offered would be greatly appreciated.
Hey MrNexy -
What does the material setup that your foliage is using look like? Often light flares like you are showing in your screenshot can be caused by high values in Metallic or lower values in Roughness. That may not be the case here but if you post a screenshot that will give us a place to start.
Hey there Eric Sure thing,
This is the material setup that I’m using at the moment for the shrubs. I was using a separate alpha texture before. I changed it to instead use the alpha channel from the color map instead. It seems to have fixed the issue to a degree within the editor but once I run it everything is blinding hehehe
I haven’t been using roughness or metallic with the foliage meshes , straight forward diff,col and normal (with opacity mask where needed). I’m eager to see where this goes
Hi MrNexy -
The Physically Based Material does like to have default values for metallic and roughness, so into Metallic plug a Constant 0 and into Roughness plug a constant 1. See if this happens to solve the problem. Also the glowing blue foliage you showed in your screenshot is that intentional or was that an error? It sort of looks like a Scifi Alien landscape so I think I originally took this as an intentional element but I wanted to check.
Let me know -
Thanks for getting back to me on that. I will give it try once I’ve re-compiled my shaders. I must be doing something that the engine doesn’t like, it seems that one of my shaders is failing to load or corrupted because my skylight is now broken yet at the same time I’m not getting the glowing issue.
The blue glowing is definitely an error hahaha I’m building a desert environment
We are having a very similar issue (pretty much identical), that happens seemingly randomly. We tried setting the constants as you suggested for all of our materials, but the issue is still happening. Any other ideas?
Hey MrNexy and KP -
Would one of you be willing to share your foliage mesh asset and textures for testing? I have been trying to reproduce here but as of yet have not been able to get the same error.
Also are you both using the landscape tool?
AND finally, for your foliage meshes can you post a screenshot of yout texture and lightmap UV unwraps?
Thank You. Still working on getting it to happen consistently. Could I possibly get the normal for the grass as well.
Thanks Eric. I believe that there is a normal map included if I’m not mistaken
Nope, Normal Map is an empty directory
I don’t know if this is the case for MrNexy, but I saw that you said you are trying to get it to happen consistently, so I’m assuming you’ve got it to happen at least once. Again I don’t know if this is true for MrNexy, but in our case, it doesn’t happen every time and occurs rather randomly going in and out of play mode.
Hopefully that’s helpful in some way.
It was the same on my end at first , then it became far more persistent.
Does the artifact go away when you set the ‘r.Cache.LightingCacheDimension’ console variable to 128? There’s a bug with many (>1728) movable components right now that will cause this. Instanced foliage currently does not support lightmaps correctly which are used when the components have static mobility, so both routes are a bit broken.
This sounds promising. Where would one go about setting that?
I started up the editor and entered this into the console once I played the game from inside the editor but no luck. Is there an INI file that I can add this to that gets called when the editor starts up ? Sorry for the slow reply.I wanted to double check everything before I said anything.
One thing that I have noticed however, if I start the game in an area with very few foliage meshes then everything seems to work fine when I navigate to an area with a higher density. I wouldn’t imagine that this is terribly high on your list of bugs to work on but would you venture a guess as to weather this may be improved upon in future updates ?
Yeah sorry I forgot that’s one of the console variables that can’t be changed at runtime, and console variables you enter in the console don’t get saved. You can add it to Engine/Config/consolevariables.ini for a quick test.
We certainly want to fix it, I’m just not sure when we will get a chance. Hopefully in 4.4.
No worries DanielW , thanks for getting back to us on that one. I’ve made some adjustments and the issue seems to have been resolved. I shall add the line you suggested to consolevariables.ini to be on the safe side.
care to share how did you solve it mate? I’m having the exactly same issue! I don’t know what else to do.