OSL+raytype in LW?

Newtek Lightwave 3D (exporter developed by holocube, Integrated Plugin developed by juanjgon)

Moderator: juanjgon

Post Reply
User avatar
promity
Licensed Customer
Posts: 363
Joined: Sun Dec 19, 2010 7:59 am
Location: Russia

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
AMD Threadripper 1950X/64gb ram/RTX 3080 Ti + RTX 2070/Samsung SSD 870 EVO 500 gb/
Lightwave 3d
milanm
Licensed Customer
Posts: 261
Joined: Tue Apr 30, 2013 7:23 pm

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.
missing-osl-ui.jpg
For now you can use this modified version:
RaytypeBlendLW.zip
(472 Bytes) Downloaded 158 times
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
User avatar
promity
Licensed Customer
Posts: 363
Joined: Sun Dec 19, 2010 7:59 am
Location: Russia

Yes, I meant exactly this - the absence of these functions in the interface of the LW. Thank you for explanation, Milan.
AMD Threadripper 1950X/64gb ram/RTX 3080 Ti + RTX 2070/Samsung SSD 870 EVO 500 gb/
Lightwave 3d
User avatar
juanjgon
Octane Plugin Developer
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

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
User avatar
promity
Licensed Customer
Posts: 363
Joined: Sun Dec 19, 2010 7:59 am
Location: Russia

Thank's , Juanjgon.
AMD Threadripper 1950X/64gb ram/RTX 3080 Ti + RTX 2070/Samsung SSD 870 EVO 500 gb/
Lightwave 3d
Post Reply

Return to “Lightwave 3D”