TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

GameGuru MAX - Bug - Base Male and Female Rigged Models Don't Work (.blend file) #3487

Closed MonkeyFrogStudio closed 1 year ago

MonkeyFrogStudio commented 2 years ago

If you open the .blend file for the base male or female model and then export that out as an FBX, the model imports into MAX, but does not deform with the bones. It moves with the animations as if it's a stiff, wooden board. I might be doing something incorrectly, but so far I've not been able to get these figures to work and import into MAX.

MonkeyFrogStudio commented 2 years ago

An example:

https://user-images.githubusercontent.com/36735507/180627528-8b2fe389-c325-44fc-ab2f-26531683b304.mp4

This is using the .fbx file included in the ZIP files in the GUIDES folder. This means that I did not import the .blend into Blender and export as FBX, but use the FBX supplied with MAX. However, I've also tried opening the .blend file and exporting my own FBX and the results are the same. The skeleton is not deforming the mesh.

bond1mjb commented 2 years ago

@MonkeyFrogStudio Yeah skinned FBX import is not working correctly at the moment in GGMAX. I assume it's a problem with the assimp library that GGMAX uses, since the FBX file imports into Blender and 3ds Max just fine.

GGMAX uses .X format for all characters and weapons, so you will need to export to that format for the time being until more formats are supported. But you will need an older version of Blender to do this.

These are the steps I used. First, download Blender 2.79 from here: https://download.blender.org/release/Blender2.79/blender-2.79b-windows64.zip Then download the directX exporter and install it as instructed: https://github.com/spamandeggs/directX_blender/wiki

Import the FBX file into Blender 2.79, and export to .X using the settings below: blenderx

Now you can import the resulting .X file into GGMAX, and all is working including animations, although I had to scale the character up by 4000.

xMAX

MonkeyFrogStudio commented 2 years ago

@bond1mjb That's ... just ... X format? I know, but that's such an old, outdated, obsolete and severely restricted format. I've not tested anything but the FBX that was in the Guides folder. What about OBJ and GLB/GLTF for character models?

Thanks, btw, for the help with older Blender versions (if I wanted to go that route).

But, yeah, this needs to be fixed as soon as possible. Not being able to import a character model using a modern 3D file format is ... just not good. ;)

bond1mjb commented 2 years ago

@MonkeyFrogStudio Yes X format exporters are getting harder to find these days. Of the "major" 3d apps, only 3ds Max still has an actively maintained X exporter.

FBX for skinned animated models is broken in GGMAX at the moment. As is GLTF - which is weird because Wicked Engine supports GLTF natively. I just tested this character exported to GLTF with the latest Blender, and it imports into Wicked just fine. So it's weird that GGMAX doesn't work with GLTF. And OBJ format doesn't support animation, period.

So unfortunately at the moment, it looks like Blender users will need to use a pipeline of: Blender 3 --> FBX ---> Blender 2.79 ---> X ---> GGMAX

Hopefully at some point GGMAX will also be able to handle FBX and GLTF for skinned models.

MonkeyFrogStudio commented 2 years ago

@bond1mjb Not just Blender users, but people who are not using 3ds MAX, apparently. I also have MODO, but that's not going to help as it doesn't export to X. And, as you've pointed out neither FBX nor GLB is working, either.

MonkeyFrogStudio commented 2 years ago

@bond1mjb Question - I've used bones to animate hard-body objects, like opening/closing doors. I've exported these to FBX and they import into GGMAX just fine (i.e. the animations work as they are supposed to). Is this because we are not deforming the mesh? Does this mean that only hard-body type animations currently work with non-X formats?

bond1mjb commented 2 years ago

@MonkeyFrogStudio I think that is correct. As a test, this cage door is directly animated, no bones, just rigid body animation. It imports with animation into GGMAX just fine as FBX (nevermind the jerkiness of the looping gif): CAGE

But this lightswitch uses bones to animate the lightswitch, and it will not import correctly. Only the switch should move, but instead the whole thing flaps around just like the character. So at least for me, exporting directly from 3ds Max, skeletal animation using bones/skinning does not work at all for FBX.

SWITCH

bond1mjb commented 2 years ago

@MonkeyFrogStudio Question, when you say you used bones for rigid animations, did you "skin" the mesh to the bone, or just link/constrain the mesh to the bone? There's a difference.

MonkeyFrogStudio commented 2 years ago

@bond1mjb It's been awhile since I'd done this, but I used bones and parented them to the door so that moving the bone would move the door. This is used when you have a single model consisting of more than one part - i.e. a sliding door consisting of a left-side and right-side that need to slide to the left and right. You cannot animate the parts separately since it is one model, but you can use bones to affect only the parts. So, I've done this with a door that consisted of two parts and a door that consisted of three parts, but were all one model (one animation using Open and Close animation names to work with MAX's Door Behavior).

MonkeyFrogStudio commented 2 years ago

This animated door, for example, was made with bones and not just keyframe animation:

https://user-images.githubusercontent.com/36735507/180652585-5209296b-82a3-408b-bc89-77c7eb13c88d.mp4

bond1mjb commented 2 years ago

@MonkeyFrogStudio We might be getting caught up in semantics since 3ds Max and Blender have such different workflows for this type of thing. I'm just not familiar enough with Blender to do a deep dive.

In any case, FBX import for skeletal animations is broken in GGMAX at the moment. I have to assume GGMAX is at fault, since the FBX character template checks out fine in the official Autodesk FBX Reviewer:

adfbx

And just to be doubly sure, it imports perfectly into Unreal Engine too, with bones and animations intact:

unrealbasemale

So until FBX or GLTF import gets fixed for skeletal meshes, Blender 2.79 with the DirectX exporter addon appears to be your only option for exporting characters for the time being, if you want to use the stock animations.

LeeBamberTGC commented 2 years ago

@bond1mjb Can you email me the FBX rig that works in UR but not MAX, that will give me somewhere to start. The FBX and GLTFs I got from SketchFab a while back all worked fine for me, I guess gremlins still remain :)

MonkeyFrogStudio commented 2 years ago

@LeeBamberTGC You can find the model that both of us were using in the Guides folder of the GameGuru MAX install -

Program Files (x86)>Steam>steamapps>common>GameGuru MAX>Guides>Characters

Both the base male and female compressed files have an FBX in them. It's that FBX that is not working correctly. Or you can take the .blend file, open it in Blender, and export that as an FBX to use as well.

bond1mjb commented 2 years ago

@LeeBamberTGC Here is the base male character in FBX and also GLTF format. Neither one imports animation correctly in GGMAX. The GLTF version works in Wicked Editor (Wicked doesn't support FBX).

basemaletemplates.zip

wicked

LeeBamberTGC commented 2 years ago

I will grill AssImp and see why we are getting gremlins.

MonkeyFrogStudio commented 1 year ago

@ZakJudges

Bond1 made a Blender rig that is capable of allowing Blender users to create rigged characters for MAX (characters, replacing the arms, etc.). However, he discovered that the FBX import is completely broken when it comes to rigged characters. The only way to get them into MAX is to use X instead of FBX. However, that would mean rolling back to an old version of Blender (2.79 or earlier). But even that doesn't solve the issue because the X exporter for those versions of Blender causes issues that renders the rig/animations useless. Ultimately, this means that it is currently impossible for Blender users to create rigged characters and bring them into MAX due to the import issues with FBX.

Here is the thread on the GameGuru Forum for reference:

https://forum.game-guru.com/thread/223894?page=1#msg2650081

davetgc commented 1 year ago

@ZakJudges - I've received a number of reports that this is becoming a big issue for artists. Given how popular Blender is, it will be affecting a lot of users.

MonkeyFrogStudio commented 1 year ago

Turns out GLTF/GLB does not import rigged/animated characters properly into MAX, either. They work in other packages, just not in MAX (see the above forum thread for more information).

ZakJudges commented 1 year ago

Hi all, thanks for the info. I will look into this when I am next on bugs, hopefully Thursday/Friday

MonkeyFrogStudio commented 1 year ago

@ZakJudges Awesome! Thanks for this. It's pretty important, especially with how many people are pleading for a means to get their own characters into MAX. We see it asked about almost every live broadcast and it comes up both on the forums and Discord.

It's also a good time to strike while the iron's hot. Meaning - we have someone (bond1) who is willing to create even a rig for arms and the female character (he's already done the male character) provided FBX import into MAX works correctly for character animations using the MAX rig. I'd hate to see this disappear due to a bug not being fixed. ;)

ZakJudges commented 1 year ago

Hi all, I am not too sure on the cause of this, so I am comparing an animated character that imports correctly into Max (from Mixamo), to the base male character that does not. However, I'm not familiar enough with Blender to see how these characters are set up differently. I can see there are differences, I just don't know what the differences mean. Here are both characters, imported into blender: Screenshot 2022-11-17 101535

I did notice that if I export the base male character as an FBX and then re-import it into Blender, the animation issue is also visible in Blender:

https://user-images.githubusercontent.com/32545391/202422828-711e400c-812f-4e64-8c68-94a2f3278722.mp4

BUT, opening the exported FBX with the Windows 3D model viewer gives correct results: Screenshot 2022-11-17 103143

So it looks like all the data needed for the animation is indeed there, it is just being interpreted differently to how it should be. If anybody can advise on the difference between how the two models are set up in Blender, that could give me a clue where to look on the ASSIMP side, and find the cause. Thanks.

Here are the FBX files for the base male and Mixamo characters, if anyone wants to import them into Blender themselves: Animation.zip

GraPhiX-Guru commented 1 year ago

Just a FYI Assimp still has issues with FBX quite a few bugs actually https://github.com/assimp/assimp/issues?q=is%3Aissue+is%3Aopen+fbx

bond1mjb commented 1 year ago

I've attached the base male exported from Blender using the "better fbx" addon, and this version will re-import back into Blender ok with animation intact, and also checks out in Autodesk's FBX reviewer. But won't import into GGMAX correctly.

autodeskfbx blender blender.zip

bond1mjb commented 1 year ago

Here also is a GLTF exported from Blender that passes Khronos group validation, loads into their model viewer and Wicked Engine, but won't play animation correctly in GGMAX. blenderGLTF.zip

bond1mjb commented 1 year ago

Just doing more testing with the Blender FBX file exported with the "better fbx" addon. In addition to the the apps mentioned above, it also imports into 3ds Max and Unreal Engine as well. The GLTF from Blender looks good in Wicked too. I'm at loss, both the GLTF and FBX work in everyting I've tried EXCEPT for GGMAX.

blenderMAX Unrealblender wicked

bond1mjb commented 1 year ago

Also tried out Sketchfab with both the FBX and GLTF, looks good there too. I'm just trying to find something other than GGMAX that also fails to load these, to help narrow down the problem. sktechfab

bond1mjb commented 1 year ago

@ZakJudges I imported both the Mixamo character and Blender FBX into 3ds Max to compare the two. but I can't really see any meaningful differences. The Mixamo FBX file also has a light and camera embedded into the file, but I doubt this would make any difference. The bone names and structure are obviously different, and also the mixamo character is comprised of two skinned meshes, while the GGMAX character is made up of 1 skinned mesh with four materials per the Character Creator minimum requirements (head,body,legs,feet) But I don't see any reason why the animation would fail to load altogether in GGMAX.

bond1mjb commented 1 year ago

@ZakJudges I found this Assimp Viewer, and the FBX imports fine here too, with animation intact! So now it's even more weird that GGMAX won't load the animation correctly since it also uses Assimp.

assimpviewer blenderbasemale.zip

ZakJudges commented 1 year ago

@bond1mjb Thank you for the additional testing! I guess there must be something in the imported ASSIMP model that we are not applying/applying wrongly to the DBO. I will take another look today :)

ZakJudges commented 1 year ago

Hi all, I hate to admit defeat, but I think I will need help with this when Lee gets back in a couple of weeks. No fix as of yet :(

bond1mjb commented 1 year ago

@ZakJudges No problem, the Blender and FBX file currently in the guides folder should be considered outdated (and probably removed from the build), I just hastily exported an FBX file from 3ds max toward the end of my CC work thinking Blender users would be able to use it.

The Blender file attached to this post represents a proper Blender animation rig and should be the one used for testing FBX and GLTF export: https://forum.game-guru.com/thread/223894#msg2650081

LeeBamberTGC commented 1 year ago

AL: I have added an updatred BLEND file to the guides folder and Mark's excellent template guide for the next build. Thanks for contributing to this thread, we will keep it open to discuss the new BLEND file and guide in case more is needed to enable artists to use this path for asset creation.

bond1mjb commented 1 year ago

Found the problem. Specifically for FBX, the importer does not like spaces in the bone names. The CC skeleton is a 3ds max Biped, which by default contains spaces in the bone names. After replacing the spaces with underscores, FBX import of the base male from Blender works fine, with animations intact. I suppose this issue can be closed now.

LeeBamberTGC commented 1 year ago

@bond1mjb Can you send me an FBX that has the spaces in the bone names? I can add a check during the import process to alter the user that if they are using Blender, to ensure they are not using spaces in their bone names.

bond1mjb commented 1 year ago

@LeeBamberTGC I've attached an FBX file exported from Blender that uses the default CC skeleton with a simple arms animation. This FBX file contains spaces in the bone names, and will not import the animation into GGMAX. But If I just replace the spaces with underscores, this same model WILL import into GGMAX correctly. basemale-withspaces.zip

LeeBamberTGC commented 1 year ago

@bond1mjb Went one further and added some conversion code which allows blender imports (as FBX) to have spaces and MAX converts them just as they go into the engine, anim now works with the file you sent me :)

image

bond1mjb commented 1 year ago

@LeeBamberTGC Awesome, I'm sure many will appreciate this!

LeeBamberTGC commented 1 year ago

@MonkeyFrogStudio As you are the owner of this issue, are you happy to close?