Cycles Standalone: Issue with shader nodes #87317

Closed
opened 2021-04-08 22:27:42 +02:00 by howetuft · 5 comments

Platforms:
macOS 10.14.6,
Intel HD 6000

Arch Linux
Intel Core i5-4440 CPU @ 3.10GHz
NVIDIA GeForce GTX 750 Ti

Broken: blender/cycles@635bf14747

Issue Description:
(Please note this task concerns Cycles Standalone specifically)

I've just updated Cycles Standalone to latest commit (4ba92f6d57ef) and I now encounter an issue with shader nodes.

For instance, it happens with the 'scene_monkey.xml' example file.
The rendering is totally black, and I get the following output in console:

build_darwin_cycles$./bin/cycles "/Users/ankitkumar/blender-build/build_darwin_cycles/bin/Resources/cycles/examples/scene_monkey.xml"
Unknown shader node "sky_texture".
Unknown shader node "background".
Unknown shader node name "tex".
Unknown shader node name "bg".
Unknown shader node name "bg".
Unknown shader node "noise_texture".
Unknown shader node "glass_bsdf".
Unknown shader node name "tex".
Unknown shader node name "monkey_closure".
Unknown shader node name "monkey_closure".
Unknown shader node "checker_texture".
Unknown shader node "glossy_bsdf".
Unknown shader node name "checker".
Unknown shader node name "floor_closure".
Unknown shader node name "floor_closure".
E0424 21:37:09.332855 542754240 device.cpp:126] Shader: compile error:
E0424 21:37:09.332937 542754240 device.cpp:127] ===== shader string ====
E0424 21:37:09.332955 542754240 device.cpp:135]  1 #version 330
E0424 21:37:09.332965 542754240 device.cpp:135]  2 uniform vec2 fullscreen;
E0424 21:37:09.332974 542754240 device.cpp:135]  3 in vec2 texCoord;
E0424 21:37:09.332983 542754240 device.cpp:135]  4 in vec2 pos;
E0424 21:37:09.332990 542754240 device.cpp:135]  5 out vec2 texCoord_interp;
E0424 21:37:09.332998 542754240 device.cpp:135]  6 
E0424 21:37:09.333005 542754240 device.cpp:135]  7 vec2 normalize_coordinates()
E0424 21:37:09.333012 542754240 device.cpp:135]  8 {
E0424 21:37:09.333021 542754240 device.cpp:135]  9    return (vec2(2.0) * (pos / fullscreen)) - vec2(1.0);
E0424 21:37:09.333029 542754240 device.cpp:138] 10 }
E0424 21:37:09.333036 542754240 device.cpp:138] 11 
E0424 21:37:09.333043 542754240 device.cpp:138] 12 void main()
E0424 21:37:09.333051 542754240 device.cpp:138] 13 {
E0424 21:37:09.333060 542754240 device.cpp:138] 14    gl_Position = vec4(normalize_coordinates(), 0.0, 1.0);
E0424 21:37:09.333067 542754240 device.cpp:138] 15    texCoord_interp = texCoord;
E0424 21:37:09.333074 542754240 device.cpp:138] 16 }
E0424 21:37:09.333082 542754240 device.cpp:142] ERROR: 0:1: '' :  version '330' is not supported

No matter if I use GPU or CPU rendering.

I can also provide the following file, as another example : Cube.xml

Both files used to render correctly with previous Cycles versions...

Could someone please provide me some help? Many thanks in advance...

Addendum (04-25-2021):
Looking at the code, the problem seems to lie in the new version of NODE_DEFINE (src/render/nodes.cpp), introduced by commit blender/cycles@635bf14747.
The previous version registered the node at program initialization (through a global static variable). In the new version, the node is only registered at the first call of the ::get_node_type method (through a local static variable). This method is never called for shader nodes, so they are never registered, and therefore not recognized during xml parsing...

**Platforms:** macOS 10.14.6, Intel HD 6000 Arch Linux Intel Core i5-4440 CPU @ 3.10GHz NVIDIA GeForce GTX 750 Ti **Broken:** blender/cycles@635bf14747 **Issue Description:** (Please note this task concerns Cycles Standalone specifically) I've just updated Cycles Standalone to latest commit (4ba92f6d57ef) and I now encounter an issue with shader nodes. For instance, it happens with the 'scene_monkey.xml' example file. The rendering is totally black, and I get the following output in console: ``` build_darwin_cycles$./bin/cycles "/Users/ankitkumar/blender-build/build_darwin_cycles/bin/Resources/cycles/examples/scene_monkey.xml" Unknown shader node "sky_texture". Unknown shader node "background". Unknown shader node name "tex". Unknown shader node name "bg". Unknown shader node name "bg". Unknown shader node "noise_texture". Unknown shader node "glass_bsdf". Unknown shader node name "tex". Unknown shader node name "monkey_closure". Unknown shader node name "monkey_closure". Unknown shader node "checker_texture". Unknown shader node "glossy_bsdf". Unknown shader node name "checker". Unknown shader node name "floor_closure". Unknown shader node name "floor_closure". E0424 21:37:09.332855 542754240 device.cpp:126] Shader: compile error: E0424 21:37:09.332937 542754240 device.cpp:127] ===== shader string ==== E0424 21:37:09.332955 542754240 device.cpp:135] 1 #version 330 E0424 21:37:09.332965 542754240 device.cpp:135] 2 uniform vec2 fullscreen; E0424 21:37:09.332974 542754240 device.cpp:135] 3 in vec2 texCoord; E0424 21:37:09.332983 542754240 device.cpp:135] 4 in vec2 pos; E0424 21:37:09.332990 542754240 device.cpp:135] 5 out vec2 texCoord_interp; E0424 21:37:09.332998 542754240 device.cpp:135] 6 E0424 21:37:09.333005 542754240 device.cpp:135] 7 vec2 normalize_coordinates() E0424 21:37:09.333012 542754240 device.cpp:135] 8 { E0424 21:37:09.333021 542754240 device.cpp:135] 9 return (vec2(2.0) * (pos / fullscreen)) - vec2(1.0); E0424 21:37:09.333029 542754240 device.cpp:138] 10 } E0424 21:37:09.333036 542754240 device.cpp:138] 11 E0424 21:37:09.333043 542754240 device.cpp:138] 12 void main() E0424 21:37:09.333051 542754240 device.cpp:138] 13 { E0424 21:37:09.333060 542754240 device.cpp:138] 14 gl_Position = vec4(normalize_coordinates(), 0.0, 1.0); E0424 21:37:09.333067 542754240 device.cpp:138] 15 texCoord_interp = texCoord; E0424 21:37:09.333074 542754240 device.cpp:138] 16 } E0424 21:37:09.333082 542754240 device.cpp:142] ERROR: 0:1: '' : version '330' is not supported ``` No matter if I use GPU or CPU rendering. I can also provide the following file, as another example : [Cube.xml](https://archive.blender.org/developer/F9926116/Cube.xml) Both files used to render correctly with previous Cycles versions... Could someone please provide me some help? Many thanks in advance... **Addendum (04-25-2021):** Looking at the code, the problem seems to lie in the new version of NODE_DEFINE (src/render/nodes.cpp), introduced by commit blender/cycles@635bf14747. The previous version registered the node at program initialization (through a global static variable). In the new version, the node is only registered at the first call of the <Node>::get_node_type method (through a *local* static variable). This method is never called for shader nodes, so they are never registered, and therefore not recognized during xml parsing...
Author

Added subscriber: @howetuft

Added subscriber: @howetuft
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

This issue was referenced by blender/cycles@aab1ad986d

This issue was referenced by blender/cycles@aab1ad986ddbe0eb9f2c5d90f5834d1c8f230430

This issue was referenced by 39226cd437

This issue was referenced by 39226cd437c4d68134369740bdab945c4b4d4364

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Brecht Van Lommel self-assigned this 2021-04-29 19:16:40 +02: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
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#87317
No description provided.