|
|
Hi Thomas!
Looks good!
I do a lot of converting from Moray to POV-Ray and from POV-Ray to Moray (in
that case as includes in Moray).
In the first case, I always add the following lines to the POV-Ray output
from Moray (after some editing, and declaring a particular object for
instance):
scale <-1,1,1>
rotate <-90,0,0>
This always works fine in further work in POV-Ray. The object is mirrored
correctly for POV-Ray (you need to do that, else the object is not like the
original). The object answers now to the POV-Ray coordinate system and you
can place it wherever you want.
In the second case, I add the following lines:
scale <1,1,-1>
rotate <90,0,0>
And include the file to the Moray scene. This is more tricky of course
because you do not see the object in Moray. But if you are careful, you can
even place Moray things on the POV-Ray thing, if you see what I mean.
Could this help you for your program? Because these two lines seem the only
things to matter really...
Best wishes,
Thomas de Groot
"Thomas Lake" <tla### [at] REMOVE-THISshawca> schreef in bericht
news:3ccbe3b4$1@news.povray.org...
>
> I'm trying to write a program that converts Moray's povray output, which
> uses the right hand coordinate system, to povray's native left handed
> system. As you can see from the images bellow I'm not quite 1/2 way there
> yet. The method I use is simply to comment out the sky and up key words in
> Moray's output thereby defaulting to povray's lefthanded system. Then for
> all vectors I switch the z and y positions. For example
>
> translate <10,-50,100>
>
> becomes
>
> translate <10,100,-50>
>
> This seems to work fine for translate and scale but rotation is a
different
> matter all together. I found a way to get rotation to work some of the
time
> by reversing the sign of the magnitude and rotating around the Z axis
before
> the y axis, so for example
>
> rotate <-28.678608, -34.926117, 42.857418>
>
> becomes
>
> rotate 28.678608*x rotate 34.926117*z rotate -42.857418*y
>
> As you can see from the image below this works for the rotated box in the
> background but not for the superellipsoid in the front. Also I get all
kinds
> of nightmarish things happening if I try to work with csg and rotation.
Can
> anyone help here cause I feel like I'm close to a solution.
>
> <SEE P.B.I under same Subject for pictures>
>
> --
> --------------------------------------------------------------------------
--
> -----------
> Home Page: http://www.geocities.com/~thomaslake/
> --------------------------------------------------------------------------
--
> -----------
>
>
Post a reply to this message
|
|