Product Chat / importing FBX models and animations

Author
Message
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 20th Jan 2021 17:57 Edited at: 19th Jun 2023 23:50
I'm not sure if this was explained but a while back Lee added support to GG classic to allow you to append FBX animations to existing models via GG - this can be seen on the medieval/dragons model
so i did some exploring/playing around with it and figured out how it works - this is my experience getting a model into GG which uses maximo animations
note: i will try to explain it clearly but i am assuming you have a basic understanding of GG and importing models - it's not hard though
1. get a model in a T Pose (you don't need any bones or animations yet)
2. upload it to maximo (link above) and follow the instructions there to make it work correctly with one of their animations (i.e. line up the wrists etc)
3. export the model with skin - this will give you a base animation along with the model
*important* - for all animations you should make a note of how long the animations are (in frames)
*important note 2* if your animations have mesh movement there should be a box to tick to tell it not to apply the movement, make sure it is ticked to keep things easier)
(note: keep maximo open for now)
4. import the newly downloaded FBX from maximo to GG via the importer - choose apbr anim.fx then apply your textures
5. go back to maximo and find any animations that you would like to use - download these WITHOUT skin
6. import the new animations (these will be .fbx files) via the importer - you won't see anything in the importer and you don't need to do anything here, just save the file so you get a .DBO in the same location as your original/first import
(this bit will seem strange but it's fine, you are simply converting the animation to GG format)
7. when you are done importing your animations find your new model's .FPE file (the original/first import) and open it.
8. this is where the magic happens - under ;anim type
appendanim1 = "animation file 1".dbo
appendanimframe1 = startframe
appendanim2 = "animation file 2".dbo
appendanimframe2 = length of previous animations
so if your first animation was called "Walk.dbo" and is 120 frames long and your 2nd animation is "Run.dbo" you put
appendanim1 = Walk.dbo
appendanimframe1 = 0
appendanim2 = Run.dbo
appendanimframe2 = 121
now it's important that you keep adding all the previous animations to each appendanimframe# so if animation 2 is 100 frames long it would be appendanimframe3 = 221 (add 1 so it doesn't overlap the previous animation)

when you have done the above for all your required animations (remember to change the number in the index each time) you can add the final part
appendanimfinal = "save animations here".dbo
appendanimmax = number of animations
where "save animations here.dbo" should be a new file you want GG to create when it is done updating your model - don't worry too much about this, just give it a unique file name
set appendanimmax = the number of animations you have appended - so if you have an idle, a walk and a run you have 3 animations
*note* it's very important these 2 lines are added before the appendanim1 line, GG will throw an error if you place them after

optional:
you can add your new animations to the normal animation system in the .FPE so that you can call SetAnimation(1) etc

your .FPE should now have info that looks like this

that's it, your model should now work and animate in GG (assuming you make a script to make it do so)
so you can either set the animation frames directly
SetAnimationFrames(1027,1056)
PlayAnimation(e)
or if you use the optional advice you can use anim system as well so you can call those
SetAnimation(10)
PlayAnimation(e)

p.s. once you have loaded your model into GG once you should also now be able to remove the append animation calls and just use the "final.dbo" you created in the .FPE so it doesn't need to create the file each time but personally i haven't noticed any performance difference
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 20th Jan 2021 20:00
Bookmarked, ty smallg, great info
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
Tauren
8
Years of Service
User Offline
Joined: 25th Jun 2015
Playing: PUBG,Conan Exiles,WoW,HoMM III,MoO 2,Master of Orion 2016
Posted: 21st Jan 2021 12:48
Big thanks smallg, this is a very helpful guide.

PM
Rimbawan Gerilya
3
Years of Service
User Offline
Joined: 5th Feb 2021
Location: Indonesia
Posted: 6th Feb 2021 11:41
Thanks, very helpful! GG should have had a better importer that tackles all of this. I'm slowly losing faith in GG Classic because of the extremely limited import and customization without having to do meticulous steps.

Login to post a reply

Server time is: 2024-04-26 17:13:51
Your offset time is: 2024-04-26 17:13:51