Home Unreal Engine

vertex blending leaks

meneer_batavia
polycounter lvl 2
Offline / Send Message
meneer_batavia polycounter lvl 2
Hello guys, first timer here, pardon me

I'm working on unreal 4 now, trying to blend material with vertex color
the setup is like unreal help pages using 3 blend layers
i have 3 textures on the setup
however, every time i paint blue channel on the red(base texture) some of my green channel texture leaking on the edges
this problem is similar to this guy here
https://answers.unrealengine.com/questions/73714/there-is-a-texture-getting-mistakenly-drawn-in-my.html
notice the unwanted pattern under the grass


anyone encountered this before ?

thanks, appreciate.

notice the leaking red and yellow texture (they supposed to be at green channel)
15213466363_d6cc8a795b_c.jpg

as you can see the vertex color is only blue
15832890795_74c666d095_z.jpg

Replies

  • Farfarer
    The only vertex color is blue, but the surrounding color is white, which has all 3 colours in it. That's probably where the bleed comes from.

    I'd try leaving the default as black, and perhaps normalising the vertex color before blending to ensure that multiple layers aren't all added on top of each other.
  • meneer_batavia
    Offline / Send Message
    meneer_batavia polycounter lvl 2
    hello Farfarer, thanks for the response,

    white is the default, i'll try to make it black
    but how do you normalize it ?
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    With the normalize node? :)
  • Farfarer
    Yeah, I'm not certain normalize will help - it depends how it's blending them together. If it simply blends the red over the black (i.e. the base colour), then green over that then blue over that... normalizing won't do much for you.
  • meneer_batavia
    Offline / Send Message
    meneer_batavia polycounter lvl 2
    yep, while the blending works like the instruction, the leak is really disturbing

    especially an OCD like me :D
  • meneer_batavia
    Offline / Send Message
    meneer_batavia polycounter lvl 2
    painting the mesh black before vertex painting helps with the leak, however the mid and top material does not want to mix

    base-top = mix good
    base-mid = mix good
    mid-top = ugly
  • Vailias
    Offline / Send Message
    Vailias polycounter lvl 18
    Same answer I posted at the unreal answers topic you linked: "Texture 1 and texture 5 are both driven by the alpha channel.
    Texture 5 is 1-alpha and texture 1 is alpha. They blend near 0.5. If you've painted with zero alpha for texture 2, then that alpha channel will wind up being interpolated across the border between texture 2 and texture 1. Which means the value will go across the 0.5 range where both 1 and 5 are half blended in (1-0.5 is 0.5) .

    3 options. Add more geometry, reorder your materials, or do some more math to split the alpha channel into two gradients. Material 5 can use one minus alpha * 2 for its lerp, material one could use alpha -0.5 * 2 clamped to 0-1
    That would make a hard switch between Material 5 and Material 1. So long as you don't want those 2 to blend, you can remove or minimize the unwanted blending issue with other textures. "

    Anything painted with an alpha of 1 (top material in that 5 way example) and a material with alpha of zero is going to cross that 0.5 alpha area and blend in some of the base texture, but you can likely minimize that by painting the top color as whatever your mid color is, and full alpha. This should keep any other textures from popping in on the blend region.
  • meneer_batavia
    Offline / Send Message
    meneer_batavia polycounter lvl 2
    Thanks for the detailed explanation Vailias, i only need 3 blend, 5 is too expensive. i guess using 2 is the safest path.

    And one more q, is there any way to export painted vertex information in unreal back to 3d programs ?


    cheers
Sign In or Register to comment.