Cycles-Regression: invisible shaders are optimized and compiled although they shouldn't #50181

Closed
opened 2016-12-04 17:53:02 +01:00 by mathieu menuet · 8 comments

Note that this report follows a discussion on IRC with @angavrilov @ThomasDinges and @lukasstockner97. It seems it worked as expected (shaders not visible also not compiled and not optimized) before, but I couldn't find the revision where it broke. So @ThomasDinges proposed to report it as a bug.

System Information
all vendors

Blender Version
Broken: latest master

Short description of error
Objects can be hidden because of layer visibility, or invisible only for rendering, or culled by camera/distance culling. Their mesh are not processed in the scene preparation, but their shaders do, increasing frame render times for nothing. List of required shader should be created after camera/distance culling.

Exact steps for others to reproduce the error
Open this Blend: bug hidden shaders compiled and optimized.blend with --debug-cycles and hit F12. See that material.001 is getting optimized and compiled also only cube.001 (hidden on an invisible layer) has it.

Note that this report follows a discussion on IRC with @angavrilov @ThomasDinges and @lukasstockner97. It seems it worked as expected (shaders not visible also not compiled and not optimized) before, but I couldn't find the revision where it broke. So @ThomasDinges proposed to report it as a bug. **System Information** all vendors **Blender Version** Broken: latest master **Short description of error** Objects can be hidden because of layer visibility, or invisible only for rendering, or culled by camera/distance culling. Their mesh are not processed in the scene preparation, but their shaders do, increasing frame render times for nothing. List of required shader should be created after camera/distance culling. **Exact steps for others to reproduce the error** Open this Blend: [bug hidden shaders compiled and optimized.blend](https://archive.blender.org/developer/F414056/bug_hidden_shaders_compiled_and_optimized.blend) with --debug-cycles and hit F12. See that material.001 is getting optimized and compiled also only cube.001 (hidden on an invisible layer) has it.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author
Added subscribers: @angavrilov, @LukasStockner, @ThomasDinges, @bliblubli
Author

Added subscribers: @brecht, @Sergey

Added subscribers: @brecht, @Sergey

Don't currently have time to check this, but if someone can test whether it's ca03edd it'll give some clues :)

Don't currently have time to check this, but if someone can test whether it's ca03edd it'll give some clues :)
Author

Tried different revisions, will try more tomorrow, but at least in may 2015, it worked. So it happened after may 2015. Just one year and a half of commits to check :D

Tried different revisions, will try more tomorrow, but at least in may 2015, it worked. So it happened after may 2015. Just one year and a half of commits to check :D
Author

This comment was removed by @bliblubli

*This comment was removed by @bliblubli*

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sergey Sharybin self-assigned this 2017-03-22 18:00:10 +01:00

Did some more deeper research. The commit mentioned above has nothing to do with this issue. In fact, i don't see issue here at all. At least there is no change in behavior since Blender version 2.75. All older versions did not have any logging around materials. All the versions starting from 2.75 are reporting 7 shaders synchronized to the shader manager.

More detailed SVM statistics are rather recent feature, so using that to show whether material is compiled in or not is not reliable.

Verdict: there is not a regression in the past couple of years and the layer system will work fully different in Blender 2.8. So wouldn't consider this a bug, but rather a a subject for reconsideration.

Thanks for the report anyway.

Did some more deeper research. The commit mentioned above has nothing to do with this issue. In fact, i don't see issue here at all. At least there is no change in behavior since Blender version 2.75. All older versions did not have any logging around materials. All the versions starting from 2.75 are reporting 7 shaders synchronized to the shader manager. More detailed SVM statistics are rather recent feature, so using that to show whether material is compiled in or not is not reliable. Verdict: there is not a regression in the past couple of years and the layer system will work fully different in Blender 2.8. So wouldn't consider this a bug, but rather a a subject for reconsideration. Thanks for the report anyway.
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
2 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#50181
No description provided.