Cody wrote: ↑Sun Aug 26, 2018 1:49 pm
Griff wrote: ↑Sun Aug 26, 2018 1:27 pm... i'm not quite sure how to do the materials stuff that A_C is using in these amazing examples...
Admiral...
Hello
To make metal materials, the important thing to remember is that metals do NOT have diffuse color. They only reflect, so you only need a specular color or a spec map. In most cases, specifying a diffuse_color of (0,0,0) will do.
Next thing to remember is that metals have pretty high specularity. In the current trunk's lighting model, spec color values in the range of 0.65 to 0.8 should give a very nice metallic shininess. Keep in mind that light energy conservation has been enabled in latest trunk. This means that if you set high specularity for your material, it will result in a relative reduction in diffuse colors, so that the total energy emitted from the material does not exceed the energy received from the light source.
Keep also in mind that the current light model allows the construction of materials that should theoretically be impossible. Setting an intense diffuse color together with a high spec oolor is allowed, but the result will look very weird. Check out the thargons in the latest trunk, they use this kind of impossibility. But it's aliens, so we're fine with it.
Here is one more pic of ghagostinho's AspII done in latest trunk:
using this definition for the hull material:
Code: Select all
materials =
{
"Hull" =
{
diffuse_map = "gsagostinho_asp_mk2_blue_white.png";
gloss = 0.675;
specular_color = (0.8, 0.8, 0.8);
shininess = 35;
emission_map = "gsagostinho_asp_mk2_emission.png";
normal_map = "gsagostinho_asp_mk2_black_normal.png";
};
[...] rest of materials
And here is the same ship, but this time with gold metal hull:
This time, the definition is this:
Code: Select all
"Hull" =
{
diffuse_map = "";
diffuse_color = (0.0, 0.0, 0.0);
gloss = 0.675;
specular_color = (1.0, 0.766, 0.336);
shininess = 35;
emission_map = "gsagostinho_asp_mk2_emission.png";
normal_map = "gsagostinho_asp_mk2_black_normal.png";
};
And finally, what it normally looks like, with a metal-hull-with-paint-coating look:
and the definition:
Code: Select all
"Hull" =
{
diffuse_map = "gsagostinho_asp_mk2_blue_white.png";
gloss = 0.675;
specular_color = (0.08, 0.08, 0.08);
shininess = 35;
emission_map = "gsagostinho_asp_mk2_emission.png";
normal_map = "gsagostinho_asp_mk2_black_normal.png";
};
You can experiment with gloss, specular_color and diffuse_color values and see how combining those leads to different materials. Note that "shininess" is not really a thing anymore, unless you switch the default shader to the Blinn-Phong model.