HCT: How to transform coordinate system

HCT: How to transform coordinate system

Hi

I have 3ds max exporter from third party - it exports meshes and animations to its native format, then my engine loads these files. Now i want to replace my engine's animation system with havok one. The point of penetration is where engine asks animation system for bone transforms - here i am going to insert query to havok for the same transforms.

The engine uses right-handed coordinate system and its exporter converts 3ds max coordinate system to right-handed. So i need havok plugin to do the same. There are a few ways to rotate the whole animation in the plugin, but rotation upsets my engine's exporter, because it relies on original bone transforms, not rotated.

I tried to write my custom filter, but nothing changed - all i can do in my filter is rotate bones or scene.

I need this conversion:

x --> x

y --> -z

z --> y

It is like rotation coordinate system to 90 degrees around Ox, but i can't do this - i must replace coordinates as shown above.

Could you please give me an advice how to replace axes?

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi there, Itten.

What you need to do here is use the Scene Transform filter - but it's important that that's the FIRST filter you use, as it only works on the scene data from your modeller. That way, the data in Havok is set up right. You'll want to go for the CUSTOM preset, using the matrix:

1 0 0
0 0 -1
0 1 0

That's only if you are already changing the scale elsewhere, mind you: Since Max uses centimetres and Havok uses metres, you might want to go with

0.01 0.00 0.00
0.00 0.00 -0.01
0.00 0.01 0.00

Let me know if this does it for you.

Patrick Developer Support Engineer Havok www.havok.com

Quoting - PatrickAtHavok
Hi there, Itten.

What you need to do here is use the Scene Transform filter - but it's important that that's the FIRST filter you use, as it only works on the scene data from your modeller. That way, the data in Havok is set up right. You'll want to go for the CUSTOM preset, using the matrix:

1 0 0
0 0 -1
0 1 0

That's only if you are already changing the scale elsewhere, mind you: Since Max uses centimetres and Havok uses metres, you might want to go with

0.01 0.00 0.00
0.00 0.00 -0.01
0.00 0.01 0.00

Let me know if this does it for you.

Hi, Patrick

I appliedScene Transform filter even before my post and it works, but it rotates objects too. Well, i think i must dig into export process deeper. Right now, i can hardly explain the problem even in my native language. I just hoped to get some hint or something.

I'll be back later )

Leave a Comment

Please sign in to add a comment. Not a member? Join today