POV-Ray : Newsgroups : povray.general : Text objects orientation problem : Re: Text objects orientation problem Server Time
1 Aug 2024 20:13:39 EDT (-0400)
  Re: Text objects orientation problem  
From: Slime
Date: 24 Apr 2005 16:02:13
Message: <426bfb45$1@news.povray.org>
> My problem is, that I cant find a transformation matrix for my text
objects
> to render in direction of the x-axis, like they normaly would.

When you say "x-axis," do you really mean in the direction of the x-axis, or
are you saying that you want your text to face *towards the camera*? Because
by default, text always *will* be along the x-axis.

If you want it to face towards the camera, here's what I think you can do.
Your camera starts off facing in the negative z-direction, and then you use
a matrix (which I assume keeps the camera vectors perpendicular) to reorient
it and translate it. If we remove the translation part (fourth line of the
matrix), we'll get just the orientation of the camera. If we apply this to
the text, it should face the same way. Since your camera direction starts
off as <0,0,-1>, we'll also have to rotate the text around 180 degrees first
so that it's facing the right way.

So here's what I think you should try:

#include "transforms.inc"
text {
    ...

    rotate 180*y
    matrix <
    0.19447261314,  0.767765769065, 0.610504812914,
    0.671023477777,  0.349843198668, -0.653710355293,
    -0.715477410038,  0.536791803748, -0.447153927808,
    0,0,0>
    translate <...> // move into position
}

This is untested but it should be a good start, anyway.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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