[Solved] Cannot make a floor object from heightmap materials

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

[Solved] Cannot make a floor object from heightmap materials

Post by MrChoke »

This seemed simple to me but it didn't work. We only have a portion of the heightmap-based tiles as spawnable objects. "forest_ground_01" for example. That is the same as the "forest_ground" tile. But take a tile like "swamp_ground". Where is the "swamp_ground_01" object? We don't have it. I tried to create it and failed.

What I did was:
1) Exported the "forest_ground_01" model to an OBJ using Blender.
2) Copied over the material definition for "swamp_ground_01" which is the "heightMapMaterial" defined for the "swamp_ground" tile
3) Loaded the OBJ into GMT, set the material to my new "swamp_ground_01". Saved it as a new model, "swamp_ground_01"
4) Opened up my dungeon, placed the new "swamp_ground_01" object AND....... it doesn't render.

Am I missing something? Can we not use heightmap-based materials in objects?

Side note: Am I the only one who is CONSTANTLY fighting the fact that we do not have the material files yet for Grimrock 2? I am about ready to shelf the months of effort I have done until we do. And its because of "head-banging" problems like this that are causing it. If we had the actual TGA files that make the materials, I can update them, rename them, etc... and make all of this much easier.
Last edited by MrChoke on Sat Jan 10, 2015 6:24 pm, edited 1 time in total.
Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Re: Cannot make a floor object from heightmap materials

Post by Batty »

swamp_ground tile = swamp_ground object
swamp_ground2 tile = swamp_ground object + swamp_grass_01 object

They're right there in the editor, I just placed them on the map, don't understand your dilemma. :?
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Re: Cannot make a floor object from heightmap materials

Post by MrChoke »

Batty wrote:swamp_ground tile = swamp_ground object
swamp_ground2 tile = swamp_ground object + swamp_grass_01 object

They're right there in the editor, I just placed them on the map, don't understand your dilemma. :?
Batty, there is no swamp_ground object in the editor. If you have one maybe you had somehow added it.

HOWEVER, I did just figure out the problem. For some reason when the forest_ground_01 model is exported, it gets exported upside down. I caught it in GMT, flipped it and it worked. It was easy after all.
Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Re: [Solved] Cannot make a floor object from heightmap mater

Post by Batty »

Oh yeah, you're right, I did make one, here's how you do it, very easy:

Code: Select all

defineObject{
   name = "swamp_ground",
	baseObject = "forest_ground_01",
	components = {
		{
         class = "Model",
         model = "assets/models/env/forest_ground_01.fbx",
			materialOverrides = { forest_ground_01 = "swamp_ground_02" }
		}
	}
}
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Re: [Solved] Cannot make a floor object from heightmap mater

Post by MrChoke »

Agreed, it is actually easy. I made ones now for almost all heightmap-only textures. You just need to do a flip 180 on the Z-axis for the model in GMT. No idea why.
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Re: [Solved] Cannot make a floor object from heightmap mater

Post by MrChoke »

Batty wrote:Oh yeah, you're right, I did make one, here's how you do it, very easy:

Code: Select all

defineObject{
   name = "swamp_ground",
	baseObject = "forest_ground_01",
	components = {
		{
         class = "Model",
         model = "assets/models/env/forest_ground_01.fbx",
			materialOverrides = { forest_ground_01 = "swamp_ground_02" }
		}
	}
}
Wait a sec. You did it completely different than me. materialOverride eh? Hmmmmm better. That would have helped me with other stuff..... Thanks!
Post Reply