Page MenuHome

Bake's Ray Distance only considers one side of the face
Confirmed, NormalPublicBUG

Description

System Information
Operating system: Linux-4.13.10-041310-generic-x86_64-with-debian-stretch-sid 64 Bits
Graphics card: GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.67

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-02 22:33, hash: rB50ccbe6bb233

Short description of error
video demo
When trying to bake a normal mapped plane, or full geometry to another object, the bake will 'go through to the other side'


Unless a solidify mod is added to the active.

This is because 'Ray Distance' affects only one side of the face.

Exact steps for others to reproduce the error

  • open attached blend file
  • notice the solidify mod on the object we want to bake to
  • bake either or both of the two smaller objects to the cube (it should work fine)
  • turn off the solidify mod, and bake again and bake (the results should appear on the opposite side)

Event Timeline

MACHIN3 (MACHIN3) renamed this task from baking to another object - as demnstrated in this case - requires a solidify mod on the active? to baking to another object - at least as demonstrated in this case - requires a solidify mod on the active?.Jul 4 2019, 5:10 PM
MACHIN3 (MACHIN3) created this task.
Sebastian Parborg (zeddb) lowered the priority of this task from 90 to 50.

It seems like the ray distance is not working.

@MACHIN3 (MACHIN3) can you test with 2.79? To determine if this was introduced in 2.80 or was ever there? (the best sample files in this case are the ones that were created in 2.79 in fact).

@Dalai Felinto (dfelinto)

Looks like there are similar, and more issues in 2.79:

  • the pyramid, only really bakes with solidify disabled, but it will go through in this case. Also it requires some amount of ray distance (vs 0 in 2.80)
  • the normal mapped plane doesn't bake at all, whatever I do.

This must have been why I've baked in Blender Internal in 2.79.

So, I'm glad that - with BI removed - the decal/planea ctually does bake now in cycles!

Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Bug".Feb 6 2020, 7:21 PM

I can confirm.
My suspicion that for the negative side of the face, the distance is also negative and therefore always less than the "Ray Distance".
https://docs.blender.org/manual/en/dev/render/cycles/baking.html#selected-to-active

Germano Cavalcante (mano-wii) renamed this task from baking to another object - at least as demonstrated in this case - requires a solidify mod on the active? to Bake's Ray Distance only considers one side of the face.Feb 7 2020, 3:02 PM
Germano Cavalcante (mano-wii) updated the task description. (Show Details)

Also, can the output of the normal map only include legitimate colors when using Selected To Active? I would like to work review on this code but very new to this developer group.

So, issue T62422 had gotten merged with this one, but then it got unmerged again. It seems very closely related to me. @Sebastian Parborg (zeddb) committed a fix, and @Vyacheslav (hitrpr) says it works now: rB27cac4a102b9

Can anyone tell whether this one is resolved as well? @MACHIN3 (MACHIN3)? @Germano Cavalcante (mano-wii)? Two reports for the price of one?

@Joe Elliott (thegryphonrider)
Now it is possible to bake details separate with new setting, but together they give weird result, that I can`t explain.
Anybody can do it?

@Vyacheslav (hitrpr): That's strange. It looks like the cube is baking the normals for the decal, but a different render pass for the pyramid? The color of the white region; is that white color coming from the selected pyramid somehow, or from the active cube? Does it make a difference if you change the color of the cube -- does the white patch in the baked image change color, too? What if you select the decal first, then the pyramid, then the cube -- does the white patch still render under the pyramid, or does it move to the decal region?

@Joe Elliott (thegryphonrider)
It looks like we dug out new bug under old one :)

  1. Order of selection between pyramid and circle changes nothing. I suppose, blender uses inner object indexes for baking order.
  2. White spot is from circle, but it`s color is from nowhere.

New tests and new simple file for tests.