Baking with Cycles using a custom cage always returns "No valid cage object" #58917

Closed
opened 2018-12-07 09:36:35 +01:00 by Gabriele Coen · 8 comments

System Information
Operating system: Win10 64
Graphics card: Quadro M5000

Blender Version
Broken: 2.80, 606223f6a6, blender2.8, 2018-12-07
Worked: 2.79b

Short description of error
Baking normals from a high resolution mesh to a low poly mesh using a custom cage always results in a "No valid cage object" error and nothing is baked. Same for baking diffuse texture.
I've been trying to do it from a scanned high resolution mesh that I can't provide, but I'm attaching a simple test scene that reproduces the issue.

Exact steps for others to reproduce the error
cage_bake_test.blend
In the provided scene it should be as simple as pressing the Bake button at the bottom of the render tab as everything should be already selected.

The steps I followed are:

  • Import high poly mesh (I created one for the test scene).
  • Create low poly target object.
  • Duplicate low poly mesh and fatten it to create a cage.
  • Assign new Cycles material to low poly object.
  • In the Image editor create new Image.
  • In the Node editor create new Image Texture and assign the previously created Image to it.
  • In the Bake section of the render options, select Normals from the dropdown menu and tick Selected to Active and Cage options.
  • Set the cage object.
  • Select the source mesh, then select the target mesh.
  • Make sure the image texture node is selected in the Node editor.
  • Press the Bake button and you should receive the error.
**System Information** Operating system: Win10 64 Graphics card: Quadro M5000 **Blender Version** Broken: 2.80, 606223f6a61, blender2.8, 2018-12-07 Worked: 2.79b **Short description of error** Baking normals from a high resolution mesh to a low poly mesh using a custom cage always results in a "No valid cage object" error and nothing is baked. Same for baking diffuse texture. I've been trying to do it from a scanned high resolution mesh that I can't provide, but I'm attaching a simple test scene that reproduces the issue. **Exact steps for others to reproduce the error** [cage_bake_test.blend](https://archive.blender.org/developer/F5867565/cage_bake_test.blend) In the provided scene it should be as simple as pressing the Bake button at the bottom of the render tab as everything should be already selected. The steps I followed are: - Import high poly mesh (I created one for the test scene). - Create low poly target object. - Duplicate low poly mesh and fatten it to create a cage. - Assign new Cycles material to low poly object. - In the Image editor create new Image. - In the Node editor create new Image Texture and assign the previously created Image to it. - In the Bake section of the render options, select Normals from the dropdown menu and tick Selected to Active and Cage options. - Set the cage object. - Select the source mesh, then select the target mesh. - Make sure the image texture node is selected in the Node editor. - Press the Bake button and you should receive the error.
Author

Added subscriber: @yeeeeeeee

Added subscriber: @yeeeeeeee

Added subscribers: @brecht, @ZedDB

Added subscribers: @brecht, @ZedDB
Brecht Van Lommel was assigned by Sebastian Parborg 2018-12-07 10:40:43 +01:00

Don't know if it is you or Dalai I should assign this to @brecht.

Don't know if it is you or Dalai I should assign this to @brecht.

Added subscriber: @dfelinto

Added subscriber: @dfelinto
Brecht Van Lommel was unassigned by Dalai Felinto 2018-12-07 11:25:11 +01:00
Dalai Felinto self-assigned this 2018-12-07 11:25:11 +01:00

Super confirmed, and the issue is a bit more strange in fact. I made an example that works in 2.79[*]:
baking-with-cage-279.blend

In 2.79 it works fine, and you can even bake Combined. In 2.80, however:

  1. The "cage" property shows red, and in fact it bakes as if it there was no cage.
  2. Once you set a cage, it indeed says no object.
    • Tip for the task author, if the reported bug works in 2.79, it helps to have a file saved in 2.79 instead of 2.80 that works in both versions so we can quickly compare.
Super confirmed, and the issue is a bit more strange in fact. I made an example that works in 2.79[*]: [baking-with-cage-279.blend](https://archive.blender.org/developer/F5868394/baking-with-cage-279.blend) In 2.79 it works fine, and you can even bake Combined. In 2.80, however: 1) The "cage" property shows red, and in fact it bakes as if it there was no cage. 2) Once you set a cage, it indeed says no object. * - Tip for the task author, if the reported bug works in 2.79, it helps to have a file saved in 2.79 instead of 2.80 that works in both versions so we can quickly compare.

Investigation update: bpy.context.scene.render.bake.cage_object is correct (e.g., "MyCage"), however when you clear it and reassign to the cage object you get leading spaces (e.g., " MyCage").

Investigation update: bpy.context.scene.render.bake.cage_object is correct (e.g., "MyCage"), however when you clear it and reassign to the cage object you get leading spaces (e.g., " MyCage").

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

The original report is now fixed. Baking in 2.8 is still a bit strange/different when comparing to 2.7. That is a different issue than the reported one though.

The original report is now fixed. Baking in 2.8 is still a bit strange/different when comparing to 2.7. That is a different issue than the reported one though.
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
3 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#58917
No description provided.