Page 2 of 2

Re: Underwater caustics

PostPosted: Tue Mar 19, 2019 11:12 am
by milanm
Yep, good old circular noise.

You can actually use the surface of the water as a "gobo". Back in V2 I used dirt in opacity but that produces a glich since V3 so I guess noise should do the trick for now.

Also, with raytype you can make the noise visible to shadow rays only . You can get some lovely caustics even in Ambient Occlusion mode.

256 samples only:
Image

Nodes.PNG


Btw. for the quick "fog" setup I just used a small plane in front of the camera and oriented towards the camera with this material: specular with no refraction + scattering medium. It's hard to see in the gif but there are some god rays there too. Super easy to setup and if you use emission instead of scattering it renders realtime on a single gtx780 in 1080p.

Cheers
Milan

Re: Underwater caustics

PostPosted: Tue Mar 19, 2019 11:29 am
by Whispermode
milanm wrote:Yep, good old circular noise.

You can actually use the surface of the water as a "gobo". Back in V2 I used dirt in opacity but that produces a glich since V3 so I guess noise should do the trick for now.

Also, with raytype you can make the noise visible to shadow rays only . You can get some lovely caustics even in Ambient Occlusion mode.

Btw. for the quick "fog" setup I just used a small plane in front of the camera and oriented towards the camera with this material: specular with no refraction + scattering medium. It's hard to see in the gif but there are some god rays there too. Super easy to setup and if you use emission instead of scattering it renders realtime on a single gtx780 in 1080p.

Cheers
Milan


Thanks, Milan - this looks really good.

Just clarify some things for me, please:

1. On your first point, are you actually using the surface as a gobo, or just saying it can be done?
2. Is the method specific to OSL/C4D (the node setup is a C4D screenshot, right?)
3. Would you mind describing the lighting and surface setup?

Thanks in advance.

Re: Underwater caustics

PostPosted: Tue Mar 19, 2019 1:51 pm
by milanm
1. Yup, the surface of the water in that gif does have a texture in opacity just like the one from linograndiotoy.
2. It's just a node. Works everywhere where Octane is integrated (even in other engines that support OSL) The shader is from here.
3. It's just a daylight/sun. The water itself is casting shadows in the shape of the noise texture.

Here's how that might work in Blender.
It looks like the UI menu is replaced with integer numbers in the demo I'm using, If this is the same in the latest version you should complain to the plugin developer about that. The OSL script will work just fine regardless of UI and these are the settings I used:

BlenderNodes.PNG

Just for reference, the Ray input options are:
0 - Camera
1 - Shadow
2 - AO
3 - Diffuse
4 - Reflection
5 - Refraction

And it looks like the checkbox input is inverted compared to Standalone.

Water is animated so I didn't post an orbx example as usual--it would be huge. I'll see if I can reduce it to a single frame and post.

Cheers
Milan

Re: Underwater caustics

PostPosted: Tue Mar 19, 2019 2:38 pm
by Whispermode
milanm wrote:1. Yup, the surface of the water in that gif does have a texture in opacity just like the one from linograndiotoy.
2. It's just a node. Works everywhere where Octane is integrated (even in other engines that support OSL) The shader is from here.
3. It's just a daylight/sun. The water itself is casting shadows in the shape of the noise texture.

Here's how that might work in Blender.
It looks like the UI menu is replaced with integer numbers in the demo I'm using, If this is the same in the latest version you should complain to the plugin developer about that. The OSL script will work just fine regardless of UI and these are the settings I used:

BlenderNodes.PNG

Just for reference, the Ray input options are:
0 - Camera
1 - Shadow
2 - AO
3 - Diffuse
4 - Reflection
5 - Refraction

And it looks like the checkbox input is inverted compared to Standalone.

Water is animated so I didn't post an orbx example as usual--it would be huge. I'll see if I can reduce it to a single frame and post.

Cheers
Milan


This is awesome - much appreciated.

So, in layman's terms - because I know nothing about OSL/gobos/life in general - the following is happening:

Sunlight is being projected at a plane. The plane has holes in it in the shape of the noise pattern as it is plugged into opacity, therefore light hits the bottom of the pool in the desired pattern. How does the raytype node help?

Re: Underwater caustics

PostPosted: Tue Mar 19, 2019 2:43 pm
by milanm
Yup that's correct.

Raytype just makes sure that the surface of the water doesn't look like Swiss cheese. ;)

Cheers
Milan

Re: Underwater caustics

PostPosted: Tue Mar 19, 2019 2:46 pm
by linograndiotoy
Very cool!


milanm wrote:Yep, good old circular noise.

You can actually use the surface of the water as a "gobo". Back in V2 I used dirt in opacity but that produces a glich since V3 so I guess noise should do the trick for now.

Also, with raytype you can make the noise visible to shadow rays only . You can get some lovely caustics even in Ambient Occlusion mode.

256 samples only:
Image

Nodes.PNG


Btw. for the quick "fog" setup I just used a small plane in front of the camera and oriented towards the camera with this material: specular with no refraction + scattering medium. It's hard to see in the gif but there are some god rays there too. Super easy to setup and if you use emission instead of scattering it renders realtime on a single gtx780 in 1080p.

Cheers
Milan

Re: Underwater caustics

PostPosted: Tue Mar 19, 2019 3:06 pm
by Whispermode
milanm wrote:Yup that's correct.

Raytype just makes sure that the surface of the water doesn't look like Swiss cheese. ;)

Cheers
Milan


Ah, of course.

I'll try this out later. Just read your other thread on Raytype. Great work you've done here. Thanks so much.

Re: Underwater caustics

PostPosted: Tue Feb 04, 2020 5:46 pm
by duskstudio
Hey, sorry to pull this up after almost a year, but looking for some help.

Im trying to recreate the underwater setup in C4D and the caustics are working, but im struggling to get the reflections that can be seen on the underside of the surface? Any tips on how to achieve this and the raytype osl caustics at the same time?

Thanks!