POV-Ray : Newsgroups : povray.advanced-users : How to create realistic caustics? : Re: How to create realistic caustics? Server Time
24 Mar 2023 11:06:09 EDT (-0400)
  Re: How to create realistic caustics?  
From: Kenneth
Date: 7 Mar 2022 05:35:00
Message: <web.6225ddf6a728bcef4cef624e6e066e29@news.povray.org>
> This should also be animated, so the caustics change realistically.
> See the following video:
> https://www.youtube.com/watch?v=Popg7ej4AUU (Pool first at minute 4:33)

That's a fascinating video, thanks for sharing the link.

> Attached an example with faked caustics of my current implementation (with
> bozo).

Your attachment is missing here :-(

> Does anyone have a tip how to get this as realistic as possible ?

I think it is possible to get a good 'faked caustics' effect for your pool

Ignoring the ior of the water for the moment, the caustics effect is produced by
the top surface of the water-- whether that is created by a simple 'normal'
pattern or with actual geometry (like a height_field). Actual geometry is
better. Applying a simple pigment to the water will not work.

It has been years since I worked with faked caustics, but I have put together a
simple test scene to play around with. It has two choices, both of which use
only a simple 'bumps' normal (which is far from ideal!) No actual 'wave'
geometry. The intensity or brightness of the caustics is the main problem to
overcome, as is the proper pattern to use. That will take some experimenting!

My own first thought would be to replace the water 'box' with a height_field--
made from some overlapping sine_wave or scallop_wave functions to create the
'wave' geometry. That gets tricky, of course. Take a look at "
Function Image" in the documentation as a starting point; it has an example of a
'procedural' height_field.

#version 3.7; // or whatever
global_settings{assumed_gamma 1.0}
#default {finish{ambient .05 emission 0 diffuse .8}}

#declare WHICH_WATER_TO_USE = 1; // 1 or 2

camera {
  location  <0, 4, -1.7>
  look_at   <0, 0, 0>
  right     x*image_width/image_height
  // direction z
   angle 30

light_source {
  color rgb 1
  translate <20, 40, -5>
 // rotate(-20 + 90*clock)*z

background {rgb <1,.9,.7>}

// pool and water
difference{ // pool shell
box{0,1 translate <-0.5,0,-0.5>}
box{0,1 translate <-0.5,.1,-0.5> scale <0.9,1.2,0.9>}
pigment{rgb 0.5}

// full water in the pool
box{0,1 translate <-0.5,0.01,-0.5> scale <0.91,0.8,0.91>
hollow  // may not be necessary
pigment{rgbf <0.6,1,1,0.9>}
 bumps 0.04
 scale 0.06*<1/1.5,1/0.5,1>
 scallop_wave // may not have any effect?
 ior 1.15
 caustics 1.0 // or higher

// a thin box (the bumps amount and the caustics amount interplay)
box{0,1 translate <-.5,0,-.5>
scale <.99,.01,.99> // try changing y-thickness
translate <0,.8,0>
pigment{rgbf <0.6,1,1,0.9>}
 bumps .05
 scale 0.08*<1/1.5,1/0.5,1>
 scallop_wave // may not have any effect?
interior{ caustics .5}
//no_image // to see the pure caustics effect

scale <1.5,0.5,1>

Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.