POV-Ray : Newsgroups : povray.general : A question about sss implementation in Blender : Re: A question about sss implementation in Blender Server Time
31 Jul 2024 10:23:04 EDT (-0400)
  Re: A question about sss implementation in Blender  
From: Grassblade
Date: 2 Nov 2007 17:20:00
Message: <web.472ba16a1cea9bf3ff3077790@news.povray.org>
"Antonio Ferrari" <nomail@nomail> wrote:
> "Grassblade" <nomail@nomail> wrote:
> > "Antonio Ferrari" <nomail@nomail> wrote:
> >
> > > P.S. The source code of Sarah Tariq is not available. Can anyone try to
> > > contact her?
> >
> > If you click on Home you end up at
> > http://www-static.cc.gatech.edu/grads/t/Sarah.Tariq/index.html. I believe
> > her email address is written just under Georgia Institute of Technology,
> > with an @ written in letters. ;-)
>
> I've already done it one or two years ago. I received no answers.
>
> If we want SSS, we must implement it personally.

I have mailed her at the nvidia address. She answered and, as I was hoping, it's
the same Sarah Tariq who made the internet page I linked to in an earlier post.
However, her code is modified to always use SSS, and it's not a patch. So
someone would have to turn the modification into an optional keyword instead.
She said her code is somewhere in an old hard disk, she'll look for it over the
weekend, and she'll send it to me. She also said she is willing to assist anyone
trying to understand/optimize her code over weekends. Any takers can contact her
at: stariq at the video card manufacturer I mentioned in the first sentence.com.

I also thought about your algorithm, assuming you still want to work on it.
Consider a voxel approximation of your object. Fill the voxels containing the
object's surface with zeros. Now, check the six cubes that are adjacent to
these, if they are 1) un-initialized and 2) are inside the object, then assign
a value of 1. Then check all cubes that are adjacent to a 1 valued cube, and
assign a 2 if they are un-initialized, etc. I'm not positive, but the result
could be slightly different from a distance calculation.
Yet another method could be of tracing the 100 rays from an arbitrary point, as
you're doing now, and find out what distance d and what direction n the surface
lies in. You then know the 26 surrounding cubes are between d-sqrt(2) and
d+sqrt(2). No need to trace them, though; instead use n to find the plane
passing through your tracing point. The surrounding cubes that have a distance
from that plane smaller than 0.5 can be assigned a value of d; those that are
further out have a value of d+1 or d-1, depending if they are closer to the
surface or farther away.
I do not know if any of these methods is quicker, but they definitely take fewer
operations.


Post a reply to this message

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