POV-Ray : Newsgroups : povray.general : Subsurface Scattering Server Time
4 Aug 2024 10:18:57 EDT (-0400)
  Subsurface Scattering (Message 14 to 23 of 23)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: ran102
Subject: Re: Subsurface Scattering
Date: 17 Jul 2003 18:16:26
Message: <3f17203a$1@news.povray.org>
Check out this picture of three glasses of milk
http://graphics.ucsd.edu/~henrik/images/imgs/milk.jpg.  The one on the far
right has no subsurface scattering, and looks like thick paint.  But the two
on the left do have this effect and replicate the look of milk almost
perfectly.


Post a reply to this message

From: Patrick Elliott
Subject: Re: Subsurface Scattering
Date: 18 Jul 2003 16:03:53
Message: <MPG.1981ffbea17f1df8989839@news.povray.org>
In article <3f17203a$1@news.povray.org>, mon### [at] stinet says...
> Check out this picture of three glasses of milk
> http://graphics.ucsd.edu/~henrik/images/imgs/milk.jpg.  The one on the far
> right has no subsurface scattering, and looks like thick paint.  But the two
> on the left do have this effect and replicate the look of milk almost
> perfectly.
> 
> 
> 

I have been thinking about this some. And media just won't do what is 
really needed for this. What you need is something like:

texture {
  pigment {Flesh}
  Subsurface {
    Pigment {
      ...
    }
    Scattering .5
    Depth .1
  }
}

Why? Because you can't get veins and things to show through properly. 
Anything like that you mapped to it would end up on the surface, but you 
want those sorts of things to be the 'subsurface' and have the light 
bounce back from there. It 'may' be possible to make a model that has two 
layers, one for the surface skin and a second for the subsurface and 
stuff media in between them, but this is hardly efficient and imho is 
outright impractical with a complex model. There is also the other 
factor, in the case of something like the milk you are talking about, it 
is literally impossible to make a media that is 'thick' enough (or my one 
attempt to fiddle with it failed to produce such anyway) so as to mask 
things behind it. Maybe in a very large container, but definitely not in 
something small.

A real method to do this would be very useful.

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: ran102
Subject: Re: Subsurface Scattering
Date: 18 Jul 2003 17:48:08
Message: <3f186b18@news.povray.org>
I have been able to with milk make it very thick.  Changing the transparency
of the main pigment and also the brightness of the scattering pigment ( i
make it something like 4 or 5), I can produce milk that cannot be seen
through at all but has the scattering below the surface that makes it look
real.  If you want I can post a picture of it on the pov binaries images.


Post a reply to this message

From: Patrick Elliott
Subject: Re: Subsurface Scattering
Date: 19 Jul 2003 17:04:06
Message: <MPG.19835f5a3e611a0798983b@news.povray.org>
In article <3f186b18@news.povray.org>, mon### [at] stinet says...
> I have been able to with milk make it very thick.  Changing the transparency
> of the main pigment and also the brightness of the scattering pigment ( i
> make it something like 4 or 5), I can produce milk that cannot be seen
> through at all but has the scattering below the surface that makes it look
> real.  If you want I can post a picture of it on the pov binaries images.
> 
> 
> 

Rather see the code. lol Having fiddled with trying to do something of 
the sort a bit, I got quite annoyed. Though I suspect you are still not 
doing what I meant. I.e. you are having the surface of the media 
container define 'part' of the 'substance' of the media. This works, but 
isn't quite what I was experimenting to achieve. It also doesn't solve 
the other issue with having a real texture 'beneath' the layer in which 
the scattering, or media, needs to be active. Thus it works great for 
milk, but basically fails with something like skin. Which doesn't exactly 
help me much in the long run. ;) lol

However, to give you an idea of what I was trying to manage in this case. 
The concept was to take a sphere, fill it with the densest red colored 
media I could, then shave the side of the sphere off (differencing a 
transparent block from it). The expected result was a thick soupy 
interior that significantly obscured the other side of the sphere and 
made the inside 'seem' semi-solid. I suspect that part of the problem was 
the sphere being way to small, but I also suspect that it is simply 
impossible to make media 'thick' enough to obscure objects at relatively 
short distances without resorting to something like what you seem to be 
talking about doing for the milk. However, I could have simply screwed up 
the settings. ;) I am pretty much flying blind here and experimenting 
with something I never used before. lol

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: Tim Cook
Subject: Re: Subsurface Scattering
Date: 19 Jul 2003 17:15:34
Message: <3f19b4f6@news.povray.org>
Patrick Elliott wrote:
> I suspect that part of the problem was the sphere being way to small, but I also
suspect that it is simply 
> impossible to make media 'thick' enough to obscure objects at relatively 
> short distances without resorting to something like what you seem to be 
> talking about doing for the milk.

You know, the 'scale' keyword works for media densities too...perhaps
that will help with making the relatively short distances less of a
problem.

-- 
Tim Cook
http://home.bellsouth.net/p/PWP-empyrean

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: Christopher James Huff
Subject: Re: Subsurface Scattering
Date: 20 Jul 2003 10:57:09
Message: <cjameshuff-8ADC1B.09504120072003@netplex.aussie.org>
In article <3f19b4f6@news.povray.org>, Tim Cook <z99### [at] bellsouthnet> 
wrote:

> You know, the 'scale' keyword works for media densities too...perhaps
> that will help with making the relatively short distances less of a
> problem.

The scale keyword only scales the pattern. You have to scale the density 
manually.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Christopher James Huff
Subject: Re: Subsurface Scattering
Date: 20 Jul 2003 11:01:44
Message: <cjameshuff-E24BFF.09551520072003@netplex.aussie.org>
In article <MPG.19835f5a3e611a0798983b@news.povray.org>,
 Patrick Elliott <sha### [at] hotmailcom> wrote:

> I suspect that part of the problem was 
> the sphere being way to small, but I also suspect that it is simply 
> impossible to make media 'thick' enough to obscure objects at relatively 
> short distances without resorting to something like what you seem to be 
> talking about doing for the milk. However, I could have simply screwed up 
> the settings. ;) I am pretty much flying blind here and experimenting 
> with something I never used before. lol

To make it thicker, you just need to increase the density. To get the 
same results at half the scale, you need to double the density. It 
sounds like you think there is some limit to how dense you can make 
media, or that high densities are somehow a "last resort".

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Patrick Elliott
Subject: Re: Subsurface Scattering
Date: 20 Jul 2003 15:13:31
Message: <MPG.198496eefefa88b98983e@news.povray.org>
In article <cja### [at] netplexaussieorg>, 
cja### [at] earthlinknet says...
> In article <MPG.19835f5a3e611a0798983b@news.povray.org>,
>  Patrick Elliott <sha### [at] hotmailcom> wrote:
> 
> > I suspect that part of the problem was 
> > the sphere being way to small, but I also suspect that it is simply 
> > impossible to make media 'thick' enough to obscure objects at relatively 
> > short distances without resorting to something like what you seem to be 
> > talking about doing for the milk. However, I could have simply screwed up 
> > the settings. ;) I am pretty much flying blind here and experimenting 
> > with something I never used before. lol
> 
> To make it thicker, you just need to increase the density. To get the 
> same results at half the scale, you need to double the density. It 
> sounds like you think there is some limit to how dense you can make 
> media, or that high densities are somehow a "last resort".
> 
> 

Umm. I am confused here.. Looking at the docs implies that density is a 
color vector. I am a bit unclear how you make that more dense, nor does 
increasing the size of this vector seem to produce a noticeable effect. 
It is possible something about what I am doing is simply not allowing 
media to be seen, but... Like I said, I haven't a clue what I am doing, I 
just tried something and it doesn't seem to be doing what I expected (if 
anything). :p

camera {

 location <0.0000001,0,-200>
 look_at <0,0,0>
}

light_source {
     <0, 0, -130>
     color rgb <1, 1, 1>  // light's color
}

light_source {
     <130, 0, -130>
     color rgb <.5, .5, .5>  // light's color
}

light_source {
     <-130, 0, -130>
     color rgb <.5, .5, .5>  // light's color
}
 
difference {
  sphere {<0,0,0>, 100
    pigment {color rgb <1,0,0>}
    hollow
    interior {
      media {
        //absorption rgb <1,0,0>
        //emission rgb <1,0,0>
        intervals 1
        variance 0
        scattering {1, rgb <1,0,0> extinction 0}
        density {
          checker
          density {rgb <1,0,0>}
          density {rgb <1,1,0>}
        }
      }
    }
  }
  box {<-110,-110,5>,<0,110,-100>
    pigment {rgbt <1,1,1,1>}
  }
  rotate <0,-20,0>
  //no_shadow
}

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: Christopher James Huff
Subject: Re: Subsurface Scattering
Date: 20 Jul 2003 16:33:46
Message: <cjameshuff-61A74B.15271820072003@netplex.aussie.org>
In article <MPG.198496eefefa88b98983e@news.povray.org>,
 Patrick Elliott <sha### [at] hotmailcom> wrote:

> Umm. I am confused here.. Looking at the docs implies that density is a 
> color vector. I am a bit unclear how you make that more dense,

To put it in technical terms: use bigger numbers.


> nor does 
> increasing the size of this vector seem to produce a noticeable effect. 

It does.


>         scattering {1, rgb <1,0,0> extinction 0}

You only scatter red light, green and blue are unaffected by this media 
(though your pigment filters them out). When I'm doing an object that is 
mainly colored by its interior, I use a pigment of rgbf 1. Yours filters 
everything red. In addition, your extinction is set to 0, this media 
won't impede light passing through it. And you don't have anything else 
in your scene. I'm not really sure what effect you're after, you're 
certainly not going to get anything like milk with that. Your density 
pattern has so much fine detail that you are going to require a lot of 
sampling to get decent results, even after scaling it up by 10.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Patrick Elliott
Subject: Re: Subsurface Scattering
Date: 21 Jul 2003 15:54:49
Message: <MPG.1985f2207d12bc6198983f@news.povray.org>
In article <cja### [at] netplexaussieorg>, 
cja### [at] earthlinknet says...
> In article <MPG.198496eefefa88b98983e@news.povray.org>,
>  Patrick Elliott <sha### [at] hotmailcom> wrote:
> 
> > Umm. I am confused here.. Looking at the docs implies that density is a 
> > color vector. I am a bit unclear how you make that more dense,
> 
> To put it in technical terms: use bigger numbers.
> 
> 
> > nor does 
> > increasing the size of this vector seem to produce a noticeable effect. 
> 
> It does.
> 
> 
> >         scattering {1, rgb <1,0,0> extinction 0}
> 
> You only scatter red light, green and blue are unaffected by this media 
> (though your pigment filters them out). When I'm doing an object that is 
> mainly colored by its interior, I use a pigment of rgbf 1. Yours filters 
> everything red. In addition, your extinction is set to 0, this media 
> won't impede light passing through it. And you don't have anything else 
> in your scene. I'm not really sure what effect you're after, you're 
> certainly not going to get anything like milk with that. Your density 
> pattern has so much fine detail that you are going to require a lot of 
> sampling to get decent results, even after scaling it up by 10.
> 
> 

Hmm.. Wasn't thinking about what was actually being scattered there. 
Probably why absorption didn't work either when I tried it that way. lol 
As for the effect.. I am not looking for milk, etc. Just really dense 
media. I used the checker pattern to add some variance to it when I 
realized something wasn't working and figured a pattern could tell me if 
it was working at all. The idea was to try to see if I could make the 
media solid enough to make it seem as though the inside was nearly solid, 
by having the media fill it in, instead of simply CSGing a box with the 
same color as the sphere. Stupid, but... lol Probably should have looked 
at some real examples first and worked from there. ;)

Basically, I wanted it so thick that the back shadow nearly disappears 
and the media seemed to be part of the sphere itself, not just something 
that kind of floated in it. At this point I am about ready to scrap the 
entire experiment, since I seem to flat out not get how this feature 
works. lol

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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