[DONE] Grimrock Model Tookit

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] Grimrock Model Tookit

Post by JohnWordsworth »

Another evening and I've found another hour to cram in a bit more work on the Model Toolkit - Huzzah! This evening, I present to you - a fully textured mace added to Grimrock from TurboSquid (original model here).

Image

Version 0.1.0.5 is available from here. Direct download here. Please note I think I'm using the 'Click Once' install system that Microsoft inflict on us free C# users properly now. You should be able to download the setup.exe file which will then download the latest version automatically. Afterward, when you start the app, I presume it does a little check on the internet first to see if a new version is available. Hey ho - It'll be interesting to see what Microsoft Devilry occurs when I release the next version anyway! Notes...

1. Again, you will need to uninstall the current version from your control panel before installing this one. However, it should auto-update after that whenever I upload a new one!

2. Improvements to OBJ import scripts. The app no longer crashes if you import a model with UV Texture Coordinates and/or without Normals. Note, Normals (for lighting) will be generated by my model importer, but will likely be dodgy as I've done so in a very cheap way. If you import a model without UV coordinates, then you obviously won't be able to add a texture to the object in game.

3. I've noticed that I think I need to flip the UV coordinates on imported models vertically. Grimrock must read them opposite to OBJ files I think. I want to confirm this before I change it in the app, so for now - you need to flip your textures up-side-down (vertically) in order for the coordinates to match up correctly in game.

4. Importing the Mace from Turbosquid wasn't trivial - but wasn't too hard. If anyone is desperate to import some models at this point, I can write out a tutorial, but I aim to make the process much easier in the future through the app - so I don't want to waste 'forum paper' by typing an even longer post!
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
Komag
Posts: 3654
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: [WIP] Grimrock Model Tookit

Post by Komag »

nice progress, the grimrock modding future is bright!
Finished Dungeons - complete mods to play
User avatar
Tomm
Posts: 36
Joined: Sat Apr 14, 2012 2:15 pm

Re: [WIP] Grimrock Model Tookit

Post by Tomm »

I still get the exception when I try to import any .OBJ file :/

+ also tried importing that mace.

anyone else tried importing .obj ? maybe there are some missing dependencies or something?
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] Grimrock Model Tookit

Post by JohnWordsworth »

Hi Tomm, that's strange - it was an issue before that it has issues if there were no texture coordinates or normals in the file, but it should be ok on that fron now. Are you sure that you are definitely running 0.1.0.5 installed from the .exe and not the zip? You'll definitely need to uninstall the previous version from the control panel first.

Good thoughts about the dependencies too though - I'm try running it on my laptop soon and see if it works there!
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
Tomm
Posts: 36
Joined: Sat Apr 14, 2012 2:15 pm

Re: [WIP] Grimrock Model Tookit

Post by Tomm »

Hi, yes I uninstalled the 0.1.0.4 first and installed 0.1.0.5 by running setup.exe
I hope it gets solved soon!
Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Re: [WIP] Grimrock Model Tookit

Post by Batty »

Helllllp!!! (graphics noob)

I'm trying to retexture items simply (like the green ice lizard)

I followed all the instructions -- saved the copied model file, saved modified texture files, and made new item.lua & materials.lua entries.

But the items appear completely black if I use the new textures and if I use the original Grimrock textures (and copied model) it appears completely white...

any help would be much appreciated.
User avatar
Isaac
Posts: 3172
Joined: Fri Mar 02, 2012 10:02 pm

Re: [WIP] Grimrock Model Tookit

Post by Isaac »

Here is what results I have...

I can open a .model file with the tool kit, and export it as an .OBJ (which is absolutely fantastic 8-)).

I find that if I import the converted OBJ into Blender, then [immediately] export it to OBJ, and load it into the toolkit; it does not make the round trip. The tool kit chokes on the exported obj; However... If I instead load the Blender exported OBJ into say... Nifscope, then export it as an OBJ... The tool kit will open it, but texturing seems to get affected, and the model is solid black. This imported OBJ does save out to .model format and does work in the game ~but shows as black ~even when used in a declared object with a custom overridden material.

I think Blender is at fault; but I don't know that.

Blender loads it's own OBJs back into it just fine (with textures).

Update: I loaded the 'black' [Blender] exported mesh into Meshlab and re-exported as an OBJ, and the Tool kit likes this one... It imports, but is shaded white; In the game the mesh looks pearlescent (not supposed to, but this is an improvement :)). The pearlescent mesh has dynamic shadows.

Update 2: So, I sort of assumed that once I saw the dynamic shadows, it worked, but had something wrong with the material definition.
I looked close and found a typo, fixed it; and now I have a textured mesh in the game 8-)

... But it looks like (at least I think) the model's UV is flipped/mirrored... It's upside down; (and has no Normal Map).
Image * Image

(Flipping the texture maps doesn't quite fix it. :()
Image
User avatar
Komag
Posts: 3654
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: [WIP] Grimrock Model Tookit

Post by Komag »

those are some freaky looking pillars! But I'm impressed that you got them working at all! ;)
Finished Dungeons - complete mods to play
User avatar
Isaac
Posts: 3172
Joined: Fri Mar 02, 2012 10:02 pm

Re: [WIP] Grimrock Model Tookit

Post by Isaac »

Komag wrote:those are some freaky looking pillars! But I'm impressed that you got them working at all! ;)
8-)
It's the toolkit though; wouldn't have managed anything so quickly without it.
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: [WIP] Grimrock Model Tookit

Post by JohnWordsworth »

@Tomm: Hmm, that's a tad annoying. I should get another hour or two on it tonight, which will also give me time to test it with a wider selection of models / content. I definitely got your cube from Blender imported last night, and I also imported an object or two from Blender (with and without normals). But it's all so hasty (and I'm quite tired in the evenings sometimes) so it's likely something silly at my end!

@Batty: It might be worth checking that your new texture files are exported as .DDS files using correct settings. I'm afraid I don't know exactly what is/isn't valid for the DDS files, but when exporting with GIMP I set Compression to BC3/DXT5, I leave Format to Default and I tick "Generate Mipmaps". This seems to work for me.

@Isaac: That's interesting about the round-trip. I hope to make this more robust over the next few 'programming sessions' I get on it, so your reports of what does/doesn't work is really useful. I'll have to checkout MeshLab as that sounds like it could also be a useful tool for me in debugging the issues that are arising with .OBJ files. Really cool to see the screenshots with the new pillars in the game! :) I feel that we're on the cusp of getting most of the bugs ironed out and having a reliable system for importing/exporting meshes to/from GrimRock! :D Oh yeah, you're right about the UV Coordinates, I'll see what I can do about sorting those out in my next session of coding.

--

Over the next few days I hope to (a) crack on and sort out the OBJ import/export scripts before either (b) moving on to add FBX import/export (while OBJ files are great because they are simple, they unfortunately do not store any Bone information - so are useless for creating new monsters) or (c) rendering textures in the preview window so that you can see (roughly - the lighting won't be the same) how they will look before importing your models into the game itself.

Always welcome any suggestions as to what people would like to see next in the app!
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
Post Reply