it would be cool if there was a way for the engine to know what shadows are overlapping and disable smaller shadows, or to disable shadows on objects that are fully inside the cast shadow of another object
I definitely agree! My mind goes to blueprints, or procedural asset creation whether that's in Houdini or in engine. Assigning some attribute based on bounding box and current sun or light position, and if said object has this attribute that meets the requirements it disables cast shadows. Something along those lines anyways.
you can fix the thinning by multiplying your opacity mask by a float parameter (~1.5-2) and then using a saturate node. if this makes things too thick for your liking in the foreground, lerp the opacity mask multiplication parameter with a smaller one, using the result of a camera distance mask as the lerp alpha. this makes my trees a consistent thickness at all distances, and it's super cheap. once you have that camera distance mask you can do other cool things like lerp wind strength or desaturate in the distance.
I didn't try them with the newest trees from Megascans, but I did get good results using .st export from SpeedTree, with the "Best" preset, adjusted a bit.
This may have changed, but I believe you can set something like this in the console, for LOD. r.ForceLOD and then your desired LOD. Also probably worth noting you could set a low poly fallback mesh with setting the nanite settings
Heya, ty for the nanite foliage demonstration! It seems that many people, including myself, get way less FPS with nanite foliage meshes enabled than disabled. My landscape foliage grass node with nanite enabled foliage mesh gives me 15fps and 70fps without! Same with static meshes. A scene with 500 barrels, with nanite at 45fps, without at 97fps... What's going on with it? Any thoughts? Ty again!
Absolutely, my pleasure! And it seems that when certain shaders are used that rely on opacity / transparency, there's a performance hit when using Nanite. I've been doing some comparisons, and that's usually the biggest factor + making sure virtual shadows are being utilized. Still digging into more of this, i'll keep you posted / do more videos on similar topics.
@@KingdomCrafter Tyvm for the info! It's a bit disappointing that nanite is not performing a little more 'out of the box'. As for the opacity, I'm not sure because those barrels have 0% opacity. Basically, any mesh I use with nanite performs worse that using it without! LOL To me it seems that just enabling nanite drops alot the FPS, after that maybe adding meshes does not but then, you are already lower on fps than using your meshes without nanite at all. Will wait for more related videos. Be well!
Depending on the wind shader, there have been some logic issues. If SpeedTree or similar, there should be a world position transform node in the shader graph, changing this to what I think is particle space should fix it. This is off memory though, so I may not be exact.
Hi! When I click on "Bulk Edit via Property Matrix" my screen only shows in blank, it's like is not even loading the edit options, do you have a tip for this? I waited 5 mins and still nothing...
Hmm that's interesting. For testing purposes, have you tried on just bulk editing a small amount of assets, like 2? If this doesn't work, there's also opening the bulk edit window. Go to Window, and make sure Grid & Display are selected. If that doesn't work, maybe checking for updates and restarting may resolve it. Let me know!
Thanks for the awesome video. Please know I am looking for solutions not trying to be a nuisance. BUT, I have had extreme problems with nanite foliage. I am working on large vista and I need to crank the density super high that you can't see the ground. Think wheat fields. When I do that my system, wich is completely overbuilt, runs out of all the rams. Also at a distance the nanite foliage is popping out of existence since distance fade amterial node no longer works. Also in 5.1 I can't appear to control the distance at wich the foliage disappears so its trying to render several million chunks of grass. In any even, if you happen to figure out how to render a dense wheat fields into the distance a guide video would be massively appreciated.
I think at the moment Nanite doesn't work with Landscapes, but I know for sure they are working on that and have plans to implement it probably with the next major patch (patch 5.2) in another 5-7 months or so...
@@chadtheall682 You can currently convert landscapes to Nanite, but it's easy to quickly run out of memory and crash. Yeah definitely looking forward to their next iteration!
hey i hear for nanite must up your performance but som reason when i enable nanite my performance drop twice idk why but with out nanite my fps is higher than with nanite maybe here need do somthing i dont know any idea?
I'll have to look more into it, but I was noticing that nanite triangles being generated, especially with low poly foliage, could end up making a lot more geometry. And even with the performance aspects of Nanite, it's possible in some of these cases it's a performance hit. My workflow will still involve using LOD's / imposters far from camera for games.
ive been using foliage and nanite for a while, didnt notice anything strange, it all worked as i expected, but then i checked my log, and i got this error LogStaticMesh: Warning: Invalid material [null] used on Nanite static mesh [S_AssetName...... has anyone had this before?
If it ever happens I double check my foliage assets to make sure they are not being filtered out by something. Such as not spawning on a certain material / angle.
@@KingdomCrafter thats what i was thinking ...I might been spawning them on rock instead of landscape....foilage doesnt like mixing LODs either...Thanks for the Response
I have face issues of flicker . can you help me if i am off (hardware ray trace) this can be solved .but it lose depth of grass shadow .you know about something
@@mudlamp3dvisualizationstudio There are a possible few solutions, i'd recommend checking out this link docs.unrealengine.com/5.0/en-US/virtual-shadow-maps-in-unreal-engine/
I feel like my 2070super wirh 16gb ram..just isnt enough to use unreal 5.1. All my suggested options begin around 5000$. Guess i will save for awhile. Been looking for a way to use it but even when i use it in low settings i keep getting mem usage 160% over memory available warnings and lag in the editor. If i build an area too detailed itll error out...crash the editor. Maybe im just too noob to try.
No viewer of my channel is too noob! I would start with everything being a 1k resolution texture or less, and instance as much as possible, reusing assets where you can, disable dynamic shadows where possible and use virtual shadow maps for nanite meshes. And if it's running fine, slowly up the quality where you want and see how it does.
This is a good showcase of why nanite really isn't a out of the box magic wand for game development. No game script, no animation, no effects, no physics objects, just foliage and lighting is not much room for more if we want to push for smooth gameplay with a stable low above 60. From my personal experience in 5.1 i struggle to find an instance where it is reasonable for my 3060TI where nanite excel the old way of foliage until you reach a point where 3060TI will give up and throw D3D removed at you, Nanite masked foliage isn't game changing but i think nanite mesh foliage is. Thus, two pipeline's foliage workflow isn't really cross compatible.
Spot on! As we work on games making sure we balance and compromise where needed, making sure it's a balanced experienced on all fronts is so important. It's fitting you brought up nanite mesh foliage, i've been putting together various methods on tackling this, mainly leveraging GrowFX in 3ds Max. The issue you may run into is in very high-density conifers, or where other overdraw situations may occur + making sure wind shaders are still cheap enough with the new mesh density.
Yeah it can now actually and seems to perform pretty well. If you're using Speedtree, I recommend exporting as st, and not st9. Since it was giving slightly odd results.
@@KingdomCrafter That'd be great. I just looked it up again and it's Nanite foliage having issues with world position offset enabled and VSM shadows. Gets very expensive with moving shadows, and i believe it uses lod0 for the shadows as well. Someone made a plugin for it to replace trees with imposters for shadows only. Hoping that's not necessary anymore in 5.3 to have acceptable performance. I recently got into UE 5 and was disappointed i had terrible fps in even a very small forest scene.
This is great to know ty for the info. Yeah let's hope it's not necessary, if it is we could cover a topic such as using PCG to create optimized forest scenes @@null643
I'm highly suggesting you to use contact shadows for grass and small debris. VSM in ue5 is pretty expensive, while contact shadows is a screen space effect with nearly constant(and rather small) cost, and they will look sharper than event that smallest cascade of shadowmaps.
I have tested nanite on dozens of different foliage assets and with every single one I get worse performance. It’s great if you want to use insanely detailed models, but nanite foliage is def not game ready. Make a small quarter km forest and you quickly see your limits.
@@KingdomCrafter Are you sure that LOD and Nanite can be enabled at the same time? I have that setup and currently the LODs (which have shadows turned off and a different material) are not switching.
@@tomsandersboxtelOfficial from Epic : Don't use conventional meshes at all, only use conventional meshes if theres no other way around it, don't mix and match nanite and conventional with lods. Renderping pipeline will mess up completely and you will loose more frames than just using one of them, even normal LODs.
i thought the whole nanite stuff was a big deal so i switched from unity to unreal and now I'm literally placing 30 trees on my map and have like 30 fps xD
Haha there are definitely some things to keep in mind with it. If it's animating, keeping a reasonable polycount is a good idea (doing a video on this soon). Also, alpha from opacity if using any cards can impact this.
@@KingdomCrafter I used some of those Megascans trees cause I thought nanite would scale everything down to its needs. Turns out its not that easy :) anyways I tried it today with a couple of selfmade TreeIt trees and they where pretty performant. But I'm definitely looking forward to your video(s) as I'm just starting out with unreal :)
@@sascha1461 Awesome! Yeah those trees can be pretty insane, glad to hear your custom ones held up really well! And much appreciated, more coming soon!
I have a dedicated mic, but yeah, I agree. I'm working on getting a screen to block the mirror of the closet. Unfortunately, with my desk size and office layout it's just what it is for the time being.
Hey, do you know how to solve the problem - when I enable nanite and choose "preserve area" to preserve leaves from dissapearing at distance, my tree becomes much brighter then without this option. Like it's losing some of its shadows.
it would be cool if there was a way for the engine to know what shadows are overlapping and disable smaller shadows, or to disable shadows on objects that are fully inside the cast shadow of another object
I definitely agree! My mind goes to blueprints, or procedural asset creation whether that's in Houdini or in engine. Assigning some attribute based on bounding box and current sun or light position, and if said object has this attribute that meets the requirements it disables cast shadows. Something along those lines anyways.
you can fix the thinning by multiplying your opacity mask by a float parameter (~1.5-2) and then using a saturate node. if this makes things too thick for your liking in the foreground, lerp the opacity mask multiplication parameter with a smaller one, using the result of a camera distance mask as the lerp alpha. this makes my trees a consistent thickness at all distances, and it's super cheap. once you have that camera distance mask you can do other cool things like lerp wind strength or desaturate in the distance.
Thanks dude, u saved my life.
Do you by any chance have an image of your node tree, I’m new to unreal and could use this help
Thank you, sir!
Really liked the multiple nanite tip
Gaea Tutorial would be excellent!!! Thanks for this tutorial!
Glad you brought that up, currently getting one together!
VERY helpful!
Glad it was!
Did you try this with wind enable for the nanite trees. I am getting very low fps when using with the newly released megascans trees.
I didn't try them with the newest trees from Megascans, but I did get good results using .st export from SpeedTree, with the "Best" preset, adjusted a bit.
What are the console commands to reduce the leaves or to remove them for performance?
This may have changed, but I believe you can set something like this in the console, for LOD.
r.ForceLOD and then your desired LOD.
Also probably worth noting you could set a low poly fallback mesh with setting the nanite settings
Heya, ty for the nanite foliage demonstration!
It seems that many people, including myself, get way less FPS with nanite foliage meshes enabled than disabled.
My landscape foliage grass node with nanite enabled foliage mesh gives me 15fps and 70fps without!
Same with static meshes. A scene with 500 barrels, with nanite at 45fps, without at 97fps...
What's going on with it? Any thoughts?
Ty again!
Absolutely, my pleasure! And it seems that when certain shaders are used that rely on opacity / transparency, there's a performance hit when using Nanite. I've been doing some comparisons, and that's usually the biggest factor + making sure virtual shadows are being utilized. Still digging into more of this, i'll keep you posted / do more videos on similar topics.
@@KingdomCrafter Tyvm for the info! It's a bit disappointing that nanite is not performing a little more 'out of the box'. As for the opacity, I'm not sure because those barrels have 0% opacity. Basically, any mesh I use with nanite performs worse that using it without! LOL To me it seems that just enabling nanite drops alot the FPS, after that maybe adding meshes does not but then, you are already lower on fps than using your meshes without nanite at all. Will wait for more related videos. Be well!
Hey bud, any clue why my trees float up and down when enabling nanite? Seem like wind is affecting the position somehow. But how?
Depending on the wind shader, there have been some logic issues. If SpeedTree or similar, there should be a world position transform node in the shader graph, changing this to what I think is particle space should fix it. This is off memory though, so I may not be exact.
Hi! When I click on "Bulk Edit via Property Matrix" my screen only shows in blank, it's like is not even loading the edit options, do you have a tip for this? I waited 5 mins and still nothing...
Hmm that's interesting. For testing purposes, have you tried on just bulk editing a small amount of assets, like 2? If this doesn't work, there's also opening the bulk edit window. Go to Window, and make sure Grid & Display are selected. If that doesn't work, maybe checking for updates and restarting may resolve it. Let me know!
Thanks for the awesome video. Please know I am looking for solutions not trying to be a nuisance. BUT, I have had extreme problems with nanite foliage. I am working on large vista and I need to crank the density super high that you can't see the ground. Think wheat fields. When I do that my system, wich is completely overbuilt, runs out of all the rams. Also at a distance the nanite foliage is popping out of existence since distance fade amterial node no longer works. Also in 5.1 I can't appear to control the distance at wich the foliage disappears so its trying to render several million chunks of grass. In any even, if you happen to figure out how to render a dense wheat fields into the distance a guide video would be massively appreciated.
Hmm, i'll need to think about this one. I'll get back to you soon
I am I. The same situation. I can't figure it out either 😱
hi! have you solved this problem?
have you thought about nanite landscapes?
Absolutely, something i'll be planning a video on here soon
I think at the moment Nanite doesn't work with Landscapes, but I know for sure they are working on that and have plans to implement it probably with the next major patch (patch 5.2) in another 5-7 months or so...
@@chadtheall682 You can currently convert landscapes to Nanite, but it's easy to quickly run out of memory and crash. Yeah definitely looking forward to their next iteration!
hey i hear for nanite must up your performance but som reason when i enable nanite my performance drop twice idk why but with out nanite my fps is higher than with nanite maybe here need do somthing i dont know any idea?
I'll have to look more into it, but I was noticing that nanite triangles being generated, especially with low poly foliage, could end up making a lot more geometry. And even with the performance aspects of Nanite, it's possible in some of these cases it's a performance hit.
My workflow will still involve using LOD's / imposters far from camera for games.
You explain it in a didactic and simple way. Thank you so much for sharing it 🏆
ive been using foliage and nanite for a while, didnt notice anything strange, it all worked as i expected, but then i checked my log, and i got this error
LogStaticMesh: Warning: Invalid material [null] used on Nanite static mesh [S_AssetName......
has anyone had this before?
Do you mind sending me a DM on Discord with the error and shader you're using for the nanite mesh? The link is on the channel.
Have you ever have the foilage brush stop working?
If it ever happens I double check my foliage assets to make sure they are not being filtered out by something. Such as not spawning on a certain material / angle.
@@KingdomCrafter thats what i was thinking ...I might been spawning them on rock instead of landscape....foilage doesnt like mixing LODs either...Thanks for the Response
awesome!
Thank you!
I have face issues of flicker . can you help me if i am off (hardware ray trace) this can be solved .but it lose depth of grass shadow .you know about something
Make sure to check that the grass has preserve area enabled, and maybe scale it up slightly
@EthanOlsonArts Its enable. i tried everything and cunsult everyone but not solved yet . please help me if you know that
@@mudlamp3dvisualizationstudio There are a possible few solutions, i'd recommend checking out this link docs.unrealengine.com/5.0/en-US/virtual-shadow-maps-in-unreal-engine/
I feel like my 2070super wirh 16gb ram..just isnt enough to use unreal 5.1. All my suggested options begin around 5000$. Guess i will save for awhile. Been looking for a way to use it but even when i use it in low settings i keep getting mem usage 160% over memory available warnings and lag in the editor. If i build an area too detailed itll error out...crash the editor.
Maybe im just too noob to try.
No viewer of my channel is too noob! I would start with everything being a 1k resolution texture or less, and instance as much as possible, reusing assets where you can, disable dynamic shadows where possible and use virtual shadow maps for nanite meshes. And if it's running fine, slowly up the quality where you want and see how it does.
@@KingdomCrafter alright ill give it another shot. Thx for the vote of confidence
This is a good showcase of why nanite really isn't a out of the box magic wand for game development. No game script, no animation, no effects, no physics objects, just foliage and lighting is not much room for more if we want to push for smooth gameplay with a stable low above 60. From my personal experience in 5.1 i struggle to find an instance where it is reasonable for my 3060TI where nanite excel the old way of foliage until you reach a point where 3060TI will give up and throw D3D removed at you, Nanite masked foliage isn't game changing but i think nanite mesh foliage is. Thus, two pipeline's foliage workflow isn't really cross compatible.
Spot on! As we work on games making sure we balance and compromise where needed, making sure it's a balanced experienced on all fronts is so important. It's fitting you brought up nanite mesh foliage, i've been putting together various methods on tackling this, mainly leveraging GrowFX in 3ds Max. The issue you may run into is in very high-density conifers, or where other overdraw situations may occur + making sure wind shaders are still cheap enough with the new mesh density.
Can nanite foliage move in wind?
Yeah it can now actually and seems to perform pretty well. If you're using Speedtree, I recommend exporting as st, and not st9. Since it was giving slightly odd results.
yes @cgp
Do you use lumen? Shadows from trees look a bit to dense, not soft
Yeah I did. The shadows were "harder" due to a low skylight intensity, to add more drama. Contrast between directionally lit areas and not
does this only work with the recent update?
Yeah to use nanite for your foliage properly, you'll need 5.1
@@KingdomCrafter thanks
Hi - looks good - FPS performance is not that important to me - have you tried rendering a sequence in 4K with MovieRenderQueue?
Hey thank you, and yeah, I have. Overall, it's pretty solid. Still probably worth keeping Virtual Shadows off when doing so to avoid any flickering.
Feels like you can make a whole feature film inside Unreal Engine.
It's definitely at that point now
I face 50% fps drop with nanite foliage, 35fps to 13, the lods work better but nanite suppose to boost performance not lowering
Yeah a huge part of this may be overdraw and shadow computation. I noticed ue5.3 is getting us closer to more optimized foliage workflows
There's a bug with nanite and shadows which is supposesdly fixed in 5.3, but I've yet to try it myself to see if it's actually fixed.
@@null643 Definitely something i'm checking out, will drop a vid soon
@@KingdomCrafter That'd be great. I just looked it up again and it's Nanite foliage having issues with world position offset enabled and VSM shadows. Gets very expensive with moving shadows, and i believe it uses lod0 for the shadows as well. Someone made a plugin for it to replace trees with imposters for shadows only. Hoping that's not necessary anymore in 5.3 to have acceptable performance. I recently got into UE 5 and was disappointed i had terrible fps in even a very small forest scene.
This is great to know ty for the info. Yeah let's hope it's not necessary, if it is we could cover a topic such as using PCG to create optimized forest scenes @@null643
ue5.1 is the real deal
They just keep on upping their game 💯
I'm highly suggesting you to use contact shadows for grass and small debris. VSM in ue5 is pretty expensive, while contact shadows is a screen space effect with nearly constant(and rather small) cost, and they will look sharper than event that smallest cascade of shadowmaps.
I agree, exactly why I covered what I did with disabling dynamic shadows for grass. It depends on the scene / goals
what are your specs?
i have the same question
I do have a pretty beefy system with a 3090. The biggest performance hit was definitely shadows
I have tested nanite on dozens of different foliage assets and with every single one I get worse performance. It’s great if you want to use insanely detailed models, but nanite foliage is def not game ready. Make a small quarter km forest and you quickly see your limits.
It's definitely a balance. Using Nanite and LOD's is the way to go. Also approaching the initial asset creation with performance in mind.
@@KingdomCrafter Are you sure that LOD and Nanite can be enabled at the same time? I have that setup and currently the LODs (which have shadows turned off and a different material) are not switching.
@@tomsandersboxtel yeah you 100% can
@@tomsandersboxtelOfficial from Epic : Don't use conventional meshes at all, only use conventional meshes if theres no other way around it, don't mix and match nanite and conventional with lods. Renderping pipeline will mess up completely and you will loose more frames than just using one of them, even normal LODs.
i thought the whole nanite stuff was a big deal so i switched from unity to unreal and now I'm literally placing 30 trees on my map and have like 30 fps xD
Haha there are definitely some things to keep in mind with it. If it's animating, keeping a reasonable polycount is a good idea (doing a video on this soon). Also, alpha from opacity if using any cards can impact this.
@@KingdomCrafter I used some of those Megascans trees cause I thought nanite would scale everything down to its needs. Turns out its not that easy :) anyways I tried it today with a couple of selfmade TreeIt trees and they where pretty performant. But I'm definitely looking forward to your video(s) as I'm just starting out with unreal :)
@@sascha1461 Awesome! Yeah those trees can be pretty insane, glad to hear your custom ones held up really well! And much appreciated, more coming soon!
please get a dedicated microphone & cover up the mirror / lamp.
I have a dedicated mic, but yeah, I agree. I'm working on getting a screen to block the mirror of the closet. Unfortunately, with my desk size and office layout it's just what it is for the time being.
If you have problems with Foliage and Nanite going “crazy in the Z axis” i explain how to fix it with ease.
ruclips.net/video/wVMImHI24QI/видео.html
Hey, do you know how to solve the problem - when I enable nanite and choose "preserve area" to preserve leaves from dissapearing at distance, my tree becomes much brighter then without this option. Like it's losing some of its shadows.
Did you ever figure out this issue? Could be that virtual shadow maps were behaving odd / needing enabled?