Unreal Engine 5.1 - Nanite Foliage + Performance Tips

Поділитися
Вставка
  • Опубліковано 5 лип 2024
  • We cover how to get started with Nanite Foliage, edit assets and textures in bulk. And then go over performance tips and thoughts on how to best approach using Nanite Foliage.
    Business - www.ethanolson.com
    Discord - / discord
    #unrealengine #ue5 #nanite #tutorial
    00:00 Intro
    00:20 Store (More Coming)
    00:30 Community
    00:40 Overview
    01:11 Mass Enable Nanite + Preserve Area
    02:06 Performance Tip - Texture Memory Trick
    02:42 Pro Advice for Assets
    03:02 Exmplaining in Game
    03:21 Performance Tip - Shadows + Culling
    04:30 Game Dev Workflow
    04:49 Showing Large scale + Thoughts
    05:17 Cinematic Approach
    06:04 Tree Kit + More Release Ideas
    06:32 Closing

КОМЕНТАРІ • 87

  • @johnnybigg7772
    @johnnybigg7772 Рік тому +2

    Really liked the multiple nanite tip

  • @HayashiKaiji
    @HayashiKaiji Рік тому +1

    VERY helpful!

  • @XaviAndreu
    @XaviAndreu Рік тому +1

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

  • @elliewylds7357
    @elliewylds7357 11 місяців тому +6

    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  11 місяців тому +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.

  • @DGDesign
    @DGDesign Рік тому +1

    awesome!

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

  • @corgilife241
    @corgilife241 Рік тому +1

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

    • @KingdomCrafter
      @KingdomCrafter  Рік тому

      Glad you brought that up, currently getting one together!

  • @ripunjoyk1706
    @ripunjoyk1706 Рік тому +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

      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.

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

  • @LastAustralianGamer
    @LastAustralianGamer 4 місяці тому +1

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

    • @KingdomCrafter
      @KingdomCrafter  4 місяці тому

      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

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

  • @heikohesse4666
    @heikohesse4666 Рік тому +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

      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.

  • @letsplaysomthing3799
    @letsplaysomthing3799 Рік тому +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  Рік тому

      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.

  • @billysatkowski6938
    @billysatkowski6938 10 місяців тому +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  10 місяців тому

      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.

  • @Silpheedx
    @Silpheedx Рік тому +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  Рік тому

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

    • @MrYipYep
      @MrYipYep Рік тому +1

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

    • @riccardosantorsola5528
      @riccardosantorsola5528 10 місяців тому

      hi! have you solved this problem?

  • @D_m9494
    @D_m9494 Рік тому +11

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

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

  • @mudlamp3dvisualizationstudio
    @mudlamp3dvisualizationstudio Рік тому +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  Рік тому

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

    • @mudlamp3dvisualizationstudio
      @mudlamp3dvisualizationstudio Рік тому +1

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

    • @KingdomCrafter
      @KingdomCrafter  Рік тому

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

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

  • @remodesign3028
    @remodesign3028 Рік тому +1

    does this only work with the recent update?

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

  • @Decs_
    @Decs_ Рік тому +2

    have you thought about nanite landscapes?

    • @KingdomCrafter
      @KingdomCrafter  Рік тому

      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!

  • @pereparabol
    @pereparabol Рік тому +2

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

    • @KingdomCrafter
      @KingdomCrafter  Рік тому +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

  • @dreamwave1994
    @dreamwave1994 Рік тому +2

    Can nanite foliage move in wind?

    • @KingdomCrafter
      @KingdomCrafter  Рік тому +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 Рік тому +1

      yes @cgp

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

  • @IncelUnicorn
    @IncelUnicorn Рік тому +1

    ue5.1 is the real deal

  • @RayManRIRI
    @RayManRIRI Рік тому +1

    what are your specs?

    • @DGDesign
      @DGDesign Рік тому +1

      i have the same question

    • @KingdomCrafter
      @KingdomCrafter  Рік тому

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

  • @marknefedov
    @marknefedov Рік тому +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  Рік тому

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

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

  • @maiwandhimmat4808
    @maiwandhimmat4808 11 місяців тому +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  11 місяців тому +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 10 місяців тому +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  10 місяців тому +1

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

    • @null643
      @null643 10 місяців тому +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  10 місяців тому +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

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

  • @anthonymerle310
    @anthonymerle310 Рік тому +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  Рік тому +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 8 місяців тому

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

  • @UnrealRealism
    @UnrealRealism 9 місяців тому

    If you have problems with Foliage and Nanite going “crazy in the Z axis” i explain how to fix it with ease.
    ua-cam.com/video/wVMImHI24QI/v-deo.html