Home Unreal Engine

Help requested, bark material in Unreal 4

triangle
Hello :) I would be grateful if you could point me in the right direction to fix my banyan tree bark?

Background: I'm creating the texture in Substance Designer. This is a test in UE4.26 to see if the big macro shapes are lining up as I imagine, with the trunk. They are going up with the world...but not locally with the shape of the mesh. The trunk looks great! The branches and roots, dreadful. 

I've included an image of the material and mesh in UE4 as well as some images of the mesh itself so you can see it without the leaves etc. I'm a student and your help is very much appreciated, thank you.








Replies

  • poopipe
    Offline / Send Message
    poopipe high dynamic range
    Um...
    UV the branches ?
  • Alex_J
    Offline / Send Message
    Alex_J veteran polycounter
    Two important things that you haven't shown: 

    1. The material graph
    2. The UV's of the tree


    If the material is applied to UV space, you have to fix the UVs. 

    If it is applied world space you fix it in the material graph. 

    Once you pinpoint the problem then fixing it is just a few easy steps. It's common stuff so you can google it easily as well, just have to know where the problem is so you can search the right phrase.
  • Camille_Meehan
    Alex_J said:
    Two important things that you haven't shown: 

    1. The material graph
    2. The UV's of the tree


    If the material is applied to UV space, you have to fix the UVs. 

    If it is applied world space you fix it in the material graph. 

    Once you pinpoint the problem then fixing it is just a few easy steps. It's common stuff so you can google it easily as well, just have to know where the problem is so you can search the right phrase.
    Thank you! That is my main issue, I'm so new I don't know what to search for, I appreciate the help.

    Here is #1, the material graph.



    And here is the #2 UVs. I think my problem is the UVs not being setup properly. Hmmm



    Thank you again.
  • Camille_Meehan
    "If it is applied world space you fix it in the material graph."

    I believe I need to fix it in the material graph.
  • Alex_J
    Offline / Send Message
    Alex_J veteran polycounter
    UVs are fine. Cutting off the cylinder ends so you can totally straight your trunks/branches might be a good idea but that's not contributing to the bigger problem. 

    Check out this guys channel. He'll help familiarize you with some of these nodes so you can understand what is happening:
    World-Aligned Textures - UE4 Materials 101 - Episode 22 - YouTube

    It's probably a good idea to go and review the texture/UV section of the wiki here as well. Don't worry it's easy stuff to understand and will lay foundation so you can troubleshoot problems like this easily in the future. I'd recommend putting this particular model aside for a moment and setup a test project with just a few cylinders you can practice on. Reduce the variables so that your eyes can see what happens when you change just one thing at a time.

    edit: this guy is useful too WTF Is? Material - World Position in Unreal Engine 4 ( UE4 ) - YouTube

    If you want to make a lot of trees and vegetation it might be a good idea to grab a SpeedTree model so you can see common techniques for laying out the UV's and what sort of textures they use.
  • poopipe
    Offline / Send Message
    poopipe high dynamic range

    Ditch the world aligned texture nodes - it's an extremely expensive way to apply a material to a surface.

    Instead, simply alter your UVs until it looks nice - scaling and shifting them around will do fine. 

    Basically what Alex said

  • Camille_Meehan
    Alex_J said:
    UVs are fine. Cutting off the cylinder ends so you can totally straight your trunks/branches might be a good idea but that's not contributing to the bigger problem. 

    Check out this guys channel. He'll help familiarize you with some of these nodes so you can understand what is happening:
    World-Aligned Textures - UE4 Materials 101 - Episode 22 - YouTube

    It's probably a good idea to go and review the texture/UV section of the wiki here as well. Don't worry it's easy stuff to understand and will lay foundation so you can troubleshoot problems like this easily in the future. I'd recommend putting this particular model aside for a moment and setup a test project with just a few cylinders you can practice on. Reduce the variables so that your eyes can see what happens when you change just one thing at a time.

    edit: this guy is useful too WTF Is? Material - World Position in Unreal Engine 4 ( UE4 ) - YouTube

    If you want to make a lot of trees and vegetation it might be a good idea to grab a SpeedTree model so you can see common techniques for laying out the UV's and what sort of textures they use.
    Great! I will do that and post once I get it more figured out. 

    I switched it to local UV space and it works but is too big. I just need figure out how to add tiling, which I'm sure I can search for. Another basic :D

    Thanks again, Alex.


  • poopipe
    Offline / Send Message
    poopipe high dynamic range
    You don't need the local aligned texture nodes either - just plug the textures into the material node.

    Then scale the mesh UVs in your 3d app. 

    Doesn't matter if they extend outside the 0-1 area
  • Camille_Meehan
    poopipe said:

    Ditch the world aligned texture nodes - it's an extremely expensive way to apply a material to a surface.

    Instead, simply alter your UVs until it looks nice - scaling and shifting them around will do fine. 

    Basically what Alex said

    Thanks. I pulled the world aligned texture nodes out. 

    It sounds like you are saying to scale/move the UV shells in the 0-1 UV space until the texture looks nice. Then tile the texture as I need it in Substance Designer rather than Unreal. Am I understanding you correctly?

    If so, does having different Texel density cause issues? 

    Appreciate the help.


  • Kanni3d
    Offline / Send Message
    Kanni3d sublime tool
    Can leave it as is in designer, no need to adjust your texture.

    Just keep your uv's oriented the way they are (so they all flow in the correct direction), scale them all up uniformally until you meet your desired TD. No branches should be scaled larger or smaller than the other, else you'd get TD issues.
  • poopipe
    Offline / Send Message
    poopipe high dynamic range
    Move and scale the branches so they feed into the trunk as seamlessly as possible and you're fine 

     texel density isn't a worry as long as it doesn't look shit - the scale of information in tree bark changes depending on the age/thickness of the limb so it is appropriate to have varying texel density when using a tileable to texture it


  • Camille_Meehan
    Thank you :) I worked on it more today and got the branches behaving. Here is an image of the progress. Appreciate the help.




Sign In or Register to comment.