|
|
Chris Howie wrote:
> Sure, you CAN, but to keep the gradients consistent, you need a depth map
> generator.
? I do not understand what you mean here... POV-Ray is the "depth map
generator"! I've done lots of depth maps for stereograms in the past with
POV-Ray 2.2, only with black fog and white luminous textures. Later I used
gradient z for easier control (wave type). Both tricks are *really* old,
and work perfectly for all kind of RDS and SIRDS.
> Not to mention that doing it that way is much longer and more challenging.
I can't see the difficulty on scaling and translating a texture, but of
course, having an INI option for depth map output is easier, sure. I only
said that POV-Ray already serves for this, IMHO.
--
Jaime Vives Piqueres
La Persistencia de la Ignorancia
http://www.ignorancia.org
Post a reply to this message
|
|
|
|
"Chris Howie" wrote:
> I have to admit, that DOES sound easy...
> could you send me some source I could examine?
Here's a quick example I just made:
// Camera and depth alignment
// **************************
// Camera alignment
#declare CamAlignment =
transform {translate -5.5*z rotate <20,35,0> translate 1.2*y}
// Depth range
#declare MinDepth = 3;
#declare MaxDepth = 9;
// Makes areas closer than depth range red
// and areas farther away than depth range blue.
#declare ErrorTest = off;
// Depthmap mode on/off.
#declare Stereogram = on;
// 'Stereogram generator'
// **********************
camera {location 0 look_at z transform CamAlignment}
#if (Stereogram=on)
#default {
texture {
pigment {
planar rotate 90*x scale MaxDepth
color_map {
[0.0001, blue ErrorTest]
[0.0001, rgb 0]
[1-MinDepth/MaxDepth-0.0001, rgb 1]
[1-MinDepth/MaxDepth-0.0001, rgb 1-<0,1,1>*ErrorTest]
}
}
finish {ambient 1 diffuse 0}
transform CamAlignment
}
}
background {rgb ErrorTest*<0,0.5,1>}
#else
#default {pigment {rgb 1}}
#end
// Objects in scene
// ****************
plane {y, 0} // floor
union { // table
box {<-1,0,-1>, <1,1,1> scale <0.1,2,0.1> translate <+2,0,+1>}
box {<-1,0,-1>, <1,1,1> scale <0.1,2,0.1> translate <-2,0,+1>}
box {<-1,0,-1>, <1,1,1> scale <0.1,2,0.1> translate <+2,0,-1>}
box {<-1,0,-1>, <1,1,1> scale <0.1,2,0.1> translate <-2,0,-1>}
box {<-2.2,2,-1.2>, <2.2,2.2,1.2>}
}
union { // ugly quick lamp
sphere {0.3*y, 0.3}
cone {0.5*y, 0.45, 1.0*y, 0.1}
translate <1,2.2,0.5>
}
// Only for testing purposes when stereogram mode is turned off.
light_source {<1,2,-3>*1000, color 1}
Rune
--
3D images and anims, include files, tutorials and more:
Rune's World: http://rsj.mobilixnet.dk (updated Jan 2)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk
Post a reply to this message
|
|