POV-Ray : Newsgroups : povray.binaries.images : Another SSS technique (28k jpg) Server Time
1 Aug 2024 16:30:25 EDT (-0400)
  Another SSS technique (28k jpg) (Message 21 to 30 of 31)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 1 Messages >>>
From: nemesis
Subject: Re: bunny test (28k jpg)
Date: 10 Aug 2008 12:50:01
Message: <web.489f1bf76739e2099d5e3b330@news.povray.org>
stbenge <THI### [at] hotmailcom> wrote:
> Oh no, don't apply the G-word to me! I'm just a bored guy, exploiting
> POV's SDL :)

Yeah, God said something like that about the laws of physics. ;)

> It's funny, I got into 3d graphics because of my interest in art, but I
> find myself screwing around with only the technical aspects. Maybe I'd
> be less depressed if I returned to the roots of my preoccupation...

Don't worry, You Highness.  Ingenious technique is a work of art in itself.  And
as others pointed out, many of your "example" images look and feel far better
than most art-geared stuff.

> > Goodbye, media.
>
> Huh?

No need for slow media SSS anymore! :D


Post a reply to this message

From: stbenge
Subject: Re: bunny test (28k jpg)
Date: 10 Aug 2008 16:05:25
Message: <489f4a05$1@news.povray.org>
nemesis wrote:
> stbenge <THI### [at] hotmailcom> wrote:
>> Oh no, don't apply the G-word to me! I'm just a bored guy, exploiting
>> POV's SDL :)
> 
> Yeah, God said something like that about the laws of physics. ;)

Lol. I guess it's better to play God with art than it is with other 
people's lives. Everybody plays the role in one way or another. I'd 
rather do it in a harmless fashion :)

>> It's funny, I got into 3d graphics because of my interest in art, but I
>> find myself screwing around with only the technical aspects. Maybe I'd
>> be less depressed if I returned to the roots of my preoccupation...
> 
> Don't worry, You Highness.

Okay, where's my crown. I didn't get a crown :(

> Ingenious technique is a work of art in itself.  And
> as others pointed out, many of your "example" images look and feel far better
> than most art-geared stuff.

If that's the case, maybe I *can* make money at this someday.

>>> Goodbye, media.
>> Huh?
> 
> No need for slow media SSS anymore! :D

Don't abandon media! It's still a better option for glass objects and 
clouds. I did, however, manage to use my SSS pattern with a transparent 
object by making the black parts clear, and filling the object with 
absorbing media. It was faster than using scattering media, and didn't 
look altogether bad.

Sam


Post a reply to this message

From: Blue Herring
Subject: Re: Another SSS technique (28k jpg)
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

From: Blue Herring
Subject: Re: bunny test (28k jpg)
Date: 12 Aug 2008 11:00:56
Message: <48a1a5a8$1@news.povray.org>
stbenge wrote:
> Okay, this is the last one for now.
> 
> Parse time:
>  1 second.... bunny
>  5 seconds... SSS
> 
> Render time:
>  125 seconds
> 
> Total:
>  2 minutes, 5 seconds
> 
> This effect is too general to be useful for much. It's nothing more than 
> a curiosity at this point, and I think I'll let it sit for a while.

Really really great!  I was killing myself recently trying to come up 
with almost exactly this texture using scattering media, and this is so 
so much better!

-- 
-The Mildly Infamous Blue Herring


Post a reply to this message

From: stbenge
Subject: Re: Another SSS technique (28k jpg)
Date: 12 Aug 2008 18:10:31
Message: <48a20a57@news.povray.org>
Blue Herring wrote:
> stbenge wrote:
>> Okay, here goes.
> 
> 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.

You could view the source I posted in p.b.scene-files to see exactly how 
it was done, or you could look at the code below as an example. It uses 
the gradient pattern, and is clipped by a boxed pattern.

/* Begin Code */

// Renders colored static inside a cubic region 2x2x2 units large.
// There are 10x10x10=1000 'cells'

// a good test object
#declare obj=
union{
  plane{y,-.5}
  sphere{0,.5}
}

// number of cells
#declare incre=1/9;

// cleaner code is reusable code :)
// I should have done it this was for fast_prox.inc...
#macro grad(gDir)
  pigment_pattern{
   gradient gDir
   scale 2
   translate gDir
  }
#end

object{obj
  pigment{
   // wrapping them inside 'boxed' is a good way
   // to contain the infinitely-repeating gradients
   boxed
   pigment_map{
    [0 rgb 1]
    [1/256
     grad(z)
     pigment_map{
      #declare Z=0;
      #while(Z<=1)
       [Z
        grad(y)
        pigment_map{
         #declare Y=0;
         #while(Y<=1)
          [Y
           grad(x)
           pigment_map{
            #declare X=0;
            #while(X<=1)
             [X
              rgb<rand(R),rand(R),rand(R)>
             ]
             #declare X=X+incre;
            #end
           }
          ]
          #declare Y=Y+incre;
         #end
        }
       ]
       #declare Z=Z+incre;
      #end
     }
    ]
   }
  }
}

/* End Code */

Sam


Post a reply to this message

From: Blue Herring
Subject: Re: Another SSS technique (28k jpg)
Date: 13 Aug 2008 13:30:57
Message: <48a31a51$1@news.povray.org>
stbenge wrote:
> You could view the source I posted in p.b.scene-files to see exactly how 
> it was done, or you could look at the code below as an example. It uses 
> the gradient pattern, and is clipped by a boxed pattern.

Of course, forgot you posted code, I'll definitely look at it.  I must 
say, this is brilliant though.  We definitely need to see about getting 
you that crown :)

-- 
-The Mildly Infamous Blue Herring


Post a reply to this message

From: Blue Herring
Subject: Re: Another SSS technique (28k jpg)
Date: 13 Aug 2008 13:33:28
Message: <48a31ae8$1@news.povray.org>
Blue Herring wrote:
> stbenge wrote:
>> You could view the source I posted in p.b.scene-files to see exactly 
>> how it was done, or you could look at the code below as an example. It 
>> uses the gradient pattern, and is clipped by a boxed pattern.
> 
> Of course, forgot you posted code, I'll definitely look at it.  I must 
> say, this is brilliant though.  We definitely need to see about getting 
> you that crown :)
> 

Forgot to mention, I think this may well solve an aggravating problem 
I've been having with media later...

-- 
-The Mildly Infamous Blue Herring


Post a reply to this message

From: stbenge
Subject: Re: Another SSS technique (28k jpg)
Date: 15 Aug 2008 17:03:55
Message: <48a5ef3b$1@news.povray.org>
Blue Herring wrote:
> stbenge wrote:
>> You could view the source I posted in p.b.scene-files to see exactly 
>> how it was done, or you could look at the code below as an example. It 
>> uses the gradient pattern, and is clipped by a boxed pattern.
> 
> Of course, forgot you posted code, I'll definitely look at it.  I must 
> say, this is brilliant though.  We definitely need to see about getting 
> you that crown :)
> 

I've got some aluminum foil...

Sam


Post a reply to this message

From: stbenge
Subject: Re: Another SSS technique (28k jpg)
Date: 15 Aug 2008 17:04:49
Message: <48a5ef71@news.povray.org>
Blue Herring wrote:
> 
> Forgot to mention, I think this may well solve an aggravating problem 
> I've been having with media later...

What is the problem you are having?

Sam


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Another SSS technique (28k jpg)
Date: 19 Aug 2008 07:57:19
Message: <48aab51f@news.povray.org>
> We definitely need to see about getting you that crown :)

How about a rendered one ;)


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 1 Messages >>>

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