Author Topic: How do shine-maps work ?  (Read 4552 times)

0 Members and 1 Guest are viewing this topic.

Offline Skullar

  • 29
How do shine-maps work ?
I am asking because I have plans to experiment on some of our textures from TBP.

So far I have found out that glowmaps are some sort of minimum-brightness maps for the textures, can someone explain me how they, and how the SHINEMAPS work ?

So... what there is to know for a 2d artist creating maps ?

I have heard something that for shinemaps not the brightness, but the intinsity of the color matters ???
They somehow determine how light is reflected ? Fully ? Colored ?

 

Offline JGZinv

  • 211
  • The Last Dual! Guardian
    • The FringeSpace Conversion Mod
Re: How do shine-maps work ?
I would also like to know... partly for the sake of knowing and secondly
since I'll have to have to tweak shine maps in the near future.
True power comes not from strength, but from the soul and imagination.
Max to PCS2 to FS2 SCP Guide
The FringeSpace Conversion Mod

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Re: How do shine-maps work ?
How they work and what a 2D artist needs to make them are two totally different things. Unless you know the difference between Oren-Nayer-Blinn and Phong you probably don't want the former. For the latter, I usually just up the contrast on the 'texture' layers and enhance the panel lines while lowering the contrast on stickers and the like.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline Topgun

  • 210
Re: How do shine-maps work ?
shine maps just tell the game what color the "shine" or specular is.
have you ever noticed those pimped-out cars with pearlescent paint? notice how the color of the car is different than it's shine?  well shine maps tell the game what the shine color is. if a shine map is unavailable, the game just makes the shine white.

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: How do shine-maps work ?
Shine and Env off the alpha also is what makes cockpit glass as reflective as it is.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Flaser

  • 210
  • man/fish warsie
Re: How do shine-maps work ?
IIRC it goes like this:

Diffuse map: Color of surface in diffuse lighting, what you normally see. Separate texture that can have 32-bit depth with alpha channel controlling transparency.
Glow map: Color of the surface that is always drawn with full diffuse illumination, so it seems to glow. Separate texture that can have 32-bit depth with alpha channel controlling transparency. The game identifies glowmaps by the "-glow.xxx" tag in their name. They use the same UV mapping or tiling that the diffuse map with the same (without the glow tag) name does.

By using a different diffuse and glow map one can simulate lamps, and other glowing objects. You draw the diffuse map so it shows the light in its inactive mode....no glow, no self shadows cast, no glare etc. Instead you draw these into the glow map, so by using the turn-glow-map-on/off sexp one can simulate power failures/derelicts/stealth runs etc.

IIRC these maps are also the ones you will need to operate on to implement occlusion mapping.

Shine map: Intensity and color of the reflected light from the surface, in other words the color of the glare a dynamic white lightsource will take. Shinemaps are 24- or 32-bit depth textures. If present, the alpha channel stores the environment map. The game identifies shinemaps by the "-shine.xxx" tag in their name. They use the same UV mapping or tiling that the diffuse map with the same (without the shine tag) name does.
Environment map: The alpha channel of the shine map dictates how much of the environment map is reflected from the surface. Gives a "mirror like" impression.

For diffuse and shine maps perceived color of surface also depends on the color of the lightsource. In "white" light the textures will be identical with their drawn version. If the light is of a specific hue, then their R-G-B components will be compared to the lightsource and a new color will be produced.

In layman terms this means, that in red light the diffuse map will only show its red components, and only the red component of the shine-glare will be present.

Glow maps are always rendered as if in full, white illumination.
"I was going to become a speed dealer. If one stupid fairytale turns out to be total nonsense, what does the young man do? If you answered, “Wake up and face reality,” you don’t remember what it was like being a young man. You just go to the next entry in the catalogue of lies you can use to destroy your life." - John Dolan

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: How do shine-maps work ?
Diffuse and Glow, while they _can_ possess a transparent channel, rarely if ever, actually need one. Point in fact, I have yet to see a single ship where the diffuse and/or glow had or needed one. Best practice: When in doubt, don't.

Other than that, pretty spot on as far as I understand it as well. Though, on the lighting example provide above, it might be more accurate to say that a diffuse map exposed to red, will gain a value of red to it's appearance in combination with the shine and glow maps relative to it. Which is why, in general, it is not a good practice to include an alpha channel for either the Diffuse or Glow map unless it is to achieve a specific result that cannot be obtained else wise.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Skullar

  • 29
Re: How do shine-maps work ?
So... Shinemap colors add to texture colors when light is reflected.
Shinemap brightness is sort of amount of light reflected. Bright areas shine much, dark areas hardly reflect ?
And alpha channel determmixes color/brightness of Shinemap mixed with color brigtness of incoming lightrays ( from nebulae / planets a.s.o )

From that, shinemaps should have reduced color depth, vastly increased contrast and clever alpha-channel.
I'll experiment with that, it should help to give textures more "depth"

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Re: How do shine-maps work ?
Diffuse and Glow, while they _can_ possess a transparent channel, rarely if ever, actually need one. Point in fact, I have yet to see a single ship where the diffuse and/or glow had or needed one. Best practice: When in doubt, don't.

Transparent parts like windows are the only cases where a diffuse map should have alpha channel. Cockpit glass usually has it's own texture for this purpose, so it follows that normally the ship textures don't need alpha channel. Glowmaps shouldn't ever need alpha channel since they are, by definition, using additive blending already - black on glowmap equals no glow.

Shinemaps should always have alpha channel, because the environmental mapping needs to be addressed in some way, seeing how FS2_Open uses the alpha envmapping by default these days. Simplest option is to just make the alpha channel full black, which results in zero envmapping intensity.

Quote
Shinemap brightness is sort of amount of light reflected. Bright areas shine much, dark areas hardly reflect ?

Not quite. Diffuse map (ie. the basic texture) tells the amount and colour of diffuse (non-shiny) reflection of light from light sources in the game.

Shinemap (RGB) tells the intensity and colour of specular reflection of light sources.

Light sources mean suns, blobs, beams and such.

Environmental map (alpha channel of shinemaps) tells the intensity of environmental reflections (background reflecting from the model surfaces. Basically starfield, nebulas and planets.) It's basically a grayscale texture withing the shinemap file, separate from the RGB channels that the specular lighting uses.

Continuing on a slight tangent, normal maps affect lighting by telling the game to "tilt" the direction of the surface on pixel-by-pixel basis, which results in different intensity of lighting, which the human eye perceives as geometry changes. Height maps add a parallax effect to parts of the surface that are supposedly on different elevation.


Quote
And alpha channel determmixes color/brightness of Shinemap mixed with color brigtness of incoming lightrays ( from nebulae / planets a.s.o )

Not so... the RGB part of shinemap is completely separate from the alpha channel. The alpha channel only addresses the environmental reflection intensity. RGB values alone define the specular lighting. And speak of lightrays in the context of FS2_Open graphics is kinda overestimation AFAIK...



Quote
From that, shinemaps should have reduced color depth, vastly increased contrast and clever alpha-channel.
I'll experiment with that, it should help to give textures more "depth"

Not really that simple... <the following is largely based on my preferences, your mileage may vary>

In fact, in my opinion shinemaps (the RGB part anyway) benefit from having an increased saturation compared to the diffuse, but it's largely ship-specific and requires case by case testing. Also, my preference is that shinemaps not be overly bright, but specular intensity settings (cmdline options) tend to have an effect on that as well. What comes to env mapping (alpha channel of shinemaps), in most cases it should be very very close to black. Very dark grey has an useful effect on giving just a hint of environmental reflection to surfaces. Chrome and glass parts should have more intensity, but even then using full alpha brightness is... questionable.

Cockpit glass is interesting case btw. You would think that full white RGB and alpha would give best results, but that's not the case (just take a look at the Tauret to confirm this). Glass actually tends to require medium gray specular (RGB) value and bright environmental (alpha) value.

Also, if the windows have a glow map on them, do not make the glowmap have full intensity. If you do, you might as well drop the windows detail from shinemap, because the glow will drown them out anyway. Reducing the brightness of the glowmap (and possibly increasing the colour saturation slightly) when it comes to windows will give a nice mix of light coming from inside the ship and reflected by specular and environmental reflections. And, of course, the windows should be black in the diffuse map.
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.