POV-Ray : Newsgroups : povray.binaries.images : Another SSS technique (28k jpg) : Re: Another SSS technique (28k jpg) Server Time
1 Aug 2024 16:27:28 EDT (-0400)
  Re: Another SSS technique (28k jpg)  
From: Blue Herring
Date: 12 Aug 2008 10:58:40
Message: <48a1a520$1@news.povray.org>
stbenge wrote:
> Okay, here goes.
> 
> Imagine a virtual df3 setup where a 3d grid pattern exists around a 
> specified object. For this setup I used three planar patterns, each 
> oriented along the x, y and z axes. I placed loops within the 
> pigment_maps for each planar pattern so that I could test each "cell" 
> within the virtual density map.
> 
> For each cell a ray is shot from a specified point in space where the 
> light_source resides. If a ray lands on the object within the cell, that 
> part of the density pattern is given a white value. If the ray doesn't 
> hit the object in that cell, the entry is left black.
> 
> The result is an approximation of where the light lands on the surface 
> of the object. Imagine how this would look like as a density pattern. It 
> doesn't look too great, as there is major stair-stepping present.
> 
> To reduce the stair-stepping effect, I go through the above steps at 
> different sample rates. For instance, I could start off with a density 
> map with <3,3,3> elements. I could then sample at <4,4,4>, <5,5,5>, and 
> so on, and average the results to produce a smoother end result. This is 
> all done automatically, otherwise the setup would be painfully tedious 
> to use. All these tests are averaged together into one pigment pattern.
> 
> The long parse times come when I test an object many times. For the 
> image I attached in the original post, I tested the object 30 times 
> starting with <3,2,3> samples and ending with <24,16,24> samples. 
> Remember, for each cell a call to trace() is performed. That's a lot of 
> tests! Not only that, but with 30 averaged pigments comes a hit on 
> render time. For simple pigments this is no problem, but for textures 
> with texture_maps, the rendering itself can take a long time.
> 
> I may try to make this code available. I'll need to write up some 
> documentation. It would be bundled with the proximity pattern macros, as 
> the SSS code stems from them.

Thanks for the explanation, I'm not sure what you were worried about, 
this is very clear and understandable :).  Very clever, this is already 
making the gears turn in my head.  I'm quite curious about the nuts and 
bolts of how you actually construct the 3d density pigment.  Any details 
you are able to share would be most welcome.

-- 
-The Mildly Infamous Blue Herring


Post a reply to this message

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