POV-Ray : Newsgroups : povray.general : Depth Maps Server Time
7 Aug 2024 05:20:40 EDT (-0400)
  Depth Maps (Message 21 to 28 of 28)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Jaime Vives Piqueres
Subject: Re: Depth Maps
Date: 10 Jan 2002 09:34:42
Message: <3c3da681@news.povray.org>
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

From: Rune
Subject: Re: Depth Maps
Date: 10 Jan 2002 10:36:11
Message: <3c3db4eb@news.povray.org>
"Chris Howie" wrote:

> >   Err.. hmmm... sorry, but IMHO, it is possible with
> > any version of POV-Ray having gradient pattern.
> > I've done this in the past with great success...
>
> Sure, you CAN, but to keep the gradients consistent,
> you need a depth map generator.

What do you mean? What is a depth map generator? And what's wrong with using
the output directly from POV-Ray (using the gradient pattern solution)?

> Not to mention that doing it that way is much longer
> and more challenging.

Scale the pattern big enough and then transform it like you transform the
camera - how difficult can that be?

I have used the gradient method in a few stereograms and it has worked fine
for me.

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

From: Chris Howie
Subject: Re: Depth Maps
Date: 11 Jan 2002 00:31:00
Message: <3c3e7894@news.povray.org>
> What is a depth map generator?

It reads the scene file and creates a depth map without using gradient
textures.

> And what's wrong with using
> the output directly from POV-Ray (using the gradient pattern solution)?

Nothing's wrong with that.

> Scale the pattern big enough and then transform it like you transform the
> camera - how difficult can that be?

Depends on the complexity of the scene.  Rendering a scene with a desk, a
jar of pencils, a lamp, and a picture frame could be difficult and tedious.

__________________
Chris Howie
cra### [at] yahoocom
http://winimizer.virtualave.net


Post a reply to this message

From: Chris Howie
Subject: Re: Depth Maps
Date: 11 Jan 2002 00:32:05
Message: <3c3e78d5@news.povray.org>
>   ? 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.

I mean an automatic generator.  Takes ANY scene and converts it into a depth
map without any work on your part.

__________________
Chris Howie
cra### [at] yahoocom
http://winimizer.virtualave.net


Post a reply to this message

From: Rune
Subject: Re: Depth Maps
Date: 11 Jan 2002 09:49:50
Message: <3c3efb8e@news.povray.org>
"Chris Howie" wrote:
> > Scale the pattern big enough and then transform it
> like you transform the camera - how difficult can that be?
>
> Depends on the complexity of the scene.  Rendering a scene
> with a desk, a jar of pencils, a lamp, and a picture frame
> could be difficult and tedious.

I don't think so.

Just leave out textures from all the objects and specify a "global" texture
using the #default feature, including correct translation, rotation etc.
Then all objects will get that texture, and it will be aligned correctly no
matter how the objects are aligned in the scene.

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

From: Chris Howie
Subject: Re: Depth Maps
Date: 11 Jan 2002 11:27:11
Message: <3c3f125f@news.povray.org>
> Just leave out textures from all the objects and specify a "global"
texture
> using the #default feature, including correct translation, rotation etc.
> Then all objects will get that texture, and it will be aligned correctly
no
> matter how the objects are aligned in the scene.

I have to admit, that DOES sound easy... could you send me some source I
could examine?

__________________
Chris Howie
cra### [at] yahoocom
http://winimizer.virtualave.net


Post a reply to this message

From: Rune
Subject: Re: Depth Maps
Date: 11 Jan 2002 16:11:20
Message: <3c3f54f8@news.povray.org>
"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

From: Ben Chambers
Subject: Re: Depth Maps
Date: 11 Jan 2002 21:58:00
Message: <3c3fa638@news.povray.org>
"Chris Howie" <cra### [at] yahoocom> wrote in message
news:3c3cb45e@news.povray.org...
> Anyway, the reason that I would like it implemented in POV-Ray is so that
> programs like Moray would be obligated to provide support for it.

IIRC, Moray doesn't yet support all of the features already there (though I
haven't used it for a while, so I'm not sure).

...Chambers


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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