Is it possible to repeat this trick with an OSL shader as in Cinema? I mean X-ray effects.
viewtopic.php?f=87&t=67849&hilit=Osl+magic
OSL+raytype in LW?
Moderator: juanjgon
Hi
It looks like there is a problem with OSL node integration in the LW plugin.
An Integer input and the corresponding user interface that allows you to choose the type of ray is missing. For now you can use this modified version: Ray input expects an integer node:
0 - Camera
1 - Shadow
2 - Ambient Occlusion
3 - Diffuse
4 - Reflection
5 - Refraction
I also noticed the missing string inputs for filenames (Windowbox shader is one example). The LW plugin should generate UI elements when the OSL file is loaded. With this limitations you are missing out on a lot of functionality and cool procedural textures and shaders. It's not always easy to adapt them like I did here.
For the x-ray setup I used the Raytype OSL shader in opacity with
I also had to prevent the body from casting shadows on the skeleton only on the inside (we still want our shadows outside). For that I used a combination of Raytype with
Cheers
Milan
It looks like there is a problem with OSL node integration in the LW plugin.
An Integer input and the corresponding user interface that allows you to choose the type of ray is missing. For now you can use this modified version: Ray input expects an integer node:
0 - Camera
1 - Shadow
2 - Ambient Occlusion
3 - Diffuse
4 - Reflection
5 - Refraction
I also noticed the missing string inputs for filenames (Windowbox shader is one example). The LW plugin should generate UI elements when the OSL file is loaded. With this limitations you are missing out on a lot of functionality and cool procedural textures and shaders. It's not always easy to adapt them like I did here.
For the x-ray setup I used the Raytype OSL shader in opacity with
Ray
set to Refraction
to hide one object (body) in refractions and reveal another (skeleton).I also had to prevent the body from casting shadows on the skeleton only on the inside (we still want our shadows outside). For that I used a combination of Raytype with
Camera
ray + PolygonSide node in opacity of the body material. I'll see if I can come up with some examples, this sounds a lot more complicated than it is. 
Cheers
Milan
Last edited by milanm on Tue Feb 19, 2019 3:19 pm, edited 1 time in total.
Colorist / VFX artist / Motion Designer
macOS - Windows 7 - Cinema 4D R19.068 - GTX1070TI - GTX780
macOS - Windows 7 - Cinema 4D R19.068 - GTX1070TI - GTX780
Some things are not as easy to support in the ancient LightWave architecture as they sound, for example, a full dynamic GUI in the nodes, but let's see what can be done 
Meanwhile, I'll expose these dropdown and string type parameters as node inputs to make possible the direct support of these kinds of OSL shaders without workarounds.
Thanks,
-Juanjo

Meanwhile, I'll expose these dropdown and string type parameters as node inputs to make possible the direct support of these kinds of OSL shaders without workarounds.
Thanks,
-Juanjo