-
Notifications
You must be signed in to change notification settings - Fork 28
StaticModule: GrassColor2
Christian Bronk edited this page Nov 27, 2019
·
8 revisions
This Module replaces the texture and color of the specified mesh. the color is the same as the underground, but can also specified in the instance.cfg file.
You can access builtin textures as listed here when using the BUILTIN:/ prefex
All original KSC buildings use this module by default
This module takes 6 textures:
- NearGrass : Texture of the Grass surface when less than benddistance away
- FarGrass : Texture of the Grass surface when more than benddistance away
- BlendMask : Black areas in this texture are grass, red areas are tarmac
- Tarmac : The Concrete Texture at the KSC (red areas in the blendMask)
- ThirdTexture: Optional third texture (green areas in the blendMask)
- FourthTexture: Optional fourth texture (blue areas in the blendMask)
Notes:
You don't have to use concrete as the secondary texture. The Alpha channel in the Tarmac-, third- and fourth- Texture defines the intensity of the blend.
You can mix colors in the blendmask: if one color is below max, it is blended by the intensity over the other.
Blending priority: BackGround: Grass --> Tarmac --> Thirth --> Fourth
Exammple module:
MODULE
{
// Mandatory, always the same
namespace = KerbalKonstructs
name = GrassColor2
// Mandatory
GrassMeshName = name of the mesh where it should be applied
//
// everything below is optional. What is not defined gets the default parameter
//
DefaultNearGrassTexture = BUILTIN:/terrain_grass00_new // the texture to use when near
DefaultNearGrassTiling = 1 // the tiling for near grass
DefaultFarGrassTexture = BUILTIN:/terrain_grass00_new_detail // the texture to use when far
DefaultFarGrassTiling = 1 // the tiling for far grass
DefaultFarGrassBlendDistance = 100 // distance in meters where the neargrass texture should be blended into the far grass texture
DefaultTarmacTexture = BUILTIN:/ksc_exterior_terrain_asphalt // red areas in the blendmask use that. at the ksc this is the concrete, but can be anything (if texture three and four are empty it is the white area)
DefaultTarmacTiling = 10, 10 // the tiling of the secondary texture (concrete or something else)
DefaultTarmacColor = 1,1,1,1 // Default Color for concrete Texture
DefaultTarmacTileRandom = False // Should be the secondary Texture be random tiled
DefaultBlendMaskTexture = BUILTIN:/blackSquare // the blend mask to use... all black means no concrete
DefaultThirdTexture = // third texture name
DefaultThirdTextureColor = 0,0,0,0 // set to 1,1,1,1 to activate the texture, the alpha channel controls the obacity
DefaultThirdTextureTiling = 1 // Tiling parameter as above
DefaultThirdTextureTileRandom = False // same as Tarmac
DefaultFourthTexture = // see above
DefaultFourthTextureColor = 0,0,0,0 // see above
DefaultFourthTextureTiling = 1 // see above
DefaultFourthTextureTileRandom = False // see above
}