Nmuta Jones wrote:
>
> I am using 3ds max 5. I just downloaded the 3ds max 4 exporter, (which is
> said to work with max 5).
>
> It works fine, textures and all, but the z axis orientation is messed up due
> to Max's z axis being "up and down".
>
> So all models come out on their side.
>
> I'm sure this is a common problem; what is the remedy for this? I couldn't
> find any relevant parameter changes to make in the exporter.
Hi Nmuta,
Glad to see you again on the lists.
There are two ways for that.
- Rotating the camera and redefining its up vector as +Z so the model appears
how you want it. I don't use this so much.
- Rotating the model. The rotation axis is X if the model hasn't been rotated
in Max. But since that couldn't be the case in many situations, I'd suggest
you always refer to a reference position that you find comfortable for you.
A good rule is also to export the content of the perspective view (click on
it before exporting). Here's an example that you might reproduce by a cilinder
(hull)
- In Max
A submarine is displayed horizontally in the perspective view. Click 'Views' in
the menu and check the 'Show Transform Gizmo' item so to have the ref sys
always on screen.
- The center of the world is just under the conning tower, in the center of the
hull. Click the 'Select and Move' toolbar button, then right click it and look
at the absolute world coords: you get (0.0, 0.0, 0.0)
- The major axis of the hull is Y. The bow is on +Y (the submarine "looks" at
right), the stern is on -Y.
The +Z axis comes out from the conning tower (that's the tower is up).
The +X axis is directed inwards the monitor. Such a position implies
two rotations (I found convenient having it so): click the 'Select and
Rotate' toolbar button, then right click it and look at the absolute world
rotation angles: you get (90.0, 0.0, -90.0)
- In Director
pSubmarine = scene.model("Submarine")
-- sc = 1.0 / 21.0 -- if needed
-- pSubmarine.transform.scale = vector(sc, sc, sc)
pSubmarine.transform.position = vector( 111.1045, 102.9363, 99.9253 ) -- or where
you want it initially
pSubmarine.transform.rotation = vector(-90.0, 0.0, 0.0)
Now you should see the submarine positioned as in Max.
If you wanted it moving along the direction it's currently looking on
you would take into account that it's major axis is Y, as it was in Max,
and so you could issue, for example:
if keyPressed("A") then pSubmarine.translate(speed * pSubmarine.transform.yAxis,
#world)
where 'speed' is the velocity vector magnitude you wish (e.g.= 1.0).
And something like this to make it rotate:
if keyPressed("R") then pSubmarine.rotate(1.0, 0.0, 0.0, #self)
The situation might be worse, though, with thirdy party models that are
positioned and rotated in the max world ref sys in various fashions.
I spent two hours to reposition torpedoes (for the submarine) that
resisted to any attempt. Also, one blew and broke my monitor's glass.
In the case, contact me privately.
Cheers,
Franco
IFC Programming Consultant
http://www.chnexus.com/athroon~/index.htm
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL
PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping
with programming Lingo. Thanks!]