Home Technical Talk

Need opinions about my foliage for UE4

DxDen1004
null
Hello everybody,
first thing first, I would like to apologize for my english :smile:.
Since I've been travelling through Austria in the past days I decided to shot some photos of the local vegetation to use them as textures in Unreal Engine 4. I'm also pretty new at modelling and creating levels, I watched videos around and checked the Polycount wiki many times and I have made some progress and understood the workflow.
Anyway I'm not sure if my work is well done or if I should start from the beginning.

This is one of the plants I've been working on, what do you think about this?


This is another one, but I definitely need to model more variations of it.



This one is a very small plant that's about 3cm to 5cm tall in nature, so I'm not worried about it too much, should I? :smile:




And this is how it looks in a mediocre scene with just a material, a directional light, a Sky light and a Sky sphere.

I should also say that I shot pics of every plant I could find, and for every plant I took photos of a healty leaf, an almost-dead leaf and a dead leaf, in the future I will model more variations for every plant. I created an atlas like this one for every plant:

Last question: I searched a lot on google and on the forum but I couldn't find an answer. How many triangles should a foliage mesh have? I've tried to create models as low poly as I could, trying to get them to look realistic. The average is 100 tris for small plants and 200 for bigger plants.

I can't wait to read what you think of this work, if you have any suggestion or critique I will be very happy to know.
Thanks in advance, have a nice day!

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    To be able to give better feedback, we would also need to see your plants wireframes, and some another textures, like normal, roughness. You could also show your references. Like how the real bush looks.

    I think they look very flat shaded. You should have a much stronger normal map that shows the bending of the leaf towards the middle vein, and the humps between them. They aren't this flat and straight in the reality.

    You can also look at the shader complexity / quad overdraw view to see how bad is the density and overlapping. It doesn't seem too bad from here.


  • Butthair
    Options
    Offline / Send Message
    Butthair polycounter lvl 11
    Hey DXDen, glad to see another taking a stab at foliage.

    Get your foliage material up when you can, that's going to be a primary working place. Majority of the effect comes from that. Google for foliage in unreal, you'll get a lot of resources.

    Simple things, if you haven't already set them:
    Blend Mode: Translucent
    Shading Model: Two Sided Foliage

    Use a desaturate or more saturated version of your base color for your Subsurface Color (this will only look right with two sided foliage). You can also add a AO map.

    You can also use the FuzzyGrassShading node for you base color and SSS color.

    The big missing element is having light penetrate through the leaves a bit, mainly for thin broadleaves. Having your material set up should allow this, but I know a lot of people use a thickness map, where the leaves are white and only get dark at thicker areas - leaf veings and towards their base.

    But this map needs to be added to shader somewhere. Which is based on how the shader is setup. When I use them, I combine them with a fresnel and distance based mask to control the effect at glancing angles over a distance (this way close up leaves use the mask more than those further away).

    Hope this get's you going in a direction.

    There's also the matter of lighting and post effects, so yeah....
  • DxDen1004
    Options
    Offline / Send Message
    DxDen1004 null
    Hello,
    thanks for your quick reply! So, let's go with the first plant, this one:

    Here's the wireframe of the mesh, you can better see it on the left side of the screen:Basically the plant consists of two leaves duplicated several times, scaled and rotated. As I said before I'm not good at modeling yet :sweat:.


    This is how the plant looks like in real life (sorry but I don't have a better reference than this one on my PC right now, the plant is not the one in the center of the picture of course :smile:).



    This is the material setup inside UE4, it's quite simple and I copied it from a video I found on YouTube, but it looks like everybody use a identical shader. If you have a better solution or a better shader please tell me how to create it :mrgreen:


    Now let's go with textures:
    Base color


    Normal map (created with Photoshop using Filters -> 3D -> Generate Normal Map, please let me know if there is a better way to bake normal maps)


    Opacity map (actually I don't know if I should store this in the alpha channel of the atlas)

    I have no roughness or other textures right now, there should be others? I'm pretty new to this so sorry if my questions are stupid for you :smile:. I've tried to set the Blend Mode to translucent but I obtain a black material, also subsurface seems to work, is not very realistic anyway, so if you have any suggestion about how to make this to look even better I would really like to know!


    Thank you for your replies, any other suggestion will be great.
    Have a nice evening!
  • Butthair
    Options
    Offline / Send Message
    Butthair polycounter lvl 11
    You can't have two-sided checked. It's odd I know, I thought to do so as well, make sense generally. Nope, keep it off, only have Two Sided Foliage set. This is because of the SSS, it doesn't work right, it can't process that normal. Unlit is fine, but not masked or translucent.

    If you need two sided, make it in your software so you can define the normals for both sides. Ie, make the the model two sided.
    If you use max or maya, you can duplicate the mesh and invert the normals. Merge those together as one mesh then merge the verts. They should retain normals for both sides.

    And because you're not done yet, set the normals of your foliage to be Z+ (world space would be Y+ for maya).

    Very important or math goes bad.
  • DxDen1004
    Options
    Offline / Send Message
    DxDen1004 null
    @Butthair
    Thanks for your reply!
    So if I understood your post correctly, using "Masked" Blend Mode, "Two sided foliage" shading model with "Two sided" checked is not the correct setup because the engine won't use the normal map. Please correct me if I understood wrong. So a better workflow would be creating a model that actually has two sides for every leaf, leaving all the material settings as they are now but unticking "Two sided". 
    If you could point me to some good tutorials or guides about this workflow would be awesome.

    Edit: after a bit of searching I found a post from an Unreal dev where he wrote that using the Two-sided option automatically flip the normals for the back side of the leaves. I'm getting more confused :/

    Thanks a lot for your answers and for your time!
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Butthair said:

    Blend Mode: Translucent




    It should be masked.
  • DxDen1004
    Options
    Offline / Send Message
    DxDen1004 null
    @Obscura
    So you think that my actual setup of the material is fine? 
    Thanks for your reply!
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    I think a proper normal map would help much more. The way you make the normal map isn't a "baking" but for what you would want to do, you don't need baking. I would put those textures in like Substance designer or something like  Bitmap to material and play with the sliders until it gives you nice humps for the shapes of the leaf. That should help a lot with the very flat, and card like shading. 

    To your another question about the other maps, you could have a translucency map too, to control the sss (plugged into the opacity slot). The veins should not let that much light through.
  • Butthair
    Options
    Offline / Send Message
    Butthair polycounter lvl 11
    @Obscura You're right. I even have it set that for my grass.
  • DxDen1004
    Options
    Offline / Send Message
    DxDen1004 null
    Hello all, 
    I've been working on my foliage a bit in the past couple days, I'll upload some images as soon as I get home!
  • DxDen1004
    Options
    Offline / Send Message
    DxDen1004 null
    So, I managed to get my foliage to look better redoing the material, now instead of using a material for every plant I created a master material and I use instances. This is how the material looks now: 
    I also discovered that comments can be colored, they look so nice and they help to keep everything in order, that's lovely!


    Also, as @Obscura suggested, I created a better defined normal map, since from what I understood normal maps are used by UE4 to calculate how the light should behave on the surface. That's the new normal map:

    Thanks to a new normal map and to the possibility to control its strenght I obtained nice looking (for me, you'll be the judges :blush:)  leaves, you can see the old model (on the sides) and a new one I made (in the center):
    The new model is about 500 tris, it's too high? I managed to get a nice detail and the leaves now look more realistic:
    Let me know if I should lower the triangles count a bit.

    If you have any more critics or suggestions I'll be happy to know.
    Have a nice evening!
Sign In or Register to comment.