You know I've been trying to recreate the feel of digital anime nature art in ue5 and keeping it reasonable perfomance-wise, the goal is up there, my knowledge is not quite, so the journey was pretty rough. But dear fucking god watching you feels like cheating. You've solved so much problems for me and probably saved weeks, if not months. I thank you from my very soul, and hope you'll do more similar in-depth videos about something else
This will be the video I'll return too when I need to do grass again. Not being much of an artist, this is the sort of thing I struggle with. Nice to see all the different approaches. Nice work.
Very interesting techniques discussed in this video. Unfortunately most of the WPO stuff won't work in UE5 because pre-skinned local position doesn't work with nanite foliage.
@@Xperto_ You could always use AbsoluteWorldPosition passed in a TransformPosition node from World To Local, if PreSkinnedLocalPos is troublesome with Nanite. I haven't toyed much with Nanite unfortunately so I fear I won't be able to help you troubleshoot any issue. Best of luck I guess :D
Short question regarding the setup of the parent objects. I have seen different approaches to parenting multiple LOD-levels to a parent to group them together but I am unsure about which one is the best. The way I usually do it, is by creating a plane, deleting all its vertices, and using this object as the parent of my LODs. Works better then empties for me, but I am unsure about what takes more ressources to process in Unreal, or if it even makes a difference. Never heard anyone talk about their method and researching it gives no results
Okay mb. After looking through it again I noticed that you always merged all the components. I was referring to objects like Grass_Cards_A_LODs and I assumed that this was a parent object and it's children objects were all the different LODs from 0-2. And I was wondering how you could replicate the random baking with such a setup, but now after noticing that you merged them together into one object, it all makes sense now. While recreating the steps I tried to keep it all as non-destructive as possible and have not thought about merging them, I handled all the LODs as seperate objects and was stuck on the UV information baking part
@@xKeaton Yeah each card model contain both LOD0, 1 and 2 at first, so that the baked normalized height & pseudo random value in uv are consistent across all LODs. The cards are all merged into one single mesh during the bake process and after that I just manually separate LODs into three distinct meshes. If that makes sense.
Wow thanks, absolute useful! Do you apply these material nodes to one object (joining them all together before) or do you copy paste them into each object? Wenn I apply these material to every object I get different colorization for different objects, connecting the last "Combine XYZ" with emission prop. Some are red-yellowish and some are purpil and white. Do You have any idea what could cause that? EDIT: Seems like my objects on the left and right of my orthographic camera are in this red-yellow style and the one in the middle are in this purpil-white style Thank You !
UVs seem to be fine. What should acutally be the effect of the bounding box. In my setup it seems that there is no difference if I have it or not. Should I have the same colors in RGB mask like you if I have the same values in my nodes or does ist depend on the steepness and other factors of my geometry? Are your grass blades on the same z-level as your grass cards or is there an offset between them? If there is no offset I can't see them anymore (of course). Thank you !!@@ghislaingirardot
@@phi7006 The bounding box is here to build the TextureCoordinate's node Object coordinates, and not have that be computed based on the object the material is applied to (especially in case all your cards are split into different objects). It's a way to build & control normalized object coordinates. Your result should be pretty identical to mine, it isn't based on steepness, just the Z vertex height relative to that bounding box. Don't render your grass cards while you're rendering these masks textures. Maybe double check your location/rotation/scale are all applied.
Dude I love you. These kind of tutorial never go in depth and never speak about performance issues, which is the main problem when actually trying to ship something. Thanks a lot!
The top-down orthographic render method to get the ground texture kind of blew my mind. I've been making landscapes for years and such an obviously simple solution never crossed my mind. Thanks!
I just recently started using UE5 and I was struggling to make a proper landscape and get the grass to work, thank you so much for giving such an extensive tutorial!! I've looked through many videos and this one is by far the most thorough one :) thank you!
This is now my favorite Video on RU-vid and I am so thankful for it! This is such a nice learning ressource and I can not wait to recreate it step by step. It might take me a full week to really grasp all the vector magic necessary, but with your clear explanation I will manage. I do truly love you for your work and we are blessed to be gifted with all of it, especially with it all being so accessible and free. Thank you so much! 🙏
Hello I just wanted to add here that for the custom billboard to work with manuallly placed foliage instances I had to add a ComponentPivotLocation material function to the end of the WPO chain in 4.27. Great tutorial once again thank you for sharing the knowledge!
What a masterclass, and the work that went into making the video and visually explaining concepts and techniques is equally amazing. Subscribed to Patreon.
Amazing video, I love that you explain the reasoning behind every choice, elaborate on the various options and suggest various ideas to experiment with. This was really informative also the grass tiling texture trick seems so simple but it's small things like that, that people can miss so easily or try to come up with something more complicated when a good solution to a problem is right in front of you.
No. You can use ray marching or similar shader shenanigans to make a grass texture have some depth on the landscape material but that won't affect the landscape's silhouette. These techniques typically don't allow for wind animation either and have plenty of limitations. Using meshes is still the only way to do proper grass to this day.
This is absolute platinum of a learning resource, just loads of well organized good to know, shown clearly and concisely. This is going to be providing immense benefit to so many artists for years to come
Thank you very much for your wonderful sharing. By the way, I find that ClumpMap or ScaleMap can be used to add more color variations, such as grass that grows very lush due to organic matter accumulation, and their color will be more saturated. I applied them to my grass and they looked better👍.
Hi Ghislain, thank you so much for your videos holy fuck they have tons and tons in them, you should really get your self into houdini xd, I would definitely support you on patreon if am not struggling financially, it took me 4 days to apply this and am not done yet xd, I wish I can support you back somehow if I can help with houdini substance designer linux please let me know you are amazing artist and a gift for our community
Glad you liked the video! Houdini, eh I'd love to but I have barely enough time to remain up to date with UE considering how fast it's growing/changing. Plus UE's becoming a bit of an Houdini every day with things like PCG, Geometry Scripting and Scriptable Tools, so I'd rather invest even more time in UE. Blender is becoming a bit of an Houdini as well with its increasingly compentent geometry nodes, so I'm less inclined to invest time in Houdini nowadays. Although it remains a beast of a software and I definitely could make use of it :D Just have other priorities! I'm also familiar with Subs. Designer and have used Gentoo/Linux for ~7 years! So no worries, enjoy the free content :D
this is a lot of useful information but I am having a hard time understanding what you are saying because your voice is a lot of lower and mid tones and it is kind of hard to pick out words. It might be helpful to adjust the audio in after effects or similar software, increasing the mid tones to high tones to get better word separation. or it could be the microphone. either way, if you could somehow make the narration more clear, it would help a lot. thank you for this video!
I would if I could. Between having the worst room accoustic ever & a speach impediment & being a non native english speaker, it's as good as its gonna get. I recently upgraded mic so I believe it got slightly better in more recent videos but not ideal still. But honestly, considering youtube's automated subtitles seem to understand every single word I say, I'd say you're just probably not used to hearing a french accent :D
Hey all! I appear to be having a pretty serious issue. Everything was fine up until appling the WPO to the material. Once I apply the the code to my material, all my landscape grass dissapears! However I can still place a single mesh down which works fine. Painting the grass with a foliage brush also doesnt work. Please help :( I am unsure what I have done wrong.
@@Elmoman11able Hey! It's impossible for me to tell :shrug: You likely missed a step. Having meshes at 0,0,0 probably means you didn't transform vertices from local to world space. It's explained in the video :)
@@ghislaingirardot hello! Thanks for the reply, I really appreciate it, not to worry I used a work around, doesnt quite look as good or is as technically impressive but it works! Keep up the awesome stuff you do its great
Quick question, I'm currently using latest version of unreal engine and I'm contemplating whether to use lod or nanite grasses for my game, which one is better for the current state of ue? Performance wise, thanks!
Impossible to tell, foliage is still where Nanite suffers a lot. Performance will depend highly on your meshes/workflow/ability to accomodate for Nanite's weaknesses.
Great video! But how the baked pivots in a 0-1 uv range translated in offsets larger than 1 unreal unit? I mean since the dots were values from 0 to 1 dont you need to multiply them with a number to hit the initial offsets that might be 50 units for example?
@@ghislaingirardot Oh thank you very much! I just put them in the 0 to 1 uv box and multiplied with the counding box size that is 40 for me. And it works. But I will just scale the uvs in blender
@@steliosstavropoulos499 Yup, it works just the same :) Normalizing position based on bounds is great if you want to bit pack position! You'll likely use 16bits UVs in UE though, so you can definitely afford to store the pivots directly in centimeters and avoid a multiply in the vertex shader. Realistically, it's not going to make any difference, performance-wise, but oh well, you do you :)
No, shader tricks are not specific to any game engine. There is actually *nothing* specific to UE here, as long as you can read in-between the lines. Most game engines offer a graph editor to write shaders, so a similar shader and similar tricks can be applied in Unity, Godot etc. Just got to be willing to do the hard-work and think on your own to recreate a similar effect in another engine. But then your comment makes me think that you have pretty much zero experience in the video-game industry. Most of us are software agnostic, as you should learn to be. Each engine has its pros and cons. UE isn't the greatest but most definitely not the worst.
hi i'm in 3d/video game school just to tell you that, your video is so much better in every sense of the word than my courses i have, thanks for this tutorial ♥
Got a bit lost in the textures part, I'm a begginer in Blender and also UE. So I tried baking normals after shear, but they didn't take effect in the flat one. Also, one side of the plant is invisible. I'm first doing one single grass to multiply, but if I manage to know how, I intend to make more plants.
Yup I couldn't afford to explain everything in great details so I went a bit fast over the Blender part. I'd double check your material setup & bounding box. Best of luck.
Is there a way to blend grass without runtime virtual textures? Uefn has a lot of features but also blocks a lot and unfortunately rvt’s are one of them.
You could capture the terrain into textures using a scene capture component (if UEFN allows you to do that). I've made a video on the subject, see ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ZwufX4JuF1U.htmlsi=c9O37lg32GVICluA
Thank you for such an amazing video! Lots and lots amazing technics. But I have a question. You wrote such a complex shader and this shader would be instanced thousand of times, isn't this is equally bad in terms of performance as having a lot of vehicles? Isn't shader complexity is a concern for performance purposes too? Thanks in advance.
Hey, thanks for watching! To answer you briefly: - I'm not sure what you mean by that, but a shader isn't instanced thousand of times and the comparison with vehicles is... strange? - Sure shader complexity is a concern for performance, but profiling speaks for itself, the shader is performant. It's not because you have a complex graph that a shader badly performs. Context matters. - The graph looks complex but the HLSL code isn't that complicated and most of the logic happens in the vertex shader and doesn't contain costly maths nodes (trigonometry). And I have made sure to keep the vertex count as low as possible, as demonstrated. - If you want a shader to perform as best as possible, use an empty shader and have no feature :) At one point you have to pay a cost to have a shader that has features. If you're tight on budget, get rid of some features. See what's worth paying the cost for your own use case. Hope that helped
Color texture projected in a top down fashion using XY world coordinates to add random tint + using 'random value per instance' to further randomize things if you need to
Great Tutorial, you are really good at explaining things. But still i have a little trouble with those textures in blender. When i made this material like you have in the video and i connect (Combined XYZ) to Emission i get a radient gradient on my grass (from center lower edge of camera) blue to green, and i have no clue how to fix this, before that i have done UV exactly like you. Would be glad if could help me a bit (i tried to find answer in comments bellow but i didn't😓) But still really awesome tutorial! :D
@@nazarboiko3917 Hi! It's hard to tell unfortunately :| double check everything, material/uv maps/object used to generate object coordinates/scene settings (linear color mapping/no world light)/viewport settings (shading view) and so on... Make sure the issue isn't just in the viewport and persists in the render as well, that might tell you something.
Hi Absolutely amazing tutorial I wanted to ask if I enable Nanite in UE5.2 the grass disappears on the landscape. Disabled the WPO and it shows again so its somehow related. Any idea why? Thanks
Hey! Thanks. Tbh I haven't tested Nanite yet... But Nanite is widely known to be extremely limited regarding WPO and is now only starting to get support for *minimal* amount of WPO. Considering this technique here does all kind of crazy WPO shenanigan, I'm not surprised Nanite breaks everything unfortunately. I don't think it's viable with Nanite sorry
Hey, great Tutorial! I am stuck on one thing tho: The PerDistanceFadeAmount. I just have a simple GrassWind applied to the World Position and none of your stuff, but the fade is not working and I dont really know how to implement it
Hey! Ty! What do you use the PerInstanceFadeAmount for? Have you customized the fade distance in your instance component settings? (or foliage settings?)
@@ghislaingirardot Hey, I want to use the PerInstaceFadeAmount for the same thing as you, so scaling the obejct. And I have set the cull distances (start 2000, end 2500)
@@moinammorgen9415 Well then you have to replicate my setup. You can't 'magically' scale an object with just the [0:1] value this node outputs. You gotta offset vertices in such a way that result in a scaling effect, like demonstrated in this video
Great tutorial, thanks a lot! I got one question: If I put my geometries into a bounding box with sheared surfaces, I do not get this nice bidirectional gradient effect. My whole geometry is quite uniformly bright. If I simplify my geometry to a rectangle and shear until it fits my bounding box and then take a look in shading mode, only the right part of my geometry is shown. Am I doing something fundamentally wrong? Do I have to turn off blenders light or does this not matter? Thanks a lot !
It seems that you are importing only your LODs into the UE project. How do You get the original grass object in? In my current understanding the LODs are just cards, which are some kind of abstraction of the original grass object. In the scene it looks like your original grass object is there. Thank You!!@@ghislaingirardot
@@ghislaingirardot Thanks so much for clearing this up. I am new to Unreal and you've probably saved me a lot of time figuring this out on my own. Is this mentioned somewhere in the official docs? Why would the coordinate system be different between view space and world space?
@@mateigiurgiu2586 No worries. I'm not sure it's mentionned in the doc but it's something one stumble upon quite early in its UE journey, generally. The coordinate system isn't different from view to world space. It just has to do with what is the "default" camera orientation in UE. Z is forward in camera space because the 'default' camera's orientation is a camera looking upward (so Z up, same as world, and same applies for X & Y). If that makes sense :D
I have to say I've spent hours, days, maybe even months watching technical gamedev videos on youtube and elsewhere trying to grasp what I possibly could with my failing maths & programming "skills", but this is by far the most effective learning tool I have ever come across in terms of pure quality vs effectiveness. Even without a strong programming or technical background the pure simplicity in the way this shader addresses the many problems of grass rendering in non nanite UE is just elegant, beautiful. and I'm not speaking of the art quality here, just purely from a technical standpoint this is already magnificent. thanks so much for sharing!
Great job there! Grass is a totally different beast to tackle :D I also did a video on more or less the same topic ( ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-gfQNjC69PCM.html ) and yes, funnily enouh is the longest I've ever done :D
Ty! I loved your mathematical approach to the problem, great breakdown as well. I'll have to take a look at the rest of your videos, interesting topics you got there! :)
Would you mind elaborating what extra magic you did with the baked pivot points? You mentioned the Y axis having to be flipped, but when you show your baked pivot points at 28:18 they don't seem flipped?
Hmmm, from what I recall I had to do a 1-(y*-1) in the script, which is actually y + 1 :p So the baked uv ends up in the correct orientation but shifted. Having to deal with different coordinates system can be confusing...
@@Gandarufu Hard to tell what's wrong. Double check your pivots are correctly baked and not overwritten by lightmaps and double check your material setup
@@ghislaingirardot thanks mate, I suspected a y-shift could be in order. will definitely give that a try tomorrow. thanks nevertheless for your great work, I'm still blown away by your knowledge and willingness to help 👍
@@ghislaingirardot Okay, so turns out you also have to multiply each pivot position by 100 because of the unit difference of Blender and UE. Never would have guessed that.
Thank you so much for this. There are some seriously impressive techniques here. I feel so dumb trying to grasp some of these concepts but slowly making progress 🙃
Thanks, you're welcome! And thanks for joining the Patreon :) No worries, I probably made this all sound more straightforward than it actually is. Struggle is to be expected at first with that amount of WPO trickery, it's not easy. Keep at it and you'll get there :)
@@ghislaingirardot really appreciate the encouragement 😊 - i’m new to UE so it’s a big curve but it’s people like you that even make this possible. I’m trying to repurpose your setup into my scene. If I’d like to replace the opacity map with a more abstract painted texture is it just essentially switching out the texture? Guess I should avoid going over the edge of your current one to prevent issues with the other baked maps?
@@smash.studio UE is amongst the most complex game engine out there and it has quite a steep learning curve indeed. Best of luck! Hmm I'd suggest replacing the entire grass texture set (opacity, normals & gradient masks) rather than just the opacity texture (which won't allow you to create a completely new look considering the other maps are meant to work with that opacity mask). You could use the workflow I described, using Blender, to create a new set, or you could handpaint everything. Handpainting gradients & normals is a bit tricky but plenty doable (you could also discard using a normal map and gradients if you don't have a use for them)