BAKE: tileable normals - possible?

Question Materials and Textures

(Apologies if this is a silly question. I didn't seem to find a direct answer in the course.) Using 4.2.9 LTS.

I had the idea of baking a tileable normal image, to apply it for a texture on a large area. It *almost* seems to work, but not quite.

(see below) The hi-poly geometry is a repeating pattern of "bumps", and the lo-poly is just a plane slightly above them. Ray distance is set to just include all the bumps plus a little margin. Pixel margin was set to 16, or zero, but didn't seem to have an effect.

The normal image result is "not quite" tileable, since colors are a little off around the edges. (I actually saved it as EXR, but I don't think it is important.)

I suppose it is behaving as expected? Maybe I'm trying to do something unreasonable - or there is another way?

I thought I had done this successfully with 2.81a...

Geometry setup is like:

01-geometry.jpg

Output:

corn-normal-01.jpg

1 love
Reply
  • Chunck Trafagander replied

    Hey there! 

    Thank you for the pretty extensive write-up! Unfortunately I'm still a little fuzzy on the details about the issue we're facing, so I've got some follow up questions. :)

    1. When you mentioned "The normal image result is "not quite" tileable, since colors are a little off around the edges", are you referring to the edge of the image's boundary? Or the edge of each tiling bump? I have taken the above normal map into Krita to check out the texture and I could not see any technical artifacts present in the map around the edges of the image, but I could have easily missed them as well. However, it appears to tile without any issue from what I could see.

    2. If you are to use this image as a normal map for a material in Blender, what does it look like tiled a couple times (so we can see if there is a distinct seamline)? Below is an example of a test I baked, the centre quad is the complete 0-1 UV Space, with each extension crossing into new UV tiles. Following how you've set up your bake, I wasn't able to replicate any baking issues that I could see. 🤔

    Please let me know if anything needs more clarity, I'm happy to add more context to what I'm looking for! Hopefully this will stir something up and we will be one step closer to figuring it out!

    Chunck :)

    1 love
  • techworker1 replied

    Thanks chunck . I looked at everything again. (array tests are below)

    I think I was affected by 2 issues:

    1. There is an optical illusion that makes the left/right edges of the planes look different (lighter/darker). I don't actually see any seams in an array.

    2. (Bigger) I tried to apply a plane normal texture around a cylinder, which is impossible, because there will have to be one seam where the normals reverse. I must have done something wrong, because later I could apply the plane texture around a cylinder.

    [Baking a cylinder to a cylinder obviously works.]

    array-applied-02.jpg

    1 love
  • Chunck Trafagander replied

    Oh ya, definitely easy for Blender to play tricks on your eyes if we're looking at stuff in the 3D view haha. 

    And totally, at some point you'll need a seam for more complicated geometry like the cylinder. With a bit of manual effort in the UVing as well as ensuring that the texture is actually seamless, you'd at least be able to have a texture running seamlessly across the body of the cylinder. As for the tops and bottom faces tho, that would involve a ton of work for likely sub-par results, visible seams are just a reality for that type of shape. 

    In these resent images, it looks like the normal map tiles correctly on the right hand plane. I'm not sure if those minor black lines in the normal map are just grid lines or if they are seams in the texture? However, the shaded plane on the right side looks correct!

    1 love
  • techworker1 replied

    So I finally got what I wanted (not 100% perfect). UV unwrapping seems trickier than I expected.

    final-01.jpg

    • 🔥
    1 love
  • Chunck Trafagander replied

    Fantastic! Ya UV unwrapping is the mortal enemy for a lot of people, haha. That being said, I think you've done an excellent job with this and now you've got some good texture baking experience to boot! :D