Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Download Outerra Tech Demo. Unofficial Outerra Discord server, MicroProse Discord server for OWS.

Author Topic: spawned animation floats in the air  (Read 6967 times)

patmarrnc

  • Full Member
  • ***
  • Posts: 136
spawned animation floats in the air
« on: December 02, 2017, 11:28:55 pm »

After much help from Andfly (thank you very much!!)  I've managed to create my first animated model, using Andfly's baby brachio script and a model I prepared that has an ANIM file.  I am very happy with the animation test, but my question pertains to the model's spawned position.

If I load a static copy of the model (a deer) it stands on the ground, as expected.
However if I spawn the animated deer, its position is relative to the camera position. And no matter how close to the ground I position the camera before spawning, I can't get the deer's feet on the ground.

following is a link to the package folder plus the FBX used to generate the package.

The animation is not refined by any means, it's just a test cycle. I don't own the rights to the deer, so this link will be deleted as soon as it is used for diagnostic purposes. Please don't redistribute the deer. It is the property of Smith-Micro software, from their product Poser.

(((files removed from DROPBOX)))

Any help getting Bambi's feet on the ground will be greatly appreciated.

(if you need any other files added to the directory on dropbox, let me know)
« Last Edit: December 11, 2017, 05:09:03 pm by patmarrnc »
Logged

andfly

  • Sr. Member
  • ****
  • Posts: 347
Re: spawned animation floats in the air
« Reply #1 on: December 03, 2017, 01:10:22 pm »

Congratulations !!!

To put the deer to the ground just press "ALT + R", you will force the model reload that, realizing that it has been called "vehicle", will lower (by gravity) until it meets a solid obstacle.

I allowed myself to retouch your materials and the "mtl"  file, for a better aesthetic rendering .. and I retouched the script ...   ;)

It's a small joke ... but the goal would be noble ...

By examining the script you should be able to understand (and reproduce) how you can define the bones of a model as a "joint", and command their movements with "rotate_joint" regardless of the existence of a pre-built animation.

https://drive.google.com/file/d/14TdGDI-QnrkKXG8MtBYhQB6vLINBz96C/view?usp=sharing


The decompression of the ".otx" file automatically creates a folder "... pakages / pat / DEER_ANIM" in the folder you have set up for the Outerra data.
You will also find the original "js" file renamed "DEER_ANIM.js.BAK", which you can restore when you get tired of my ...

Congratulations again,
best wishes for your next progress !!!   :D :D


P.S.
It only occurred to me, just now, another thing ...   ::)
Probably it is sufficient to equip the deer with a mass to make it lay on the ground without the need for the "reload" ...

it's good to try ...
« Last Edit: December 03, 2017, 01:33:35 pm by andfly »
Logged
I do not know the English language. I use Google Translate. I hope it's all understandable.

patmarrnc

  • Full Member
  • ***
  • Posts: 136
Re: spawned animation floats in the air
« Reply #2 on: December 03, 2017, 07:04:49 pm »

I nominate Andfly for the "most encouraging person on the forum". Also the most helpful... and certainly one of the most creative. 

Thank you! your help and feedback are greatly appreciated! (Now I'm going to DL your changes to see what you did)
Logged

patmarrnc

  • Full Member
  • ***
  • Posts: 136
Re: spawned animation floats in the air
« Reply #3 on: December 05, 2017, 01:25:45 pm »

I'm guessing there is a limitation to the size of an ANIM file, so the logical use would be to create a bunch of commonly used animations, then either control which one plays via conditional logic, triggered by the keyboard/controller input, or build more complex and interesting actions by concatenating several smaller ANIM files, one after the other, in the same script.

I spent most of last evening trying to see if I could edit Andfly's script to loop through 3 different ANIM files. No luck yet. Open to suggestions.
Logged

andfly

  • Sr. Member
  • ****
  • Posts: 347
Re: spawned animation floats in the air
« Reply #4 on: December 06, 2017, 08:49:04 am »

The method certainly exists (it is used with the mercenary) but ...
I have not been able to identify it yet.  :(

These readings should certainly be useful:

https://github.com/Outerra/anteworld/blob/master/include/ot/animation.h

https://github.com/Outerra/anteworld/blob/master/include/ot/animation_stack.h
Logged
I do not know the English language. I use Google Translate. I hope it's all understandable.

patmarrnc

  • Full Member
  • ***
  • Posts: 136
Re: spawned animation floats in the air
« Reply #5 on: December 06, 2017, 05:28:55 pm »

You are always very helpful, Andfly! I hadn't seen either of those links yet, so thanks for pointing me in a useful direction
Logged