Home Technical Talk

Getting a non-tileable and a tileable texture to blend correctly

Hi everyone!

First off: Thanks for taking the time to read this.

I have the following problem: I've created a tree model, which has a trunk that consists of two parts. The bottom part is a retopologized version of a 3D Scan, while the upper section uses a tileable texture that was created from the scanned texture. (Click here for picture)

Now I've been trying to get the transition between these two parts to blend correctly for ages. What I've done is create a gradient in the upper section of the scan's texture (s. here and here)) that blends over into the tileable texture. If I put the two textures above each other in Photoshop, they blend perfectly.
Then, I've tried two adjust the Unwrap of the "transition", and this is where the problem is: I just can't get the faces to "align" correctly.

As you see, I've used colored dots on both texture edges two help me align them, but I seem to be missing something essential about how Unwrapping works. It's probably simple.

Can anyone help me? I'd greatly appreciate it. :)

Thanks in advance,

Nicolas

Replies

  • Scruples
    Options
    Offline / Send Message
    Scruples polycounter lvl 10
  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    Well it doesn't look to me like they have the same amount of geometry on the edge of both pieces.
  • Ben Cloward
    Options
    Offline / Send Message
    Ben Cloward polycounter lvl 18
    The problem with this is that in Photoshop textures aren't filtered like they are on 3D hardware. In Photoshop, if you zoom in on your image, the pixels get larger and you can see the hard edges between them. When the textures are applied to 3d models, the graphics hardware applies texture filtering to them so you don't see hard edges between the pixels. Instead, the center of one pixel is blended with the center of the next pixel so that the space in between the pixel centers is a smooth gradient. Zooming in makes the texture look blurry, not blocky.

    For a texture that tiles, the pixel at the bottom of the texture blends smoothly with the pixel at the top. If you put your UVs at the very bottom of the texture, there will be a small strip of space in between the last pixel's center and the bottom of the UVs where the top pixel is blended in. This small strip will allow that tile to blend with another tile that has the same stip of pixels on the top, but if it doesn't it won't match.

    I recommend taking the strip of pixels that's at the top of your tiling texture - at least the first row of pixels and maybe several rows - and placing them at the top of your non-tiling texture. Then take the bottom row of pixels in your tiling texture and put that as the very top row on your non-tiling texture. Then shift your top UVs on the bottom piece down slightly so that they fall right in the middle of that top row of pixels instead of right at the top. Do the same for the bottom UVs of your tiling section. Move those bottom UVs up just slightly so that they fall in the center of the last roll of pixels in your tiling texture instead of at the bottom of it.

    You might have to play around with the placement of the row of UVs on the seam. Shift them up or down just a tiny bit until the seam goes away.
  • Ben Cloward
    Options
    Offline / Send Message
    Ben Cloward polycounter lvl 18
    Another problem I see is that your verts on the bottom and top don't match up. There are a different number of verts and they aren't aligned. You'll never get a clean seam unless the vert count is the same and the verts match.
  • Latiro
    Options
    Offline / Send Message
    Hello everyone,

    Thanks for the help! I don't think I'll be able to use Blending Materials, mainly for performance reasons. The only way I could do this would be by doubling the geometry of the trunk (at least partially) and adding Vertex Alpha. I'm not sure how bad it would be, but I'd save that as a last resort.

    Ben, thanks for explaining the entire thing to me. I guess that means that I'll try to edit the geometry so that they are exactly identical. Plus, I'll try the trick you suggested. I'll write here if I found something that helped. :)
  • Latiro
    Options
    Offline / Send Message
    Okay, I did it - basically by making the two transitional parts have identical geometry and then adjusting the Unwrap. It should probably been painfully obvious, but another problem was that the edges of the unwrap didn't match up. Now it works - thanks!
Sign In or Register to comment.