Is there a way to make badges appear less washed out?
Before editing anything:
- Does it show this way in all maps?
- Does it show this way in all angles?
- It does.
- It does as well.
The diffuse is too bright is what is going on. The badge uses the same logic as paint. There are possibly other contributing factors but the diffuse would be the first thing I’d look at.
Is it possible for them to glow?
Well, any workaround? Making diffuse darker isn’t the thing I’d like to do.
I would call it a shader bug really, is there a mask or something we can use to change the transparency of the badge? You’d want it to be faint on some ships and sharp and clear on others…
It’s a Hard Light blend mode, it’s well established math and works as intended- it brightens or darkens the badge based on the brightness/darkness of the badge and the underlying diffuse. Badges are the variable here and can be anything between black and white so the diffuse has to be around 50% grey.
Take your diffuse into Photoshop and drop different badges over it in Hard Light to see what is going on. You’ll have to write your own badge shader if you’re going to use bright diffuses so start changing blend modes to see what you can make work.
Looking at this again, what are blend modes and where do I change them? Also what options for blend modes exist?
I don’t understand it fully cuz math, but I believe these are the relevant portions of the sob_ship.frag:
#ifdef SOB_BADGE vec4 lumMap = vec4(0.299, 0.587, 0.114, 0.0); vec4 diffLum = vec4(texDiff.r, texDiff.g, texDiff.b, dot(texDiff, lumMap)); vec4 d_hi = clamp(((diffLum*2.0)-1.0), 0.0, 1.0); vec4 d_lo = clamp(((diffLum*paintDarkScale)-paintDarkOfs), 0.0, 1.0); // Slight overdark for badge contouring paint = mix(d_lo*paint, vec4(1.0), d_hi); diffLum.rgb = d_lo.w*texBadge.rgb; d_lo = mix(diffLum, vec4(1.0), d_hi.w); paint = mix(paint, d_lo, texBadge.a);
In sob_share_materials.imp, there is this clue:
// How do materials treat their diffuse source? #if gte PAINT_FLAT 1 local float4 inPaintStyle 0.0 2.0 0.0 // Curve (0.0 for flat), Darkening scale/ofs (2.0 + 0.0 for PS hardlight)
And the wikipedia page for blend modes contains the formulas for each:
MATH = Mental Abuse To Humans >_<
Thank you @sastrei I will… randomly change numbers in those areas and see what happens