

That is actually correct, mostly. More reflective a metal is, less color it has of it's own. But, I'll still have to make some tests...One note, though. It seems the reflection map reflects the blackness of space, which as far as I understand physics isn't quite as it should be. I'm not sure if they have always done that (this was my first), or if that is a problem specific to this shader.
I suppose there could be somekind of conflict that might feed incorrect data to emission material, ambient light could also be the source. Which one it is or is it something else.Now that I have taken a closer look at things, it looks like it applies a uniform lighting to all parts of the mesh, ignoring shading completely. I've attached a screenshot that shows this. It looks like it has an emissive setting applied to it but it doesn't.
// Combine diffuse terms
float3 zD = cDiff.rgb * fA * LightFX(cSun * fR * dLN + cDiffLocal + cAmbient) + (cDiff.rgb * gMtrl.emissive.rgb) + cE;
float3 zD = cDiff.rgb * fA * LightFX(cSun * fR * dLN + cDiffLocal + cAmbient) + cE;
float3 zD = cDiff.rgb * fA * LightFX(cSun * fR * dLN + cDiffLocal) + cE;
There is a "Full Scene" option in D3D9 Configuration and it's set to "Planet Only" by default. In most cases it's sufficient enough.It should reflect the full scene. As you can see on the Apollo photo above, it reflects the Moon, the LM and black space.
So, the cAmbient was the source ? The Earth glow is a part of it. The "Glow" material you mentioned earlier in not in use and it has nothing to do with this. There might be a problem with environment maps and if that's the case it may have existed a long time.Going down to the third option eliminates the emissivity issue but produces this.
CONFIG_VERSION 3
; =============================================
MESH SSU/Orbiter
SHADER Metalness
; ---------------------------------------------
MATERIAL 1
AMBIENT 0.000000 0.000000 0.000000
DIFFUSE 1.000000 1.000000 1.000000 1.000000
EMISSION2 0.000000 0.000000 0.000000
GLOW 0.000000
; ---------------------------------------------
MATERIAL 2
AMBIENT 0.000000 0.000000 0.000000
ROUGHNESS 0.950000
METALNESS 1.000000
GLOW 0.129412


MATERIAL ThermalCoating
0.7 0.7 0.796 1
0.9 0.9 0.9 1
1 1 1 1 2.5
0 0 0 0
CONFIG_VERSION 3
; =============================================
MESH space_station_pack\JunctionSquare
SHADER PBR-Old
; ---------------------------------------------
MATERIAL 12
SPECULAR 1.000000 1.000000 1.000000 2.500000
I would also prefer for the configurations to be tied to a mesh like <mesh_name>.cfg but the problem is that the client doesn't always get the file name for a meshes. If a mesh is load using oapiLoadMeshGlobal() then a client does get the file name but if oapiLoadMesh() is used instead then the name isn't forwarded for a client. About 50% of addons use the first one and another 50% the second one. The lack of mesh file name has been a show-stopper for some features we have planned. In a case when we don't have the name we need to rely on vessel class name and mesh index. That's not exactly very reliable.But the problem is a bit that I would really like to have those materials applied by mesh, not by vessel, since the mesh might appear in multiple vessels.
Yes, texture map and additional D3D9 specific configuration will override settings from a mesh file. That should apply everything including "Diffuse", "Ambient", "Emission" material properties.the PBR shader ignores the orbiter .msh settings and either takes the values from the cfg file or from the maps. Which would be a bit confusing, because it totally does respect the diffuse and ambient color settings. Is this intended behaviour?
Huh, that's weird... From what I observed reflectivity and roughness control how the general surrounding scene is reflected, while specular color and power specifically control how active lightsources are reflected. The effect of both is visually quite different, and I have seen them working in combination quite well on some materials.The second thing that should be noted is that "roughness" and "specular.power" are basically one and the same thing using a different scales.
That much is clear. I'm using 2x2, actually, works without a hitch.Texture maps don't need to be the same size. So, if you have constant color "Reflectivity" you can simply assign 4x4 pixel miniature texture to a mesh containing the color you want.
That is also clear. I merely expected it to fall back to the .msh definitions for shared properties if neither was provided, which seems to be the case for diffuse and ambient color, but not specular color and power. But after what you wrote, I guess that's because a reflection and roughness map was provided. It's just that if I go and fiddle with specular options, reflectivity and roughness in the debug panel, I can clearly see them both working at the same time, and the result is overall better, so it's a bit of a bummer that specularity is turned of on load if reflectivity and roughness are provided.Yes, texture map and additional D3D9 specific configuration will override settings from a mesh file. That should apply everything including "Diffuse", "Ambient", "Emission" material properties.
so it's a bit of a bummer that specularity is turned of on load if reflectivity and roughness are provided.
Yes, it is inverted and sadly it's too late to do much about it. I can change the material property name to "Smoothness" in the material editor but the texture identifier "*_rghn.dds" remains. Smoother material makes (should make) the sun reflection smaller but more intense in strength. The lack of "strength" or "intensity" in sunlight reflection is what triggered the development of new shaders.In fact, fiddling around with it a bit paying attention to that aspect, it seems like roughness has an inverted effect on direct lightsources. High roughness means the scene is reflected more clearly, but the sun is barely being reflected at all.
Any update on my issue with the Metalness shader?