- Messages
- 124
- Country
I have been trying to get the Color Multipliers in Blender2MSFS to work in MSFS. After some experimentation, I do not believe this is implemented completely in Blender2MSFS and have found a workaround.
To provide context, I am talking about this panel located near the top of the MSFS Material Params panel:
In this panel, the Albedo Color value is the equivalent of the Base Color described in the FlightSim Material and glTF Materials sections of the MSFS SDK Documentation. According to the documentation, this value colors or tints a material applied to an object in MSFS. If a texture is assigned, the value is multiplied with the texture's color values. In this case, "multiplied" means how it is blended with another value just like the Multiply blending mode in Photoshop and other graphics packages. This is important because it allows you to recolor textures which allows for reuse of a texture. In other words, you can reduce the number of textures used by your scenery by recoloring similar materials in the sim rather than using multiple DDS files. I discovered this while investigating how Asobo textured their buildings and found many of them used tiled materials located in the asobo-modellib-texture package. Many of these textures are white or light grey but, when rendered in MSFS, they take on a variety of colors. This effect is achieved through the Base Color or Albedo Color property.
With Blender2MSFS, the Albedo Color property sets the color of an object if a texture is not assigned. For example, if you were to just create a cube, assigned the MSFS Standard material, change the Albedo Color property to red, exported the object using Blender2MSFS, and loaded into MSFS, you would see a red cube. Now, if you assign a texture to the cube and export it again, the texture will override the red color. This is not the way it is supposed to work. Instead, the red should be blended/multiplied with the texture's color(s) in MSFS. The reason why this is not working has to do with what is being exported by Blender2MSFS.
Looking at the glTF created by Blender2MSFS, our red cube's material without a texture assigned would look like this:
The baseColorFactor represents the value in the Albedo Color field in the Color Multipliers panel and is an RGBA value. Once a texture is assigned the material, the glTF created by Blender2MSFS looks like this:
Notice that the baseColorFactor has been replaced by baseColorTexture. This is not correct. Instead, the output should contain both the baseColorFactor and the baseColorTexture, and it should look like this:
As a real world example, I created a box and assigned three materials to it:
The face without a texture appears yellow as it should. The two other faces, however, are white (the base color of the texture) and are not tinted blue or red. This is because the baseColorFactor is not exported for the materials where a texture has been assigned. However, if I edit the glTF file to include the baseColorFactor, I get this which is what I expected:
Please do not misconstrue my post as criticism of Blender2MSFS. This addon makes so much possible and I am so appreciative for it. Instead, I hope this post documents an improvement that could be made in a future release and a workaround (editing the glTF) for those that want to make use of this powerful feature in MSFS.
Let me know if you have any questions or other thoughts on this.
To provide context, I am talking about this panel located near the top of the MSFS Material Params panel:
In this panel, the Albedo Color value is the equivalent of the Base Color described in the FlightSim Material and glTF Materials sections of the MSFS SDK Documentation. According to the documentation, this value colors or tints a material applied to an object in MSFS. If a texture is assigned, the value is multiplied with the texture's color values. In this case, "multiplied" means how it is blended with another value just like the Multiply blending mode in Photoshop and other graphics packages. This is important because it allows you to recolor textures which allows for reuse of a texture. In other words, you can reduce the number of textures used by your scenery by recoloring similar materials in the sim rather than using multiple DDS files. I discovered this while investigating how Asobo textured their buildings and found many of them used tiled materials located in the asobo-modellib-texture package. Many of these textures are white or light grey but, when rendered in MSFS, they take on a variety of colors. This effect is achieved through the Base Color or Albedo Color property.
With Blender2MSFS, the Albedo Color property sets the color of an object if a texture is not assigned. For example, if you were to just create a cube, assigned the MSFS Standard material, change the Albedo Color property to red, exported the object using Blender2MSFS, and loaded into MSFS, you would see a red cube. Now, if you assign a texture to the cube and export it again, the texture will override the red color. This is not the way it is supposed to work. Instead, the red should be blended/multiplied with the texture's color(s) in MSFS. The reason why this is not working has to do with what is being exported by Blender2MSFS.
Looking at the glTF created by Blender2MSFS, our red cube's material without a texture assigned would look like this:
Code:
"name" : "Red-Material",
"pbrMetallicRoughness" : {
"baseColorFactor" : [
1,
0,
0,
1
],
"metallicFactor" : 0,
"roughnessFactor" : 0.5
}
The baseColorFactor represents the value in the Albedo Color field in the Color Multipliers panel and is an RGBA value. Once a texture is assigned the material, the glTF created by Blender2MSFS looks like this:
Code:
"name" : "Red-Material",
"pbrMetallicRoughness" : {
"baseColorTexture" : {
"index" : 4,
"texCoord" : 0
},
"metallicFactor" : 0,
"roughnessFactor" : 0.5
}
Notice that the baseColorFactor has been replaced by baseColorTexture. This is not correct. Instead, the output should contain both the baseColorFactor and the baseColorTexture, and it should look like this:
Code:
"name" : "Red-Material",
"pbrMetallicRoughness" : {
"baseColorFactor" : [
1,
0,
0,
1
],
"baseColorTexture" : {
"index" : 4,
"texCoord" : 0
},
"metallicFactor" : 0,
"roughnessFactor" : 0.5
}
As a real world example, I created a box and assigned three materials to it:
- A material with a yellow Albedo Color and no texture.
- A material with a blue Albedo Color and a white corrugated metal texture.
- A material with a red Albedo Color and the same white corrugated meta texture I used with the blue one.
The face without a texture appears yellow as it should. The two other faces, however, are white (the base color of the texture) and are not tinted blue or red. This is because the baseColorFactor is not exported for the materials where a texture has been assigned. However, if I edit the glTF file to include the baseColorFactor, I get this which is what I expected:
Please do not misconstrue my post as criticism of Blender2MSFS. This addon makes so much possible and I am so appreciative for it. Instead, I hope this post documents an improvement that could be made in a future release and a workaround (editing the glTF) for those that want to make use of this powerful feature in MSFS.
Let me know if you have any questions or other thoughts on this.