Blender importer/exporter [1.7.1]

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Blender importer/exporter [1.5.0]

Post by Isaac »

maneus wrote: Thu Mar 25, 2021 5:52 pm ...But thank you for your reply.
No slight intended.

You did state it in your post, (and I missed it). It's easy to miss the export format, and someone who has might even still phrase their question as you did... with or without the quotes.

As for the image, I am not at home, and do not have access to LoG1 nor above Blender v,2.82.

It's a strange bug then; probably best for minmay to investigate.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Blender importer/exporter [1.5.0]

Post by minmay »

You're right, it doesn't work. Fortunately this seems to be a one line fix; look for this block at line 2492:

Code: Select all

        # write animation to file depending on Grimrock version
        if settings.grimrock_version == 'LOG1':
            anim.write_v1(file_object)
        else:
            anim.write_v2(file_object)
and change it to:

Code: Select all

        # write animation to file depending on Grimrock version
        if settings.grimrock_version == 'LOG1':
            anim.version = 1
            anim.write_v1(file_object)
        else:
            anim.write_v2(file_object)
Sorry for the inconvenience, I'm amazed that I never tested that in-game...



I have been working on version 1.5.1, which will have vertex color support fixed. Another issue I found is that some bones in rigged models can get their transforms messed up when exporting (fjeld_warg.fbx is a good example), which I made a lame workaround for, which will probably end up being the permanent "fix" because I can't figure out why this issue is happening...
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
maneus
Posts: 246
Joined: Mon Jun 17, 2013 10:42 pm
Location: Switzerland

Re: Blender importer/exporter [1.5.0]

Post by maneus »

Thank you minmay for the fix. :D
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Blender importer/exporter [1.6.0]

Post by minmay »

Updated to work in Blender 3.2+. Sorry, I totally missed that there was a breaking change until today.

Also finally added vertex color support. Under normal circumstances, vertex colors are ignored by both Grimrock games. However, if you are using umods to use custom shaders, you can access vertex colors in those shaders.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
DaggorathMaster
Posts: 53
Joined: Thu Sep 08, 2022 7:29 pm

Trouble exporting animations.

Post by DaggorathMaster »

I'm having trouble exporting animations for a monster I made. (An imp, if you must know).
The animations keep coming out as 24 bytes in size. I have more bones than that, times more frames!

No error message.

The hierarchy is right (mesh and rig parented to local srt, root node, game matrix - and those are imported empties).
I ungrouped the channels (though maybe it's only an issue if some are grouped and some aren't).

I have exported edited animations for existing monsters, and those worked fine, e.g., a monster using the ogre skeleton and animations which can also breathe an element, and a wizard who isn't too lazy to walk sometimes instead of warping only.

But this from-scratch monster won't export a bit of useful info.

I'm using the exporter 1.5.0 and Blender 2.90.1.

Big fun mod in progress. Needs some plot glue, a working final boss (animation and enhanced AI), more allies, and - the hardest part sometimes - a better title.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Blender importer/exporter [1.6.0]

Post by minmay »

Would you be willing to send me the .blend file? My chances of being able to fix that would be much better that way...
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
DaggorathMaster
Posts: 53
Joined: Thu Sep 08, 2022 7:29 pm

Re: Blender importer/exporter [1.6.0]

Post by DaggorathMaster »

Sure, how should I send it?
I have Google Drive.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Blender importer/exporter [1.6.0]

Post by minmay »

A Google Drive link would be perfect! You can PM it to me on the forums (my inbox has room for 3 more private messages...) or on the Discord server.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
DaggorathMaster
Posts: 53
Joined: Thu Sep 08, 2022 7:29 pm

Re: Blender importer/exporter [1.6.0]

Post by DaggorathMaster »

Oh looks like I missed making it public. [CLICK]
User avatar
DaggorathMaster
Posts: 53
Joined: Thu Sep 08, 2022 7:29 pm

Re: Blender importer/exporter [1.6.0]

Post by DaggorathMaster »

OK great (answered not on this forum, but by minmay).

The objects were in a collection, not in the main scene.

So I just needed to select all, hit m, and choose "Scene Collection".

IT'S ALIVE! IT'S ALIVE! Or whatever daemons are...
Post Reply