Home Unreal Engine

Setting up vertex painting while keeping unique normal maps?

jordank95
polycounter lvl 8
Offline / Send Message
jordank95 polycounter lvl 8

(Not sure if I should be posting this here for in UE4 forum. Sorry mods if this is wrong place!)

I have a bunch of rocks that I’m creating some giant cliffs with. The way I made them is I baked each rock (there’s about 10) from a high poly, then in my material setup I’m using the normal map along with a mask for edge wear (created in Painter) and a tiling rock texture. All set up using material functions within UE4. 

My issue is from a distance you can tell the rock tiling texture is repeating. Doesn’t look great. Up close it looks fine, but players will also be coming from a distance, so I need the tiling to look good.

Is there a way to set up vertex painting for these rocks so I can add in moss or different textures where I need to? Not sure how to set this up with my current material setup and keep the unique normal maps for each rock. 

Thanks

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Show your material setup and I'll draw over it.
  • jordank95
    Options
    Offline / Send Message
    jordank95 polycounter lvl 8
    Obscura said:
    Show your material setup and I'll draw over it.
    here you go. thanks @Obscura


  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    The simplest way is this:


    Anyways, in 4.19 and above, there is a much better way of doing layered materials now. This material function method isn't really good because you can't change the layer setup functions in the instances. With the new method, you can. I would highly recommend to check it out.
  • jordank95
    Options
    Offline / Send Message
    jordank95 polycounter lvl 8
    Obscura said:
    The simplest way is this:


    Anyways, in 4.19 and above, there is a much better way of doing layered materials now. This material function method isn't really good because you can't change the layer setup functions in the instances. With the new method, you can. I would highly recommend to check it out.
    Thanks for this. Though, in my situation, I dont really need to change the functions in the instances as all instances are rocks as well and have the same moss/edge wear applied to them. Am I just not understanding? 

    Also, a bit confused with your overdraw pic. It's also me being fairly new to these kinds of material setups in UE4. But what am I connecting to the "vertex color red channel"? I tried connecting another material function (a different rock matererial), but it wouldnt let me.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Mask red channel goes to multiply A and vertex color red channel goes to multiply B. Then the result of that goes to the layer blend alpha like on the picture. This makes you being able to paint where to show the moss based on the mask.

    About the layered material approach:
    Currently you don't want to, but imagine you have 5 more layered materials in the scene. With your current approach, you would need to wire up 5 different material setups. With the new approach above 4.19 the amount of layers are dynamic and can be edited in the material instance. So you can set up one graph and instance it to make different layered material setups with different layers and blend settings.
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    +1 for the new layered material functions. They pretty much make the layered approach that we used to have to do obsolete.


  • jordank95
    Options
    Offline / Send Message
    jordank95 polycounter lvl 8
    @Obscura ok got i, thx. I think ill try that approach next time I can. 

    Though Im having a bit of an issue with this setup you suggested. When I paint on one rock, it paints on every other rock thats the same and not just the single instance. I have tried using one vertex color node (and using both red/green channels from this node) and also tried using two vertex color nodes (one for red and one for green).

    Any ideas?
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    That is very weird. I know you can propagate the paint of a duplicate to the original mesh so it applies on all of them, but thats on a button and shouldn't happen by default. Can you show a video of it? I have never experienced anything like that  :D
  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    Another to look into might be distanced based tiling, they do this alot on terrains. That is at some threshold where you figure the tiling doesn't look good, you do a camera distance lerp between coordinates that tile less, or differently.
Sign In or Register to comment.