Cycles material sometimes overrides GLSL material functionality #38633

Closed
opened 2014-02-14 09:57:55 +01:00 by Jonatan Bijl · 9 comments

System Information
WinXP 32 bits (but not really important I think)

Blender Version
Broken: 2.69

Short description of error
Some GLSL materials have shading and shadows, others dont. My guess is that for some materials it uses the BI material as a basis for the GLSL, and for others it uses the Cycles material as basis for the GLSL. I use materials that have both a Cycles and a BI node tree, so that very late in the process I can still choose which renderer to use.
glslmaterial.jpg

Exact steps for others to reproduce the error
Open this file: GLSLmaterial.blend
The two tiles have a very similar material, but one has a shadow the other does not.
In http://blenderartists.org/forum/showthread.php?327207-GLSL-materials-with-or-without-shadows someone suggests removing and re-adding the cycles output node as a workaround.

**System Information** WinXP 32 bits (but not really important I think) **Blender Version** Broken: 2.69 **Short description of error** Some GLSL materials have shading and shadows, others dont. My guess is that for some materials it uses the BI material as a basis for the GLSL, and for others it uses the Cycles material as basis for the GLSL. I use materials that have both a Cycles and a BI node tree, so that very late in the process I can still choose which renderer to use. ![glslmaterial.jpg](https://archive.blender.org/developer/F77233/glslmaterial.jpg) **Exact steps for others to reproduce the error** Open this file: [GLSLmaterial.blend](https://archive.blender.org/developer/F77235/GLSLmaterial.blend) The two tiles have a very similar material, but one has a shadow the other does not. In http://blenderartists.org/forum/showthread.php?327207-GLSL-materials-with-or-without-shadows someone suggests removing and re-adding the cycles output node as a workaround.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @jonim8or

Added subscriber: @jonim8or
Brecht Van Lommel was assigned by Sergey Sharybin 2014-02-14 09:59:31 +01:00

Added subscriber: @Sergey

Added subscriber: @Sergey
Author

Hypothesis: It looks like it is using the first output it finds in m.nodes, and generates a shader for that.

In the example file Maps/Basalt is the material that works OK and Maps/Concrete is the one that has no shadows.

  >>> dict((m.name, list(m.node_tree.nodes)) for m in D.materials)
  {
  'Maps/Basalt': [bpy.data...nodes["Output"], bpy.data...nodes["Diffuse BSDF"], bpy.data...nodes["Material Output"], bpy.data...nodes["Material"], bpy.data...nodes["Image Texture"]],
  'Maps/Concrete': [bpy.data...nodes["Material Output"], bpy.data...nodes["Diffuse BSDF"], bpy.data...nodes["Material"], bpy.data...nodes["Output"], bpy.data...nodes["Image Texture"]]}

and after the workaround of deleting and re-adding the cycles output, in both node lists the Output is first, and therefore the BI material is used as a basis.:

  >>> dict((m.name, list(m.node_tree.nodes)) for m in D.materials)
  {
  'Maps/Basalt': [bpy.data...nodes["Output"], bpy.data...nodes["Diffuse BSDF"], bpy.data...nodes["Material Output"], bpy.data...nodes["Material"], bpy.data...nodes["Image Texture"]],
  'Maps/Concrete': [bpy.data...nodes["Diffuse BSDF"], bpy.data...nodes["Material"], bpy.data...nodes["Output"], bpy.data...nodes["Image Texture"], bpy.data...nodes["Material Output"]]}

proposed/expected way for it to work:
When in BI mode, use BI output node, when in Cycles mode use Cycles output node

Hypothesis: It looks like it is using the first output it finds in m.nodes, and generates a shader for that. In the example file Maps/Basalt is the material that works OK and Maps/Concrete is the one that has no shadows. ``` >>> dict((m.name, list(m.node_tree.nodes)) for m in D.materials) { 'Maps/Basalt': [bpy.data...nodes["Output"], bpy.data...nodes["Diffuse BSDF"], bpy.data...nodes["Material Output"], bpy.data...nodes["Material"], bpy.data...nodes["Image Texture"]], 'Maps/Concrete': [bpy.data...nodes["Material Output"], bpy.data...nodes["Diffuse BSDF"], bpy.data...nodes["Material"], bpy.data...nodes["Output"], bpy.data...nodes["Image Texture"]]} ``` and after the workaround of deleting and re-adding the cycles output, in both node lists the Output is first, and therefore the BI material is used as a basis.: ``` >>> dict((m.name, list(m.node_tree.nodes)) for m in D.materials) { 'Maps/Basalt': [bpy.data...nodes["Output"], bpy.data...nodes["Diffuse BSDF"], bpy.data...nodes["Material Output"], bpy.data...nodes["Material"], bpy.data...nodes["Image Texture"]], 'Maps/Concrete': [bpy.data...nodes["Diffuse BSDF"], bpy.data...nodes["Material"], bpy.data...nodes["Output"], bpy.data...nodes["Image Texture"], bpy.data...nodes["Material Output"]]} ``` proposed/expected way for it to work: When in BI mode, use BI output node, when in Cycles mode use Cycles output node

This issue was referenced by blender/blender-addons-contrib@a252e27fec

This issue was referenced by blender/blender-addons-contrib@a252e27fec16e09efe873a6bbbd29b3ad5d4c67f

This issue was referenced by a252e27fec

This issue was referenced by a252e27fec16e09efe873a6bbbd29b3ad5d4c67f

Fixed now, thanks for the report.

Fixed now, thanks for the report.

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit a252e27fec.

Closed by commit a252e27fec.
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
4 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#38633
No description provided.