rotation values always 0

Software: Away3D 4.x

Manuel L., Member
Posted: 18 July 2012 09:44 AM   Total Posts: 99

Hey guys ... when i trace rotationX, ...Y or ...Z of my meshes it always says 0, why?

my meshes are loaded as awd1 out of prefab1, but this seems not to be important information.

its the same, when i trace “myobject.x” or “myobject.y” ... it is always 0. in this case it works when i use scenePosition.x for example.
is there any similar for rotation?

manu

   

Richard Olsson, Administrator
Posted: 18 July 2012 10:41 AM   Total Posts: 1192   [ # 1 ]

Why wouldn’t they trace zero? You have provided no information about whether you are in fact trying to change their rotation or position, or how you are going about doing that, but it sounds like you might be rotating a container?

Just like in the regular Flash display list, if you rotate a container, the children within that container will move with it, but their respective position, rotation and scale values will not change. They will still change visually, because on top of their own values, they also “inherit” the values of their parent.

   

Manuel L., Member
Posted: 18 July 2012 10:51 AM   Total Posts: 99   [ # 2 ]

oh yes you`re right, im sorry i forgot to tell you some details.
i am able to rotate my objects, thats not the problem. the problem is that my objects have rotation in cinema4d and i need these rotation values in my away3d scene, you know?

   

Richard Olsson, Administrator
Posted: 18 July 2012 10:53 AM   Total Posts: 1192   [ # 3 ]

Ok, that’s an entirely different topic then. You say that you are loading them from AWD files created in Prefab. Do they have the correct rotations in Prefab?

And just to be sure, are they or are they not visually correct once loaded in Away3D? I want to make sure you’re not just tracing the wrong values.

   

Manuel L., Member
Posted: 18 July 2012 11:01 AM   Total Posts: 99   [ # 4 ]

hmm no, now you are asking me, the rotations in prefab are zero, too. but why? what can i do to get the right values in prefab?

   

Richard Olsson, Administrator
Posted: 18 July 2012 11:04 AM   Total Posts: 1192   [ # 5 ]

What format are you using between Cinema4D and Prefab then? That’s the faulting link, so please try some different formats and see if you can get one to work. Are you using OBJ? As far as I know, OBJ doesn’t even contain transform information for objects, just the positions of their vertices in space, assuming identity transforms (no rotation, scale or translation) on all objects.

   

Manuel L., Member
Posted: 18 July 2012 11:14 AM   Total Posts: 99   [ # 6 ]

hmm yes i use obj .... dont know what i could use instead of obj. its the only format that holds my material information and bring it to prefab hmmm

   

Avatar
Fabrice Closier, Administrator
Posted: 18 July 2012 11:24 AM   Total Posts: 1265   [ # 7 ]

Not quite. you can load 3ds, collada, awd1, awd2 with material information as well in Prefab.
Note that If you open Prefab preferences and set autorecenter at load. The position offset should then automatically be corrected in case of obj (and others). This doesn’t take in account the rotations.

   

Manuel L., Member
Posted: 18 July 2012 11:34 AM   Total Posts: 99   [ # 8 ]

oh yes of course you can load 3ds, collada etc with materials in prefab but the problem is cinema4d ... the export options are really bad. i cant get the material informations out of c4d when not using obj. and i cant use the c4d own obj export, i have to use an external thing “riptide”.
its a shame ... ^^

   

Manuel L., Member
Posted: 18 July 2012 11:49 AM   Total Posts: 99   [ # 9 ]

hmmm ... because of the fact that away3d is able to position my objects with rotations etc. correctly, somewhere these rotation informations have to be available. is there a changes to trace them? hmmm

   

Avatar
Fabrice Closier, Administrator
Posted: 18 July 2012 12:11 PM   Total Posts: 1265   [ # 10 ]

Just looked at cinema exports…. indeed the exports are geometry only for some weird reasons. I even see obj exports are not valid, explicitly requesting an mtl not even exported… What you could do is export as collada and reassign the materials by hand in Prefab.

if you export as collada, the matrix information should be saved. Where now obj behaves like if you would have applied rotations and translations, it will now displayed same way, but the rotations should be set as in C4D.

   

Manuel L., Member
Posted: 18 July 2012 12:56 PM   Total Posts: 99   [ # 11 ]

okay thank you, i tested a little bit with collada and its good now. i can export collada with material information, thats good.

but the last sentence i didnt understand. when i import my collada model, should i see the real rotation properties in prefab now? (old prefab). in my case the rotations are still zero.

where are the rotation informations in the new prefab? didnt find it.

   

Avatar
Fabrice Closier, Administrator
Posted: 18 July 2012 01:36 PM   Total Posts: 1265   [ # 12 ]

if C4D exports the matrix properly in collada (doesn’t apply the transform to vertices/if doesn’t fill xml with an identity) the rotations should be described in the collada xml. In Prefab you can see the rotation values (after you select one mesh) into the property panel on lowest part of the interface.

   

Manuel L., Member
Posted: 19 July 2012 07:12 AM   Total Posts: 99   [ # 13 ]

thank you very much for your help, i think i found the problem ... when i rotated my objects in cinema i rotated the container and not the single objects in it. i try to rotate all single objects now, and im sure this will help me.

thank you very much.

   

Manuel L., Member
Posted: 19 July 2012 08:33 AM   Total Posts: 99   [ # 14 ]

okay, i tried to load my collada in the new prefab ... after a while prefab crashes ... with the old prefab it works, without textures. but the rotations show up right.
why does the new one crash and the old one runs? wink

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X