This page will show you how to mod the materials within Elegos.
Create a folder called materials
inside of a mod folder. You should end up with a structure like <mod name>/materials
. Remember that in the main folder of your mod you need the file modinfo.json
.json
file and name it whatever you like. It doesn't really matter what it is named but best practices would be something descriptive and the same as the name of the material you are creating. i.e blue concrete.json
.<mod name>/materials
folder.Please note: These JSON objects will evolve over time to contain more metadata and more options for material modding
Type | Description | Example |
---|---|---|
String | Letters and Characters | "Name": "Simon" |
Bool | A True or False value | "AffectAlbedo": True |
Float | A whole or decimal number | "NormalScale": 2.45 |
Enum | A string from a specific choice of strings | "Shader": "HDRP/Lit" |
Color | Color in float RGBA format as a string. Each color value is between 0-1 . |
"BaseColor": "1.0,0,0,1" |
Vector | A string of either 2, 3 or 4 float values | "Scale": "1,1" |
Texture | Texture object that contains a path, a scale and an offset. | See below |
Contains the description for the texture that will be used, the file name, scale and offset.
Name | Type | Description |
---|---|---|
FileName |
String | Mandatory. Relative path to the image file for this texture. |
Scale |
Vector | Optional. A Vector2 for the scale of the texture when rendered. |
Offset |
Vector | Optional. A Vector2 for the offset of this texture when rendered. |
"BaseColorMap":
{
"FileName": "TX_BlueConcrete_Albedo.png"
}
"NormalMap":
{
"FileName": "TX_BlueConcrete_Albedo.png"
}
"MaskMap":
{
"FileName": "TX_BlueConcrete_Albedo.png"
}
If your images are in another folder, let's say <modname>/textures
your json file will look something like this
"BaseColorMap":
{
"FileName": "../textures/TX_BlueConcrete_Albedo.png"
}
"BaseColorMap":
{
"FileName": "TX_BlueConcrete_Albedo.png",
"Scale": "1,1",
"Offset": "0,0"
}
Since the v0.6 we support different types of materials and each has it's own specifications, it will always have a texture needed, but depending on the type of material (Lit, Decal or Nature) you'll need other information added.
This type make up for most of the materials present so far, examples of this are doors, walls, chests and so on. You'll find the list over here
Name | Type | Description |
---|---|---|
BaseColorMap |
Texture | An object that defines a new BaseColorMap texture. Also known as the Albedo or Diffuse, you'll find the description above this section |
BaseColor |
Color | Optional. Tint applied to the BaseColorMap |
Shader |
Enum | Mandatory. Values accepted: "HDRP/Lit" |
Override |
String | Mandatory. The name of the texture in game that you want to change |
Name |
String | Mandatory. A descriptive name for this material. |
ID |
String | Optional but STRONGLY recommended. A unique ShortGUID to identify this material. |
{
"BaseColorMap":
{
"FileName": "TX_BlueConcrete_Albedo.png",
"Scale": "1,1",
"Offset": "0,0"
},
"BaseColor": "0.4,0.4,0.8,1",
"Shader": "HDRP/Lit",
"Override": "M_WoodDoors",
"Name": "New concrete",
"ID": "roDF-mFLNkmBiYqCpyGj6A"
}
This JSON file contains all the metadata to uniquely identify a material and it's specific settings.
Name | Type | Description |
---|---|---|
BaseColorMap |
Texture | Mandatory. An object that defines a new BaseColorMap texture. Also known as the albedo or diffuse. |
NormalMap |
Texture | Optional. An object that defines a new NormalMap , a grayscale image that you use as a height map on your objects in order to give an appearance of raised or recessed surfaces. |
MaskMap |
Texture | Optional. An object that defines a new MaskMap , the mask map contains four grayscale Textures, one in each of its color channels. |
Shader |
Enum | Mandatory. Values accepted: "HDRP/Decal" |
NormalScale |
Float | Optional. Strength of the NormalMap |
BaseColor |
Color | Optional. Tint applied to the BaseColorMap (Attention: 0,0,0,0 might make it invisible) |
AffectAlbedo |
Bool | Optional. Does this Decal affect the underlying Albedo? |
AffectNormal |
Bool | Optional. Does this Decal affect the underlying Normal? |
AffectAO |
Bool | Optional. Does this Decal affect the underlying AO? |
AffectMetal |
Bool | Optional. Does this Decal affect the underlying Metal? |
AffectSmoothness |
Bool | Optional. Does this Decal affect the underlying Smoothness? |
Override |
String | Mandatory. The name of the texture in game that you want to change |
Name |
String | Mandatory. A descriptive name for this material. |
ID |
String | Optional but STRONGLY recommended. A unique ShortGUID to identify this material. |
{
"BaseColorMap":
{
"FileName": "TX_BlueConcrete_Albedo.png",
"Scale": "1,1",
"Offset": "0,0"
},
"Shader": "HDRP/Decal",
"Override": "M_D_Dirt_02",
"Name": "NewDecal",
"ID": "roDF-mFLNkmBiYqCpyGj6A"
}
{
"BaseColorMap":
{
"FileName": "TX_BlueConcrete_Albedo.png",
"Scale": "1,1",
"Offset": "0,0"
},
"NormalMap":
{
"FileName": "TX_BlueConcrete_Albedo_N.png",
"Scale": "1,1",
"Offset": "0,0"
},
"MaskMap":
{
"FileName": "TX_BlueConcrete_Albedo_Mask.png",
"Scale": "1,1",
"Offset": "0,0"
},
"NormalScale": 0.8,
"BaseColor": "0.4,0.4,0.8,1",
"AffectAlbedo": true,
"AffectNormal": true,
"AffectAO": false,
"AffectMetal": false,
"AffectSmoothness": true
"Shader": "HDRP/Decal",
"Override": "M_D_Dirt_02",
"Name": "NewDecal",
"ID": "roDF-mFLNkmBiYqCpyGj6A"
}
This JSON file contains all the metadata to uniquely identify a material and it's specific settings.
Name | Type | Description |
---|---|---|
AlbedoMap |
Texture | Mandatory. An object that defines a new AlbedoMap texture. Also known as the albedo or diffuse. |
NormalMap |
Texture | Optional. An object that defines a new NormalMap , a grayscale image that you use as a height map on your objects in order to give an appearance of raised or recessed surfaces |
PackedMap |
Texture | Optional. An object that defines a new PackedMap . |
Shader |
Enum | Mandatory. Values accepted: "HDRP/Nature Shaders/Tree Bark" |
Wind |
Bool | Optional. Is wind enabled? |
WindStrength |
Float | Optional. Values between ?? how strong the wind blows over this element |
TintColor |
Color | Optional. Tint applied to AlbedoMap |
Override |
String | Mandatory. The name of the texture in game that you want to change |
Name |
String | Mandatory. A descriptive name for this material. |
ID |
String | Optional but STRONGLY recommended. A unique ShortGUID to identify this material. |
{
"AlbedoMap":
{
"FileName": "TX_BlueConcrete_Albedo.png",
"Scale": "1,1",
"Offset": "0,0"
},
"Shader": "HDRP/Nature Shaders/Tree Bark",
"Override": "M_Shrubbery_01_Bark",
"Name": "New Nature Material",
"ID": "roDF-mFLNk7hRqqCpy546A"
}
{
"AlbedoMap":
{
"FileName": "TX_BlueConcrete_Albedo.png",
"Scale": "1,1",
"Offset": "0,0"
},
"NormalMap":
{
"FileName": "TX_BlueConcrete_Albedo_N.png",
"Scale": "1,1",
"Offset": "0,0"
},
"PackedMap":
{
"FileName": "TX_BlueConcrete_Albedo_packed.png",
"Scale": "1,1",
"Offset": "0,0"
},
"Wind": true,
"WindStrength": 3,
"TintColor": "0.4,0.4,0.8,1"
"Shader": "HDRP/Nature Shaders/Tree Bark",
"Override": "M_Shrubbery_01_Bark",
"Name": "New Nature Material",
"ID": "roDF-mFLNk7hRqqCpy546A"
}
Whilst a Materials ID is essentially a string that labels a material, we are currently using the material name in the game but this is likely to change to something more uniquely identfiable such as a ShortGUID. We've tried to be descriptive and as time goes on, this documentation can be updated with more examples/screenshots.
See below for a list of Material IDs currently available in Elegos. The thumbnails are just for a reference as to what is being modded/what will change.
Well, this is now slightly automated! Still need to manually upload the various images but at least can copy and paste most of it into here now. Be aware, this is not 100% complete until v0.6 comes out ~28th June 2022 due to the JSON format changing slightly when it comes to different material types and supporting multiple different shaders.
Please get in touch on Discord and let me know what materials/textures you want to mod. Maybe able to do it already or I can make sure it's in the next update.