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 / 3D Animation Frames

Author
Message
Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 26th Jan 2017 05:22
On a 3d bone animated object, is there any way to get current frame number and set/jump to a specific frame number instead of by animation name or time?
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Jack
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 26th Jan 2017 07:37
If you know the num of total frames and the total play time in the model, you can calculate the current frame by the given time pretty easy.

[/url]
Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 26th Jan 2017 18:42
To be honest I'm more interested in the setting than the getting.

Play time / speed always feels a bit messy to me. It is often linked to performance, slowing down as performance drops, causing a given animation to play at different speeds over different lengths of time on different systems or situations.

I prefer to drop frames and jump to where it is supposed to be based on actual time elapsed against an objective rate than to mess about with adjusting subjective play speeds under changing performance.

Maybe this is already delinked in agk, I will have to do some playing about.

Basically though, I was hoping to just reuse my existing dbpro animation handler built around frame numbers without having to make significant changes to my handler and modeling process
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Jack
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 26th Jan 2017 21:56
This should also not be a problem at all, if you know the animation frames.
If not, you have to write a simple fbx or dae parser with opentoread, that scan the file for the total frames.
once done, you calculate the current frame from the the total frames and the current play time (Get)
Or calculate the current play time from the current frame and he total frames and the current sync-rate (frames per second)


[/url]
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 26th Jan 2017 22:19
Quote: "Basically though, I was hoping to just reuse my existing dbpro animation handler built around frame numbers without having to make significant changes to my handler and modeling process "


I believe you can use the animation the same way as DBPro.
The coffee is lovely dark and deep,and I have code to write before I sleep.
Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 26th Jan 2017 22:45 Edited at: 26th Jan 2017 22:49
Maybe I'm missing something, but I'm only seeing commands to set animation to a given time or to a given name, I dont see a command in the help docs to set by frame.

The equivalent of "set object frame objnum, framenum"

Setting by time may be usable, if as I was saying, the animation time is decoupled from the games current running framerate, often it isn't, but I will play around with it.

Thanks guys
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 26th Jan 2017 22:46 Edited at: 26th Jan 2017 22:49
It is set by frame ignore the documentation.

P.S. check the CharacterControllerRagdoll demo here.

https://forum.thegamecreators.com/thread/216683
The coffee is lovely dark and deep,and I have code to write before I sleep.

Login to post a reply

Server time is: 2024-11-24 20:18:00
Your offset time is: 2024-11-24 20:18:00