Texturing

From KSP 2 Modding Wiki

KSP2 graphics improved a lot, and for that they use textures, for parts we can use up to 6 textures. Diffusion, Metallic, Occlusion, Normal, Emission and Paint Map, the latter being a custom texture used by the Scenery - Standard (Opaque) shader.

Diffusion texture

Diffusion texture for SORRY's MK2 RCS Block, this texture is overlayed with normal texture details giving it shadows and highlights

KSP2's diffusion map is pretty simple, it's a simple "mask" telling the shader where each color should be. This texture is used only when no paint is applied, Also, this texture is shown where there's a blue pixel in the Paint Map texture.

Tips and Tricks
  • The base color used by the game is 0, 0, 0.98 (HSV)
  • The game overlays the diffusion texture with the ambient occlusion to be more RAM efficient.





Metallic texture

Metallic texture for SORRY's MK2 RCS Block, this texture features detailing visible only when downloaded

This texture tells the shader how reflective a given pixel should be, the higher the alpha on said pixel the more reflective it will be. Every pixel on this texture should be white and you should only change the opacity of the pixels. This is overwritten by the Paint Map's opacity when a pixel is marked as painted (either a green or red pixel).







Normal/Bump texture

SORRY's MK2 RCS Block normal texture, containing detailing such as metal edges, nails and small elevations

A bump texture is used to give or take height on a certain pixel, affecting how shadows are casted by and to it, also affects reflections. This texture should only contain detailing and its prefered over the use of extra meshes or geometry.








Paint Map Texture

finished Paint Map for MK2 RCS Block from SORRY. Note that in this image all channels are combined where cyan = Green and Blue and White = Red. Green and Blue

This texture is a custom made texture that the shader uses, by reading the RGBA values on each pixel it is able to make the parts paintable! The game uses alpha for the smoothness, blue to display the diffusion and metallic textures, green to display the base color and red to display the accent color in game.