Page 1 of 1
OSL+raytype in LW?
Posted: Tue Feb 19, 2019 4:20 am
by promity
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
Re: OSL+raytype in LW?
Posted: Tue Feb 19, 2019 1:33 pm
by milanm
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
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
Re: OSL+raytype in LW?
Posted: Tue Feb 19, 2019 3:00 pm
by promity
Yes, I meant exactly this - the absence of these functions in the interface of the LW. Thank you for explanation, Milan.
Re: OSL+raytype in LW?
Posted: Tue Feb 19, 2019 10:24 pm
by juanjgon
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
Re: OSL+raytype in LW?
Posted: Wed Feb 20, 2019 3:33 am
by promity
Thank's , Juanjgon.