Exporting a maya character into the demos

Exporting a maya character into the demos

Аватар пользователя Abhinav S.

Hello,

I just recently started working with the Havok SDKs and content tools and I am stuck; I have a rigged character is Autodesk Maya and I wish to replace HavokGirl in the CharacterController demo (Animation->Api->MotionExtraction->CharacterController) with him. Problem is that I do not know exactly how to proceed. HavokGirl has a bunch of .hkx files associated with her but from the Maya export tutorials, I only get a huge .hkt file. I am not exaclty sure on how to proceed with that in order to achieve what I am aiming for.

Any input will be really appreciated.

Thank you.

17 сообщений / 0 новое
Последнее сообщение
Пожалуйста, обратитесь к странице Уведомление об оптимизации для более подробной информации относительно производительности и оптимизации в программных продуктах компании Intel.
Аватар пользователя Havok - Josh S.

Hi Abhinav,
I'm not sure what exactly you're having trouble with. hkt and hkx files each contain the same data in different formats. In most cases, they can be used interchangeably. The format is specified in the export tool in the options for the "write to platform" filter. See Havok Content Tools help under The Havok Filter Pipeline -> Core FIlters -> Write to Platform for more details.

In order for havok-specific information to be attached to your maya asset, some work is needed in Maya using the havok plug-in. Please look at the Havok Content Tools help under Maya Tools for more information on how to set this up.

Does this answer your question?

Josh S. Havok Developer Support Engineer www.havok.com
Аватар пользователя Abhinav S.

Hello,
I already looked into the content tools. Sorry I didn't make myself clear enough: I wish to change the HavokGirl in the demo with a custom maya character. My question is thus: how exactly should I proceed for this? I first familiarized myself with the export options by uploading two custom rigid bodies in the simple loader demo. Now what I need to know is what files exactly do I need in order to have my character in the controller demo?
I looked a bit into this and came up with the following: that demo reads in the following 5 files associated with HavokGirl: hkRig.hkx, hkLowResSkin.hkx, hkProtect.hkx, hkIdle.hkx, and hkRunLoop.hkx.
If I create the 5 above hkx files with my own character, would that be enough to replace HavokGirl? If that's the case what specific export options would I use in each?
Thank you very much for considering this.

Аватар пользователя Abhinav S.

PS: I now know how to create hkx files. Thank you

Аватар пользователя Havok - Josh S.

HI Abhinav,
It sounds like you're asking how to export hkx files in the same configuration as those used by the CharacterController demo. The way to do this is by using different configurations of export filters to build the individual files you want. The configurations below will build the appropriate hkx files.

hkRig contains the skeleton data. in order to build this you will need to set up your filters like so:
Transform Scene (core)
Create Skeletons (animation)
Prune Types (core) - set to prune everything but skeletons
ViewXML (core) - you should see 1 skeleton under Animation Container -> hkaAnimationContainer in Scene Inspection
Write To Platform (core)

hkLowResSkin contains the skin for the skeleton:
Transform Scene (core)
Create Skeletons (animation)
Create Skins (animation)
Prune Types (core) - set to prune everything but mesh bindings
ViewXML (core) - you should see 1 (or more) skin under Animation Container -> hkaAnimationContainer in Scene Inspection
Write To Platform (core)

hkRunLoop, hkIdle, and hkProtect each refer to animations. you will need corresponding animations for your character. For each animation load and play the animation in Maya. While the animation is playing, click Havok Content Tools -> Export. Now it is set up to export the animation. Use the following filters:
Transform Scene (core)
Create Skeletons (animation)
Create Animations (animation)
Prune Types (core) - set to prune everything but animations and everything under animations
ViewXML (core) - you should see 1 animation and 1 binding under Animation Container -> hkaAnimationContainer in Scene Inspection
Write To Platform (core)

Josh S. Havok Developer Support Engineer www.havok.com
Аватар пользователя Havok - Josh S.

Please let me know if you are able to get this to work. If not, i may be able to determine what is going wrong by looking at the contents of your hkx files.

Josh S. Havok Developer Support Engineer www.havok.com
Аватар пользователя Abhinav S.

Thank you very much for your help. I will try to get to this as soon as possible and let you know how things unfold.

Аватар пользователя Abhinav S.

When I export the animation, I see an animation, a binding and a skeleton in the scene inspector under hkaAnimationContainer. Is that fine or did I do something wrong?

Аватар пользователя Havok - Josh S.

That should be fine. the skeleton isn't strictly necessary, but it shouldn't hurt anything. You can get rid of it by checking the skeletons box in the prune types filter.

Josh S. Havok Developer Support Engineer www.havok.com
Аватар пользователя Abhinav S.

Hello, I created an equivalent of hkRig.hkx, hkLowResSkin.hkx and hkIdle.hkx. I noticed that if you seal off (that is comment out) the animation code in the demos, the character figure just stands there in T-pose. With that in mind, I commented out the animation code line in BasicMovementDemo.cpp under Animation -> Api -> MotionExtraction -> BasicMovement. I then replaced the HavokGirl hkRig.hkx and hkLowResSkin.hkx files with the ones created using my character and tried to run the demo. Unlike with HavokGirl, my character doesn't show up. I followed the export options written above verbatim. Am I missing something?
Thanks.

Аватар пользователя Abhinav S.

I just succeeded in uploading my character's skeleton. Mesh and texture didn't get in. Aren't they supposed to be part of hkLowResSkin.hkx?

Аватар пользователя Abhinav S.

I figured out what was wrong; in my export options under Prune Types, I was checking on Nodes, lights and cameras and Meshes. I unchecked them and I successfully opened my character up in the demos. Now, I have a question: how can I make my character interact with the environment. I have my character in a bomb type scenario (Explosion demo under physics -> api -> dynamics -> Actions -> WindAction -> Explosion) but he is just standing there. How can I make him responsive to the wind action?
Thanks.

Аватар пользователя Havok - Josh S.

Hi Abhinav,
The way to get a character to respond to physical forces is by using a ragdoll. There is no ragdoll in the BasicMovement demo, which is why you're not seeing your character respond to the explosion. You can create a ragdoll for your character in Maya, but to begin it's probably easier to reuse a ragdoll from another demo like you suggested in another post. For example, you could start by adding a wind explosion into the Animation -> Api ->Ragdoll -> ConstraintMatching demo.

Josh S. Havok Developer Support Engineer www.havok.com
Аватар пользователя Abhinav S.

But would it work out if i create a character proxy like was done in the constraintmatching demo or would the ragdoll be faster to do if I wish to stick to the explosion demo?

Аватар пользователя Abhinav S.

Also for the ragdoll, how exactly would I attach it to the character? I can get a ragdoll ready and imported into the demo. How would I attach that to the character? Will it be through hkpCharacterController?

Аватар пользователя Abhinav S.

sorry the character proxy was not in the constraint matching demo but character controller demo

Аватар пользователя Havok - Josh S.

Hi Abhinav,
The character proxy you're talking about is not a physical object in that it doesn't respond to forces and impulses. To get your character to respond to physical forces is to use a ragdoll. This is what the ragdoll is designed for. You can set up a ragdoll for your character using the Havok plug-in for your modeller (maya). There's a lot to know about setting up ragdolls, so i recommend reading through the ragdoll setup documentation in Havok Physics Help -> Articles -> Ragdoll best practices.

Josh S. Havok Developer Support Engineer www.havok.com

Зарегистрируйтесь, чтобы оставить комментарий.