MeshMaterialModifications - Generically tweak textures and shaders of meshes

Description

This mod can be used to generically modify mesh materials’ textures, shaders and parameters.
The changes are made to the original data, no custom variations are created (may be added later).

You can use this mod to easily experiment with materials and shaders, try out tweaks…
Or you can implement this in a bigger mod/run it alongside the mod if it needs certain changes to meshes (for example a “stealth” humvee, or a more realistic, black M4).

Usage

Specify what parameters to modify or add in the config.lua file. The format of the modifcations is as such:

[<MeshAsset_Guid>] = {
		VARIATION_HASH = <ObjectVariationHash>  -- defaults to 0 if not specified
		MATERIALS = 
			[<MeshMaterial_Index>] = {
				SHADER = {
					TYPE = <ParameterModificationType>,
					NAME = <ShaderGraph_Name>, -- optional
					PARAMETERS = {
						<VectorShaderParameter_Name> = { TYPE = <ShaderParameterType>, VALUE = <Vec4> }
					}
				},
				TEXTURES = {
					TYPE = <ParameterModificationType>,
					PARAMETERS = {
						<TextureShaderParameter_Name> = <TextureAsset_Name>,
					}
				}
			}
		}
	},

Theres also some examples already in the config file for demonstration

Download

The latest version can be on Github:

7 Likes

2 Likes

i love it amazing work

1 Like