I think there is still some confusion (on my side at least) about the glow issue. However, since it's working fine as it is and there are more pressing issues, I consider it a low priority. We should perhaps come back to it at a later point. Let's focus on the decals instead.
DECALS
Geoff wrote:
In your examples, the decal channel is only black or white (ie. not grey or otherwise textured). Given that, couldn't a key colour in the diffuse map be used instead, such as bright saturated magenta, which is always replaced with the empire colour? This would save a channel.
The problem with this solution is, that all the decals would be a flat color. There won't be occlusion shadows and no texture elements either. If you take a look at the those starcraft 2 buildings(
one,
two), the player colors are not flat.
Also, here's a closeup of the Mark1 texture as it is and if the decals were flat.
I've committed a decal map for the Mark 1. There are currently just 2 channels. The first is a neutral base texture, onto which the empire color is overlayed using the second channel, which is the decal mask.(see
this and
this).
Or you could just use the second channel to replicate
this.
GLOW
tzlaine wrote:Ok, but what's the point of values between 0.0 and 1.0 though? It looks like the color channels already have the glow color at the right intensity already, no? Should the glow channel be used to modulate the color channels?
The color channels have the glow color at the maximum intensity(1). Parts that are actually glowing will be pure white(or very close to white) in the glow channel. Parts that are illuminated will be something between 0 and 1. So yes, the glow channel is used to modulate the color channel, I guess. Sorry for the confusion, I tried to say this before, but failed somehow
tzlaine wrote:I don't think this works as a general solution, because the glowing bits might need to be in different colors. This is the case, for instance, in the mark1 model already. It's engine ports in the back should glow white, and its core should glow orange.
Also, just the core alone is glowing in a multitude of colors(white, yellows, oranges, reds).
tzlaine wrote:
Without separate channels, with the glow baked into the specular channels, bright specular reflections automatically cause the glow to increase too, which is bad.
While this is right, it can be solved by using black in the specular channel for everything that's glowing, which is what I'm doing anyway.
WEAPONS
Geoff wrote:
Weapon firing glow would need to turn on or off depending whether the weapon is firing, though. It could also be done with a texture, but would need to be coordinated with the emitter points for any beam weapon effects. So far as I know, there's been no discussion about how to render beam effects in relation to ship meshes. My main concern is that beam effects should originate form a place on a ship that looks like a weapon component, but how will the effects rendering code know where to emit a beam weapon effect from on a model? If this can be indicated somehow, then the beam firing glow texture could be created to match.
Weapon effects are on my list of "mock-ups to-do"... Since we don't show actual ship parts externally, I don't think we need to have weapon effects come out of certain parts. Instead they can originate from the center of the ship, but only be shown starting at the boundary volume. Here's is something quick and dirty to illustrate this. The bottom two ships are shooting at the seed sphere.
(click)
Transparency
Transparency is something nice to have. I still have plans for the seed sphere to grow and develop foliage, for which transparency is essential(to mask out leaves and branches). I had to laugh when I read about the pleasure cruiser with transparent domes, it sounds so cliche, but fun at the same time. We definitely should have something like this.