[WIP] GrimFBX

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

[WIP] GrimFBX

Post by JohnWordsworth »

GrimFBX v0.0.1.0

One day this will be part of the GMT, but I've had to develop it separately as the FBX SDK from Autodesk doesn't have a C# interface. This C++ app will allow for conversion between FBX Models and Grimrock Models. It's taking a while, but only because the FBX SDK is extensive, quite different to other formats and I've never used it before.

This first release is very much 'in alpha' at the moment, so please don't expect it to work properly for anything (although it should!). There is a first stab at getting bones to work - so testing that would be very useful. Unfortunately, it's a command line tool at the moment. I'm not really sure of the direction to go in yet... (1) Make it a windows DLL for the GMT, and/or (2) Keep it command line so it can be used on OSX when the OSX version of Grimrock comes out or (3) make it a separate, simple, cross-platform wxWidgets app (no 3D renderer in this one!).

Zip file GrimFBX-0-0-1-0.zip simply contains an EXE file that can either run as part of a .bat file, or if you just double click it you can enter the same commands interactively. Commands at the moment...

GrimFBX grim2fbx E:\Path\To\Files\altar.model [E:\Path\To\Files\altar.fbx]
GrimFBX fbx2grim E:\Path\To\Files\altar.fbx [E:\Path\To\Files\altar.model]

If you don't provide an output file name, it just uses the input name but with the new extension. In interactive mode, miss off the GrimFBX at the start of each line (that invokes the app if it's not running).

Please let me know how you get on! I hope to refine and add animation support over the next week or two!
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: [WIP] GrimFBX

Post by Skuggasveinn »

seems to be working just fine.
I ran it through the models and got them all out into fbx format and into max.

one thing that I saw was that it throws an error if the path has spaces in them, and putting the path in between " " doesn't fix that. But when you have the models in a standard spaceless path it works great.

Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] GrimFBX

Post by JohnWordsworth »

That's great to hear Skuggasveinn :). Thanks for being a guinea pig!

1. I've just realised there is a problem with grim2fbx in that it doesn't retain the separate material groups on the model. So there is probably an issue with the Skeleton and Goromorg having only 1 material attached to the whole model (should be fine the other way though).

2. Thanks for highlighting the spaces issue. In 'interactive mode' I do really simple parsing of the inputs, so yeah - that makes sense that that is a problem.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
Phitt
Posts: 442
Joined: Tue Aug 14, 2012 9:43 am

Re: [WIP] GrimFBX

Post by Phitt »

Finally got a chance to try this, but unfortunately it doesn't do anything for me. Probably I do something wrong. I export to fbx, then enter this into the console:

GrimFBX fbx2grim C:\BallistaTest.fbx [c:\BallistaTest.model]

Also tried

GrimFBX fbx2grim C:\BallistaTest.fbx

But nothing happens. No error message, no new file, nothing. Any ideas what might be wrong?
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] GrimFBX

Post by JohnWordsworth »

Hi Phitt,

That's definitely not the expected behaviour! I would expect an output file. I've been overly busy these last couple of weeks with X-Mas coming up, so haven't made as much progress as I should have liked with GrimFBX.

However, if you could possibly send over your FBX file to me, I could see where it is choking. I expect there is just a silly mistake in my code that your FBX file hits - but I'm pretty confident that it's just a minor tweak to get it working properly :).

JW
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] GrimFBX

Post by JohnWordsworth »

Just a quick update really - got to spend a few more hours on FBX support today and I'm 90% certain that I have animations extracted from FBX files correctly. There appears to be a few minor problems left to sort out that make it unusable at the moment - but if I get a couple more hours on an evening soon then there should be a working FBX -> GrimModel converter available which supports full bone weights and animations! As it's plain old C++, it will also work on OSX when the OSX version of Grimrock comes out :).

Thanks Phitt for your test model. I have it correctly appearing in the GMT now - as I say, I just think there is an issue with the assigning of bone weights but then it should all be ready!
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: [WIP] GrimFBX

Post by Komag »

that sounds excellent, nice progress!
Finished Dungeons - complete mods to play
User avatar
Phitt
Posts: 442
Joined: Tue Aug 14, 2012 9:43 am

Re: [WIP] GrimFBX

Post by Phitt »

Sounds great, thanks for the update!
User avatar
germanny
Posts: 530
Joined: Sat Apr 07, 2012 10:52 pm
Location: Kiel, Germany

Re: [WIP] GrimFBX

Post by germanny »

WOW! You´re great, John!
Especially bone weights - if i can export from blender properly, this would awesome.
Keep up your brilliant work. 8-)
Dungeon Master Resource Pack worker and passionated Beer drinker
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] GrimFBX

Post by JohnWordsworth »

Another quick update to GrimFBX for everyone to play with. Lots of code has been fixed / tidied and updated. It's still very much a work in progress though which I hope to improve over the XMas period.

GrimFBX 0.0.2.0.

Release Notes...
  • This is still not a fully functional version of the software! While it should work fine for static meshes, I'm not confident that it does everything quite right for animated meshes yet (though it might work in some cases!).
  • Running "GrimFBX fbx2grim C:\modelname.fbx" will also extract all animations found in the FBX file. They have crazy file names, but they should exist in the same folder as the .model file.
  • The exported .model file now uses the material names from the FBX file correctly. This means that your model @Phitt no longer crashes the editor (I think that was just caused because the material names were empty strings). I've only loaded it in as a static model so far, but that works :). I don't know if you can have multiple animated meshes in a model in the game though?
  • In 'interactive mode' blank spaces in the file path still cause problems. This isn't a problem when just using it from the command line though.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
Post Reply