|
|
So, I am using this macro to generate chromadepth textures:
// this script assumes the depth effect is *linear* from near to far,
// which may not be the case
// red, white, blue
#macro MakeChromadepthTextureCameraRWB(CameraLocation, CameraLookAt)
#local iMax = 240;
pigment
{
spherical
color_map
{
[0.0 color srgb <0,0,1>]
[0.5 color srgb <1,1,1>]
[1.0 color srgb <1,0,0>]
}
}
// finish
// {
// ambient 1
// diffuse 0
// }
scale vlength(CameraLocation - CameraLookAt) * 2
translate CameraLocation
#end
The texture is centered on the camera location, and stretches to a point
opposite the model. The problem is that the model ends up mostly white,
with only touches of blue and red, as you can see in the attached image.
I think the texture should hug the model a bit closer, so that more red
and blue are visible. The problem is that the texture is centered on the
camera instead of the model, or I could just scale the texture a bit
smaller.
What method can I use to fix the texture? I know what the model's center
point and bounding box are.
Thanks.
Mike
Post a reply to this message
Attachments:
Download 'wrapper_showcase.jpg' (225 KB)
Preview of image 'wrapper_showcase.jpg'
|
|