Author Topic: [SOLVED] Problem animating a box  (Read 882 times)

0 Members and 1 Guest are viewing this topic.

Offline Archaicvirus

  • *
  • - Original Poster (OP) -
  • Rotting Walker
  • Posts: 92
  • Country: us
  • Respect: 32
    • View Profile

Problem animating a box

« on: June 18, 2017, 07:57:07 pm »
I've made a model of a crate, and made the animations for it to open and close it's lid in maya 2014. The problem is I don't really know the bone hierarchy that I need to follow. I tried making a bone called "tag_origin", then made it the parent of another bone called "tag_lid". I selected the lid of the crate, then hit bind>rigid to the "tag_lid" bone. I set the bottom of the crate to bind>rigid on the "tag_origin" bone. I can play both the animations in maya, and it looks fine, when the lid opens and closes, but in ape the box is sideways, and the animation doesn't play. Any help is appreciated.

*In APE I have the xanims set up as Type>delta. I enabled the option to view bones in the ape preview window, and I can see the tag_lid bone swinging open, but the lid isn't attached to the bone, I don't understand why because when playing the anim in maya it is attached and looks fine.
« Last Edit: June 18, 2017, 08:04:02 pm by Archaicvirus »
Let he who has not sinned cast the first stone.

This topic contains a post which is marked as the Best Answer. Click here to view it.

Offline Archaicvirus

  • *
  • - Original Poster (OP) -
  • Rotting Walker
  • Posts: 92
  • Country: us
  • Respect: 32
    • View Profile

Re: Problem animating a box

« Reply #1 on: June 20, 2017, 10:44:31 am »
*Frustrated sigh* :(

I was able to get the xanims playing in APE, but only when using the animations I made in blender. Problem is blender anims only seem to work with type>relative, and not delta in ape. The xanims still won't play in game though. I have the animtree set up and all the script side of it I triple checked. Blender xanims worked fine for me in WAW, but aparantly not in bo3. I'm just inexperienced in maya honestly. Maybe someone can make a really basic tutorial on doing a simple box animation in maya and getting it playing in game. I saw uptownpap's video on the animtrees which demonstrates a box opening, but it doesn't cover the maya part of it linking the bones and all that. Once I figure out the basic workflow I can start implementing all my crazy ideas and take it from there.

Offline Jer. Steelhammer

  • Legless Crawler
  • Posts: 16
  • Country: nl
  • Respect: 6
  • Voice Actor
    • View Profile
    • Voice Acting

Re: Problem animating a box

« Reply #2 on: June 20, 2017, 01:23:57 pm »
You could make the box and lid seperate models, and have the lid open via move/rotate functions in script.
I know this isn't exacly what you want, nor will it help you with more elaborate animations in the future;
but it's a viable and quick workaround to use in the meantime.
- Jeremy

Offline Archaicvirus

  • *
  • - Original Poster (OP) -
  • Rotting Walker
  • Posts: 92
  • Country: us
  • Respect: 32
    • View Profile

Re: Problem animating a box

« Reply #3 on: June 20, 2017, 02:38:43 pm »
Thanks for the reply. Ironically that's the way I originally made it, two seperate xmodels, linked a struct to the lid on the hinge, and just a rotatePitch() on the struct. The issue is that when the lid rotates open, it jitters around as if colliding with the box. It looks really weird. I tried doing NotSolid() on both the models, but it didn't help. That's the reason why I wanted to do anims. But thanks for the input anyways man, much appreciated.

Offline Archaicvirus

  • *
  • - Original Poster (OP) -
  • Rotting Walker
  • Posts: 92
  • Country: us
  • Respect: 32
    • View Profile

Re: Problem animating a box

« Reply #4 on: June 25, 2017, 10:26:01 am »
Finally, after stubbornly and painstakingly cracking at this for almost two weeks now, I figured it out. I started the bone hierarchy in the following order: "tag_origin"  > "tag_animate" > "j_hinge". I started by selecting the bottom of the crate's mesh, + selecting the "tag_origin" root bone, then hit skin>bind smooth>clicked the white outlined options box, and set the option to bind only to selected joint, set the max influences to 1. Repeated this process with the joint "j_hinge" and the top of the crate. Made keyframes as usual for the animation, and re-exported everything. Got it working correctly in ape, and tested in game! I used wraith to export the xmodels and xanims for the magic box, then imported them in a new scene in maya to study how 3arc did it. That and trial and error plus headaches and lots of coffee. I'm not making a magic box but a loot crate system with random rewards/penalties similar to dig sites but more high-tech

Marked as best answer by Archaicvirus. [23/10/2017, 19:26:10]

Offline Archaicvirus

  • *
  • - Original Poster (OP) -
  • Rotting Walker
  • Posts: 92
  • Country: us
  • Respect: 32
    • View Profile

Re: Problem animating a box

« Reply #5 on: June 26, 2017, 03:45:29 pm »
After making a simple box animation, I didn't stop there. I studied up on IK rigs, and decided to make a custom robot arm xanim to test out this new workflow. I don't mind helping anyone else who wants to do their own custom animations now, but I don't have experience doing weapons yet. Just throwing it out there in case anyone else has that desire. Here is a short video demonstrating one of the new anims I made