Bake's Ray Distance only considers one side of the face #66438

Open
opened 2019-07-04 17:10:47 +02:00 by MACHIN3 · 21 comments

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: 50ccbe6bb2

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'
image.png
Unless a solidify mod is added to the active.
image.png

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)

baking_requires_solidify.blend

**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: `50ccbe6bb2` **Short description of error** [video demo ](https://www.youtube.com/watch?v=9CduQ7AFsVk) When trying to bake a normal mapped plane, or full geometry to another object, the bake will 'go through to the other side' ![image.png](https://archive.blender.org/developer/F8327611/image.png) Unless a solidify mod is added to the active. ![image.png](https://archive.blender.org/developer/F8327616/image.png) 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) [baking_requires_solidify.blend](https://archive.blender.org/developer/F7566438/baking_requires_solidify.blend)
Author

Added subscriber: @MACHIN3

Added subscriber: @MACHIN3

#90069 was marked as duplicate of this issue

#90069 was marked as duplicate of this issue

#62422 was marked as duplicate of this issue

#62422 was marked as duplicate of this issue
MACHIN3 changed title 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? 2019-07-04 17:11:04 +02:00

Added subscriber: @ZedDB

Added subscriber: @ZedDB
Dalai Felinto was assigned by Sebastian Parborg 2019-07-05 10:48:07 +02:00

It seems like the ray distance is not working.

It seems like the ray distance is not working.

@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).

@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).
Author

@dfelinto

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

  • 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!

@dfelinto Looks like there are similar, and more issues in 2.79: [baking_requires_solidify_279_2.blend](https://archive.blender.org/developer/F7567968/baking_requires_solidify_279_2.blend) * 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!
Dalai Felinto removed their assignment 2019-12-23 16:33:52 +01:00

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Added subscriber: @mano-wii

Added subscriber: @mano-wii

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

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 changed title 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 2020-02-07 15:02:34 +01:00

Added subscribers: @Vyach, @EllJNidan, @IngmarFranz

Added subscribers: @Vyach, @EllJNidan, @IngmarFranz

Added subscriber: @MikeCroswell

Added subscriber: @MikeCroswell

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.

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 #62422 had gotten merged with this one, but then it got unmerged again. It seems very closely related to me. @ZedDB committed a fix, and @Vyach says it works now: 27cac4a102

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

So, issue #62422 had gotten merged with this one, but then it got unmerged again. It seems very closely related to me. @ZedDB committed a fix, and @Vyach says it works now: 27cac4a102 Can anyone tell whether this one is resolved as well? @MACHIN3? @mano-wii? Two reports for the price of one?

@EllJNidan
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?
2020-05-23_19-46-12.mp4

@EllJNidan 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? [2020-05-23_19-46-12.mp4](https://archive.blender.org/developer/F8549614/2020-05-23_19-46-12.mp4)

@Vyach: 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?

@Vyach: 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?

@EllJNidan
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.
bbt.blend
2020-05-24_12-56-16.mp4

@EllJNidan 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. [bbt.blend](https://archive.blender.org/developer/F8550606/bbt.blend) [2020-05-24_12-56-16.mp4](https://archive.blender.org/developer/F8550607/2020-05-24_12-56-16.mp4)

Added subscriber: @Ishaqalasyja

Added subscriber: @Ishaqalasyja

Added subscriber: @ParallelMayhem

Added subscriber: @ParallelMayhem

Added subscriber: @Nominous

Added subscriber: @Nominous
Philipp Oeser removed the
Interest
Render & Cycles
label 2023-02-09 14:00:13 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
10 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#66438
No description provided.