modifying global axes orientation

Software: Away3D 4.x

klinek3, Newbie
Posted: 29 October 2017 01:41 PM   Total Posts: 8

Is it possible to change the orientation of global axes in away3D? (like in the attached jpeg)

It’s different from the orientation in most of 3d softwares (like 3ds max) - sometimes it’s little confusing when you build your scene inside desktop 3d software and try to transfer it into away3D.



Hector, Sr. Member
Posted: 28 November 2017 09:43 AM   Total Posts: 137   [ # 1 ]

I agree with you the axis settings are a pain. In my case I learned at school that Y axis is vertical, X axis is horizontal and Z axis is used for depth. If I remember well, most of 3D software and engines I’ve seen (Maya, Blender, Fusion 360, SketchUp, Unity, Away3d, ThreeJS) works this way (Unreal engine seems to have Z up, but then it uses X for deepness so it doesn’t seem to match 3DSMax either).
3DSMax system may be useful for certain things, but for me: Y for up/down, X for left/right and Z for front/back is more intuitive.

That said, some 3D software lets you configure the default axis to work with or set the Y direction when exporting. 3DSMax doesn’t have that option when exporting to 3DS format (it does for OBJ though).

You could rotate your object in 3DSMax before exporting, but it is not nice when you have to do a lot of changes to that object or deal with bones, etc.
What I used to do in Away3D is:
  - Load 3DS file into Away3D and rotate it to match Away3D’s axis.
  - Add it to a new container.
  - Use the new container as the main object.
Something like:

private var my3DSfile:Class;
createObject():void {
// Parse 3DS file as a 3DObjectContainer.
var my3DSObject:ObjectContainer3D Max3DS.parse(Cast.bytearray(my3DSfile),{autoLoadTextures:false}) as ObjectContainer3D;

// Rotate 3DS object so it faces Y up
my3DSObject.rotationX 90;

// Create the wrapper container and add it to the scene.
var myObject:ObjectContainer3D = new ObjectContainer3D();

// Add the object to the wrapper.

I may be wrong with ‘90’ value, it could be ‘-90’, but you get the point. Sometimes you may have to set ‘rotationX = 90’ and ‘rotationY = 180’ if the object was created facing back and you can’t (or don’t want to) modify the 3DS file.



Away3D Forum

Member Login