Download

Can Foliage be lit only via direct lighting and the indirect lighting cache?

Hey guys,

I am trying to make a high quality architectural visualization with also some kind of explorable environment around the building. So I definitely need Lightmass for high quality lighting for the building, but so far I am really struggling to get it to work for the outside. I constantly go out of memory while trying to bake foliage with 16GB Ram, but I also cant get rid of lightmass if I want to achieve foto real interior lighting.

I tried combining static lighting with dynamic distance field lighting, but as soon as you switch the skylight to movable to shadow the grass and trees with DFAO, all baked lighting disappears.

So I wanted to try to basically tell foliage to not use lightmass, bake everything and have a lightmass importance volume that generates indirect lighting samples. Now I am kinda stuck with telling foliage to be lit by the indirect lighting samples, since you cant set an objects mobility settings in the static mesh viewer nor the foliage tool.

Does anybody have some ideas for this or tips for improving lightmass baking performance for high quality stuff that also uses landscape and foliage? :slight_smile:

Thanks a lot and cheers!

I am just continueing to test and I am starting to wonder: Is foliage even “properly” supported by lightmass? I mean if I think about it, it doesnt make sense that it works at all. A complex tree need at least a lightmap rez of 256 pixels. That adds up enormously if I have…lets say 500 Trees. And I am not even talking about grass here. The foliage tool suggest a lightmap rez of 8 for the trees and grass, but when I try that with one tree…of course half of it is black. And besides that, not even that is guaranteing that I can finish the bake.

Besides that, I constantly get this warning in the lighting Results which I dont understand:
03.JPG

If I click on the foliage so the instanced foliage actor 1 is selected, there are no options to change its lightmap size. And I also did not find a way to set the number of instances per component.

I have to say I am a bit hanging in mid air right now as it feels like this basically cant work at all. Does anybody have more experience with Lightmass and Foliage to help me out a bit?
Oh an small update while writing this post, I basically only enabled the grass for lightmass in the build I had running. It was set to use 8 pixel lightmap so I dont get the memory crash and of course what happens is this:
04.JPG

So yeah…hopefully somebody can help me out with this as I feel like I am stuck.

Thanks a lot and cheers!

What happens if you disable static shadows for foliage instances? Then have 2 skylights, one static one movable and activate/deactivate them when you are inside or outside. It will give you an error about 2 skylights in the same level when you build the lights but it will work. I would like to do more tests with DFAO but i dont have a dx11 gpu anymore so this is more like a theory. :\

Hmmm…the problem is you would a) get light popping and b) I cant seperate the interior like that from the exterior. Its supposed to be a modern architecture winery. So it will be something that has a lot of open spaces that blend into the environment.

So you will constantly be able to see the interior from outside as well as the exterior from the inside. Honestly, the ideal solution would be if the lightmass data would still be visible after switching the skylight to movable! Then I could deactivate the distance fields for all parts of the building, have the directional light and the skylight as stationary and foliage flagged as not to be considered for static lighting. Then I would bake everything, and after I have baked the lighting, I would just switch all lights back to be movable. Then all foliage would use DFAO and all other meshes would be lit via lightmass. That sounds like the perfect marriage for architectureal visualization that combines indoor and outdoor areas.

I mean…I think it could still work with lightmass only, but seriously…I dont have the money laying around to upgrade my Ram to …I dont know…64GB to make the baking work. I think thats something Epic has to tackle. Honestly, I think its kinda bad that you need more than 16GB Ram to build lighting for a bit of foliage…thats quite…meh. I think Lightmass building should be better optimized. But then again…what do I know, I am not a programmer :smiley: Its just a bit frustrating since this is for a contest and I dont want to waste my time with stupid **** like that^^

But thanks for your suggestion. Oh btw…the last time I tried having two skylights, I didnt get any errors, but only the one that I dragged in last was working. So there is definitely some weird behavior as well.

Cheers!

Hi There Daedalus51. It’s been a while since you have posted this, but I now find myself in a similar situation using started using Unreal Engine about 2 months ago. I’m using v 4.24.3.
so similar to what you mention in your post I am trying to achieve a photorealistic interior which I am happy with using a skylight with HDRI and keeping the directional light switched off entirely… using GPU lightmass for this to get it done quicker…
But now I want to incorporate a yard outside to walk around in and am facing challenges.
Basically I can add foliage and then bake it inside the lightmass importance volume, but immediately I get warnings about the lightmass resolution for staticfoliageactor being large and that I should reduce either quality or quantity…
Foliage from both megascans and Dviz to make comparisons…

One thing I am thinking of trying next is to bake the lighting without any foliage in the scene using static skylight for the interior, then once done, adding the foliage after and switching on a ‘moveable’ directional lights to get the foliage to look acceptable and then hopefully keep the quality of the interior… Any thoughts or suggestions? Would be highly appreciated;)