HELP: 3DS. rotated vertex != rotationMatrix * vertex

Started by
5 comments, last by benryves 18 years, 9 months ago
hi I rotate my mesh 90 degrees around the x axis. I rather expected this: for each vertex in mesh vertex = rotationMatrix * vertex But after loading in the mesh to the actual game demo, it seems all the vertices are not rotated, though the correct rotationMatrix is supplied in the 3ds file. How can I achieve what I want in the authoring stage? Thx
Advertisement
What kind of coordinate system do you use? Note that most graphics APIs use a left-handed coordinate system while 3D Studio Max uses a right-handed one. Hence the transformation matrix cannot be applied directly; the transform must be... well, transformed.

Greetz,

Illco

PS: just post your message once in the appropriate forum. See forum guidelines (cross posts are evil).
Quote:Original post by jeremy_huang
How can I achieve what I want in the authoring stage? Thx
I read that as "how do I export a model where everything is already rotated 90 degrees"... and I know that certain exporters allow you to do that, but if not, surely it's not too hard to select all the vertices, click rotate, then type "90" into the "x axis" box? (I've only use MS3D, so your modelling package will no doubt be slightly different).

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

Moving to GP&T for want of a better place to put this.

Watch the cross posting!

You may also want to talk about which API you're using, it'd help us move it to the correct forum.
Pardon me. Anyways, this question is a combination of modeling software knowledge and technical understandings.

Basicly, as an example, all the vertices in the mesh are in the X,Y plane like so ( (x0,y0,0), (x1,y1,0), ... (xn,yn,0) )

I need the data rearranged like this:
( ( x0,0,y0), (x1,0,y1), ... (xn,0,yn) )


Surely there is a way to do it in 3dsmax.
That's exactly the difference between the coordinate systems, only for vertices this time. I doubt you can do it in max, but it may be possible, at any rate I wouldn't know how to.

The normal way would be to this during the export or import stage, because for max the coordinate system shouldn't change. That means you would have to use a format different from 3DS or, also common, fix the change in your application at load time.

[EDIT]: Inspired by Benryves you could write a plug-in using max script or C++ which does this. Wouldn't be too much work indeed, although the 3D Studio Max SDK is rather clumsy and hard to use correctly.

Greetz,

Illco

[Edited by - Illco on July 14, 2005 7:40:04 AM]
MS3D supports running external JavaScript files to manipulate models (a script to flip coordinate systems would be the work of 2 minutes) - I'd be surprised if 3dsmax isn't scriptable. That said, (as Illco mentioned), swapping coordinate systems makes more sense at the export stage.

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

This topic is closed to new replies.

Advertisement