POV-Ray : Newsgroups : povray.general : second life conversions : Re: second life conversions Server Time
31 Jul 2024 06:23:48 EDT (-0400)
  Re: second life conversions  
From: Alain
Date: 16 Aug 2007 18:56:37
Message: <46c4d625@news.povray.org>
Barehunter nous apporta ses lumieres en ce 2007/08/15 11:23:
> I decided to re-create an object I own in the game second life to POVray.
> The coordinate system and rotations appear to match up more or less. Anyway
> one object had three different rotations. I repeated the rotations in povray
> and got an entirely diferent final angle. Now each rotation ( along the x,
> y, and z axi's)individually, rotated identically.
> e.g. a 20 degree angle along the  X axis matched a 20 degree angle in POVray
> 
> It was when taken together that they failed to match the expected rotation.
> (<20,33,16>)
> 
> I then tried three rotations ( each with just one of the rotations)
> for example
> <20,0,0>
> <0,33,0>
> <0,0,16>
> and still didnt match. I then swapping the three rotations and got different
> final angles but none of them matched the expected final angle.
> Has anyone tried to re-create secondlife objects in POVray and met the same
> problem? Is there a solution?
> straight object to object conversion should be possible, you'd think.
> 
> 
> 
In POV-Ray, the rotation is applied successively to the 3 axis X, then Y, then 
Z. The axis never change during that operation: rotate about X, from where you 
ended, rotate around Y, then around Z.
Second Life may use another sequence.
It may use a rotating refference axis set. Rotate around X, and Y and Z change 
place, if you then rotate around Y, then X and Z will turn around Y. Same thing 
for Z. In that case, after the Y rotation, your X and Z will have changed. You 
may try the vreorient() macro from transform.inc. (not sure about the exact 
spelling, I've never used that include)
There is also another possibility: The angles are applied all at once in a polar 
coordinate system! In that case, a non-rotated object is rotation <0,90,90>. 
This mean that a point along the X axis is at 0 degree from the X axis, 90 
degree from the Y axis and the Z axis on a polar coordinate system.
Thus, in your case, a rotation of <20,33,16> mean take a vector from the origin 
to a point on the X axis, rotate it 20 degrees away rfom the X axis. Keeping 
that angle constant, rotate it 33 degrees away from the Y axis and 16 degrees 
away from the Z axis.
Using that convention, NOT all combinations of X,Y and Z values are possible: 
<10,10,10> is not deffined.

-- 
Alain
-------------------------------------------------
I find that the harder I work, the more luck I seem to have.
Thomas Jefferson


Post a reply to this message

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