What's the exact recipe for transparency/reflection/glowmap?

What's the exact recipe for transparency/reflection/glowmap?

Share and discuss visual creations and creation practices like texturing, modelling and musing on the meaning of life.

Moderators: MR.D, Moderators

Post Reply
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

What's the exact recipe for transparency/reflection/glowmap?

Post by Anarchid »

I've "site:" googled and forum-searched this site for kilotons of traffic, yet i still can't find any decent description on what exactly should go into a second s3o texture. The closest match i found so far was the mention of glowmaps in "simple mod tutorial"... which basically said that the author has no idea how to make glowmaps besides that they go into tex2. And the three times i tried to pull a tex2 on a unit, it disappeared the instant reflectiveness was turned on.

Now, i want my units to have metallic surfaces and glowing polys; Therefore: how do i concoct myself a (dds or otherwise) tex2 that will actually work?
User avatar
Hoi
Posts: 2917
Joined: 13 May 2008, 16:51

Re: What's the exact recipe for transparency/reflection/glowmap?

Post by Hoi »

Afaik the green channel is used for reflectivity and the red channel for glow, that's all I can tell you.
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Re: What's the exact recipe for transparency/reflection/glowmap?

Post by [Krogoth86] »

Look here:
http://spring.clan-sy.com/wiki/Basic_s3 ... king_guide

For the 2nd texture's green channel is for reflectivity, red channel is for self-illumination.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: What's the exact recipe for transparency/reflection/glowmap?

Post by FLOZi »

2nd texture alpha layer is 1bit transparency
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: What's the exact recipe for transparency/reflection/glowmap?

Post by Saktoth »

For a more specific answer, i personally take the RGB (white-black) of the texture and stick it directly into the red channel (glowmap) of my tex2, then cut the brightness by half. Because Spring reserves the higher ranges of white for the glowmap (otherwise there would be nowhere to go), your bright whites in the tex1 will come out grey in game and your model wont have as much contrast as it should, making it look dull and flat.

Flaw in spring AFAIC but its a workaround.
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: What's the exact recipe for transparency/reflection/glowmap?

Post by Anarchid »

Several internets and hundreds of kudos. :P
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: What's the exact recipe for transparency/reflection/glowmap?

Post by smoth »

Saktoth wrote:For a more specific answer, i personally take the RGB (white-black) of the texture and stick it directly into the red channel (glowmap) of my tex2, then cut the brightness by half. Because Spring reserves the higher ranges of white for the glowmap (otherwise there would be nowhere to go), your bright whites in the tex1 will come out grey in game and your model wont have as much contrast as it should, making it look dull and flat.

Flaw in spring AFAIC but its a workaround.
not sure if I buy this. I think maybe your normals are fukt, the rx78 is PLENTY white.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: What's the exact recipe for transparency/reflection/glowmap?

Post by Argh »

1. Green levels 0-255, are how much the value of the reflectionmap is weighted vs. the diffuse map.

2. Red levels 0-255, are how much the diffuse map is raised relative to its final values, after shading (including shadows) is done. IOW, it "glows" because it's canceling out the difference in the angle of the triangles from perpendicular to the sun light.

Glow can and does wash stuff out, though, because of where this occurs in the shader. If you have too high of a glow level, you'll frequently see issues, because the shader allows glow stuff to saturate over the diffuse level. Therefore, I suggest never using a level higher than 220 for red in the glow channel, it leaves some wiggle-room.

Using pure white is fine, and I'm with Smoth, there aren't any shades of white "reserved". I just checked the fragment program, that's just plain wrong.

It caps out at 1.0 1.0 1.0, just like everything else in OpenGL. The issue is that maybe you think that pure white will actually look pure white most of the time, and the answer is... no, it won't, and should not.

It won't even hit pure white unless the mapper was really stupid and used a pure white light for the sun and a pure white light for the specular highlight... and even then, it'll only hit pure white if the angle of the normal is on the same vector as the sun. The normal vector's difference from the sun determines how much the sun raises the value over the level of ambient.

You'll only see issues with pure white if you mix it with glow, in which case you'll hit pure white very frequently and wash out the difference between normal angles, because it's adding that value back on top of the texel value after lighting has occurred. So a pure white area with a lot of glow, facing the sun light, will look really horrible, because the vertexes will wash out, and your model will quit looking 3D.
For a more specific answer, i personally take the RGB (white-black) of the texture and stick it directly into the red channel (glowmap) of my tex2, then cut the brightness by half.
That is completely un-necessary, and totally counterproductive.

Don't do that... do the glow colors in a seperate layer, including the overspill (i.e., the glowy fuzz around lights), then when you make your reflectionmap, you can just fill whatever is there with red value 220, using Multiply, so that all non-red values go bye-bye.

That's the easy way.

Oh, and Saktoth, send me whatever you're seeing these odd problems with, I'll take a quick peek. I'm with Smoth though, it's probably the normals, and that's a quick fix in UpSpring most of the time.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: What's the exact recipe for transparency/reflection/glowmap?

Post by jK »

I already talked with him, it is more a problem that he tries to texture for maps with TOTALY broken lighting. But it isn't the job of the texturerer to balance the textures for such extreme values, on a map with a blue sun light the model just can't look white period.
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: What's the exact recipe for transparency/reflection/glowmap?

Post by Saktoth »

I know its wrong, i know the glow map should only be used for lights, and jK says its just the mappers fault. Take a look at the shots of cremuss's new AA ship in his thread, its using the technique im talking about- there is no 'whiting out' of the bright spots other than when its has a reflection on it. Regardless of whether or not its correct it helps the model retain its contrast under different lighting conditions. Playability and visibility is my first priority.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: What's the exact recipe for transparency/reflection/glowmap?

Post by Argh »

That screenshot is useless, you don't have shadows on. Most players with even hardware two years old can play this game with shadows on :roll:

My guess is, with shadows on, it will glow all over and look like crap, tbh.

At any rate, if it's a screwed-up map... put out a new version of the map, with proper lighting. Sheesh. You're working on CA! Don't pigeonhole your work so that it only looks good on one map...
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: What's the exact recipe for transparency/reflection/glowmap?

Post by Saktoth »

http://licho.eu/alba/album02/New_CA_stuff.jpg Uh looks like shadows to me man. And i dont know that most players can run shadows: even if they can, i doubt they'd chose to play with it. I concede the point that if it DOES screw up shadows (Which it doesnt appear to?) it will date the models though.

Its not 'a' screwed up map. Its many screwed up maps. I dont design or release the maps! Making sure it looks good on all maps is precisely what im trying to do.
Last edited by Saktoth on 23 Jan 2009, 12:20, edited 1 time in total.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: What's the exact recipe for transparency/reflection/glowmap?

Post by Argh »

Do whatever you want, it's a free world and stuff. That map isn't a very good test, though. That sun's practically directly overhead.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: What's the exact recipe for transparency/reflection/glowmap?

Post by Warlord Zsinj »

I'm quite interested to see some sort of resolution of this discussion, as I have to agree it is quite difficult to get decent light contrast on units. However, in my experience when I am combining glow and reflectivity, if they exist in the same place, they will simply 'white out' and remove any textural information whenever the unit is facing the sun / giving off glints. For this reason I tend to black out my reflectivity underneath any glows that I have (eg: lights), otherwise I find that any lights I have will not retain their colour if they are facing into the light.
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: What's the exact recipe for transparency/reflection/glowmap?

Post by Saktoth »

Personally i dont mind the full-white glints. It only happens in areas directly facing the sun and even then mostly only on the natural highlights of the units.

This looks really good on, say Comet Catcher with its dark sky and white sun. Problem is that due to reflectivity it turns all reflective white areas completely grey when they reflect the sky (most of the time). Which is another thing glow helps with.
Post Reply

Return to “Art & Modelling”