Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualill

Posted 18 March 2013 - 12:17 PM

So 3DS max appears to be left handed and has the z be pointing up, and y pointing forward.

My engine uses a right handed coordinate system where y is up.

 

I'm trying to write a max script that exports the names of selected objects and their transform, and also puts the transform into my space.

 

At first I was trying to just transform the matrix by rotating it 90 degrees about the x axis and scaling it negatively in the z.

In the end, the rotation portion looks like

1 0 0
0 0 1
0 1 0

 

I want it to basically be an identity matrix with just positions remapped if the node isn't even rotated.

 

I remember on Android there was a function to switch coordinate spaces in a matrix as well.

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/android/hardware/SensorManager.java#SensorManager.remapCoordinateSystem%28float%5B%5D%2Cint%2Cint%2Cfloat%5B%5D%29

 

They seem to have some crazy bit-flipping going on that I'm having a hard time understanding.

 

 

I basically want my engine to load in the scene exactly as it appears in the viewer, only making all positions and scale be in my coordinate system.  If an object isn't rotated I want the diagonal to just be identity.

 

This also means that in 3DS max I want an object at negative y to be remapped to positive Z, and an object at positive Z to be remapped to positive y.


#2ill

Posted 18 March 2013 - 12:16 PM

So 3DS max appears to be left handed and has the z be pointing up, and y pointing forward.

My engine uses a right handed coordinate system where y is up.

 

I'm trying to write a max script that exports the names of selected objects and their transform, and also puts the transform into my space.

 

At first I was trying to just transform the matrix by rotating it 90 degrees about the x axis and scaling it negatively in the z.

In the end, the rotation portion looks like

1 0 0
0 0 1
0 1 0

 

I want it to basically be an identity matrix with just positions remapped if the node isn't even rotated.

 

I remember on Android there was a function to switch coordinate spaces in a matrix as well.

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/android/hardware/SensorManager.java#SensorManager.remapCoordinateSystem%28float%5B%5D%2Cint%2Cint%2Cfloat%5B%5D%29

 

They seem to have some crazy bit-flipping going on that I'm having a hard time understanding.

 

 

I basically want my engine to load in the scene exactly as it appears in the viewer, only making all positions and scale be in my coordinate system.  If an object isn't rotated I want the diagonal to just be identity.


#1ill

Posted 18 March 2013 - 12:12 PM

So 3DS max appears to be left handed and has the z be pointing up, and y pointing forward.

My engine uses a right handed coordinate system where y is up.

 

I'm trying to write a max script that exports the names of selected objects and their transform, and also puts the transform into my space.

 

At first I was trying to just transform the matrix by rotating it 90 degrees about the x axis and scaling it negatively in the z.

In the end, the rotation portion looks like

1 0 0
0 0 1
0 1 0

 

I want it to basically be an identity matrix with just positions remapped if the node isn't even rotated.

 

I remember on Android there was a function to switch coordinate spaces in a matrix as well.

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/android/hardware/SensorManager.java#SensorManager.remapCoordinateSystem%28float%5B%5D%2Cint%2Cint%2Cfloat%5B%5D%29

 

They seem to have some crazy bit-flipping going on that I'm having a hard time understanding.


PARTNERS