Hello
I have created some diffusemaps for a new level Im working on. (walls and floor) but i cant get them to load. Tried to follow the retexturing-guide on wiki posted here but it mostly focused on retexturing one of the monsters.
I have:
1. created the textures
2. copied the "dungeon_wall_01" model from the log1 assets dir to my dungeons assets dir, and renamed it dungeon_wall_02
3. created a new material in the materials.lua:
defineMaterial{
name = "dungeon_wall_02",
diffuseMap = "mod_assets/textures/dungeon_wall_02_dif.tga",
specularMap = "assets/textures/monsters/brickwall_stone_root_spec.tga",
normalMap = "assets/textures/monsters/brickwall_stone_root_normal.tga",
doubleSided = false,
lighting = true,
alphaTest = false,
blendMode = "Opaque",
textureAddressMode = "Wrap",
glossiness = 65,
depthBias = 0,
}
4. Used the toolkit to assign this material to my "dungeon_wall_02" model (copy of dungeon_wall_01) and saved it
5. Edited the "tiles.lua" with this:
cloneObject{
name = "dungeon_wall_02",
baseObject = "dungeon_wall_01",
model = "mod_assets/models/dungeon_wall_02.fbx",
}
When I start up the dungeon editor I get the following error and I cant load my dungeon:
"Attempt to call global ´cloneObject´ (a nil value)"
Im new to this and if anyone would guide me it would be much appreciated. Spent 6 hours on this now so.. I suspect step 5 is the problem but I cant find any guides on this
Retexture objects
Re: Retexture objects
Switch cloneObject to defineObject and it should work.
You also need:
in the object definiton and a Model component added as well.
So, the definiton should look like:
You also need:
Code: Select all
material = "dungeon_wall_02"
So, the definiton should look like:
Code: Select all
defineObject{
name = "dungeon_wall_02",
baseObject = "dungeon_wall_01",
components = {
{
class = "Model",
model = "mod_assets/models/dungeon_wall_02.fbx",
material = "dungeon_wall_02"
}
}
}
Re: Retexture objects
Thanks! It works, the walls became very dark though. I even tried with a complete white diffuse map but that becomes medium to dark grey, the normalmap looks fine though. Maybe there are some other setting I should add in the material.lua or tile.lua?
Thanks again for helping
Thanks again for helping
Re: Retexture objects
Open the normal map in GIMP or PS and export as .dds with BC3nm/DXT5nm compression, that should fix it.Marsmyra wrote:Thanks! It works, the walls became very dark though.
If that doesn't work, open the model in the GMT and in the menu select Model -> Recalculate Normals -> Yes and that might work. After that, I'm lost.
Re: Retexture objects
Note that you don't need to create a new model if you want to change the material. You can use material property in Model component to override the material. For multi material objects there's even materialOverrides which takes a table for mapping from old material -> new material.
Re: Retexture objects
Remember, normalmap standard is a little bit different in LoG2 (purple --> green) + there is not update on Ctrl+R. For more info, read this:
viewtopic.php?f=22&t=8080
viewtopic.php?f=22&t=8080
I'm the Gate I'm the Key.
Dawn of Lore
Dawn of Lore