Jump to content
Hash, Inc. Forums

Recommended Posts

Hi!

 

I'm trying to convert an A:M spline object to POV-Ray and have a few questions regarding the file format.

 

First of all, some backgound information: The spline I'm trying to convert has 12 control points, starts at 0 seconds and ends at 100 seconds. The number of keyframes varies among each point from three to seven. E.g., not all points on the spline have the same number of keyframes. Since not all points have the same number of keyframes, I interpolated linearly between the *existing* keyframes in order to arrive at the missing ones.

 

I am guessing that the translation coordinates contained within CHANNELITEMs get added to the spline model coordinates in reverse order. E.g., add the coordinates of the last CHANNELITEM to the first point of the spline model. I wasn't able to get the spline to work by applying the coordinates in the forward order.

 

Also, I don't know what to do when keyframes in CHANNELITEMs have rotational angles. For instance, some of the keyframes are of type #23, like the following:

 

23
25:0 -3.16683
342.36 0.259643
342.36 0.259643

 

In addition, there are some type #21 for which I'm not sure what the differences are. I think the last two sets of coordinates are pitch and roll angles. To which coordinate axes, and in what order, do I apply the rotations?

 

Finally, what are the different types of interpolation supported by A:M? All the keyframes indicate Interpolation type 2. What does this mean?

 

I'm having a lot of problems with the conversion. Results aren't always what I expect. So I'd appreciate any detailed information you could provide me regarding the MDL and PRJ file formats.

 

Thanks!

 

-Mike

Share this post


Link to post
Share on other sites

so this is a spline that has "muscle mode" animation done on it? and you want to somehow convert that to something that POV does?

 

I know nothing of POV but the closest thing I can think to an animated spline would be a series of "morph targets" in a polygon program.

 

Here's what I'd do.

 

In A:M you can right-click>export as mdl at any frame of a chor. Everything in the chor gets saved as a model in whatever shape or position it is in at that moment.

 

delete everything but the model you want to convert and do that export at every keyframe that is important.

 

the reload those mdls and export those to some typical poly format like 3DS or OBJ. I presume POV can read one of those.

 

if you can cobble those into a series of morph targets in POV you're done.

 

 

Finally, what are the different types of interpolation supported by A:M? All the keyframes indicate Interpolation type 2. What does this mean?

 

 

 

Quaternion is the default except for cameras i think.

 

Vector and Euler are the other choices

Share this post


Link to post
Share on other sites

I should have added the disclaimer that I don't actually have a copy of A:M. I'm looking at the MDL/PRJ file in a text editor.

 

so this is a spline that has "muscle mode" animation done on it? and you want to somehow convert that to something that POV does?

 

I know nothing of POV but the closest thing I can think to an animated spline would be a series of "morph targets" in a polygon program.

I've set up POVray so that it interpolates between the different keyframes using a mathematical function. I've also double-checked my results in Excel. The output is "close" to what it should be, but there are some oddities that lead me to believe I don't understand the MDL/PRJ file format completely, hence my questions.

 

Finally, what are the different types of interpolation supported by A:M? All the keyframes indicate Interpolation type 2. What does this mean?

 

 

 

Quaternion is the default except for cameras i think.

 

Vector and Euler are the other choices

Is "Quaternion" method #2?

 

Thanks!

 

-Mike

Share this post


Link to post
Share on other sites

I should have added the disclaimer that I don't actually have a copy of A:M. I'm looking at the MDL/PRJ file in a text editor

 

did you know you can get a one year license for $50?

 

 

 

 

I've also double-checked my results in Excel. The output is "close" to what it should be, but there are some oddities that lead me to believe I don't understand the MDL/PRJ file format completely, hence my questions.

 

of course now we wonder how you know you'e close if you don't have A:M to see the intended result

 

 

Finally, what are the different types of interpolation supported by A:M? All the keyframes indicate Interpolation type 2. What does this mean

 

 

Is "Quaternion" method #2?

well, we gotta back up here. Quat, Euler and Vector are kinds of Rotational interpolation.

 

The interpolation of a spline through its CPs is another matter entirely. That's something I know even less about. The behavior of A:M splines has changed slightly over the years. The method number may refer to a particular version of that behavior.

Somewhere on this forum there is a link to a paper by Martin D. Hash that explains the math behind his splines. A search on the web might find it too.

 

But it doesn't address A:M file format specifics. I've never seen such a document. Perhaps the SDK goes into it. Check the archived development forum.

Hmmm ... POV? I know it probably has some exotic qualities but you really ought to check out A:M

Share this post


Link to post
Share on other sites

I don't know if this would help:

 

A:M File Format v7.0

 

Edit: - is it just me, or are the [tag][/tag] formatting things broken?

That's exactly the kind of thing I was hoping for! Unfortunately, it doesn't go into the amount of detail that I require. For instance, under the CHANNELITEM section for the "time float" pair, it merely says "the other float is the value". It also doesn't mention the effect of the rotational coordinates/values.

 

Edit: - is it just me, or are the [tag][/tag] formatting things broken?

Yeah, I don't know what the problem is.

 

did you know you can get a one year license for $50?

I really don't want to spend $50 just to convert a portion of a single model.

 

of course now we wonder how you know you'e close if you don't have A:M to see the intended result

Because I can compare it to a rendering/animation of the finished product.

Share this post


Link to post
Share on other sites

I think I just discovered the problem!

 

The CHANNELITEMs are actually themselves contained within MUSCLEITEMs. The MUSCLEITEMs are numbered, and some of them appear out of order within the file. I think all I need to do is extract them in the order that they're numbered instead of the order they were added to the file.

 

[edit]

Yup, that fixed it.

 

The rotational values are still a mystery to me, but they're very small, so I think I can ignore them.

Share this post


Link to post
Share on other sites

I will be very curious to see what this 12 CP model is doing.

Share this post


Link to post
Share on other sites

I will be very curious to see what this 12 CP model is doing.

 

ounds very promising to me... it would be great to be able to render in other renderers (for example maxwell or povray).

 

Maybe Arthur or Steffen could jump in from time to time and help here?

 

*Fuchur*

Share this post


Link to post
Share on other sites

You should really get a copy of AM and study some of the file IO examples in the SDK. That will save you loads of time. It's only 50 bucks. C'mon. ;)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. 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...