Cycles Normal node nonfunctional under CPU with OSL enabled

materials
shading

(MattVG) #1

I’ve been trying out some OSL-based shading the last couple of days and so have been rendering on my CPU. Tonight I discovered the Normal node doesn’t seem to function when rendering on CPU with OSL enabled. Is this true or am I missing something?

I made a simple material to test this out:

The GPU renders as expected.

Switching to CPU rendering and now it renders improperly.

Checking the Fresnel node to make sure that wasn’t the problem. It works fine.

I don’t normally render on the CPU, so please let me know if I’m doing something wrong. If not, then the Normal node seems bugged.

EDIT:
I turned off OSL and now it renders properly on the CPU. Is there a way around this issue? I was hoping to control some rim lighting with the Normal node using a few OSL nodes in the mix.

EDIT 2:
I see this is a known bug. Anyone know any workarounds? Normal and vector calculations aren’t my thing.


(<== Lost? Click Me) #2

OSL is CPU only.
You need an OSL script node pointing at an OSL shader to employ OSL rendering.

An example:

The OSL node has been renamed fresnel_interference and will look different depending on the OSL shader file in the text field. Youtube a tutorial or try the manual.


(MattVG) #3

The latest Blender nightly build fixed the bugged Normal node behavior, but is extremely unstable. I didn’t even consider looking for OSL fresnel scripts. Thank you for the suggestion.