Texturing: Difference between revisions

From KSP 2 Modding Wiki
No edit summary
 
Line 1: Line 1:
KSP2 graphics improved a lot, and for that they used textures, for parts we can use up to 6 textures. Diffusion, Metallic, Occlusion, Normal, Emission and Paint Map, the later being a custom texture used by the [[Scenery - Standard (Opaque)]] shader.
[[Category:Part textures]]
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==
[[File:MK2_RCS_Block_diffuse_texture.png|thumb|287x287px|Diffusion texture for SORRY's MK2 RCS Block, this texture is overlayed with normal texture details giving it shadows and highlights]]
[[File:MK2_RCS_Block_diffuse_texture.png|thumb|287x287px|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.
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 ======
======Tips and Tricks======  


* The base color used by the game is 0, 0, 0.98 (HSV)
*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.
*The game overlays the diffusion texture with the ambient occlusion to be more RAM efficient.




Line 17: Line 18:




 
==Metallic texture==
== Metallic texture ==
[[File:MK2 RCS Block m.png|thumb|Metallic texture for SORRY's MK2 RCS Block, this texture features detailing visible only when downloaded|289x289px]]
[[File:MK2 RCS Block m.png|thumb|Metallic texture for SORRY's MK2 RCS Block, this texture features detailing visible only when downloaded|289x289px]]
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).
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).
Line 33: Line 33:




== Normal/Bump texture ==
==Normal/Bump texture==
[[File:MK2 RCS Block normal texture.png|thumb|SORRY's MK2 RCS Block normal texture, containing detailing such as metal edges, nails and small elevations|291x291px]]
[[File:MK2 RCS Block normal texture.png|thumb|SORRY's MK2 RCS Block normal texture, containing detailing such as metal edges, nails and small elevations|291x291px]]
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.
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.
Line 50: Line 50:




== Paint Map Texture ==
==Paint Map Texture==
[[File:MK2 RCS Block Paint Map Texture.png|thumb|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|285x285px]]
[[File:MK2 RCS Block Paint Map Texture.png|thumb|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|285x285px]]
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.
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.
[[Category:Parts modding]]
__FORCETOC__
__FORCETOC__

Latest revision as of 00:06, 3 August 2023

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.