POV-Ray : Newsgroups : povray.binaries.images : sss tests Server Time
13 Nov 2024 03:48:50 EST (-0500)
  sss tests (Message 1 to 4 of 4)  
From: Bill Pragnell
Subject: sss tests
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


 

From: triple r
Subject: Re: sss tests
Date: 31 Oct 2007 00:05:00
Message: <web.47280c0fb654624888727a860@news.povray.org>
"Bill Pragnell" <bil### [at] hotmailcom> wrote:

> #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


Some ior really helps to disguise the internal structure.  It doesn't get rid of
the internal structure, of course, but it does make it less apparent.  Makes it
possible to use a little more translucency.  Physically accurate, too.

 - Ricky


Post a reply to this message

From: Bill Pragnell
Subject: Re: sss tests
Date: 31 Oct 2007 07:10:01
Message: <web.47286fe9b6546248731f01d10@news.povray.org>
Hmm, interestingly this doesn't seem to give the same results in MegaPov. Does
anyone know of any differences in the way media is calculated?

"triple_r" <rre### [at] hotmailcom> wrote:
> Some ior really helps to disguise the internal structure.  It doesn't get rid of
> the internal structure, of course, but it does make it less apparent.  Makes it
> possible to use a little more translucency.  Physically accurate, too.

I'll give it a go. I might try some light attenuation too.


Post a reply to this message

From: Bill Pragnell
Subject: Re: sss tests
Date: 1 Nov 2007 09:35:00
Message: <web.4729e37fb6546248731f01d10@news.povray.org>
"triple_r" <rre### [at] hotmailcom> wrote:
> Some ior really helps to disguise the internal structure.  It doesn't get rid of
> the internal structure, of course, but it does make it less apparent.  Makes it
> possible to use a little more translucency.  Physically accurate, too.

Right, I tried the ior but it doesn't really get rid of the internal structure,
just moves it around and slows the render down. But I've found that #declaring
the texture and interior as a material and then applying it separately to all
the component objects (using union instead of merge) works perfectly. Then it's
just fine-tuning for the translucency, by modifying the media density and
surface transparency.

The only problem with this approach is that it completely clobbers the render
time for non-trivial unions. I shall mainly be relying on meshes and lathes and
whatnot for this approach I think... :)


Post a reply to this message


Attachments:
Download 'sss.jpg' (27 KB)

Preview of image 'sss.jpg'
sss.jpg


 

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