1. What are DefaultTextures ?
As the name allready says, they are basic Texture-shaders, bundled with base Content. Its all based on Smoths Lua-Texture-Shader.
There are four of them at the Moment:
- Rubber
Renders a Object as a black rubber like type
Iron:
Shows a object as a single piece of perfect iron.
Color:
Renders the whole piece, in the specified colour and second colour. Usefull for Gunports and Lights.
PaintedMetall:
Renders a piece, per quad as Coloured Textured surface, with the borders beeing abbrassed by use
TeamPaintedMetall:
Same as PaintedMetall but in Team Colour
First you need a model, thats several seperate pieces.
Do not specify a texture for your unit in UpSpring or Blender.
Now go into the Unitdef of the unit that uses the model.
Create a Tag called CustomParams={} if you did not see one allready.
Inser the following Code into the CustomParams Table.
Code: Select all
CustomParams={
DefaultTexture={
["TankWhee2"]="Rubber",
["TankWhee1"]="Rubber",
["TankWhee3"]="Rubber",
["TankWhee4"]="Rubber",
["TankBody"]={type="PaintedMetall", colour={r=128,g=128,b=128}}
["TankTop"]="TeamPaintedMetall"
}
}
One final information- the painted Metall TextureShader is applied per Quad, which means, it will look better, if that part of the modell consists of relative huge polygons. Of course the same System can be applied to features, within the limitation, that every feature consists of just one piece.
DefaultTextureShaders are part of Spring 103.0 upwards.
Have fun making your own game. Its easy again.
PS: Will update with photos later.
Thanks goes to smoth and gajop.
If you got any questions, post them below.