Jump to content
Hash, Inc. Forums

action file variables


DrPhibes

Recommended Posts

I have been working with A:M to create motion profiles for animatronics. Successfully I programed the animatronics for some pieces in Las Vegas last year, writing our own app to help translate to our controllers. You can see some of our process here.

I am still working on refining this process and I was hoping someone could point me to some documentation of what all the switches are in an .ACT file or a .MDL file so I can better create some of the tools I need. I have looked on the FTP and at the SDK materials, but I could not find some plain language materials describing all of the syntax of the files. I am not a programmer by nature and there is a lot I don't know, so perhaps it is there, but I need a little more guidance to sort it out. everything I have done so far is simply by trial and error.

For example, I can open an action file in text editor and understand what is the axis, time, and position of a bone and this made it easy to convert to what I needed. However, there are other tags in a model file I don't quite know what they all are and I would like to understand them more clearly to leverage for other conversions.

For example the following;

<SPLINE>
262145 0 1 -18.4294033 -2.04771137 0 . .
262145 0 9 24.2136593 -1.03441095 0 . .
</SPLINE>

creates a two point spline in a model file. what does the "262145" indicate? What does the "0" following it indicate? what does the ". ." at the end indicate?

Thanks for any help in parsing this out.

Charles

  • clap 1
Link to comment
Share on other sites

  • Hash Fellow

Hi Charles,

Very cool stuff in that video! Very impressive all around.

 

I recall doing some slight investigation these numbers...

The first number seems to contain flags about properties of the CP.  It may be a binary number with on-off flags.

The last digit indicates peaked/not peaked

 the dot dot is a placeholder for CP bias info when there is none

image.png

 

Link to comment
Share on other sites

  • Hash Fellow

262145 in binary is

0100 0000 0000 0000 0001

262144 in binary is

0100 0000 0000 0000 0000

 

that is too much of a coincidence for that to not be a binary number where each digit stores some true/false value.

The 2.5 byte size would odd, probably not the full possible extent of the value. The real value may be a four byte integer

 

Link to comment
Share on other sites

  • Hash Fellow

The first field is some set of binary flags

The second field signifies "attached" (T/F) to another CP

(EDIT: A better description of this true/false second field is "Position taken from another CP")

The third field is the CP#

After that the fields are data and can be of varying meaning

In line 26 the 4th, 5th, and 6th fields are  X Y Z locations

However, in line 27 there is a 1 in the second field (attached = true) so the 4 in the 4th field tells what other CP is it attached to, no X Y Z is supplied

 

the space-dot-space-dot seems to mean "apply defaults for CP bias"

CPinfo.jpg

 

Link to comment
Share on other sites

  • Hash Fellow

If I replace 262145 with 1 that means the CP has

0000 0000 0000 0000 0001 in the first field instead of

0100 0000 0000 0000 0001

 

With that  first 1 missing the default bias through the spline is parallel to a line drawn through its two neighboring CPs. I believe that is an old style that previous versions of A:M used, now named "perpendicular normals"...

CPinfoC.jpg

 

With the 1 in place the default bias is derived somehow differently. It is not parallel to the neighboring CPs. This modern result is called "biased normals"...

CPinfoB.jpg

 

The choice of Biased or Perpendicular normals can be selected in the modeler with the same-named buttons which can be added to a toolbar from the Tools>Customize>Commands menu...

NormalsStyle.jpg

 

 

Link to comment
Share on other sites

  • Hash Fellow
Quote

The second field signifies "attached" (T/F) to another CP

 

A better description of this true/false second field is "Position taken from another CP")

If 1, (true) then the fourth field gives the CP number this CP's position is taken from.

If 0, (False) then the CP position information will be explicitly given in the fourth and succeeding fields

Link to comment
Share on other sites

Robert,

This is really helpful! Thank you very much for the deep dive!

I will have more questions as I go here.

I am hoping to create a more direct translation of a spline from A:M to Rhino and back. the polygon formats that I can use to get models to and from are ok, but I think there has to be a better way.

Link to comment
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...