1
$\begingroup$

So I am pretty new to modeling. I made this high poly model and then tried to print it to a low poly version using the following bake settings.

high poly

enter image description here

enter image description here

But every time i bake it, it returns this mess:

enter image description here

I have tried splitting the UV without using smart unwrap, turning the ray max distance up and down to many different values and have tried tweaking the extrusion setting, even though the entire high poly model is encapsulated by the low poly.

I then started to think the problem was with the high poly model and the decimate modifier i used, so i decided to copy paste the low poly and add some divots onto the top face to see if that was the problem:

enter image description here

Yet this is what i got:

enter image description here

Why is this happening? I have baked normal maps before on other models and have never come across such issues, in fact, all of them turned out perfectly. But for some reason this one model just does not want to work.

On top of the info I have typed, my normal texture is 2048x2048, but i have tried with higher res, giving the same results. The normal texture is set to non color and linked to a normal map. The texture itself is set to 32 bit float:

enter image description here

I would like to post more pictures, but i am unable to do so due to my non existent reputation.

Any help would be appreciated! I'm pulling my hairs out with this one!

File is available at https://drive.google.com/file/d/17oCP5v-Vj8qDjau7Uyxm1kQz6a21JGaM/view


@vklidu Thank you so much for your quick response! Using a cage has worked wonders to get the normal details right! However, I am still getting some very weird artifacts on the baked normal map...

enter image description here enter image description here

Tweaking the max ray distance seems to alter it, but I can't ever make it disappear.

Here's my files:

https://drive.google.com/file/d/17oCP5v-Vj8qDjau7Uyxm1kQz6a21JGaM/view?usp=sharing

$\endgroup$
2
  • $\begingroup$ A link to a file would be helpful. Suspects here are intersecting high and low or flat shaded low, but can't tell from just the pics you have. $\endgroup$
    – Nathan
    Commented Jun 2, 2022 at 18:29
  • $\begingroup$ Added a link to the files in answers :) $\endgroup$
    – Adryll
    Commented Jun 2, 2022 at 19:10

2 Answers 2

2
$\begingroup$

So the first thing we notice upon looking at your low poly is that the normals are backwards:

enter image description here

I can see that by enabling face orientation in overlays. Backwards normals means it will shoot the rays the wrong direction, and that it will read the normals as modifications to backwards normals. Let's fix that, by recalculating normals in edit mode (select all vertices, then ctrl n is recalculate normals for me.)

Now, let's look at your high poly and low poly on top of each other. To help us distinguish them, I've given the low a purple viewport display color:

enter image description here

We notice that the high and low poly intersect. That's no good. The rays will be shot from the low poly, along the low poly's normals, in a single direction, and if the high poly encloses the low poly, then those rays will hit the backside of the high poly and we'll get totally wrong normals.

This is what extrusion or a cage is for, to set this distance. There's another way to do this, which I prefer, because it gives us more visual information, which is to use a temporary displace modifier instead. This is exactly the same as using ray extrusion. Let's do this; it will show us why you need to use a cage, rather than ray extrusion:

enter image description here

I duplicated high and low so we can see both sides. I'm using an equal displace on both copies of the low; we can see what we get when we'd use an extrusion of 0.52. (Well, it would be 0.52, if you had applied scale; not sure, with unapplied scale.) It doesn't completely enclose the high poly. But if we made it any bigger, the legs and the the rim self-intersect, and maybe intersect the the high, which is something we don't want. So yes, we want a cage. So let's look at your cage, again coloring it to help us see, in conjunction with your high poly:

enter image description here

The cage is almost there. You've raised the top. But we still see Z-fighting all over the place. Exactly at the same spot as the high isn't good enough for Blender. We'll have to extrude this very slightly, which I'll do by selecting all and using shrink/fatten operation. We want to see none of the high poly, but we don't want to see any self-intersection either. If needed, we could do this on a per-vert basis, but doing it evenly along all verts with the cage you've provided works here, since you've already done the top.

There is one other thing we want to do, which is to change the table to smooth-shaded, clear all sharp edges, and turn off autosmooth. I've written about why this should be done several times elsewhere, most recently at How to bake a high poly, smooth cube onto a simple, sharp cube? . The short of it is that if we use sharp edges-- flat shading-- then some of our rays are going to miss the high poly.

Of course, your cage, as a duplicate of you low poly, had backwards normals, so we probably want to fix those, and get it set as smooth shading as well (although I'm not totally sure it matters.)

When we're all done with that, we can bake, with almost your settings. I'm going to set Max ray distance to 0 (which actually means, infinite, not zero). With a proper bake, max ray distance should almost never be used. It will stop rays when they get long-- but through the steps we've taken, we've assured that every ray is hitting the high poly, and that they're hitting the correct side of the high poly. Which is what should be done with a bake.

After all that, we get what we expect:

enter image description here

I'm displaying my normals on a zero roughness glossy shader, which will let us see our normals much more easily to check for problems. Looks good to me here. At first, that normal map image looked wrong to me, and I rebaked, and rebaked, and then I saw, ohhhhh, object space, not tangent space :)

Note that your low poly is made out of several different distinct meshes that intersect each other. At these intersections, we should expect some minor artifacts, especially when using texture filtering. To fix these, we'd want to redesign our low poly to be a single, manifold mesh. Here, it doesn't seem like those locations are going to be noticeable, so I think you can live with the artifacts.

$\endgroup$
2
  • $\begingroup$ Thank you, so, so much for this really in depth answer. I have read it all a couple times and its extremely helpful! This whole time i thought the low poly model had to intersect the bottom most face of the high poly model... I will apply it once i get back on my computer. Again, thank you! Wish i had higher reputation to up vote your answer haha. :) $\endgroup$
    – Adryll
    Commented Jun 2, 2022 at 21:05
  • $\begingroup$ @Adryll Thanks, I'm happy to be of help to anybody that's willing to read anything a couple of times :) Those are my fave peeps. $\endgroup$
    – Nathan
    Commented Jun 2, 2022 at 22:49
0
$\begingroup$

Extrusion is definitely good way to go if highly overlaps lowers.
For simple example ...

enter image description here

enter image description here

Extrusion 0 enter image description here

Extrusion 0.4 enter image description here

enter image description here

... but what works in one part of your model could fail in another. For more complex meshes you can try Cage (mesh that works something like extrusion, but under your control).

Try to change environment lightning or switch to simple diffuse shader to see effect and Strength of Normal Map should be smaller than 1 like here 0.5 is maximum I see change ... sometimes 0.1 is also fine.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .