Blender 2.71 - Importer / Exporter (1.4.4)

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!
Post Reply
User avatar
Aisuu
Posts: 61
Joined: Fri Oct 31, 2014 2:07 pm

Re: Blender 2.71 - Importer / Exporter

Post by Aisuu » Sun Nov 23, 2014 5:54 pm

Ha! Iam stupid, it helped :D many, many thx :mrgreen:

bitcpy
Posts: 39
Joined: Tue Apr 24, 2012 7:43 pm

Re: Blender 2.71 - Importer / Exporter

Post by bitcpy » Mon Nov 24, 2014 12:06 am

First draft animation export support, currently doesn't handle skinned objects :(

It can probably be a bit unstable since I haven't tested it more than exported some gears rotating, moving and scaling.
Tried placing it in-game as well and doing playback on the animation, seemed to work okay.

Latest 1.3.2
https://sites.google.com/site/bitcpy/do ... sion-1.3.2

Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Re: Blender 2.71 - Importer / Exporter

Post by Batty » Mon Nov 24, 2014 5:58 am

bitcpy wrote:I'm glad you girls/guys like it and are finding it useful! :)
Useful? No more .obj! So many annoyances gone...
  • model scaled 100x :x
  • normals flipped :!:
  • left is right, right is left :?:
  • folder full of .mtl files :(
  • materials missing :?:
  • no animation :cry:
and on and on...this resource has made using Blender enjoyable, really helped beyond getting early access to the models. :)

User avatar
Lark
Posts: 178
Joined: Wed Sep 19, 2012 4:23 pm
Location: Springfield, MO USA

Re: Blender 2.71 - Importer / Exporter

Post by Lark » Mon Nov 24, 2014 6:38 am

bitcpy wrote:@Lark
I tried with the latest 1.3.1 which worked fine. Bringing it into Blender, then exporting and opening it in GMT.
You shouldn't need to bring it into GMT for tangent re-calculations with the latest, it should work just fine in the game.
(I'll double check that in a couple of minutes)

If there's still problem, let me know and I'll see what we can do about it.

@everyone
Thanks for helping each other out :)
Fantastic! 1.3.1 works perfectly and imports the model without any issues at all! We are not worthy! Thank you! I cannot even imagine the magic you are doing to make this possible. Now I can proceed with the next model I want which will be much easier modifying this alcove. Thanks again, you're the best Bitcpy! (Oh, and I have my fist model ready to go - I'll post it tomorrow at work!)

Sincere Gratitude, -Lark

Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke

User avatar
aaneton
Posts: 189
Joined: Fri Sep 21, 2012 1:53 pm

Re: Blender 2.71 - Importer / Exporter

Post by aaneton » Mon Nov 24, 2014 10:51 am

I just want to say thank you for this awesome script!
My Grimrock mod (LoG1): The Onkalo Project
My Android (and windows desktop) game: Balloon Gentleman

bitcpy
Posts: 39
Joined: Tue Apr 24, 2012 7:43 pm

Re: Blender 2.71 - Importer / Exporter

Post by bitcpy » Sun Nov 30, 2014 1:09 am

Sorry for the lack of updates lately, I'll try to push fixes or requests if needed but I will be either really busy or not at home during most of December.
If there's anything you want, keep asking for it and I put it on the list (if it isn't already on it)

Anyways, I updated the script to support armatures as well as rigid objects.
I also added support to import and export animations from and to Legend of Grimrock 1.

Latest 1.4
https://sites.google.com/site/bitcpy/do ... ersion-1.4

minmay
Posts: 2656
Joined: Mon Sep 23, 2013 2:24 am

Re: Blender 2.71 - Importer / Exporter

Post by minmay » Sun Nov 30, 2014 4:29 am

This script is excellent and has been immensely helpful so far.

However, I think I've found a couple of bugs.
1. Importing assets/models/env/beach_rock_arch_01.fbx.model and exporting it without changes completely messes up the normals or something similar:
SpoilerShow
Image
Asking Blender to recalculate the normals didn't fix this.

2. Importing assets/models/env/forest_plant_cluster_01.model and exporting it without changes messes up the lighting on the heather (tangents calculated wrong?):
SpoilerShow
Image
Enabling "Export transformed normal map" and/or disabling "Export tangents" just makes the problem worse, as you would expect.

Neither of these were changed by removing doubles.
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.

bitcpy
Posts: 39
Joined: Tue Apr 24, 2012 7:43 pm

Re: Blender 2.71 - Importer / Exporter

Post by bitcpy » Sun Nov 30, 2014 3:23 pm

Updated 1.4 to resolve some issues when importing models with multiple materials on them.

Latest 1.4.1
https://sites.google.com/site/bitcpy/do ... sion-1.4.1

@minmay
Thanks for finding the model import issue, I had made a small mistake when assigning materials to faces on models with multiple materials on them.
I fixed the issue and uploaded a new version, 1.4.1 should work fine.

For the plant model, I'm a bit unsure what to do, maybe make sure Blender doesn't alter the normals when importing (was supprised that it actually did).
From what I can tell by looking at the model it appears the artists has used smoothed normals on the grass planes through transfered normal attributes.
It's a good trick when working with planes, but I'm not sure Blender can actually do that out of the box since it would require the user to be able to lock the normals or apply vertex-normal maps.
Works really well with short hair on faces as well as you would simply transfer the vertex normals from the mesh below onto the hair planes.

I know I seen some better articles on it but this page from polycount does a fairly good job at describing the effect.
It also shows how to do it in Maya, Modo or Max.
http://wiki.polycount.com/wiki/VertexNormal

bitcpy
Posts: 39
Joined: Tue Apr 24, 2012 7:43 pm

Re: Blender 2.71 - Importer / Exporter

Post by bitcpy » Wed Dec 03, 2014 9:12 pm

Added so that mesh objects with more than 4 edges (none quads or tris) are automatically selected so user don't have to find them manually when export fails.
Also fixed an issue with mesh objects not being exported if being root nodes.

Latest 1.4.2
https://sites.google.com/site/bitcpy/do ... sion-1.4.2

User avatar
germanny
Posts: 530
Joined: Sat Apr 07, 2012 10:52 pm
Location: Kiel, Germany

Re: Blender 2.71 - Importer / Exporter

Post by germanny » Fri Dec 05, 2014 9:45 pm

Great work, bitcpy!
How about register this module official with Blender?
Dungeon Master Resource Pack worker and passionated Beer drinker

Post Reply