|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello,
I use the following camera settings, which I derive from an OpenGL
projection matrix:
camera {
perspective
direction <0.0, 0.0, -1.0>
right 1.40381791483 * x
angle 83.0
transform {
matrix <
0.19447261314, 0.767765769065, 0.610504812914,
0.671023477777, 0.349843198668, -0.653710355293,
-0.715477410038, 0.536791803748, -0.447153927808,
-57.7085227966, -52.2379188538, 28.1092147827
>
inverse }
}
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.
Can anyone please help me with this?
Thanks
Andreas Moll
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
kerosin wrote:
> Hello,
>
> I use the following camera settings, which I derive from an OpenGL
> projection matrix:
>
> camera {
> perspective
> direction <0.0, 0.0, -1.0>
> right 1.40381791483 * x
> angle 83.0
> transform {
> matrix <
> 0.19447261314, 0.767765769065, 0.610504812914,
> 0.671023477777, 0.349843198668, -0.653710355293,
> -0.715477410038, 0.536791803748, -0.447153927808,
> -57.7085227966, -52.2379188538, 28.1092147827
> >
> inverse }
> }
>
>
>
>
> 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.
>
> Can anyone please help me with this?
i.e. apply no transformation?
simple, just use the identity matrix:
matrix
<1,0,0,0,
0,1,0,0,
0,0,1,0,
0,0,0,1>
Otherwise, I'm not sure what you're asking....
--
~Mike
Things! Billions of them!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Raiford wrote:
> kerosin wrote:
>
>> Hello,
>>
>> I use the following camera settings, which I derive from an OpenGL
>> projection matrix:
>>
>> camera {
>> perspective
>> direction <0.0, 0.0, -1.0>
>> right 1.40381791483 * x
>> angle 83.0
>> transform {
>> matrix <
>> 0.19447261314, 0.767765769065, 0.610504812914,
>> 0.671023477777, 0.349843198668, -0.653710355293,
>> -0.715477410038, 0.536791803748, -0.447153927808,
>> -57.7085227966, -52.2379188538, 28.1092147827
>> >
>> inverse }
>> }
>>
>>
>>
>>
>> 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.
>>
>> Can anyone please help me with this?
>
>
> i.e. apply no transformation?
>
> simple, just use the identity matrix:
>
> matrix
> <1,0,0,0,
> 0,1,0,0,
> 0,0,1,0,
> 0,0,0,1>
>
> Otherwise, I'm not sure what you're asking....
Err.
<1,0,0,
0,1,0,
0,0,1,
0,0,0>
--
~Mike
Things! Billions of them!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
sorry bit this wont work, first I have to translate the label to the
position I want it to appear. If I dont use a transformation matrix, the
text has a very strange direction, e.g. try the POVRay file below. I would
be delighted if someone could help me out...
// To render this scene, call povray (available from www.povray.org) like
this:
// povray +I1.pov +FN +O1.png +Q9 +W659 +H524 -UV +A0.3
//
camera {
perspective
direction <0.0, 0.0, -1.0>
right 1.25763358779 * x
angle 83.0
transform {
matrix <
0, 1, 0,
-0.00787083446969, 0, 0.999969024503,
0.999969024503, 0, 0.00787083446969,
-0.0784517526627, 0.145133942366, -6.29094362259
>
inverse }
}
light_source { <2.1, 24.35, 0.27>, <0.8, 0.8, 0.8, 0., 0.>}
global_settings { radiosity { brightness 0.6 } }
background { <1., 1., 0.49, 0., 0.> }
// enter the path to your desired font here:
#declare BALLLabelFont =
"/usr/share/fonts/wine/wine_marlett.ttf"
union {
text{ ttf BALLLabelFont, "test label",0.2, 0
texture{ pigment{color rgb<0.33, 0., 0., 0., 0.> }
finish{ambient 0.15 diffuse 0.85} }
translate <-0.145134, 0.333343, 0.0810779 >
}
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I found the correct way now:
First apply the inverse camera matrix, than rotate 180*y and x,
than apply the translation. Maybe someone else will have the same problem...
text{ ttf "font", "asdasd",0.2, 0
texture{ pigment{color rgb<0.33, 0., 0., 0., 0.> }
finish{ambient 0.15 diffuse 0.85} }
matrix < 0, 1, 0, -0.860148, 0, 0.510045, 0.510045, 0, 0.860148, 0, 0, 0 >
rotate 180*y rotate 180*x
translate < 13.1507, 88.4991, 9.21197 > }
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|