Page 8 of 11

Re: Blender 2.71 - Importer / Exporter (1.4.3)

Posted: Mon Jan 19, 2015 12:09 am
by bitcpy
Glad you got it sorted out. :)

Re: Blender 2.71 - Importer / Exporter (1.4.3)

Posted: Wed Jan 21, 2015 12:42 am
by sajon
Batty wrote:You need to triangulate all the faces. You will notice after that error that bitcpy's script selects/highlights the n-gons that need to be triangulated.

In edit mode with those faces selected (or all faces), do Mesh -> Faces -> Triangulate Faces.
Thank you that did work sorry for the late reply.
I triangulated a cylinder then added a texture and was not right. Does that mean i need to apply texture / UV maps first then triangulate last?

Re: Blender 2.71 - Importer / Exporter (1.4.3)

Posted: Sat Jan 24, 2015 1:10 am
by bitcpy
Latest 1.4.4 ... sion-1.4.4

Sorry, it has been a hectic week, but I managed to sit down yesterday and look at the problem.
It appears some of the vertices are missing skinning weights straight out of the model file.

I wrote a tool and scanned through the entire dat container, and could only find three models that had the same kind of issue.
Funny thing was that when loaded into GMT they look fine, so I guess John already compensate for zero weighted vertices and simply spreads some weighting onto it.

The incorrect models was,

Anyways, I did a quick (ugly) fix today in the script to correct this, so version 1.4.4 should work fine.

Let me know if you're having problems with it.

Re: Blender 2.71 - Importer / Exporter (1.4.4)

Posted: Wed Mar 04, 2015 2:52 pm
by germanny
Hi bitcpy, do you working on this or have you stopped?

Maybe i´m doing something wrong (i guess not).
If i make a render from an imported grimrock 2 model, the surface shows only in shaded black. No matter if i used an image texture or a standard material.
The same if i attached an animation to the model or not.
All normals (face, vertex..) are faced in correct outside direction, so this is not the error source.
If i set the 'translucency' setting of the material from 0 (standard) to 1 the mesh seems rendered as expected.
But is not because with translucency=1 the material colour will 'shine' through from the (inner)backside of the faces.


Guess there must be something wrong with face orientation outside the normal orientation space?
The material is mapped to the opposite face direction?

Tested with Blender 2.71 and the newest 2.73-8.
In 2.73-8 there must be an internal script engine change - because imported models are distorted now:

Those internal changes in Blender are disturbing.. how would someone come to a stable importer then!?
Thanks for your outstanding effort, bitcpy!

Re: Blender 2.71 - Importer / Exporter (1.4.4)

Posted: Wed Mar 04, 2015 9:38 pm
by bitcpy
Hi germanny,

I'm not actively working on this because of work taking up more and more of my time lately, but I'll definately find some time and try and resolve your issues and possibly help out with potential requests.

I should really try and get some more work done on it now when the asset pack has been released.

So, I'll try and have a closer look on your problems this weekend and get back to you.
Thanks for letting me know about your problems with it so I get a chance on improving it.

Re: Blender 2.71 - Importer / Exporter (1.4.4)

Posted: Sat Mar 07, 2015 12:52 pm
by bitcpy

Just wanted to drop you a quick update before I leave for work.

I don't get completely black models, what happens is that they seems to be lit as if they didn't have scales applied.
So for me the lighting is completely inverted as in the 'back' receiving the incomming light rather than the quads actually facing the light, Is this the problem you're having?
I'll do some simple tests with cubes / spheres when I get back home this afternoon and post a bug to Blender if it is missbehaving for even the simple case.

I couldn't find the 2.73-8, only found a 2.74 testbuild (called 2.73-alpha in Blender).
This one had exactly the problem you mentioned.

After I switched the armature to rest pose it was pretty clear that it was not rotated correctly.
Other objects had slight odd transforms as well, after I rotated the armature to align up with the model and went back to pose mode it looked just fine.
Although now everything was rotated incorrectly, so fine might be a bit exaggerating.

Anyways, I'll look into the armature stuff closer when I get back home, might just be me that doesn't supply the transforms properly to Blender, or it's simply a Alpha unstable issue.

I'll also as I mentioned take a closer look at the rendering and see if I need to post a bug report or fix the script somehow.

Re: Blender 2.71 - Importer / Exporter (1.4.4)

Posted: Sun Mar 15, 2015 7:35 am
by minmay
When I try to import dm_spikes_floortrap.model or dm_spikes_floortrap_we.model from Germanny's Dungeon Master Resource I get the following error:

Code: Select all

  line 3647, in execute
    load_model(self.filepath,file_offset, context)
  line 3528, in load_model
    load_binary_model(file_object, context)
  line 2318, in load_binary_model
  line 2728, in build_model
    parent_ob =[parent_name]
KeyError: 'bpy_prop_collection[key]: key "pressure plate" not found'

location: <unknown location>:-1
It looks like Grimrock is fine with the parent node not existing (the model works ingame), but your importer is not. I changed the line to

Code: Select all

            parent_ob =, game_matrix_ob)
and the models import fine then. Not a big deal by any means, just thought I'd mention it. Thanks again for all the awesome work on this.

Re: Blender 2.71 - Importer / Exporter (1.4.4)

Posted: Sun Mar 15, 2015 7:46 am
by Isaac
Now that I have Blender working again, I really have to try out this import script. 8-)

Re: Blender 2.71 - Importer / Exporter (1.4.4)

Posted: Tue Jul 07, 2015 9:19 am
by DrVooDoo
How fix invert shadows?

Re: Blender 2.71 - Importer / Exporter (1.4.4)

Posted: Tue Jul 07, 2015 9:30 am
by minmay
Try inverting the model by scaling all axes by -1, then rotate back to its original orientation and flip normals. It will look the same in Blender but this will most likely fix that specific lighting issue.