POV-Ray : Newsgroups : povray.general : A question about sss implementation in Blender Server Time
31 Jul 2024 08:29:57 EDT (-0400)
  A question about sss implementation in Blender (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
From: Thomas de Groot
Subject: Re: A question about sss implementation in Blender
Date: 24 Oct 2007 03:31:53
Message: <471ef4e9$1@news.povray.org>
"Samuel Benge" <stb### [at] THIShotmailcom> schreef in bericht 
news:471e6964@news.povray.org...
> Antonio Ferrari wrote:
> <remove>
>> And for Povray are these steps easy to implement or not?
>
> You can do something similar with MegaPOV. Using the projection pattern 
> you can convert the 'light map' into a pigment and blur it using the 
> average pigment. I made some posts a long time ago about this very same 
> thing to p.b.images. The method can render very slowly, though.
>
> Funny you should mention Blender, btw. That post in p.o-t led me to 
> Blender's website, and it looks like the newer version has a bunch of new 
> features that weren't present in the version I already had. I'm blown away 
> by how fast you can render hair, SSS, focal blur.... I've got me a new toy 
> :) :)
>
>

Hmmm... time to go back to Blender, I guess. I shall have a look too.
Wish I had some time to really learn Blender, but as I can set my own 
priorities I am the only one to blame :-)

Thomas


Post a reply to this message

From: Antonio Ferrari
Subject: Re: A question about sss implementation in Blender
Date: 24 Oct 2007 04:40:00
Message: <web.471f04991cea9bf34e64f15d0@news.povray.org>
> I confess that I agree, but now is probably a good time to thank everyone
> who has developed POV-Ray for their effort.  Assuming most of the
> developers have a life outside of this, it's all the more impressive.  That
> said, subsurface scattering sure would be a great addition.  I know media is
> more robust, but I can never get that to work right.  Oh, and someone has
> already implemented this in POV-Ray, but it's probably not for sharing
> (look at the last line):
>
>
http://www-static.cc.gatech.edu/grads/t/Sarah.Tariq/a_practical_model_for_subsurface.html


Yes. I also have a work and I'm out of my house from 7am to 20pm. I have
also a little child of one year old. But in spite of this I'm trying to
develop a patch that allows to use media ii such a way that can model sss.
I'm trying to do this adding a new pattern that can be used in density
contest. DF3 files could be used, but they need a double pass to render and
an external program. If my idea will be OK, I hove to model a density
pattern that grows exponentially with the (minimal) distance from a generic
surface. It's just an aid to avoid df3 alternative. I've already talked of
these topics in other posts. Obviously rendering time grows up a lot.

I'm already at a good point of developement and I've already obtained good
results. Unfortunately not always I've found a sufficient support in this
forum. So I had to study and debug by my own. Anyway thanks to everyone
that have helped me.

Antonio

P.S. The source code of Sarah Tariq is not available. Can anyone try to
contact her?


Post a reply to this message

From: Jan Dvorak
Subject: Re: A question about sss implementation in Blender
Date: 24 Oct 2007 05:23:57
Message: <471f0f2d$1@news.povray.org>
Antonio Ferrari napsal(a):
> 
>> I confess that I agree, but now is probably a good time to thank everyone
>> who has developed POV-Ray for their effort.  Assuming most of the
>> developers have a life outside of this, it's all the more impressive.  That
>> said, subsurface scattering sure would be a great addition.  I know media is
>> more robust, but I can never get that to work right.  Oh, and someone has
>> already implemented this in POV-Ray, but it's probably not for sharing
>> (look at the last line):
>>
>>
http://www-static.cc.gatech.edu/grads/t/Sarah.Tariq/a_practical_model_for_subsurface.html
> 
> 
> Yes. I also have a work and I'm out of my house from 7am to 20pm. I have
> also a little child of one year old. But in spite of this I'm trying to
> develop a patch that allows to use media ii such a way that can model sss.
> I'm trying to do this adding a new pattern that can be used in density
> contest. DF3 files could be used, but they need a double pass to render and
> an external program. If my idea will be OK, I hove to model a density
> pattern that grows exponentially with the (minimal) distance from a generic
> surface. It's just an aid to avoid df3 alternative. I've already talked of
> these topics in other posts. Obviously rendering time grows up a lot.
> 
> I'm already at a good point of developement and I've already obtained good
> results. Unfortunately not always I've found a sufficient support in this
> forum. So I had to study and debug by my own. Anyway thanks to everyone
> that have helped me.
> 
> Antonio
> 
> P.S. The source code of Sarah Tariq is not available. Can anyone try to
> contact her?
> 
> 
> 
I thought that the skin has a constant density that is quite high plus 
probably some rough surface (epidermis) over it and even inserting some 
bones.
You can use any function or pattern as the media density; working out 
the function itself is probably impossible if you are using meshes.


Post a reply to this message

From: Antonio Ferrari
Subject: Re: A question about sss implementation in Blender
Date: 24 Oct 2007 12:10:00
Message: <web.471f6d6d1cea9bf34e64f15d0@news.povray.org>
Jan Dvorak <jan### [at] centrumcz> wrote:
> I thought that the skin has a constant density that is quite high plus
> probably some rough surface (epidermis) over it and even inserting some
> bones.

Yes. But I'm not talking of the correct value of the density for a certain
material, but I'm talking about how to find a way to use density for
approximatig sss. Constant density doesn't give very good results for
certain material near the contour.

> You can use any function or pattern as the media density; working out
> the function itself is probably impossible if you are using meshes.

Yes, meshes are a limit. And functions or patterns works well for simple
objects, but not for complicated objects, CSGs, blobs, etc. And I say more:
isosurfaced can be used... The generating function can be used for
extracting the formula of the density for many and many surfaces...

But we always come to the same point... Why not to develop a simpler method
for approximating sss using media? Mine is only an idea and I dont know if
I'll be able to complete it or if it works at all. It has many limits at
the moment, because only a few persons have helped me in these groups. I've
obtained very good results at the moment and I hope to release the sources
one day. On the other side we could simulate sss or bssrdf, but it's not
the case... As Christoph said, we have the powerful of medias that can
approximate sss effects. But aren't media a bit complicated to model?

Certainly the code of Sarah Tariq should be better... But we haven't it! :-/

A.


Post a reply to this message

From: Grassblade
Subject: Re: A question about sss implementation in Blender
Date: 24 Oct 2007 14:50:00
Message: <web.471f92cc1cea9bf3654d6f060@news.povray.org>
"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. ;-)


Post a reply to this message

From: Antonio Ferrari
Subject: Re: A question about sss implementation in Blender
Date: 25 Oct 2007 06:50:00
Message: <web.472074881cea9bf34e64f15d0@news.povray.org>
"Grassblade" <nomail@nomail> wrote:
> 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 already wrote to her one or two years ago, but non replies arrived.


Post a reply to this message

From: Grassblade
Subject: Re: A question about sss implementation in Blender
Date: 25 Oct 2007 15:20:00
Message: <web.4720ebbd1cea9bf345deea430@news.povray.org>
"Antonio Ferrari" <nomail@nomail> wrote:
> "Grassblade" <nomail@nomail> wrote:
> > 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 already wrote to her one or two years ago, but non replies arrived.

Oh, I just saw the post you made two years ago. Sorry, I wasn't around back
then.
I have run a search for Sarah Tariq, and this paper turned up:
http://developer.download.nvidia.com/presentations/2006/siggraph/dx10-effects-siggraph-06.pdf
You can find her new address on page 66. I don't post it just in case
spam-bots are around (unlikely, but better safe than sorry). Chances of
homonymy are minimal, IMO.


Post a reply to this message

From: Tom York
Subject: Re: A question about sss implementation in Blender
Date: 26 Oct 2007 14:40:00
Message: <web.472234621cea9bf37d55e4a40@news.povray.org>
"Antonio Ferrari" <nomail@nomail> wrote:
> "Grassblade" <nomail@nomail> wrote:
> > 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 already wrote to her one or two years ago, but non replies arrived.

It looks to me like most of the code you need is on the page you originally
mentioned:

http://www-static.cc.gatech.edu/grads/t/Sarah.Tariq/a_practical_model_for_subsurface.html

There are a few bits missing, but you could work those out from having a
look at the (famous) subsurface scattering paper linked to on the home
page:

http://www-static.cc.gatech.edu/grads/t/Sarah.Tariq/index.html

Tom


Post a reply to this message

From: Antonio Ferrari
Subject: Re: A question about sss implementation in Blender
Date: 27 Oct 2007 10:10:00
Message: <web.472345ab1cea9bf3500d96d20@news.povray.org>
"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.


Post a reply to this message

From: Grassblade
Subject: Re: A question about sss implementation in Blender
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

<<< Previous 5 Messages Goto Initial 10 Messages

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