POV-Ray : Newsgroups : povray.advanced-users : Finding Screen Coordinates of Objects Server Time
4 Nov 2024 21:25:11 EST (-0500)
  Finding Screen Coordinates of Objects (Message 1 to 6 of 6)  
From: Heckmans
Subject: Finding Screen Coordinates of Objects
Date: 20 Feb 2001 23:52:16
Message: <3A934972.96C708C7@igs.net>
I'm doing a project where I'm trying to automate
the creation of clickable image maps from pov-ray scenes.

Is there any easy way of finding the screen
coordinates of an object in the scene.
i.e. some internal way of converting from world to screen coords

Ivan Heckman
7 i c h @ q l i n k  -I really don't like spam-  . q u e e n s u .c a


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Finding Screen Coordinates of Objects
Date: 23 Feb 2001 22:39:14
Message: <3a972ce2$1@news.povray.org>
In article <3A934972.96C708C7@igs.net> , Heckmans <jhe### [at] igsnet>  
wrote:

> Is there any easy way of finding the screen
> coordinates of an object in the scene.
> i.e. some internal way of converting from world to screen coords

This is not how POV-Ray works.  While not the perfect answer to your
question, this should help explain it:

<http://www.students.tut.fi/~warp/povVFAQ/languageVFAQ.html#wireframes>


       Thorsten


Post a reply to this message

From: Pablo Viojo
Subject: Re: Finding Screen Coordinates of Objects
Date: 25 Feb 2001 10:39:33
Message: <3a992735@news.povray.org>
> > Is there any easy way of finding the screen
> > coordinates of an object in the scene.
> > i.e. some internal way of converting from world to screen coords
>
> This is not how POV-Ray works.  While not the perfect answer to your
> question, this should help explain it:
>

This is not how POV-Ray works, but you can, knowing the coordinates of an
object and its dimensions, calculate the position of the object in the final
image.

For this you must know: 1- The coordinates of the object in the POV-Ray
world
                                     2- The camera location, look_at,
direction, angle, etc.

                                     3- The size of the final image.

And the rest is all maths.


Pablo Viojo
pvi### [at] adinetcomuy


Post a reply to this message

From: Warp
Subject: Re: Finding Screen Coordinates of Objects
Date: 27 Feb 2001 06:06:55
Message: <3a9b8a4e@news.povray.org>
In povray.general Pablo Viojo <pvi### [at] adinetcomuy> wrote:
: And the rest is all maths.

  Quite complicated math if you want to support every camera type (eg.
panoramic, ultra_wide_angle, spherical...). Also if you want to support
non-orthogonal camera coordinates it makes it more complicated :)
  Not to talk about camera normal modifiers...

-- 
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/


Post a reply to this message

From: Duncan Gray
Subject: Re: Finding Screen Coordinates of Objects
Date: 27 Feb 2001 14:08:50
Message: <3a9bfb42@news.povray.org>
Warp wrote:> In povray.general Pablo Viojo <pvi### [at] adinetcomuy> wrote:
>   Quite complicated math if you want to support every camera type (eg.
> panoramic, ultra_wide_angle, spherical...). Also if you want to support
> non-orthogonal camera coordinates it makes it more complicated :)
>   Not to talk about camera normal modifiers...

The +UG INI file option (Draw-Vista's on) will display the 2D projections of
the bounding slabs, do you know if POV-Ray can be asked to write out this
image as a separate file.

I know this isn't a solution to the problem, but it might be a little bit
closer, and perhaps easier to build the image_map from. On a complicated
scene, I don't think it will help much at all as it draws so many boxes that
yu cannot tell one from the other, but it suggests to me that POV must
preform these calculations before it starts rendering.

Any use ?

--
Duncan Gray
(warning: may contain traces of nut)


Post a reply to this message

From: Ron Parker
Subject: Re: Finding Screen Coordinates of Objects
Date: 27 Feb 2001 14:48:28
Message: <slrn99o14e.u7n.ron.parker@fwi.com>
On Tue, 27 Feb 2001 19:14:03 -0000, Duncan Gray wrote:
>Warp wrote:> In povray.general Pablo Viojo <pvi### [at] adinetcomuy> wrote:
>>   Quite complicated math if you want to support every camera type (eg.
>> panoramic, ultra_wide_angle, spherical...). Also if you want to support
>> non-orthogonal camera coordinates it makes it more complicated :)
>>   Not to talk about camera normal modifiers...
>
>The +UG INI file option (Draw-Vista's on) will display the 2D projections of
>the bounding slabs, do you know if POV-Ray can be asked to write out this
>image as a separate file.

Only on camera types that support the use of the vista buffer.

Quoting the docs:

|The vista buffer can only be used with perspective and orthographic 
|cameras because they rely on a fixed viewpoint and a reasonable 
|projection (i. e. straight lines have to stay straight lines after 
|the projection).


-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

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