Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / I can't load 3D objects with animations

Author
Message
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 22nd May 2016 14:58 Edited at: 22nd May 2016 15:20
Hi,

I have recently bought some commercial models, namely these:
http://3drt.com/store/vehicles/galaxian-space-invaders.html

They are animated but I can't get the animations to work in AGK. I don't know if the issue is with AppGameKit or with the models.
They come in various formats and I have tried to load each supported format with this code:


The only formats that show animation are the *.DAE ones, of which there are two variants. There's *.autodesk.DAE and *.collada.DAE
The autodesk variant has a single animation which combines all of the (supposedly) separate animations. The collada variant performs in much the same way but only displays the main body of the model and not the children.

There are 3 variants of the *.X format. Two of them don't animate but the third (*.anim_split_XNA.x) does at least list the 24 animation names (the only format that does) however, when I try to animate them, they set the object to the position of the first frame but go no further.

None of the other model formats show or list any animations at all.

So, is there a problem with AppGameKit or is it the way the models have been exported?
If it's the models then I will speak to Max at 3DRT.com and ask if he can help - he has done something similar for me in the past but it would be useful to know what it is that I need to ask him to do.

Any ideas?

Thanks
AGK V2 user - Tier 1 (mostly)
Jack
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 22nd May 2016 16:09 Edited at: 22nd May 2016 16:12
Do you have tried to play the whole object at once?
Like:


It won't be easy to find the solution without a model to test

[/url]
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 23rd May 2016 08:43
Since the objects are commercial, I obviously can't upload any of them here.

I suppose my real questions are:
Has anyone had any similar issues with animated objects?
If so, do you know what to do to fix them?

Thanks
AGK V2 user - Tier 1 (mostly)
Jack
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 23rd May 2016 21:28
Quote: "Has anyone had any similar issues with animated objects?"

Yes and no - there are diffrent standards for 3d models, so a .x model can be diffrent from another .x file made by another exporter and AppGameKit can't interpret them.
There are even diffrent standards inside the format, so it is also possible to load a mesh, but with no UV info or no animation. This will be your issue. I know, it's not a pleasant problem.

Quote: "If so, do you know what to do to fix them?"

The best way is to create a custom workflow with a 3d program like 3dsMax or Blender, import the models there and save it in
a format that is confirmed to work with AGK.

But there may be a faster option for you, an online 3d converter:
http://www.greentoken.de/onlineconv/

[/url]
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 24th May 2016 09:25
Hi Scraggle,

I used this pack before , and you should use the direct x (text) versions. i used this one:
cp_03_anim.X , in www.arcadefps.com as a flying bot.

But as i remember only the directx text version is working. ( the working ones are all 3.6mb in size ).

The animations listed on the web site is the numbers you can use in agk:
...
010 - 060 idle_1
070 - 120 idle_2
...

PlayObjectAnimation( botsflying[a].botid , "", 10, 60, 0, 0 ) // 010 - 060 idle_1

Hope it helps


best regards Preben Eriksen,
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 24th May 2016 17:35
Thanks Preben,

That sorted it perfectly.
The help files are very confusing.
Quote: "objID - The ID of the object to modify.
animName - The name of the animation to play, defined by the modelling program
starttime - The point in the animation at which the object should start playing, in seconds
endtime - The point in the animation at which the object should stop playing, minus 1 to continue to the end
loop - 1 to loop the animation forever, 0 to play once, any other positive integer to loop that many times
tweentime - The time in seconds to transition from the objects current state to the first frame of animation"

From that I presumed that the use of the animation name was a mandatory requirement and since startime and endtime are said to be in seconds (which they're not, I see now that they are frame references) then I presumed that the starttime was an offset to start the animation (like with tweens) and that endtime was how long it should run for - therefore setting the animation speed.
AGK V2 user - Tier 1 (mostly)

Login to post a reply

Server time is: 2024-11-25 05:48:10
Your offset time is: 2024-11-25 05:48:10