POV-Ray : Newsgroups : povray.general : Depth Maps Server Time
15 Oct 2026 07:57:03 EDT (-0400)
  Depth Maps (Message 1 to 28 of 28)  
From: Chris Howie
Subject: Depth Maps
Date: 9 Jan 2002 05:49:29
Message: <3c3c2039$1@news.povray.org>
Not sure if this is where to post suggestions, but here we go:

It would be great if POV-Ray could generate depth maps.  These are used in
stereogram creation.

The resulting image would be greyscale, with higher values of grey
corresponding to closer objects.  As far as I can see, the implementation
would be much simpler: rather that calculating colors, reflection, etc., you
would just trace each ray until it hits an object, and then record the
distance.

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


Post a reply to this message

From: Warp
Subject: Re: Depth Maps
Date: 9 Jan 2002 06:10:04
Message: <3c3c250c@news.povray.org>
Chris Howie <cra### [at] yahoocom> wrote:
: It would be great if POV-Ray could generate depth maps.  These are used in
: stereogram creation.

  MegaPov supports this.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Chris Howie
Subject: Re: Depth Maps
Date: 9 Jan 2002 06:21:47
Message: <3c3c27cb@news.povray.org>
Where can I download it?

__________________
Chris Howie
cra### [at] yahoocom
http://winimizer.virtualave.net
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3c3c250c@news.povray.org...
> Chris Howie <cra### [at] yahoocom> wrote:
> : It would be great if POV-Ray could generate depth maps.  These are used
in
> : stereogram creation.
>
>   MegaPov supports this.
>
> --
> #macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb
M()}}
> N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
> N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  -
Warp -


Post a reply to this message

From:
Subject: Re: Depth Maps
Date: 9 Jan 2002 06:35:58
Message: <7nao3u4l9tffjd3spfvvka53rcnnai2bhk@4ax.com>
On Wed, 9 Jan 2002 06:21:40 -0500, "Chris Howie" <cra### [at] yahoocom>
wrote:

> Where can I download it?

It depends on target platform.
Check http://nathan.kopp.com/patched.htm

ABX


Post a reply to this message

From: Chris Howie
Subject: Re: Depth Maps
Date: 9 Jan 2002 06:46:13
Message: <3c3c2d85@news.povray.org>
The site does not have a Windows version...
__________________
Chris Howie
cra### [at] yahoocom
http://winimizer.virtualave.net
"W³odzimierz ABX Skiba" <abx### [at] babilonorg> wrote in message
news:7nao3u4l9tffjd3spfvvka53rcnnai2bhk@4ax.com...
> On Wed, 9 Jan 2002 06:21:40 -0500, "Chris Howie"
<cra### [at] yahoocom>
> wrote:
>
> > Where can I download it?
>
> It depends on target platform.
> Check http://nathan.kopp.com/patched.htm
>
> ABX


Post a reply to this message

From:
Subject: Re: Depth Maps
Date: 9 Jan 2002 06:50:46
Message: <afbo3u0u16lqr3k47tpjgtcc1mj3svek5u@4ax.com>
On Wed, 9 Jan 2002 06:46:07 -0500, "Chris Howie" <cra### [at] yahoocom>
wrote:
> The site does not have a Windows version...

It _is_ about windows version. Links point to other platform pages. Have you
checked download section ?

And btw: please not get into bad habits and not quote whole message even if it
is short.

ABX


Post a reply to this message

From: Chris Howie
Subject: Re: Depth Maps
Date: 9 Jan 2002 06:52:12
Message: <3c3c2eec@news.povray.org>
Sorry.

*slaps Outlook Express*

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


Post a reply to this message

From: Warp
Subject: Re: Depth Maps
Date: 9 Jan 2002 06:55:34
Message: <3c3c2fb6@news.povray.org>
Chris Howie <cra### [at] yahoocom> wrote:
: The site does not have a Windows version...

  Yes it does.
  In fact, it's the only version available in the site (besides the source
code).

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Chris Howie
Subject: Re: Depth Maps
Date: 9 Jan 2002 07:09:06
Message: <3c3c32e2@news.povray.org>
It would still be nice if POV-Ray implemented this, though.

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


Post a reply to this message

From: Chris Howie
Subject: Re: Depth Maps
Date: 9 Jan 2002 07:11:05
Message: <3c3c3359$1@news.povray.org>
Yep, just found it.

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


Post a reply to this message

From:
Subject: Re: Depth Maps
Date: 9 Jan 2002 07:14:38
Message: <ruco3uo8tohkslqiucalnai4k27hcvih96@4ax.com>
On Wed, 9 Jan 2002 07:08:19 -0500, "Chris Howie" <cra### [at] yahoocom>
wrote:
> It would still be nice if POV-Ray implemented this, though.

what is wrong with MegaPOV ?

ABX


Post a reply to this message

From: Chris Howie
Subject: Re: Depth Maps
Date: 9 Jan 2002 07:16:35
Message: <3c3c34a3$1@news.povray.org>
Nothing.  But not having to download another file to use this feature would
be handy.

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


Post a reply to this message

From:
Subject: Re: Depth Maps
Date: 9 Jan 2002 07:25:07
Message: <fddo3u4njajcnpi0lgedk717j95kf23akd@4ax.com>
On Wed, 9 Jan 2002 07:16:28 -0500, "Chris Howie" <cra### [at] yahoocom>
wrote:
> Nothing.  But not having to download another file to use this feature would
> be handy.

downloading is a nature of IT community
patches are a nature of POV community
wishes are a nature of users

;-)

ABX


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Depth Maps
Date: 9 Jan 2002 07:27:24
Message: <3c3c372c@news.povray.org>
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... 

  You only have to texture your whole scene with a gradient from white to 
black, along the direction of the camera view (this may require a bit of 
good and old trial&error scaling and translating the gradient). Use a 
finish with ambient 1 and diffuse 0, and no lights. Simple, isn't?

-- 
Jaime Vives Piqueres

La Persistencia de la Ignorancia
http://www.ignorancia.org


Post a reply to this message

From: Simon Adameit
Subject: Re: Depth Maps
Date: 9 Jan 2002 09:43:38
Message: <3c3c571a$1@news.povray.org>
>   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...
>
>   You only have to texture your whole scene with a gradient from white to
> black, along the direction of the camera view (this may require a bit of
> good and old trial&error scaling and translating the gradient). Use a
> finish with ambient 1 and diffuse 0, and no lights. Simple, isn't?
>

If you want to get the distance to the camera you should use a spherical
pattern.

--
#local T=text{ttf"timrom.ttf""Simon Adameit".01,0}#local Y=1;#while(Y>-1)
#local X=0;#while(X<7)#local O=trace(T<X,Y><X,Y>+z);cylinder{<X-3,Y,5>*.01
<X-3,Y,5>*.01+5e-3,5e-5pigment{rgb 25*O}}#debug chr(83-(O.x=0)*51)#local
X=X+.05;#end#debug"\n"#local Y=Y-.05;#end


Post a reply to this message

From: Ron Parker
Subject: Re: Depth Maps
Date: 9 Jan 2002 11:15:48
Message: <slrna3or5l.ivf.ron.parker@fwi.com>
On Wed, 9 Jan 2002 15:42:01 +0100, Simon Adameit 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...
>>
>>   You only have to texture your whole scene with a gradient from white to
>> black, along the direction of the camera view (this may require a bit of
>> good and old trial&error scaling and translating the gradient). Use a
>> finish with ambient 1 and diffuse 0, and no lights. Simple, isn't?
>>
> 
> If you want to get the distance to the camera you should use a spherical
> pattern.

Except you really don't want the distance to the camera for stereograms.
It ends up looking funny.

-- 
#local R=<7084844682857967,0787982,826975826580>;#macro L(P)concat(#while(P)chr(
mod(P,100)),#local P=P/100;#end"")#end background{rgb 1}text{ttf L(R.x)L(R.y)0,0
translate<-.8,0,-1>}text{ttf L(R.x)L(R.z)0,0translate<-1.6,-.75,-1>}sphere{z/9e3
4/26/2001finish{reflection 1}}//ron.parker@povray.org My opinions, nobody else's


Post a reply to this message

From: Chris Howie
Subject: Re: Depth Maps
Date: 9 Jan 2002 16:21:34
Message: <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.

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


Post a reply to this message

From: Chris Howie
Subject: Re: Depth Maps
Date: 9 Jan 2002 16:23:16
Message: <3c3cb4c4@news.povray.org>
>   MegaPov supports this.

Yep, I just made a whole stack of stereograms.  Thanks, guys.  =)

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


Post a reply to this message

From: Chris Howie
Subject: Re: Depth Maps
Date: 10 Jan 2002 08:51:53
Message: <3c3d9c79$1@news.povray.org>
>   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.

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

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


Post a reply to this message

From:
Subject: Re: Depth Maps
Date: 10 Jan 2002 09:11:23
Message: <p58r3us36gk2ipteqqn3hf1or8q2seb7jh@4ax.com>
On Thu, 10 Jan 2002 08:51:46 -0500, "Chris Howie" <cra### [at] yahoocom>
wrote:
> Not to mention that doing it that way is much longer and more challenging.

Not exactly. With features of 3.5 (or MegaPOV) it could be done with one smart
macro.

ABX


Post a reply to this message

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

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