POV-Ray : Newsgroups : povray.binaries.images : sss tests : sss tests Server Time
5 Nov 2024 06:18:12 EST (-0500)
  sss tests  
From: Bill Pragnell
Date: 30 Oct 2007 11:20:01
Message: <web.47275837396b90e731f01d10@news.povray.org>
All this subsurface scattering chatter (together with some mouthwatering
examples) has inspired me to try it for myself. It's not actually that hard,
although I'm not a media guru so it's taken some experimentation to get some
decent results.

The images below were rendered with the following code:

#declare col = <1, 0.5, 0.1>;
#declare densty = 15;
merge {
  torus { 1, 0.2 }
  cylinder { <-1, 0, 0>, <1, 0, 0>, 0.15 }
  cylinder { <0, 0, -1>, <0, 0, 1>, 0.15 }
  sphere { <0, 0, 0>, 0.5 }
  torus { 1, 0.15 rotate <90, 0, 0> }
  torus { 1, 0.15 rotate <0, 0, 90> }
  hollow
  texture {
    pigment { color rgbt <col.x, col.y, col.z, 0.5> }
    finish { ambient 0 diffuse 1 phong 0.5 phong_size 20 } }
  interior {
    media {
      scattering { 1, densty*col extinction 0 }
      absorption densty/col
      intervals 1
      samples 50
      method 2 } } }

....together with a standard point light, camera, adequate max_trace_level etc.

The main problem was getting the media to be properly opaque without
oversaturating it. This requires juggling of the 'densty' parameter. The first
three examples were rendered with varying pigment transmit (currently set to
0.5 in the code above). The final image illustrates why method 3 is unsuitable
- more samples are taken on longer in-media rays resulting in brighter patches.

It's also surprisingly fast - about 4 minutes on an aging 900MHz Win98 for each
image - although with complex CSG I'm sure this will get bogged down. Best to
stick to meshes I expect. :-)

Bill


Post a reply to this message


Attachments:
Download 'ssseg.jpg' (143 KB)

Preview of image 'ssseg.jpg'
ssseg.jpg


 

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