POV-Ray : Newsgroups : povray.newusers : absorbing media question : Re: absorbing media question Server Time
29 Jul 2024 04:20:01 EDT (-0400)
  Re: absorbing media question  
From: Alain
Date: 25 Jul 2006 22:17:20
Message: <44c6d0b0$1@news.povray.org>
mine nous apporta ses lumieres en ce 24/07/2006 23:38:
> Hi, here is what I want to do: I have a cube (it could be a rectangle later
> on) and I have made it hollow and filled it with absorbing media and made
> the cube clear. the light source is above it. I want to progressively
> change the amount I am absorbing as I go away from the light. I want to
> absorb more light the further away I get from the light source. I figure I
> have to use a density_map but I'm not sure how to that for a cube (or
> similar) shape. I have done a density_map for a sphere with emitting media
> before. Thanks for any help. :)
> 
> 
> 
You can use a simple gradient pattern. As your light is above the box, a 
gradient y dencity_map{[0 rgb 1][1 rgb 0]} would be apropriate. Scale it 
verticaly to slightly over match the hight of the box. If the box is 2 units 
high, scale the gradient by 2.001 in the y direction to prevent the pattern from 
starting to repeat at the top of the box. Translate it verticaly so that it 
matches the base of the box.

-- 
Alain
-------------------------------------------------
BACHELOR: A man who never makes the same mistake once.


Post a reply to this message

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