Home 3D Art Showcase & Critiques

[Environment] ~ Total newbie looking for feedback and advice on |grass|

triangle
Offline / Send Message
Steamy_Steve triangle
Hello!

I've started fiddling with 3D and videogames production a few months ago, and now I'm involved in a small indie project.
We're just five people, so we have to be flexible and ready to learn every kind of new skills, one of which is making open world environments.
My tasks were to learn how to make a terrain in World Machine, then how to correctly import the heightmap in UE4, then how to make terrain materials in Substance Designer, and now how to make proper foliage (and more to come!).

I've started with grass because it's one of the assets that is going to recur the most in our open world environments.
Four days of tutorials, tests and troubleshooting led me to this....



Not too bad, for a total newbie, if I can say it myself.
Now, though, I'm not really satisfied with the quality. Not in terms of realistic look, more about.....I dont know, as it is now it's just a waving sea of fairly big strands of (allegedly) grass.
I'm not looking for something realistic, as this is going to be a fantasy game with a touch of cartoonish, but I'm pretty sure I could do something better.
Also, this is a quite tall grass type, 40-50cm tall, I'd like to also make something more suitable for a scruffy lawn.

What I'd like to learn is:
.- what's the best way to arrange "cards" when making grass clusters?
-. how big should a grass cluster (group of cards that compose the object) be depending on its use?
.- how should I arrange the cards to get the best look for a tall type and for a short type of grass?
-. what types of grass are more suitable for tall and short clusters?
.- when looking at a reference, what traits should I focus on to be sure my grass will look anything even slightly close to realistic/plausible?
-. what bad pratices should I avoid? any best practice I should learn?
.- what about efficiency and performance? any fairly feasible method to bring overdrawing down to the minimum?

The grass in the screenshots has been made by modeling a 3D strand, copying and bending/twisting it in 6-7 different versions, then "clone-painting" them onto a surface.
Then I exported the subdivided/smoothed bundle of grass along with five pairs of simple planes (low-poly and cage) to capture normals, color, thickness, height, AO and alpha from 4+1 directions.
Then I've composed the five projections onto a single tile (one tile for each type of map) and subsequently UV'd cards over it.
The result is a 45 vertices mesh composed of 5 cards, 4 arranged in an asterisk + 1 folded into a cone pointing downward halfway the bundle's height.
I've tried other configurations, but this is the one where cards' bounds seem less noticeable (as of yet).

Any advice is very welcome, I'm in learning mode full-time.
Thank you! ^o^

Replies

  • Apocrs1980
    Offline / Send Message
    Apocrs1980 polycounter lvl 4
    Honestly good foliage comes down to your material in the engine. Opacity, specularity, subsurface color and scattering,  masks, and color variation go a very long way. 

    I use UE4, in tweaking the materials I get something like this:
    The other part is the lighting in your screen. I would suggest getting that where you like it then tweak the materials to where it looks good.
  • FreneticPonies
    Offline / Send Message
    FreneticPonies polycounter lvl 3
    - Whatever way doesn't make it obvious it's repeating when there's a lot of it onscreen, little things like different rotations, slightly different scaling, etc. etc. help with this.
    - enough that it doesn't disappear in the distance easily, as a bonus stick to a multiple of 64 vertexes (GPUs like that but it's not really necessary at all)
    - See first answer
    - Eh? I'm sure someone out there thinks about that, but it's just whatever you find looks good.
    - Grass sucks in games today, maybe like, for next gen exclusive games (PS5?) it won't, but right now it does. Just concentrate on the texture color/variation and make sure it's not too thin so it doesn't disappear easily.
    - Throw all the cards at varying angles (you don't want it to disappear when looking straight down), and try to use alpha cutout over alpha whenever possible. Translucency might look nicer, but doesn't work with fancy TAA stuff and makes GPUs sad : (
    - See above, and definitely do at least one if not two LODs.

    All that being said, it looks great! It could use some color variation tricks and etc. But there's a thousand other "tricks" like bending normals, or etc. that are of varying value, but really you're off to a great start.
  • 7bajwa
    Offline / Send Message
    7bajwa polycounter lvl 10
    Well, Realistic grass depends on all the factors, modeling, texturing, shading and lighting. You can create some bigger chunk of grasses. Bigger in radius to spread across the field. 
    Don't just fill the landscape with the grass. leave some bare place and then keep the growth gradual. like small near to bare place and bigger as it will go further. It will look a lot better. Give the scale and color variation. Right now all the grass is uniform. You can put speedtree color variation node in the shader graph in the front of basecolor then plugging it to output. It works very well. Try these things and we'll see what you come up with.
    Hope these will help. Keep up with the cool work.
    -Bajwa
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    7bajwa said:
    Well, Realistic grass depends on all the factors, modeling, texturing, shading and lighting. You can create some bigger chunk of grasses. Bigger in radius to spread across the field. 
    Don't just fill the landscape with the grass. leave some bare place and then keep the growth gradual. like small near to bare place and bigger as it will go further. It will look a lot better. Give the scale and color variation. Right now all the grass is uniform. You can put speedtree color variation node in the shader graph in the front of basecolor then plugging it to output. It works very well. Try these things and we'll see what you come up with.
    Hope these will help. Keep up with the cool work.
    -Bajwa
    I did most of what you suggested:
    .- given a 20% variation in size
    -. used speedtree color variation node
    .- used a Constant3 to multiply the base texture to get a more "plausible" base color
    -. tilted cards to hide the terrain better

    Speedtree color variation node is VERY sensitive, I have to move by 0,01 steps and at 0,03 it's already very noticeable.

    Better?
    Anything that I might improve in applying your suggestions?
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    Honestly good foliage comes down to your material in the engine. Opacity, specularity, subsurface color and scattering,  masks, and color variation go a very long way. 

    I use UE4, in tweaking the materials I get something like this:
    The other part is the lighting in your screen. I would suggest getting that where you like it then tweak the materials to where it looks good.
    Your short grass looks very good, I cant really distinguish where cards start and end (if cards those are), would you share your methods? =)
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    - Whatever way doesn't make it obvious it's repeating when there's a lot of it onscreen, little things like different rotations, slightly different scaling, etc. etc. help with this.
    - enough that it doesn't disappear in the distance easily, as a bonus stick to a multiple of 64 vertexes (GPUs like that but it's not really necessary at all)
    - See first answer
    - Eh? I'm sure someone out there thinks about that, but it's just whatever you find looks good.
    - Grass sucks in games today, maybe like, for next gen exclusive games (PS5?) it won't, but right now it does. Just concentrate on the texture color/variation and make sure it's not too thin so it doesn't disappear easily.
    - Throw all the cards at varying angles (you don't want it to disappear when looking straight down), and try to use alpha cutout over alpha whenever possible. Translucency might look nicer, but doesn't work with fancy TAA stuff and makes GPUs sad : (
    - See above, and definitely do at least one if not two LODs.

    All that being said, it looks great! It could use some color variation tricks and etc. But there's a thousand other "tricks" like bending normals, or etc. that are of varying value, but really you're off to a great start.
    I've attached a couple of screenshots to answer Bajwa, could you look at them and tell me what you think might be improved?

    Also, you said "try to use alpha cutout over alpha whenever possible"; what do you mean with "alpha cutout"?
    Right now I'm using an alpha map, as the opacity mask, that is a separate file from the texture (actually, all maps are separate files, didnt spend time on filling them into a single image's RGB channels, will do that later).
    And...so I should just unplug the translucency color input altogether?

    Btw, I made my maps with xNormal (it's awesome for this kind of works!!) and also extracted the thickness map.
    I had planned to use it as an opacity input, so I mixed it with a scalar parameter through a multiply node and plugged it into opacity. But no matter what the scalar value is, 0.1 or 10, I see no difference whatsoever.
    I even tried to plug in a full white Constant3Vector, but the result is just the same. =0

    Thank you! ^o^
  • Apocrs1980
    Offline / Send Message
    Apocrs1980 polycounter lvl 4
    Honestly good foliage comes down to your material in the engine. Opacity, specularity, subsurface color and scattering,  masks, and color variation go a very long way. 

    I use UE4, in tweaking the materials I get something like this:
    The other part is the lighting in your screen. I would suggest getting that where you like it then tweak the materials to where it looks good.
    Your short grass looks very good, I cant really distinguish where cards start and end (if cards those are), would you share your methods? =)

    By short grass, I'm thinking that your referring to the ground texture?

    In order to get the ground texture looking properly again there is a lot that goes in to the shaders and materials. I'll post a couple of screen shots. but basically there is some moderate amount of tessellation going on based off of it's height map done in a  material layer blend, there is also some fuzzy shading on it since it's overall feel is light and soft.


    This material function is then input in to that master landscape layer blend material I created. This gives it the appearance that it's truly 3D mesh when it's just offset triangles from the landscape tessellation.
    The texture I used is actually a composition of over 30 pictures I took with my Nikon outside during an overcast day, re-assembled them in Photoshop and then put in to Bitmap 2 Material with substance designer to get the various maps I need for the material.

    for the grass mesh, there are debates over what is more efficient and better looking vs what is more performant and gets you by.
    It honestly depends on your project, how much is going on in the scene.
    I moved away from regular "cards" when doing my grasses and instead modeled them to their own polygon strips as such:

    The main reason for this and my argument is that UE4 tends to be able to handle millions of polygons in one scene decently but quad overdraw bottlenecks performance. Therefore the more translucency you can get rid of the better.

    Additionally, when using deformation stuff like wind and displacement it looks awful with big cards waving about vs single polygons.
    Also your grass cards are just that, straight cards, there is no bending or deformation showing what grass naturally does, which gives it the appearance of looking manufactured, fake, and static.
    I would suggest putting some sort of bend in your modeled cards in different directions to get a title bit more variation.

    Doing this, even with PC generated grass it looks good, but, if you want to take it to the next level, make grass textures which have 5 to 10 plus different blade variations, the more the better and more natural the grass will look.

    For the shaders,
    I found a decent compromise between my poly count and my overdraw, currently I can run my scene constantly above 70 -80 fps with hundreds of these clumps painted on to the landscape with the foliage tool.
    Here is my shader complexity vs lit and unlit:
    Grass is notorious for overdraw and as you can see, when you clump a bunch of them together it's inevitable it will happen even if they have the slightest bit of translucency showing on the mesh. despite my stuff being in the "bad" range since my game is a top down perspective I can get away with it. but for games that are like Fortnight you will want to aggressively use your LOD's and culling to keep your performance from tanking.

    Finally, as said before, good materials making good use of your textures are super key to good looking foliage.
    here is an example of my material:

    Not everything in the material contributes to the over all look per-say, there are some world offset stuff for player displacement and wind. But making use of your opacity, normal, spectacular, and even brightness of your albedo maps are going to be key, tweaking the values that these maps play in the over all material will go a long way to making your foliage look good.

    I hope this helps and this method generally has been helpful to any foliage I have done.
    Just using the same material and applying it to my foliage while making some minor tweaks you will get a more over all uniformed look such as this:



    Cheers

    ~Apoc

  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    @Apocrs1980 You think your method to make grass would work with wide open worlds with free movement cameras too?
    I mean, I've read some tutorials about your same method, separate cards for separate strands to minimize overdraw, but my grass has literally hundreds of strands in the bundle, it's very dense, do you think it would be possible to achieve the same dense look with separate cards rather than with normals projections? =o

    For the short type it's probably the best practice, although....what about LODs, how do you put those strands together into one card to still look like the exact same grass, but with less polygons? =0

    My head hurts.... -.-'
  • Apocrs1980
    Offline / Send Message
    Apocrs1980 polycounter lvl 4
     Wide open areas such as the Kite demo have done so with the same method. Although, I would say they took it to the extreme, modelling every last blade with minimal to no translucency showing as they were going for a super realistic environment.
    However they ran their stuff on a beast of a machine, so therefore LOD's would be the key. 

    For your LOD's they can be single billboards such as the one's your using now, pictures of your final grass can be used on the billboards etc.

    And eventually they should be distance culled and your ground material should do all the work faking the grass in the distance as no one will ever see the detail form far away.
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    @Apocrs1980 The terrain faking the grass in the distance?! How! Teach me, master!! =O
  • Apocrs1980
    Offline / Send Message
    Apocrs1980 polycounter lvl 4

    Thanks, but I am by no means an expert, only been at it for a couple of years. :D 

    There is a lot to cover when it comes to landscape material, once you start figuring out how stuff working then you can iterate and expound upon it with your own creations.

    The topic is so broad it would take a long time to cover everything.

    I would suggest starting here:

    This guy is amazing with his tutorial series and can teach you a lot. Too bad he only made a few.
    I hope I have been helpful on your journey to environmental art.

  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle




    @Apocrs1980 @FreneticPonies @7bajwa
    I have crafted LODs for grass, pushed high the triangles number for LOD_0 (~850 tris) to maximize the cutout, tweaked and reused old LOD_0 as LOD_1 (48 tris), and made a very cheap LOD_2 (6 tris).
    Fade-off for grass is 100 meters so there's plenty of sight range, althought I could push it higher, now that LOD_2 is only 6 tris (and with no alpha holes).

    In the second screenshots the PS value is in the green area, but it actually fluctuates for and back between green and white. It seems like there's no way to avoid it.

    Question: does UE keep calculating alpha mask even if you resize UVs to leave no alpha holes visible on the mesh?
    I mean, should I make a copy of the material and, like, disable the alpha mask node completely (or even change the type altogether)?

    I tried to find tutorials to learn how to make distant LOD billboards rotate along with the camera so that they always face it, but all the ones I found started with "it's very complicated, when it comes to foliage", which discouraged me right away.
    But I believe it will become unavoidable, when it will be trees's turn, for two crossed billboards wouldnt look good, in my opinion.
    Any valuable source on the matter that could guide me step by step through the process?
    Also, would I have to make a separate shader for the billboards, in order to activate the camera tracking function, or I could just make the effect affect only the most distant meshes?

    I feel like there are more questions I should ask, but it's almost 4am and I've been working for the last 5-6 hours straight, plus a few hours this afternoon.....I'm quite exhausted. -.-'
  • Olingova
    Offline / Send Message
    Olingova interpolator
    Shader complexity kinda hurts, you can see you got a lot of white parts there. To help with that; what you can do is actually use a "lod material" for the last lod. For exemple; remove the wind part of your main material (will reduce the shader comlexity) and use it for the last lod (that will be seen at a really high distance; so you won't notice it doesnt move anymore) that will already help a lot!
  • Apocrs1980
    Offline / Send Message
    Apocrs1980 polycounter lvl 4
    I agree with @Olingova you should be able to have your texture maps mip and have all but the basics on your shader. You can do this in 1 material by setting up true false switches or have it reference a simplified copy of the material.

    By the way, I can see progress on your grass it's starting to get there little by little. ;)
  • 7bajwa
    Offline / Send Message
    7bajwa polycounter lvl 10
    @Steamy_Steve  I liked the optimization you have done and also you had set up the shader for color variation. 
    Tweak the color of the grass to more real-world grass. Use the images of the grass if you can.
    Color variation is fine but the frequency is small. check this image see how the color is changing on the grass in the big clusters and it also consisting dry grass. add few dry blades of grass in between the cluster also.
    for the scale, I was suggesting the same. size variation in the form of the clusters. Check this image how it is forming the grass clusters.
    Check this Video. you will get more idea for the foliage population.
    Hope that this will help.
    -Bajwa
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    Olingova said:
    Shader complexity kinda hurts, you can see you got a lot of white parts there. To help with that; what you can do is actually use a "lod material" for the last lod. For exemple; remove the wind part of your main material (will reduce the shader comlexity) and use it for the last lod (that will be seen at a really high distance; so you won't notice it doesnt move anymore) that will already help a lot!

    @Olingova <Total newbie>, remember? ^^'
    How do I reference a simplified version of the shader?
    I had thought of giving the farthest LOD a very basic color+roughness shader with no masking/wind/normals, but in case I need to modify the original materials (for multiple assets), maintaining the basic ones along would be a pain. =p

    The white parts you see are from LOD0, so no LOD material will save it.
    If you have any suggestion on how to furtherly reduce it (beside adding a number of vertices to better cut it out), you're very welcome. =o
    Anyway, if that's a lot of white, to you, you should've seen it before the high-poly cards, that was a freaking "snowy" field of grass!! xD
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    I agree with @Olingova you should be able to have your texture maps mip and have all but the basics on your shader. You can do this in 1 material by setting up true false switches or have it reference a simplified copy of the material.

    By the way, I can see progress on your grass it's starting to get there little by little. ;)

    @Apocrs1980 I've just learned the meaning of "mip mapping", but the glossary I read it from doesnt specify whether I should put the low-res maps onto the same texture tile along with the high res ones.
    Or maybe, just downscaling the UV projections of the most distant LOD is enough? In that case, being this grass, all I would have to do is just resizing and moving the cards' UVs over the base color map.

    What about the true/false switches to disable inputs, how would that work? Any tutorial/reference I could learn from? =)
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    7bajwa said:
    @Steamy_Steve  I liked the optimization you have done and also you had set up the shader for color variation. 
    Tweak the color of the grass to more real-world grass. Use the images of the grass if you can.
    Color variation is fine but the frequency is small. check this image see how the color is changing on the grass in the big clusters and it also consisting dry grass. add few dry blades of grass in between the cluster also.
    for the scale, I was suggesting the same. size variation in the form of the clusters. Check this image how it is forming the grass clusters.
    Check this Video. you will get more idea for the foliage population.
    Hope that this will help.
    -Bajwa

    @7bajwa I had set the color variation to something much higher, many clusters would look dry (while others oddly white!) and it was nice and kind of realistic, but the team asked me to bring back the blinding green (since this is going to be a fantasy/cartoonish game), so there it goes.

    By the way, do you happen to know whether there's a way to clamp the color variation so that it doesnt go too high with lightness? =o

    I'll watch the video for sure, but the reason for the current lack of variety in foliage is just that those two (grass and poppies) are all the assets I have at the moment. ^^'
    More to come, of course, like dandelions and other plants I already have in mind. =)
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    @Olingova @7bajwa @Apocrs1980 Almost forgot, does any of you know how to make distant billboards rotate along the camera angle so that they always face the player? =o
  • 7bajwa
    Offline / Send Message
    7bajwa polycounter lvl 10
    I used speedtree for that. Speedtree creates billboard and material by itself. you can study it and create master material out of it and then you can create the billboard in a 3d package also and assign the baked textures.
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    7bajwa said:
    I used speedtree for that. Speedtree creates billboard and material by itself. you can study it and create master material out of it and then you can create the billboard in a 3d package also and assign the baked textures.

    @7bajwa   I dont like highly automated things, the moment they stop to develop some tools you find yourself without the knowledge to replicate the same results without such tools. =p
  • 7bajwa
    Offline / Send Message
    7bajwa polycounter lvl 10
    Haha very true. I found out about the speedtree color var node from speedtree shader only. :p At least we should explore those automated things to learn. Well!! I am not that strong with shaders and blueprints. I have just working knowledge. I am working on these things including dynamic foliage.  ;)
  • Apocrs1980
    Offline / Send Message
    Apocrs1980 polycounter lvl 4
    you can alter an alpha map and use it as a sub surface or color mask to push the highlights or darker tones in the shader.
    But from what it sounds like the folks your collaborating with want Fortnight grass?
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    you can alter an alpha map and use it as a sub surface or color mask to push the highlights or darker tones in the shader.
    But from what it sounds like the folks your collaborating with want Fortnight grass?
    @Apocrs1980 Not exactly, let's just say they're happy with what you see in the screenshots. Lush green.
    Seriously, I've seen Fortnite, my stuff looks way less like a Playmobil toy. =0

    Now that I think of it, I have a couple of questions about the foliage shader:
    .- I've tried to use the thickness map plugged into the opacity output (not opacity mask, just opacity) to affect the amount of subsurface color depending on the thickness of the grass bundle; but no matter what value I plug into that output, nothing changes whatsoever. Why? Did I misunderstand the function of the opacity output?
    -. What does the pixel depth output exactly do? It looks like it gives some kind of displacement when objects clip through the mesh, like it fakes a depth that the model doesnt have, but it might be my impression.
    .- I tried to plug the AO map into its corresponding output, but it doesnt do much; by multiplying it with the base color , instead, the resulting effect is much better; maybe there's a way to make good use of the AO output that I didnt think of?

    @7bajwa Dynamic foliage?! =o
  • 7bajwa
    Offline / Send Message
    7bajwa polycounter lvl 10
    Dynamic foliage is intractable foliage. Like it is in the Uncharted, Crysis, Far Cry, Horizon Zero Dawn, Forza Horizon, God of war and in lots of other games. Grass press down or move away when a character comes closer. Trees break or shatter when you shoot at them and much more.
    Dynamic Foliage in Uncharted
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    7bajwa said:
    Dynamic foliage is intractable foliage. Like it is in the Uncharted, Crysis, Far Cry, Horizon Zero Dawn, Forza Horizon, God of war and in lots of other games. Grass press down or move away when a character comes closer. Trees break or shatter when you shoot at them and much more.
    Dynamic Foliage in Uncharted

    @7bajwa Now that you mention it, I've asked where I can learn how to implement that kind of interactivity, more specifically grass that moves apart when the player goes through it, but nobody answered.
    Do you happen to know how, could you direct me toward some good tutorial? =o
  • Apocrs1980
    Offline / Send Message
    Apocrs1980 polycounter lvl 4
    There is a lot to explain, but if I remember correctly (it has been a long time since I  set up my material) you can achieve a subsurface mask by doing a lerp  or linerinterpolate node and plugging a black and white mask in to the alpha input and your subsurface color into the A input and do a scalar parameter in the B input so you can adjust the intensity.  

    Pixel depth offset is for tessellation or for pushing the pixels out, for grass it's not needed as it can be very taxing on performance.  

    I'm still learning techniques and all I can say is keep learning and messing with nodes.

    You'll get there!
  • Olingova
    Offline / Send Message
    Olingova interpolator
    Olingova said:
    Shader complexity kinda hurts, you can see you got a lot of white parts there. To help with that; what you can do is actually use a "lod material" for the last lod. For exemple; remove the wind part of your main material (will reduce the shader comlexity) and use it for the last lod (that will be seen at a really high distance; so you won't notice it doesnt move anymore) that will already help a lot!

    @Olingova <Total newbie>, remember? ^^'
    How do I reference a simplified version of the shader?
    I had thought of giving the farthest LOD a very basic color+roughness shader with no masking/wind/normals, but in case I need to modify the original materials (for multiple assets), maintaining the basic ones along would be a pain. =p

    The white parts you see are from LOD0, so no LOD material will save it.
    If you have any suggestion on how to furtherly reduce it (beside adding a number of vertices to better cut it out), you're very welcome. =o
    Anyway, if that's a lot of white, to you, you should've seen it before the high-poly cards, that was a freaking "snowy" field of grass!! xD
    I think there's small misunderstanding with the "white parts"; it's caused by shader complexity (basically it's the tiny transparents area of your billboards that are kinda heavy to calculate); and from far away (the LOD you already got) it's still pretty bad.

    A simple solution: change the shader of the LOD you already have. If this shader is lighter (for exemple totally remove the transparent pass or the wind one if you got it) it will be easier.

    To change a LOD material; check that it's pretty easy: https://answers.unrealengine.com/questions/578259/cant-change-lod1-material-grayed-out.html   ( i know it's a "problem topic" but there's the solution below). So it's not even about having mipmaps; it's about applying different (and way lighter) shader on the LOD
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    Olingova said:
    I think there's small misunderstanding with the "white parts"; it's caused by shader complexity (basically it's the tiny transparents area of your billboards that are kinda heavy to calculate); and from far away (the LOD you already got) it's still pretty bad.

    A simple solution: change the shader of the LOD you already have. If this shader is lighter (for exemple totally remove the transparent pass or the wind one if you got it) it will be easier.

    To change a LOD material; check that it's pretty easy: https://answers.unrealengine.com/questions/578259/cant-change-lod1-material-grayed-out.html   ( i know it's a "problem topic" but there's the solution below). So it's not even about having mipmaps; it's about applying different (and way lighter) shader on the LOD
    @Olingova 
    Ok, it seems I misunderstood you, here, when you first told me that I should use a simplified shader.
    I thought you meant that I should reference part of the LOD0 shader into a simplified one, so that I could modify the main one and see the same modficiations in LOD1 and 2.
    I mean, if I change the tint of the main shader, I'd like to see the same changes happen in the simplified ones, so that I dont have to maintain them separately. Would that be possible? But most important, HOW?

    Anyway, I dont see (relevant) white spots on LOD1 and LOD2 (see screenshots in 29 August reply), they're all from LOD0.
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    There is a lot to explain, but if I remember correctly (it has been a long time since I  set up my material) you can achieve a subsurface mask by doing a lerp  or linerinterpolate node and plugging a black and white mask in to the alpha input and your subsurface color into the A input and do a scalar parameter in the B input so you can adjust the intensity.  

    Pixel depth offset is for tessellation or for pushing the pixels out, for grass it's not needed as it can be very taxing on performance.  

    I'm still learning techniques and all I can say is keep learning and messing with nodes.

    You'll get there!

    @Apocrs1980
    So, basically, rather than plugging the thickness map into the opacity output and the subsurface color into subsurface, I should just LERP the two colors into the base color output using the thickness map as a mask?
    Gonna try right away! ^o^

    And I'll get rid of the height map. =0
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    @Olingova @Apocrs1980

    This is the shader remade to ignore opacity, subsurface colour, AO and pixel depth while applying a range limit to normal and wind:


    I re-interpreted the solution mentioned in Olingova's link to make a distance calculator that would work as a mask to decide whether to apply alpha, normals (replaced by a constant) and wind.
    It seems to work well, but I have no idea whether this is what Olingova had in mind.

    This is with a [25 meters] range:




    This is with a [10 meters] range:




    As you can see, the white spots are a bit less, with the 10 meters limit.
    What you cant see is the wind not affecting the grass beyond 10 meters anymore.

    What other improvement could I apply to the shader? =o
  • Apocrs1980
    Offline / Send Message
    Apocrs1980 polycounter lvl 4
    You have no AO?
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    You have no AO?
    I do, there's a dedicated AO map (visible in the screenshot), but instead of plugging it into the pertaining output, I multiply it by the base color.
    Why? =o
  • Steamy_Steve
    Offline / Send Message
    Steamy_Steve triangle
    For those who are interested, I managed to make a material that generates a displacement around the PC.

  • Steamy_Steve
Sign In or Register to comment.