[DONE] Grimrock Model Tookit

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Isaac
Posts: 3089
Joined: Fri Mar 02, 2012 10:02 pm

Re: [DONE] Grimrock Model Tookit

Post by Isaac » Sun May 02, 2021 2:04 am

minmay wrote:
Sun May 02, 2021 1:36 am
That link goes to a Blender 2.7 version of the plugin. This is the 2.9 version.
:oops:
Thanks.

wagtunes
Posts: 311
Joined: Sun Feb 04, 2018 11:04 pm

Re: [DONE] Grimrock Model Tookit

Post by wagtunes » Sun May 02, 2021 2:30 am

Okay, I may be venturing into an area where I'm out of luck.

Here is what I did and here is what I'd like to do.

1. I created a model in Blender using the Grimrock addon. It's a cube with 3 different colors.

2. I exported it and then brought it into the dungeon after making the script for it. I'm not concerned about the icon at this point so I just used any icon. I'm only interested in the model how it looks on the floor.

3. On running the dungeon, the model was completely white on all sides. None of the colors saved with the model.

4. So I brought it into the Grimrock Model Toolkit and assigned any materials to it just to see if they would take. They did. The model is now colored. However, it's not the colors I want.

So, I am going to assume that I have to somehow import the 3 different materials that I want into the Grimrock Model Toolkit because what I want isn't in there.

Is this even possible? If not, how do I get this model to have the 3 colors that I created it with? What steps am I missing?

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

Re: [DONE] Grimrock Model Tookit

Post by minmay » Sun May 02, 2021 2:41 am

In Grimrock, models and textures are stored separately, you can't put both of them in the same file. You need to save your texture as a .dds file (DXT1, DXT3, DXT5, or uncompressed RGBA8 formats will work, and it needs to have mipmaps), and define a material that uses that texture with defineMaterial. Look at assets/scripts/materials.lua for examples.
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.

wagtunes
Posts: 311
Joined: Sun Feb 04, 2018 11:04 pm

Re: [DONE] Grimrock Model Tookit

Post by wagtunes » Sun May 02, 2021 3:10 am

minmay wrote:
Sun May 02, 2021 2:41 am
In Grimrock, models and textures are stored separately, you can't put both of them in the same file. You need to save your texture as a .dds file (DXT1, DXT3, DXT5, or uncompressed RGBA8 formats will work, and it needs to have mipmaps), and define a material that uses that texture with defineMaterial. Look at assets/scripts/materials.lua for examples.
Figured that out. Got it. Works like a charm. Yeah, it's a lot of work and getting things to look just right in the game is a bit of trial and error because what you see in the various graphics programs isn't necessarily what you get in LoG. So it took me a few tries to get things just so.

Keeping this simple and sticking to items and objects (no way do I even attempt to tackle monsters with all their moving parts) I shouldn't have any problems from here on in. Errors are all gone. Now it's just a matter of design and how picky I want to be.

wagtunes
Posts: 311
Joined: Sun Feb 04, 2018 11:04 pm

Re: [DONE] Grimrock Model Tookit

Post by wagtunes » Sun May 02, 2021 6:15 pm

Okay, so much for objects being simple. This one has me totally stumped.

If I'm working with a cube shaped or an object with a flat side, no problem. It renders fine and when I bring it into the model toolkit to apply textures, its lying flat on the z axis. In other words, on the floor.

However, when I render a spherical object and bring it into the model toolkit, half the model is above the floor and half is below the floor. In other words, it's cut in half.

Okay, I figure all I have to do is bring it back into Blender and raise it up the Z axis a bit. Well, I did that and resaved. Doesn't matter. Upon bringing it into model toolkit, half is above the floor and half is below the floor. So instead of getting a round spherical object inside the game, I get a half sphere or like an upside down cone.

What is causing this and how do I fix it?

User avatar
Isaac
Posts: 3089
Joined: Fri Mar 02, 2012 10:02 pm

Re: [DONE] Grimrock Model Tookit

Post by Isaac » Sun May 02, 2021 6:23 pm

This should be correctable in the GMT itself.

If you upload the model I will examine it, or alternatively, you could post screenshots.

User avatar
maneus
Posts: 244
Joined: Mon Jun 17, 2013 10:42 pm
Location: Switzerland

Re: [DONE] Grimrock Model Tookit

Post by maneus » Sun May 02, 2021 6:24 pm

You can raise it in the Grimrock Model Toolkit(GMT).

Left near "Translate" are 3 fields, you can type inside a number. After a click on "Translate", the model will move in the direction and the amount, you entered in the fields. A number of "1" will be one square. The field, your model is placed on, has a wide of "3".

In Blender you have to set the origin of your model not to the center of your model. The origin of your model has to be set to the world origin before you export your model.

User avatar
Isaac
Posts: 3089
Joined: Fri Mar 02, 2012 10:02 pm

Re: [DONE] Grimrock Model Tookit

Post by Isaac » Sun May 02, 2021 6:37 pm

Definitely.
Image

wagtunes
Posts: 311
Joined: Sun Feb 04, 2018 11:04 pm

Re: [DONE] Grimrock Model Tookit

Post by wagtunes » Sun May 02, 2021 6:44 pm

maneus wrote:
Sun May 02, 2021 6:24 pm
You can raise it in the Grimrock Model Toolkit(GMT).

Left near "Translate" are 3 fields, you can type inside a number. After a click on "Translate", the model will move in the direction and the amount, you entered in the fields. A number of "1" will be one square. The field, your model is placed on, has a wide of "3".

In Blender you have to set the origin of your model not to the center of your model. The origin of your model has to be set to the world origin before you export your model.
Thanks. It's now sitting on the floor. One last problem. I'm hoping I can do this inside GMT but I can't tell by looking at the controls. Translate doesn't do it.

The sphere is now taller than it is wider. This wasn't noticeable in Blender. In fact, the 2D render appears that it is wider than taller so that alone confuses me.

Anyway, instead of the sphere standing on its feet, for lack of a better word, I'd like to lay it on its back. In other words, tilt it over. Is there a control in GMT that will do this or will I have to go back into Blender to reorient the sphere?

** EDIT ** I figured it out. It's through the matrix/ Trial and error got me there.

Post Reply