Jump to content
  • Advertisement
Sign in to follow this  
jeremy_huang

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

This topic is 4873 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!