Home Unreal Engine

[SOLVED] Blending between 2 textures using vertex paint in UE4

ICO
Hello fellow artists!

I'm in a dead end and would greatly appreciate if someone can help.

I have made a tree, where lower half is sculpted and unique texture is made for in Painter and upper half is not sculpted and would use a tilable texture.

I also have 2 tree bark textures I'd like to blend between in UE4. One texture is unique (made in Painter), the other one is tilable (made in Designer).

I've set up my tree mesh through Blender to have RED (255,0,0) vertex paint colour only on the part of the tree that is going to use the tilable texture (ignore the canopy, it's using another material and it's not relevant for this example).


This is how the tree UVs look:



Upon importing into UE4, I've made sure that "Vertex Color Import Option" is set to "Replace".



In UE4, I've made the simplest possible material having 2 base colour textures (tilable and unique).




I've then run a LERP node to blend between the two textures using a Vertex Color node for the alpha. From the vertex colour I pick the red channel because that's the colour I've assigned to the upper part of the tree mesh in Blender.



This is what I get. Unique texture is correct, but the tilable texture is not assigned correctly, as if the Vertex Color is not at all taken into account.





Can someone please explain to me what am I doing wrong? I'm apparently incapable of solving that issue on my own... :s

Thanks!

Replies

  • Axi5
    Options
    Offline / Send Message
    Axi5 interpolator
    A few things, your UV's don't look great to be honest and could be causing some of the issues, but that aside I think you're not getting vertex colours in Unreal. Did you check the box on the importer for reading vertex colours? Just try outputting the vertex colours into base colour and see what you get.
  • ICO
    Options
    Offline / Send Message
    ICO
    Hey Axi5, thanks for your reply. It'd be really helpful if you can tell me what exactly you don't like about the UVs, so that I can change it.

    Here's the solution I was given by a person from the awesome DiNusty community:

    I had to vertex paint the lower part of the tree in black (0,0,0) and in the LERP node, I had to invert the texture order -> first goes unique texture into A and tileable texture into B. Now everything looks as supposed to!
  • Mink
    Options
    Offline / Send Message
    Mink polycounter lvl 5
    Try to straighten out your UV's. They'll perform much better if the majority of them are semi-even rectangles. You're going to have crazy warping and super visible ugly seams with UV's as wonky as that.
Sign In or Register to comment.