Baking an object's texture is effected by the 'Exclude' option for the first render layer in the Render Layers menu. #42712

Closed
opened 2014-11-24 15:28:55 +01:00 by stephen thomas · 17 comments

System Information
Mac OS 10.10.1 - GTX580 - GTX560Ti

Blender Version
Broken: 2.72b 9e963ae
Worked: ?

Short description of error
Baking an object's texture is effected by the 'Exclude' option for the first render layer in the Render Layers menu. If the object being baked is on a layer that's being excluded, the resulting baked texture will be black.

Exact steps for others to reproduce the error

  • Unwrap default cube
  • Add material to cube
  • Create new image
  • Add image to cube material and have it selected in the node editor
  • Move the cube and light to layer 2
  • In the Render Layers menu, set 'Exclude' to 'on' for layer 2
  • Add another Render Layer, making sure that 2 is on for it.
  • Disable Render Layer 1
  • Select the cube
  • Click 'Bake'
  • The baking always takes the exclusion of Render Layer 1 into account when baking the texture.

I don't think the exclude options should have any effect on texture baking, let alone have an effect when the render layer has been disabled.

system-info.txt

Here's a screencast of the bug:
http://www.spintheyarn.co.uk/projects/baking-bug.mov

**System Information** Mac OS 10.10.1 - GTX580 - GTX560Ti **Blender Version** Broken: 2.72b 9e963ae Worked: ? **Short description of error** Baking an object's texture is effected by the 'Exclude' option for the first render layer in the Render Layers menu. If the object being baked is on a layer that's being excluded, the resulting baked texture will be black. **Exact steps for others to reproduce the error** - Unwrap default cube - Add material to cube - Create new image - Add image to cube material and have it selected in the node editor - Move the cube and light to layer 2 - In the Render Layers menu, set 'Exclude' to 'on' for layer 2 - Add another Render Layer, making sure that 2 is on for it. - Disable Render Layer 1 - Select the cube - Click 'Bake' - The baking always takes the exclusion of Render Layer 1 into account when baking the texture. I don't think the exclude options should have any effect on texture baking, let alone have an effect when the render layer has been disabled. [system-info.txt](https://archive.blender.org/developer/F126063/system-info.txt) Here's a screencast of the bug: http://www.spintheyarn.co.uk/projects/baking-bug.mov
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @stephenthomas

Added subscriber: @stephenthomas
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

Hey @stephenthomas,
could you also append a .blend file, so we can easily reproduce the bug? This would help us to help you ;)

Hey @stephenthomas, could you also append a .blend file, so we can easily reproduce the bug? This would help us to help you ;)
Author

Sure, here you go:
bake-broken.blend

Just hit bake and you should get a nice black texture (which should be red & blue). Turning off the 'Exclude' for layer 2 on Render Layer 1 will make it work again...

Sure, here you go: [bake-broken.blend](https://archive.blender.org/developer/F126136/bake-broken.blend) Just hit bake and you should get a nice black texture (which should be red & blue). Turning off the 'Exclude' for layer 2 on Render Layer 1 will make it work again...
Dalai Felinto was assigned by Julian Eisel 2014-11-24 18:21:34 +01:00
Member

Added subscriber: @dfelinto

Added subscriber: @dfelinto
Member

Mhh, I get a crash when pressing bake. I don't know the code base but maybe the issues have the same root.
@dfelinto, got a failed kernel_assert. Error log:

/blender/intern/cycles/kernel/kernel_compat_cpu.h:51: T ccl::texture<T>::fetch(int) [with T = ccl::float4]: Assertion `index >= 0 && index < width' failed.

Mhh, I get a crash when pressing bake. I don't know the code base but maybe the issues have the same root. @dfelinto, got a failed kernel_assert. Error log: ``` /blender/intern/cycles/kernel/kernel_compat_cpu.h:51: T ccl::texture<T>::fetch(int) [with T = ccl::float4]: Assertion `index >= 0 && index < width' failed. ```
Author

Yes, I got a crash when I tried to bake on the CPU, but GPU seems to work fine. Maybe the issues are related?

Yes, I got a crash when I tried to bake on the CPU, but GPU seems to work fine. Maybe the issues are related?
Author

When I say "Seems to work fine", I mean that the bug I originally raised still happens, but Blender doesn't crash on the GPU when you try to bake.

When I say "Seems to work fine", I mean that the bug I originally raised still happens, but Blender doesn't crash on the GPU when you try to bake.

@JulianEisel I believe this is a duplicate of #40709 (which is in our todo list).
Now the crash would be something new. I'll see if I get that as well.

@JulianEisel I believe this is a duplicate of #40709 (which is in our todo list). Now the crash would be something new. I'll see if I get that as well.

The crash only happens when there are zero objects in a (to be rendered) layer. It is still a bug (related to the #40709) but not something you would run into in a real production.

The crash only happens when there are zero objects in a (to be rendered) layer. It is still a bug (related to the #40709) but not something you would run into in a real production.
Author

I ran into it on a real production, it's how I found it...

I ran into it on a real production, it's how I found it...
Member

@dfelinto, any chance you have some time left to look deeper into this? I could also do, shouldn't be a big challenge code-wise...

Oh, and just to be clear, we're talking about the crash, the original bug report is a duplicate

@dfelinto, any chance you have some time left to look deeper into this? I could also do, shouldn't be a big challenge code-wise... Oh, and just to be clear, we're talking about the crash, the original bug report is a duplicate
Member

Added subscriber: @Sergey

Added subscriber: @Sergey
Member

Okay had another quick look, printing out index and width shows that width stays 0 while index is > 0.
Mind investigating this @dfelinto? (Or maybe @Sergey is interested?)

Okay had another quick look, printing out index and width shows that width stays 0 while index is > 0. Mind investigating this @dfelinto? (Or maybe @Sergey is interested?)

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

This was fixed by efe78d82 - it now prevents baking from happening in those cases.

This was fixed by efe78d82 - it now prevents baking from happening in those cases.
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#42712
No description provided.