[DONE] Grimrock Model Tookit

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
cougardod
Posts: 36
Joined: Sun Oct 28, 2012 2:29 am

Re: [WIP] Grimrock Model Tookit

Post by cougardod »

Not much of a modeler, but does it matter if the item is centered on the 9 square boxes and if so, how do I center it? I'm kind of jumping in the deep end, so bear with me please.

Image

Also, does anyone have any example files of what the file structure and the .lua files should look like in order for the model/textures to appear in the Model Viewer and in game? Thanks in advance.

P.S. this is an imported .obj file.
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: [WIP] Grimrock Model Tookit

Post by Isaac »

cougardod wrote:...
What modeler are you (or can you) use to edit the mesh? The GMT itself is not an editor (AFAIK). It can do limited scaling, but I believe that you would have to load the model into an editor to make changes to it; including the assignment of UV mapped textures.

If this is an 'already mapped' model, then you just need to define a texture in the material.lua file, and use the name of it in the GMT to assign that material to the mesh; using 'Material Find / Replace' in the TOOLS menu.

Material definition is described here: http://www.grimrock.net/modding/creating-custom-assets/

It is possible that the game will print an warning that an object outside of the tile that it is supposed to be inside of; so you'd want the object fully inside the tile.
User avatar
cougardod
Posts: 36
Joined: Sun Oct 28, 2012 2:29 am

Re: [WIP] Grimrock Model Tookit

Post by cougardod »

Using 3ds Max. Got it repositioned this morning, easily. Guess I was just staring at it too long last night. Think I will be able to figure out the materials.lua file when I get home tonight though.
Deadlylama
Posts: 22
Joined: Tue Oct 09, 2012 5:06 pm

Re: [WIP] Grimrock Model Tookit

Post by Deadlylama »

Isaac wrote:
cougardod wrote:...
What modeler are you (or can you) use to edit the mesh? The GMT itself is not an editor (AFAIK). It can do limited scaling, but I believe that you would have to load the model into an editor to make changes to it; including the assignment of UV mapped textures.

If this is an 'already mapped' model, then you just need to define a texture in the material.lua file, and use the name of it in the GMT to assign that material to the mesh; using 'Material Find / Replace' in the TOOLS menu.

Material definition is described here: http://www.grimrock.net/modding/creating-custom-assets/

It is possible that the game will print an warning that an object outside of the tile that it is supposed to be inside of; so you'd want the object fully inside the tile.
using the node transform dialog, you can set some sort of offset into non-animated models and even rotate/strech them without needing to open any modeling program.
Dungeon maker, scripter and modeling beginner
My first Wallset
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 »

@Isaac (and @Phitt): I'll take a look at the animations import (and DAE format) next, it appears that it's either not working correctly or is very fragile (I got a .x model animated in the game correctly - so it is possible!).

@Isaac: If you could send me any/all test data that's causing problems - I could take a look and then see if I can (a) figure out what's wrong or (b) find some settings that work properly. :) Also, if I can reproduce the "Object reference not set to an instance of an object" exception, then I might also be able to open up more avenues for animation import.

One thing to note is that different modelling software and file formats expect different 'handedness' as well as sometimes applying different meaning to 'X,Y and Z' (which is forward for instance). I expect this is where a lot of problems are coming from, so I intend to add some buttons to apply basic transforms to the model soon (rotate 90 degrees in a given direction, either by editing the vertices or updating the node transformations). I might also sneak in 'Node Editing' soon too, so you could select a node and 'replace mesh' and/or add/delete nodes.

@cougardod: You have 2 options, you can either open the model in 3DS Max and ensure that the model is centered (in X,Z) at the origin and then the bottom of the bed should rest on the floor. Alternatively, as @Deadlylama said, you could also open the model in the GMT, bring up the 'Node Transform Dialog' and type in some values in the last column of that matrix. Assuming you have a standard 3x3 identity matrix in the left, the top row on the last column is the 'X' translation, the second "Y" and the third "Z". That might not make much sense, but it basically means you can edit the matrix like so...

Code: Select all

1 | 0 | 0 | X
0 | 1 | 0 | Y
0 | 0 | 1 | Z
0 | 0 | 0 | 1
So an example to translate your model 0.5 units in X would be

Code: Select all

1 | 0 | 0 | 0.5
0 | 1 | 0 | 0
0 | 0 | 1 | 0
0 | 0 | 0 | 1
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: [WIP] Grimrock Model Tookit

Post by Skuggasveinn »

@JohnWordsworth

If I may be so bold as to ask for a feature :)
Nothing major, but can really help with the workflow.

In the Node Transformation dialog, can you add constrain proportions (you can click it or unclick it)
so if you input something into the scaling field it will populate the other 2 fields also
just the ones with X and ofcourse nothing at the last column.
X00
0X0
00X

(as you can guess I have been scaling alot and was thinking this would be a nice to have)

Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: [WIP] Grimrock Model Tookit

Post by crisman »

Small parenthesis: I've just installed win8 on my laptop and your program still works greatly! ;)
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: [WIP] Grimrock Model Tookit

Post by Neikun »

Neikun wrote: Addition:
Is it possible to have the file load memory and the file save memory different?
This would help when I load constantly from the asset pack, but save constantly into my models folder.
Just an extra thought on this;
By doing this, while making wallsets and especially wallset related objects, it will become much faster.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
cougardod
Posts: 36
Joined: Sun Oct 28, 2012 2:29 am

Re: [WIP] Grimrock Model Tookit

Post by cougardod »

OK, still having trouble with the textures...it looks fine in 3DS Max, but I must be exporting it wrong. How do I export it so that the Model Viewer will open the textures correctly?
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: [WIP] Grimrock Model Tookit

Post by Neikun »

In tools, settings, ensure that your asset pack is loaded in properly.
Ensure that your current dungeon is also loaded in the current dungeon field.

Any new texture will need to be defined using the defineMaterial{ script.
You need to make sure you're exporting your .dds images with compression: DXT5, format: RGBA8, and generate mipmaps ticked.
(Note: within the defineMaterial{ script, you will refer to them as.tga)
Then it's just a matter of going to tools, material find/replace, typing in the material of your choice, clicking Replace Material and reloading the Material Library
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
Post Reply