Page 13 of 74
Re: [WIP] Grimrock Model Tookit
Posted: Wed Oct 03, 2012 12:51 am
by Isaac
Blichew wrote:What am I doing wrong ?
If I had to guess (and that's all it is), I think it might be that the lever's are animated meshes, and the toolkit does not support them properly yet. I have imported the wall_lever before, and all I got in to Blender was the lever [cylinder] itself.
My suggestion to anyone planning to import custom models later, is to define all of your dungeon assets without [or comment out] the 'model=' override; use them in place, then replace the object definition later on when we have animated model support in the toolkit.
** About Blender: I have not seen a mesh that displays in Object Mode, but not in editor mode ... (Except... maybe when using linked appended models that exist in a different .Blend file; but this isn't what you have).
Has anyone tried re-modeling stuff from original asset pack ?
Yes. Next on my list is to alter the Iron_Door model to not clip the pull-chain on one side ~although I do believe that Juho is doing this for the Asset Pack ~when updated.
Re: [WIP] Grimrock Model Tookit
Posted: Wed Oct 03, 2012 1:08 am
by Blichew
Thanks for the reply.
I've managed to import it into blender (I've re-exported the OBJ file(s) one more time, maybe something went wrong the other time). Here's what I got:
1. Model is imported (without the cylinder, just a "console") - I can switch to edit mode.
2. I used the Unwrap function (UV Mapping is the only method I'm somewhat familiar with right now) and imported a texture (used dungeon_lever_dif.dds) but it seems impossible for me at the moment to "map" the many "faces" (like 40 or so) from the model to the elements of the texture (there are only 3 parts of it - cactus from the youtube tutorial was muuuuch easier
). All I did in terms of editing the model was to make whole model somewhat "deeper" - so just a vertex stretch, noting unusual.
Oh well, I guess I'll start it again (export -> modify -> import) with easier model. Do you have any suggestions ? What are the basic steps that I should complete/pay attention to ?
Re: [WIP] Grimrock Model Tookit
Posted: Wed Oct 03, 2012 1:09 am
by JohnWordsworth
Hi @Blichew, the first thing to note is that the toolkit is very much a work in progress and I've not yet figured out all of the odd bits yet. With that in mind though...
1. Why does it export 2 OBJ files?
At the moment I simply export 1 OBJ file per mesh in the .model file. Most files only have one, but a few have two. These are a problem going back to .model format at the moment, as there is no way to load multiple OBJ files into one .model file. There will be soon though (I'll add the ability to import an OBJ into a node, instead of just a new file).
2. Why is there no edit mode?
That's weird. I have imported single mesh files before and they load into edit mode just fine. I have only tested one or two though. @Endzeit makes a good point - ensure that you only have one object selected whey of try to enter edit mode instead of both.
Sorry I can't give you a more definitive answer, but it's only been in development for about 10 days - and even then just when I get some spare time after work! However, it should still support a full round trip to/from blender now, it's just very fiddly!
@Isaac: You're right. Anything animated is trouble at the moment. When I've tidied up DirectX rendering and texture support, I hope to move on to FBX file format support (which supports multiple objects and bones much better than OBJ) and then get the animation support in. Then it's just a case of making it all more friendly to use!
Re: [WIP] Grimrock Model Tookit
Posted: Wed Oct 03, 2012 1:14 am
by JohnWordsworth
Sorry, out of order posting! The imported mesh should already have the relevant UV texture coordinates loaded from the original mesh (Oooh, I don't know if I invert these properly on export yet), so you should just be able to load the relevant texture from the asset pack in blender and it will properly map. Ie. no need to unwrap again.
There are extra vertices (many vertices at the same point sometimes) with different normals and the like so this might be confusing in blender (although it might tidy them up on import).
Re: [WIP] Grimrock Model Tookit
Posted: Wed Oct 03, 2012 1:28 am
by Blichew
JohnWordsworth wrote:Sorry, out of order posting! The imported mesh should already have the relevant UV texture coordinates loaded from the original mesh (Oooh, I don't know if I invert these properly on export yet), so you should just be able to load the relevant texture from the asset pack in blender and it will properly map. Ie. no need to unwrap again.
There are extra vertices (many vertices at the same point sometimes) with different normals and the like so this might be confusing in blender (although it might tidy them up on import).
So what you're saying is that if i import only one obj file (along with textures - they should be assigned to the material, right? So, theorethically I don't need to tamper with _spec, _diff and _normal D dds files?)
It should be then possible to reimport rhe model under different name (from one obj file, so no handle) without changing materials/texture references in cloned object definition - just the model would change, aye?
Re: [WIP] Grimrock Model Tookit
Posted: Wed Oct 03, 2012 1:33 am
by JohnWordsworth
If you're thinking for a coin slot - that should theoretically work
. You just need to assign the imported model the right material with the material changer dialog and the textures should be ok. You are in the guinea pig wave, soon promises at this stage! :p
Re: [WIP] Grimrock Model Tookit
Posted: Wed Oct 03, 2012 8:09 pm
by Juppstein
Short question since I did not find the answer in the forum so far:
Getting stuff into Blender works good so far but I have the feeling that either the toolkit or Blender is scaling the models up by a few magnitudes because when I re-import the model from Blender into the toolkit it looks like the imported model is much bigger than the original from the dat file.
Am I doing something wrong here in Blender or is it by the nature of the Toolkit/importer?
Re: [WIP] Grimrock Model Tookit
Posted: Wed Oct 03, 2012 8:17 pm
by JohnWordsworth
Models stored in grimrock's .model format are also stored with a transformation matrix, so many models are actually stored 100x bigger than they need to be and then there is a little bit of info in the file which tells the engine to scale it down to the correct size.
Unfortunately, .OBJ files do not have a similar matrix, and GMT doesn't resize the vertices on export - so you get the original (100x bigger) mesh. You can either (a) scale it down in Blender manually to the correct size or (b) open the original .model file, click on 'Tools -> Node Transform Matrices' (can't remember the exact title, not at home at the moment), write down the transform matrix of 12 numbers from there and put them back into your new model. This will be easier in the future - but it's not automatic at the moment I'm afraid.
Re: [WIP] Grimrock Model Tookit
Posted: Wed Oct 03, 2012 8:42 pm
by Juppstein
Thanks for the feedback John.I think I'll stick to the way of adding the info back to the re-imported model. That would also keep it in line to how the rest of the meshes are treated. It's a bit of extra work on my side but at least I'll stay in the norm.
Re: [WIP] Grimrock Model Tookit
Posted: Wed Oct 03, 2012 10:51 pm
by JohnWordsworth
When I next get to sit down with the code, I hope to add a 'replace node from OBJ' option, so you can keep a model intact and just tweak one mesh in that model. If I don't get time this evening, I should be back on the coding wagon tomorrow!