Page 1 of 1

[Solved] Cannot make a floor object from heightmap materials

Posted: Sat Jan 10, 2015 4:53 pm
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.

Re: Cannot make a floor object from heightmap materials

Posted: Sat Jan 10, 2015 5:48 pm
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. :?

Re: Cannot make a floor object from heightmap materials

Posted: Sat Jan 10, 2015 6:05 pm
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.

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

Posted: Sat Jan 10, 2015 7:22 pm
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" }
		}
	}
}

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

Posted: Sat Jan 10, 2015 8:19 pm
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.

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

Posted: Sat Jan 10, 2015 8:22 pm
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!