|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Explanation: to generate realistic range images I need to create a Z based
pigment using the 'gradient' pigment modifier.
Problem: 'gradient' wraps from 0 to 1 continuously based upon a modulo
operation on Z, i.e. 'gradient' = fmod(z,1.0) where fmod = "floating point
remainder" in VC6++ (see pattern.c, void gradient for more details)
Question: how do I force or modify gradient z so that it is valid only
from 0<Z<1 and gradient z = 0 otherwise? If we can answer this question,
then creating random dot stereograms and producing other such range imagery
will become faster and more realistic using povray. My only alternative at
this point is to clip the scene, which causes a 10X increase in compute
time.
#declare DepthMapTexture = texture {
pigment {
gradient z // this little fellow keeps wrapping around with
increased z, i want to make him
color_map { // stop wrapping and return 0 when z > 1 and z < 0.
[0.0 color Black]
[1.0 color Red] }
scale 40
}
finish{ambient 1.0 diffuse 0.0}
}
Many Thanks! dan
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <399aa176@news.povray.org>, "dan"
<dan### [at] snwpafbafmil> wrote:
> Explanation: to generate realistic range images I need to create a Z
> based pigment using the 'gradient' pigment modifier.
Why not just use the MegaPOV "depth" post_process filter?
> Question: how do I force or modify gradient z so that it is valid
> only from 0<Z<1 and gradient z = 0 otherwise? If we can answer
> this question, then creating random dot stereograms and producing
> other such range imagery will become faster and more realistic using
> povray. My only alternative at this point is to clip the scene,
> which causes a 10X increase in compute time.
You could use a function (in MegaPOV) specifying the blend you want,
clipping it to the correct range. If your entire scene is to be
contained within the range of the depth buffer, then you can simply
scale the gradient up to fit the scene.
--
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
dan wrote:
>
> Explanation: to generate realistic range images I need to create a Z based
> pigment using the 'gradient' pigment modifier.
>
> Problem: 'gradient' wraps from 0 to 1 continuously based upon a modulo
> operation on Z, i.e. 'gradient' = fmod(z,1.0) where fmod = "floating point
> remainder" in VC6++ (see pattern.c, void gradient for more details)
>
> Question: how do I force or modify gradient z so that it is valid only
> from 0<Z<1 and gradient z = 0 otherwise? If we can answer this question,
> then creating random dot stereograms and producing other such range imagery
> will become faster and more realistic using povray. My only alternative at
> this point is to clip the scene, which causes a 10X increase in compute
> time.
>
> #declare DepthMapTexture = texture {
> pigment {
> gradient z // this little fellow keeps wrapping around with
> increased z, i want to make him
> color_map { // stop wrapping and return 0 when z > 1 and z < 0.
> [0.0 color Black]
> [1.0 color Red] }
> scale 40
> }
> finish{ambient 1.0 diffuse 0.0}
> }
>
> Many Thanks! dan
Does 'planar' do what you want?
PoD
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|