Page 1 of 1

OSL Window Box

Unread postPosted: Thu May 09, 2019 10:12 am
by dane
I'm just posting here as I didnt see much about this but we have been working on some large scenes using kitbash3d assets. One of the things we needed to do was add interiors to all the buildings as the shots are mainly at night. To do this we duplicated and offset the window glass to sit behind the window and then assigned this OSL shader setup.

You can download the osl here: and use it directly in Clarisse.

Render using OSL shader for windows -->


Here is the shader setup for the OSL windows -->


As each geo was unique we are using the utility node set to 'vertex ID' to add variation to the switch node itself and also variation to the gain so room lights are on/off.

All renders fine on the farm without any issues. When building the shaders and connecting/disconnecting you have to prompt the osl node as it seems to die sometimes. Apart from that, works perfectly!



Re: OSL Window Box

Unread postPosted: Thu May 09, 2019 10:28 am
by dboude
Thanks for sharing Dane :!:

Re: OSL Window Box

Unread postPosted: Tue May 14, 2019 4:42 pm
by meryon
This is great. Thank you for sharing your process!

I have Neotokyo kitbash too.
Did you made some transform on the Windows geo (triplanar proj ?) I have this result when I try to apply the shader with OSL on windows geo.
Otherwise, it works well on a basic planar.



Re: OSL Window Box

Unread postPosted: Sun May 19, 2019 8:42 pm
by dane
No worries, yea you'll have to replace the window geo manually, each glass plane needs to have its local transforms for the OSL to work correctly it seems. It only took a couple of days to go through all our packs. Good thing is you then get per window IDs that you can use to drive randomness like I have.

Hope that helps

Re: OSL Window Box

Unread postPosted: Mon May 20, 2019 10:14 am
by meryon
Thank you Dane for the reply!

Re: OSL Window Box

Unread postPosted: Tue Sep 10, 2019 3:22 pm
by psampa
Has anyone tried this OSL with Clarisse 4.0sp3 ? I am getting some Parser errors that do not show up if I stop using the OSL. The error looks like this :

[pathexp] Parse errorReached end of line looking for ) at char 18

I've contacted Isotropix on that error, but I am not sure yet where the problem comes from.

Re: OSL Window Box

Unread postPosted: Wed Sep 11, 2019 8:32 am
by dboude

which one do you use ?

There is plenty in the downloadable zip:

Cheers ;)