POV-Ray : Newsgroups : povray.advanced-users : Tricky Transform Problem and screen.inc Server Time
1 Nov 2024 09:20:15 EDT (-0400)
  Tricky Transform Problem and screen.inc (Message 1 to 3 of 3)  
From: Timtro
Subject: Tricky Transform Problem and screen.inc
Date: 8 Jul 2006 01:00:01
Message: <web.44af3b0bdd2631736380c8890@news.povray.org>
Hey all.

I'm not sure how 'advanced' this is, but I think it would take some thought.

I have created a small set of axes to mark the direction of x, y and z. I
want to place an item in front of the screen. I have done this using
screen.inc. My problem is that Screen_Object rotates the object into the
plane normal to camera_position-camera_target. So my result is that the z
axis points to camera_position-camera_target, and the x and y axes are in
the plane of the screen. I want to rotate the axes back so that they --
once again -- point to positive x, y and z as they would have naturally
(before being rotated by screen.inc). Obviously the natural way to do this
is to rotate the axes ahead of time so that screen.inc will be rotating it
into the natural x, y and z directions.

If anyone can think of a good way to do this, I would be highly
appreciative.


Post a reply to this message

From: Rune
Subject: Re: Tricky Transform Problem and screen.inc
Date: 8 Jul 2006 19:19:41
Message: <44b03d8d$1@news.povray.org>
Timtro wrote:
> If anyone can think of a good way to do this, I would be highly 
> appreciative.

Perhaps you could use somthing like this for your axes (untested code):

object {
    Axes
    transform {Camera_Transform inverse}
    translate Camera_Location
}

Rune
-- 
http://runevision.com


Post a reply to this message

From: Timtro
Subject: Re: Tricky Transform Problem and screen.inc
Date: 10 Jul 2006 02:55:01
Message: <web.44b1f95f9de603d26380c8890@news.povray.org>
"Rune" <new### [at] runevisioncom> wrote:
> Timtro wrote:
> > If anyone can think of a good way to do this, I would be highly
> > appreciative.
>
> Perhaps you could use somthing like this for your axes (untested code):
>
> object {
>     Axes
>     transform {Camera_Transform inverse}
>     translate Camera_Location
> }
>
> Rune
> --
> http://runevision.com



Haha! Brilliant! Thanks so much!

I had no idea that povray could calculate matrix inverses for you.


Post a reply to this message

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