POV-Ray : Newsgroups : povray.advanced-users : Help with special density for blob: getting my feet wet Server Time
26 Dec 2024 14:33:23 EST (-0500)
  Help with special density for blob: getting my feet wet (Message 1 to 4 of 4)  
From: wade
Subject: Help with special density for blob: getting my feet wet
Date: 10 Jan 2005 21:30:00
Message: <web.41e339a7fbc78a8ae4b238f30@news.povray.org>
Hello,

I am trying to get my blob to behave like cell walls: where the surface is
parellel to the plane of projection the wall looks pritty much clear and as
the wall bends towards perpendicular to the plane of projection the wall
becomes more opaque. I don't know if I'm being clear. Glass is simmilar.

I tried density maps but I dont know how to use them correctly I think.

Thanks for the help!


Post a reply to this message

From: Mike Williams
Subject: Re: Help with special density for blob: getting my feet wet
Date: 10 Jan 2005 23:43:36
Message: <hStLLCAqg14BFwqw@econym.demon.co.uk>
Wasn't it wade who wrote:
>Hello,
>
>I am trying to get my blob to behave like cell walls: where the surface is
>parellel to the plane of projection the wall looks pritty much clear and as
>the wall bends towards perpendicular to the plane of projection the wall
>becomes more opaque. I don't know if I'm being clear. Glass is simmilar.
>
>I tried density maps but I dont know how to use them correctly I think.

That sounds a bit like the Angle Of Incidence pattern available in
MegaPOV but not in Official POV-Ray. Except it doesn't happen with
glass.

The value returned by this pattern is proportional to the angle between
a certain ray and the (perturbed) normal at the surface of the object.
So you can use a colour_map to vary the transparency.

  pigment {aoi
    colour_map {
      [0.1 rgbt <.3,.5,0,1>]
      [0.5 rgbt <.3,.5,0,0>]
    }
  }

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Bob Hughes
Subject: Re: Help with special density for blob: getting my feet wet
Date: 11 Jan 2005 02:16:49
Message: <41e37d61$1@news.povray.org>
The mention of glass confused me, was thinking of plate glass turned edge-on 
and yet this being about a blob shape I thought of something rounded.

If it were like a microscopic view of a plant cell I imagine this would be 
about the extinction of light across denser places along line of sight. What 
Mike suggests could work, I guess, just that I was thinking of media getting 
thicker at the outer edge of a spherical shape and thinner in the middle. 
Much like the Earth's atmosphere, as seen from orbit.

If you fill the object with media uniformly then the opposite will happen. 
That is, if not only a shell. So, it would seem a shell is needed. The shape 
of the blob object might make that difficult. A sphere alone would be very 
simple, though, by using the 'spherical' pattern in the density_map.

Well, I don't have any brilliant ideas to share really, just wanted to 
elaborate this question a bit. However, I do have a little scene of a plant 
cell-like thing showing an example of media filling a blob. Should be 
obvious enough to understand. Basically just a positive strength sphere and 
negative strength side spheres to make it boxy and 'boxed' patterns for both 
surface color and interior. Feel free to do whatever you want with this if 
it is any good at all for what is needed. If not, continue asking... maybe 
at povray.general or povray.newusers, too, since there's more traffic there.

/* BEGIN */
global_settings {
 assumed_gamma 1
}

camera {
 location -5*z
 look_at 0
 angle 50
 rotate <30,30,0>
}

light_source {
 -1000*z, 1
 rotate <30,-30,0>
}

plane { // floor
 y,-2/3
 pigment {
  rgb 1
 }
}

// plant cell?
blob {
 threshold 0.5
 sphere {
  0,1.75,1
  pigment {
   boxed
   color_map {
    [0.45 color rgbt <0.1,0.6,0.1,0.9>]
    [0.55 color rgbt <0.6,0.1,0.1,0.3>]
   }
   scale 1.3
  }
 }
 sphere {
  0,1,-1
  scale <0.5,2,2>
  translate x
  pigment {
   color rgbt <0.1,0.6,0.1,0.9>
  }
 }
 sphere {
  0,1,-1
  scale <0.5,2,2>
  translate -x
  pigment {
   color rgbt <0.1,0.6,0.1,0.9>
  }
 }
 sphere {
  0,1,-1
  scale <2,2,0.5>
  translate z
  pigment {
   color rgbt <0.1,0.6,0.1,0.9>
  }
 }
 sphere {
  0,1,-1
  scale <2,2,0.5>
  translate -z
  pigment {
   color rgbt <0.1,0.6,0.1,0.9>
  }
 }
 sphere {
  0,1,-1
  scale <2,0.5,2>
  translate y
  pigment {
   color rgbt <0.1,0.6,0.1,0.9>
  }
 }
 sphere {
  0,1,-1
  scale <2,0.5,2>
  translate -y
  pigment {
   color rgbt <0.1,0.6,0.1,0.9>
  }
 }
 pigment {
  color rgb 1
 }
  interior {
   media {
    method 2
   // samples 10
    absorption <0.9,0.1,0.9>*9
    emission <0.1,0.9,0.1>
    scattering {
     4, rgb 4
     // eccentricity 0.2
     // extinction 0
    }
  density {
   boxed
   density_map {
    [0.45 color rgb <0.6,0.1,0.1>*0]
    [0.55 color rgb <0.1,0.6,0.1>*1]
    [0.65 color rgb <0.1,0.6,0.1>*0]
   }
   scale 1.3
  }
   }
  }
 hollow
}
/* END */


Post a reply to this message

From: Warp
Subject: Re: Help with special density for blob: getting my feet wet
Date: 11 Jan 2005 05:42:50
Message: <41e3adaa@news.povray.org>
wade <web### [at] aproximationorg> wrote:
> I am trying to get my blob to behave like cell walls: where the surface is
> parellel to the plane of projection the wall looks pritty much clear and as
> the wall bends towards perpendicular to the plane of projection the wall
> becomes more opaque. I don't know if I'm being clear. Glass is simmilar.

  What happens with glass is that they reflect more light at shallow
angles. If you look at a window directly from the front, the amount of
reflection is very small and mostly you see through. If you look at the
window from a very small angle, you see mostly the reflection (of course
this effect can be accentuated or diminished by the coating of the glass).
  If this is the effect you are looking for, try variable reflection
(supported by POV-Ray).

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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