Meshing Question Body axes and mesh orientation

physick

New member
Joined
Aug 10, 2010
Messages
7
Reaction score
0
Points
0
I've been trying to create a simple vessel and whatever I do the +z body axis ends up pointing downwards. I've been creating the mesh as a 3ds in Anim8tor and then using 3ds2msh to get the orientation "Right" i.e the top of the vessel upwards. However whtever I have done with rotations of the object and its internal axes in Anim8tor it insists that the engine must be at +whtever and the thrust vector is 0,0,-1 to get it to climb. i.e initial pitch is -90

Am I missing something completely simple here?

I noticed that when I deployed other meshes like Tital21 with a set of negative TD points it appeared upside down which also appeared odd

Any help appreciated in resolving this

Thanks
 
check for a "right-hand-axis" option or similar...

i usually do my exporting straight out of 3dsMax2011 via script... so i haven't used 3ds2msh... but i imagine there should be something in the likes of that, since some programs regard Z as the "up-down" axis, whilst DirectX and most game engines use Y for that
 
There's a much simpler way to export An8 -> msh :

Anim&tor plugin v0.95b to directly export msh from Anim&tor (by Urumpwe)

[ame="http://www.orbithangar.com/searchid.php?ID=2698"]Anim8or 0.95b .msh export script 070514[/ame]

If you need to rotate meshes after exporting :

[ame="http://www.orbithangar.com/searchid.php?ID=2740"]Mesh Wizard 1.9d[/ame]
 
Last edited:
Thanks for the script - works OK but I still have the same effect. I get a mesh that looks OK and add a thruster with a vector up the z axis mounted at the bottom (i..e -ve z) Fire it up and the craft moves into the ground!! Thus the body z is downwards

I've looked in meshwizard and the +z is where I expect it to be. How can I get it to plant itself on the ground the right way up?
 
It sounds like you have two possible problems:

1. Your thruster is incorrectly defined; or
2. Your touchdown points are incorrectly defined.

To resolve, in Orbiter press F4 and select "Visual Helpers". Turn on the vessel axes. Does the +Z axis appear where you expect it to be relative to the mesh (it should, if it shows correctly in mesh wizard). Does the +Z axis appear to be pointed in the right direction relative to the ground? If not, then you need to look at your touchdown points definition to get it pointed in the right direction. If the axis is pointing in the right direction and your vessel is moving the wrong way then your thrust vector is ill defined. Can you post your thruster definition (position and thrust direction)?
 
Thanks - looked at the axes and the nose is at +z
As far as I can see the source below should stand it on its tail and fire it upwards

instead it is 'nose down'

SetTouchdownPoints(_V(0.5,0.87,-25.0),_V(-.5,0.87,-25.0),_V(0.0,-1.0,-25.0));
ph_main = CreatePropellantResource (100000.0);
th_main[0] = CreateThruster (_V(0,0,-25), _V(0,0.0000,1.0), 1200000.0,ph_main, 2000.0);
 
Thanks - looked at the axes and the nose is at +z
As far as I can see the source below should stand it on its tail and fire it upwards

instead it is 'nose down'

I think that once had a similar issue (if understood well what you wish to do, not sure yet) and it was caused by the way the touchdown points were defined. Please note that this was a long time ago, for a spacecraft.dll powered 'tail seater' and would need to check my development notes but, as far as remember, there are a number of things that matter when defining those points and which might be relevant for your case.


Without having a look at how your 3D model looks like inside Orbiter I would then perhaps suggest to define first the 'central front gear' then the left then the right one (and make sure that the 'front gear' is really at the front of the others, etc).


If still no joy, it would perhaps be better if you could please share a screenshot about how your model looks like inside Anim8or and how it looks in Orbiter (with axis displayed on both cases).


António
 
Last edited:
It looks like the touchdown points are the problem. Swap the first two vectors, like this:
Code:
SetTouchdownPoints(_V(-.5,0.87,-25.0),_V(0.5,0.87,-25.0),_V(0.0,-1.0,-25.0));
 
Yes!!! So the order of the TD points is critical - looks like they must go clockwise.

Thanks for all the help
 
Yes!!! So the order of the TD points is critical - looks like they must go clockwise.

Thanks for all the help
FYI, the SDK document "API Reference" includes information on how the vessel orientation is determined from the touchdown points in the section on the SetTouchdownPoints function.
 
I had seen it in the SDK ref but didn't realise that it was crucial. Also I'm not used to thinking in a left hand axis set so I got left and right crossed. Oh well live and learn
 
Back
Top