POV-Ray : Newsgroups : povray.programming : Using POV for computing environment maps & background cubes Server Time
28 Jul 2024 12:24:31 EDT (-0400)
  Using POV for computing environment maps & background cubes (Message 1 to 7 of 7)  
From: Nigel Stewart
Subject: Using POV for computing environment maps & background cubes
Date: 5 Jun 2002 21:03:51
Message: <3CFEB431.8030008@nigels.com>
Hello,

I've come across an issue in POV 3.1g recently,
but I've been away from the POV newsgroups and
community for a while.  So, I understand there
is 3.5 in the pipeline, but no source as yet.

I'm tinkering with using POV to capture environment
maps suitable for use in OpenGL.  The basic idea is
to choose a position in the scene and render six
pinhole cameras with 90 degree field of view:
front, right, back, left, top, bottom.

This works reasonably well overall, but I'm observing
some discontinuity along the edges of the top and bottom
images, where they meet front, right, back and left.

Looking at the POV source, it seems that the grid
of rays traced is not centered on the pixel, they are
on the top-left (or bottom-left) corner.  So, it seems
that simply shifting these by half a pixel should solve
the problem:

In create_ray (render.c)

     case PERSPECTIVE_CAMERA:
       x0 = x / (DBL)Frame.Screen_Width - 0.5;
       y0 = ((DBL)(Frame.Screen_Height - 1) - y)
	/ (DBL)Frame.Screen_Height - 0.5;

...should become...

     case PERSPECTIVE_CAMERA:
       x0 = (x+0.5) / (DBL)Frame.Screen_Width - 0.5;
       y0 = ((DBL)(Frame.Screen_Height - 0.5) - y)
	/ (DBL)Frame.Screen_Height - 0.5;

I'm going to actually test this for corectness when I get
some time, but in the meantime, interested in your
impressions.

Regards,

Nigel Stewart

http://www.cs.rmit.edu.au/~nigels


Post a reply to this message

From: Pabs
Subject: Re: Using POV for computing environment maps & background cubes
Date: 5 Jun 2002 23:11:48
Message: <3cfed2f4@news.povray.org>
> This works reasonably well overall, but I'm observing
> some discontinuity along the edges of the top and bottom
> images, where they meet front, right, back and left.
> Looking at the POV source, it seems that the grid
> of rays traced is not centered on the pixel, they are
> on the top-left (or bottom-left) corner.  So, it seems
> that simply shifting these by half a pixel should solve
> the problem:

I believe this was fixed in one of the 3.5 betas
You'd have to check though.

> I'm tinkering with using POV to capture environment
> maps suitable for use in OpenGL.  The basic idea is
> to choose a position in the scene and render six
> pinhole cameras with 90 degree field of view:
> front, right, back, left, top, bottom.

I started an object camera patch (bicubic patches, sphere...) for MegaPOV a
while ago &
the demo images (inc env mappings of the resulting images - using POV not
OpenGL) should still be in povray.binaries.images if you go back far enough
mail me at <pabs3 at zip dot to> if you want the src
I put off finishing it because there was little interest & 3.5 was coming
soon :-)
I plan to do all the objects there is UV mapping for after the 3.5 src is
released

Bye,
Pabs


Post a reply to this message

From: Apache
Subject: Re: Using POV for computing environment maps & background cubes
Date: 5 Jun 2002 23:37:02
Message: <3cfed8de$1@news.povray.org>
It's fixed in 3.5.

--
Apache
POV-Ray Cloth experiments: http://geitenkaas.dns2go.com/experiments/
Email: apa### [at] yahoocom
ICQ: 146690431


Post a reply to this message

From: Pabs
Subject: Re: Using POV for computing environment maps & background cubes
Date: 5 Jun 2002 23:49:10
Message: <3cfedbb6@news.povray.org>
> the demo images (inc env mappings of the resulting images - using POV not
> OpenGL) should still be in povray.binaries.images if you go back far
enough

See here: http://news.povray.org/povray.binaries.images/12939/


Post a reply to this message

From: Nigel Stewart
Subject: Re: Using POV for computing environment maps & background cubes
Date: 6 Jun 2002 08:58:39
Message: <3CFF5BBB.5020307@nigels.com>
> It's fixed in 3.5.

That's great, thanks!

Keep up the good work with POV 3.5...

Regards,

Nigel Stewart


Post a reply to this message

From: Nigel Stewart
Subject: Re: Using POV for computing environment maps & background cubes
Date: 6 Jun 2002 20:36:46
Message: <3CFFFF5D.5040501@nigels.com>
> It's fixed in 3.5.

Yes indeed.
Thanks!

Nigel Stewart


Post a reply to this message

From: Apache
Subject: Re: Using POV for computing environment maps & background cubes
Date: 6 Jun 2002 20:52:56
Message: <3d0003e8$1@news.povray.org>
I didn't do anything. Those folks who're working on povray3.5 though...

--
Apache
POV-Ray Cloth experiments: http://geitenkaas.dns2go.com/experiments/
Email: apa### [at] yahoocom
ICQ: 146690431


Post a reply to this message

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