Lost on how I can define a custom texture
Posted: Sun Nov 02, 2014 8:22 pm
First I want to say I have never done any graphics stuff. I am a coder, not a graphics guy. With that said though, I thought maybe I could test out creating a custom texture and putting it in a new object or maybe a tile... whatever I can do. I have read what I can here in the forum and I am not getting how to do it.
So I have a .dds file in the proper format (the no alpha one). I renamed it to .tga. From there, I have no idea where to go. I don't think I want to define a model because aren't those .fbx files? I just want to to see if I can get a new wall texture to render from my texture. Is something like this a material? Or is it a model? I did something like this in matrials.lua:
Now how do I get that into something I can place in the editor? I tried many things to basically clone an existing item and can't get anything to work. One example, from items.lua:
In this one, the editor doesn't blow up but it doesn't do anything either. I am lost. 
So I have a .dds file in the proper format (the no alpha one). I renamed it to .tga. From there, I have no idea where to go. I don't think I want to define a model because aren't those .fbx files? I just want to to see if I can get a new wall texture to render from my texture. Is something like this a material? Or is it a model? I did something like this in matrials.lua:
Code: Select all
defineMaterial{
name = "testMaterial",
normalMap = "mod_assets/textures/test.tga",
doubleSided = false,
lighting = true,
alphaTest = false,
blendMode = "Opaque",
textureAddressMode = "Wrap",
glossiness = 15,
depthBias = 0,
}
Code: Select all
defineObject{
name = "testItem",
baseObject = "castle_wall_cloth",
components = {
{
class = "Model",
material = "testMaterial",
},
}
}
