Unreal Engine 5.1 - Nanite Foliage + Performance Tips

Поделиться
HTML-код
  • Опубликовано: 17 дек 2024

Комментарии • 89

  • @elliewylds7357
    @elliewylds7357 Год назад +8

    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

    • @KingdomCrafter
      @KingdomCrafter  Год назад +1

      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.

  • @Aethelvlad
    @Aethelvlad Год назад +18

    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.

    • @MarcioSilva-vf5wk
      @MarcioSilva-vf5wk Год назад

      Thanks dude, u saved my life.

    • @christianhiden137
      @christianhiden137 Год назад +1

      Do you by any chance have an image of your node tree, I’m new to unreal and could use this help

    • @TheUkuleleXD
      @TheUkuleleXD Год назад

      Thank you, sir!

  • @johnnybigg7772
    @johnnybigg7772 Год назад +2

    Really liked the multiple nanite tip

  • @corgilife241
    @corgilife241 Год назад +1

    Gaea Tutorial would be excellent!!! Thanks for this tutorial!

    • @KingdomCrafter
      @KingdomCrafter  Год назад

      Glad you brought that up, currently getting one together!

  • @Cakemagic1
    @Cakemagic1 Год назад +1

    VERY helpful!

  • @ripunjoyk1706
    @ripunjoyk1706 2 года назад +2

    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.

    • @KingdomCrafter
      @KingdomCrafter  2 года назад +2

      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.

  • @LastAustralianGamer
    @LastAustralianGamer 10 месяцев назад +1

    What are the console commands to reduce the leaves or to remove them for performance?

    • @KingdomCrafter
      @KingdomCrafter  10 месяцев назад

      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

  • @nikgiak2994
    @nikgiak2994 Год назад +2

    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!

    • @KingdomCrafter
      @KingdomCrafter  Год назад +1

      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.

    • @nikgiak2994
      @nikgiak2994 Год назад +2

      @@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!

  • @billysatkowski6938
    @billysatkowski6938 Год назад +1

    Hey bud, any clue why my trees float up and down when enabling nanite? Seem like wind is affecting the position somehow. But how?

    • @KingdomCrafter
      @KingdomCrafter  Год назад

      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.

  • @axelquesada3434
    @axelquesada3434 Год назад +1

    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...

    • @KingdomCrafter
      @KingdomCrafter  Год назад

      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!

  • @Silpheedx
    @Silpheedx 2 года назад +2

    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.

    • @KingdomCrafter
      @KingdomCrafter  2 года назад

      Hmm, i'll need to think about this one. I'll get back to you soon

    • @MrYipYep
      @MrYipYep 2 года назад +1

      I am I. The same situation. I can't figure it out either 😱

    • @riccardosantorsola5528
      @riccardosantorsola5528 Год назад

      hi! have you solved this problem?

  • @Decs_
    @Decs_ 2 года назад +2

    have you thought about nanite landscapes?

    • @KingdomCrafter
      @KingdomCrafter  2 года назад

      Absolutely, something i'll be planning a video on here soon

    • @chadtheall682
      @chadtheall682 Год назад +1

      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...

    • @KingdomCrafter
      @KingdomCrafter  Год назад

      @@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!

  • @letsplaysomthing3799
    @letsplaysomthing3799 2 года назад +1

    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?

    • @KingdomCrafter
      @KingdomCrafter  2 года назад

      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.

  • @XaviAndreu
    @XaviAndreu 2 года назад +1

    You explain it in a didactic and simple way. Thank you so much for sharing it 🏆

  • @carloscarrillo2813
    @carloscarrillo2813 Год назад +1

    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?

    • @KingdomCrafter
      @KingdomCrafter  Год назад

      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.

  • @paulfedor9828
    @paulfedor9828 Год назад +1

    Have you ever have the foilage brush stop working?

    • @KingdomCrafter
      @KingdomCrafter  Год назад

      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.

    • @paulfedor9828
      @paulfedor9828 Год назад +1

      @@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

  • @DGDesign
    @DGDesign 2 года назад +1

    awesome!

  • @mudlamp3dvisualizationstudio
    @mudlamp3dvisualizationstudio 2 года назад +1

    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

    • @KingdomCrafter
      @KingdomCrafter  2 года назад

      Make sure to check that the grass has preserve area enabled, and maybe scale it up slightly

    • @mudlamp3dvisualizationstudio
      @mudlamp3dvisualizationstudio 2 года назад +1

      ​ @EthanOlsonArts Its enable. i tried everything and cunsult everyone but not solved yet . please help me if you know that

    • @KingdomCrafter
      @KingdomCrafter  2 года назад

      @@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/

  • @avistryfe4534
    @avistryfe4534 Год назад +1

    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.

    • @KingdomCrafter
      @KingdomCrafter  Год назад

      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.

    • @avistryfe4534
      @avistryfe4534 Год назад +1

      @@KingdomCrafter alright ill give it another shot. Thx for the vote of confidence

  • @boxtodragon
    @boxtodragon Год назад +2

    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.

    • @KingdomCrafter
      @KingdomCrafter  Год назад +1

      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.

  • @NeuralCurse
    @NeuralCurse 2 года назад +2

    Can nanite foliage move in wind?

    • @KingdomCrafter
      @KingdomCrafter  2 года назад +3

      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.

    • @incelunicorn
      @incelunicorn 2 года назад +1

      yes @cgp

  • @pereparabol
    @pereparabol 2 года назад +2

    Do you use lumen? Shadows from trees look a bit to dense, not soft

    • @KingdomCrafter
      @KingdomCrafter  2 года назад +1

      Yeah I did. The shadows were "harder" due to a low skylight intensity, to add more drama. Contrast between directionally lit areas and not

  • @socalfootwear
    @socalfootwear 2 года назад +1

    does this only work with the recent update?

    • @KingdomCrafter
      @KingdomCrafter  2 года назад

      Yeah to use nanite for your foliage properly, you'll need 5.1

    • @socalfootwear
      @socalfootwear 2 года назад +1

      @@KingdomCrafter thanks

  • @heikohesse4666
    @heikohesse4666 2 года назад +2

    Hi - looks good - FPS performance is not that important to me - have you tried rendering a sequence in 4K with MovieRenderQueue?

    • @KingdomCrafter
      @KingdomCrafter  2 года назад +2

      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.

  • @D_m9494
    @D_m9494 2 года назад +11

    Feels like you can make a whole feature film inside Unreal Engine.

  • @maiwandhimmat4808
    @maiwandhimmat4808 Год назад +1

    I face 50% fps drop with nanite foliage, 35fps to 13, the lods work better but nanite suppose to boost performance not lowering

    • @KingdomCrafter
      @KingdomCrafter  Год назад +1

      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

    • @null643
      @null643 Год назад +1

      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.

    • @KingdomCrafter
      @KingdomCrafter  Год назад +1

      @@null643 Definitely something i'm checking out, will drop a vid soon

    • @null643
      @null643 Год назад +1

      @@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.

    • @KingdomCrafter
      @KingdomCrafter  Год назад +1

      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

  • @incelunicorn
    @incelunicorn 2 года назад +1

    ue5.1 is the real deal

    • @KingdomCrafter
      @KingdomCrafter  2 года назад

      They just keep on upping their game 💯

  • @marknefedov
    @marknefedov 2 года назад +5

    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.

    • @KingdomCrafter
      @KingdomCrafter  2 года назад

      I agree, exactly why I covered what I did with disabling dynamic shadows for grass. It depends on the scene / goals

  • @RayManRIRI
    @RayManRIRI 2 года назад +1

    what are your specs?

    • @DGDesign
      @DGDesign 2 года назад +1

      i have the same question

    • @KingdomCrafter
      @KingdomCrafter  2 года назад

      I do have a pretty beefy system with a 3090. The biggest performance hit was definitely shadows

  • @anthonymerle310
    @anthonymerle310 2 года назад +6

    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
      @KingdomCrafter  2 года назад +1

      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.

    • @tomsandersboxtel
      @tomsandersboxtel Год назад

      @@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.

    • @JoeBissell
      @JoeBissell Год назад +1

      @@tomsandersboxtel yeah you 100% can

    • @DarkSession6208
      @DarkSession6208 Год назад

      @@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.

  • @sascha1461
    @sascha1461 Год назад +2

    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

    • @KingdomCrafter
      @KingdomCrafter  Год назад

      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.

    • @sascha1461
      @sascha1461 Год назад +1

      @@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 :)

    • @KingdomCrafter
      @KingdomCrafter  Год назад

      ​@@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!

  • @elganzandere
    @elganzandere Год назад +2

    please get a dedicated microphone & cover up the mirror / lamp.

    • @KingdomCrafter
      @KingdomCrafter  Год назад

      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.

  • @UnrealRealism
    @UnrealRealism Год назад

    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

  • @86Dina
    @86Dina 4 месяца назад +1

    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.

    • @KingdomCrafter
      @KingdomCrafter  2 месяца назад

      Did you ever figure out this issue? Could be that virtual shadow maps were behaving odd / needing enabled?