Blender 2.71 Import/Exporter (1.4.3)

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
bitcpy
Posts: 39
Joined: Tue Apr 24, 2012 7:43 pm

Blender 2.71 Import/Exporter (1.4.3)

Post by bitcpy »

The Grimrock 2 importer/exporter has been updated to work with Grimrock 1 as well. (.dat file is untested, otherwise it should work fine)
For anyone interested, head over to the mod section for Grimrock 2 and check it out.

Grimrock Blender Addon thread at Grimrock 2 Mod Creation forum
viewtopic.php?f=22&t=8086

Add on page
https://sites.google.com/site/bitcpy/
Last edited by bitcpy on Tue Dec 09, 2014 1:54 am, edited 1 time in total.
User avatar
Isaac
Posts: 3191
Joined: Fri Mar 02, 2012 10:02 pm

Re: Blender 2.71 Import/Exporter

Post by Isaac »

Does this use 2.71 features, or would it work with 2.70?
User avatar
maneus
Posts: 246
Joined: Mon Jun 17, 2013 10:42 pm
Location: Switzerland

Re: Blender 2.71 Import/Exporter

Post by maneus »

Import works with 2.70. I´ve tested it with the tunnel_ogre model and the tunnel_ogre_attack animation from the asset pack.
But export works not for me.
User avatar
Isaac
Posts: 3191
Joined: Fri Mar 02, 2012 10:02 pm

Re: Blender 2.71 Import/Exporter

Post by Isaac »

maneus wrote:Import works with 2.70. I´ve tested it with the tunnel_ogre model and the tunnel_ogre_attack animation from the asset pack.
But export works not for me.
Exporting [as you very likely know ~but for those that don't...] could be managed via John Wordsworth's GrimFBX. ;)

I hope it's a minor thing, and not somehow 2.71 dependent; that might see it fixed in an update.
bitcpy
Posts: 39
Joined: Tue Apr 24, 2012 7:43 pm

Re: Blender 2.71 Import/Exporter

Post by bitcpy »

That's odd, I just tried it with 2.70 and it worked fine.
I brought it in to the GMT tool and it played fine there as well.
What kind of error do you get?

When exporting animation, be sure to select the correct format.
There's an 'Animation Version' drop-down to switch between Grimrock 1 and 2.
User avatar
maneus
Posts: 246
Joined: Mon Jun 17, 2013 10:42 pm
Location: Switzerland

Re: Blender 2.71 Import/Exporter

Post by maneus »

@Isaac: Yes I know it and I use GrimFBX for exporting.

@bitcpy: Thank you for telling me about the drop-down button in blender. After changing to "Grimrock 1" there are no error messages in the GMT after importing the animation file anymore.

After exporting from blender into a .model file and open it in the GMT there is no mesh data. Only the nodes are viewable and they are rotated through 90° on the Y-axis.
There is no "Root node" and no "local_srt node" inside.
By exporting as a model- or animation file from blender I get no error message. But the .model file is only 1,94kb.
It doesn´t matter which model I´ll export. The file size is always the same.
bitcpy
Posts: 39
Joined: Tue Apr 24, 2012 7:43 pm

Re: Blender 2.71 Import/Exporter

Post by bitcpy »

@maneus
Sorry for not replying earlier.
Is the model something you done on your own in Blender from scratch?

The script doesn't rotate or flip your model in any way, so it will look flipped and rotated incorrectly when exporting.
This is what the game_matrix object tries to help you with since it's rotation and scale are cleared automatically when exporting so your mesh ends up in Grimrock space.

You can create a game_matrix object from the Create tab in the Properties Panel in Blender, by default it's configured so that Blender positive X points forward, Blender positive Y points to the left and Blender positive Z points upwards.

If you import for example the Ogre you can see that it's oriented forward in this way, and if you would go ahead and clear the rotation to all zeros and scale it to all ones you can see that it's flat down on it's back in Blender facing positive Z, standing tall in Blender positive Y and mirrored on the X axis, since his hammer is now in his left hand!

This might be the issue with your model nodes comming out wrong.
Why the mesh doesn't contain any data is a bit trickier to guess, is it possible to email me the .blend file so I can look at it?

Good thing you got the animation sorted out!

Also added some information on the game_matrix, handedness and the differences between Blender and Grimrock on the support page,
https://sites.google.com/site/bitcpy/su ... me_matrix-
bitcpy
Posts: 39
Joined: Tue Apr 24, 2012 7:43 pm

Re: Blender 2.71 Import/Exporter

Post by bitcpy »

@maneus
Thanks for finding the export issues!
I updated the script, check the main thread for changes,
viewtopic.php?f=22&t=8086&start=40#p86512

Latest 1.4.2
https://sites.google.com/site/bitcpy/do ... sion-1.4.2
bitcpy
Posts: 39
Joined: Tue Apr 24, 2012 7:43 pm

Re: Blender 2.71 Import/Exporter

Post by bitcpy »

Added some tools to work with ground foliage, and skipping hidden objects on export.

Check a rather lengthy rambling post with example
viewtopic.php?f=22&t=8086&start=50#p86862

Latest 1.4.3
https://sites.google.com/site/bitcpy/do ... sion-1.4.3
Post Reply