Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Unknown Target on July 22, 2003, 06:19:22 am

Title: Reflective surfaces...
Post by: Unknown Target on July 22, 2003, 06:19:22 am
Are these in? Or when could they be in?
Title: Reflective surfaces...
Post by: Taristin on July 22, 2003, 08:27:48 am
Alpha 1: Command! There's a wing of enemy fighter heading straight towards us! What should we do?!

Command: We're not reading any fighters, Alpha. Check your sensors.

Alpha 2: I see them too! They're flying terran craft command! What's going on?

Command: Pilots, you're talking nonsense!

Alpha 1: I'm going in! Cover me!

*CRASH*

Command: What's this? Alpha! ou've encounterred a new ship class! The SJ Mirror! Get out of there it's a trap!

Alpha 2: No! I can still see hostile craft...


And so the ignorance of the common GTVA Pilot is used against him.
Title: Re: Reflective surfaces...
Post by: IceFire on July 22, 2003, 10:11:43 am
Quote
Originally posted by Unknown Target
Are these in? Or when could they be in?

Specular highlighting would be a big step towards making the graphics more realistic looking...it'd be an awesome thing...not sure if its doable right now.
Title: Reflective surfaces...
Post by: Nico on July 22, 2003, 10:31:30 am
I don't think it's really complicated. after all, it's just exagerated lighting.
Title: Reflective surfaces...
Post by: Black Wolf on July 22, 2003, 10:40:04 am
Mmmm - N1 Starfighter :)
Title: Reflective surfaces...
Post by: Unknown Target on July 22, 2003, 11:11:19 am
Would make for a nifty semi-cloaking effect.

And good-looking cockpits froim the external view would also be a possibility.
Title: Reflective surfaces...
Post by: Nico on July 22, 2003, 11:25:46 am
Quote
Originally posted by Unknown Target
And good-looking cockpits froim the external view would also be a possibility.


not w/o clipping fixed.
Title: Reflective surfaces...
Post by: diamondgeezer on July 22, 2003, 11:32:06 am
Do I sense an agenda here, Venom?
Title: Reflective surfaces...
Post by: Nico on July 22, 2003, 11:53:42 am
yes, but still it's true:
a detailled cockpit means lots of details at the same place, so lost of polys in front of each other, so lot of see-through problems. simple as that.
Title: Reflective surfaces...
Post by: StratComm on July 22, 2003, 12:51:30 pm
I think the idea is to make the cockpits reflective, so that they look like glass.  So there'd be no extra complexity.  However, I don't see what is wrong with the good old black ones myself.
Title: Reflective surfaces...
Post by: Nico on July 22, 2003, 01:02:38 pm
well, then, it's the same with 256*256 maps, very low poly meshes, etc etc. it's just a matter of improvement.
Title: Reflective surfaces...
Post by: NecroBob on July 22, 2003, 03:19:20 pm
perfect, raa ;)
Title: Reflective surfaces...
Post by: Nuke on July 22, 2003, 04:05:11 pm
two words
pixel shaders
Title: Reflective surfaces...
Post by: Taristin on July 22, 2003, 05:36:35 pm
Quote
Originally posted by NecroBob
perfect, raa ;)

:p
Title: Reflective surfaces...
Post by: Flipside on July 22, 2003, 05:48:46 pm
In that case, I would have thought the best bet is simply to Chrome effect the cockpit with the current background map? It would be a lot simpler and faster.

Flipside :)
Title: Reflective surfaces...
Post by: Charmande on July 23, 2003, 02:59:29 pm
Quote
Originally posted by Raa Tor'h
Alpha 1: Command! There's a wing of enemy fighter heading straight towards us! What should we do?!

Command: We're not reading any fighters, Alpha. Check your sensors.

Alpha 2: I see them too! They're flying terran craft command! What's going on?

Command: Pilots, you're talking nonsense!

Alpha 1: I'm going in! Cover me!

*CRASH*

Command: What's this? Alpha! ou've encounterred a new ship class! The SJ Mirror! Get out of there it's a trap!

Alpha 2: No! I can still see hostile craft...


And so the ignorance of the common GTVA Pilot is used against him.


:lol:
Title: Reflective surfaces...
Post by: Fry_Day on July 25, 2003, 04:55:01 pm
True reflections are unlikely to be implemented, at best. When HT&L upgrade is done, using sphere-mapping for fake-phone would be fairly trivial (but it can't be done right now, since you need the normals for sphere mapping, but the renderer doesn't pass them right now), and a pixel shader for per-pixel lighting with shinyness maps shouldn't be too hard.

But, of course, the T&L upgrade needs to be done for all of that.
Title: Reflective surfaces...
Post by: Nuke on July 26, 2003, 10:48:29 am
cloaking effects as i understand them will be multitextured. if the coders could come up with a way to use the multitexture code on the normal ship textures, then we would have unfettered access to limitless effects.
Title: Reflective surfaces...
Post by: Fry_Day on July 26, 2003, 01:13:26 pm
Fixed Function multitexturing is much more limited than a pixel shader, and you have to remember that not everything you can do with OpenGL blending functions, you can do with DirectX ones, and vice versa. Ideally, some program similar to MFCtex would be made for editing multitexturing effects.
Title: Reflective surfaces...
Post by: IceFire on July 28, 2003, 07:14:18 pm
Quote
Originally posted by Fry_Day
True reflections are unlikely to be implemented, at best. When HT&L upgrade is done, using sphere-mapping for fake-phone would be fairly trivial (but it can't be done right now, since you need the normals for sphere mapping, but the renderer doesn't pass them right now), and a pixel shader for per-pixel lighting with shinyness maps shouldn't be too hard.

But, of course, the T&L upgrade needs to be done for all of that.

What about the relatively simple metal shine effect that we've seen in games like StarLancer and back as far as Privateer 2 (which used a software renderer)?  Is there a technical reason why even the old DX5 version of the FreeSpace engine couldn't do that?
Title: Reflective surfaces...
Post by: Deathstorm V2 on July 29, 2003, 05:04:27 am
I saw a ship once that had unstable mapping, gave it a metallic effect (i.e. the texes shifted around as my fighter moved - looked good though)

Not quite reflections, but close.
Title: Reflective surfaces...
Post by: Nuke on July 29, 2003, 01:39:11 pm
once the multitexturing is figured out, we need a shaders.tbl then when we want to use a shader effect we could point it to an entry in that table instead of pointing to a texture file. i perfer simple scripting language when it comes to shaders.
Title: Reflective surfaces...
Post by: Flipside on July 29, 2003, 01:47:04 pm
The effect is called Chroming, I'm not a coder, but I believe all it does is make the material an 'environment map' instead of an object map, when the eye moves, the object map remains fixed to the polygons, in an environment map, when the model moves, the textures moves across it, as though under a projection lamp. By using curved meshes, you can get a very good metalliglass effect :)

As I say, I'm not a coder, but I think this wouldn't be too hard to implement?

Flipside :)
Title: Reflective surfaces...
Post by: Fry_Day on July 29, 2003, 04:47:31 pm
Quote
Originally posted by IceFire

What about the relatively simple metal shine effect that we've seen in games like StarLancer and back as far as Privateer 2 (which used a software renderer)?  Is there a technical reason why even the old DX5 version of the FreeSpace engine couldn't do that?

Technically, they do that using sphere mapping. Sphere mapping is extremely simple to implement without the API having anything to do with it, but, you need the tranformed normals passed to the renderer for it. If I had that, I could indeed do shiny-metal and fake phong effects. Two problems limit me about that. The first is that the current way the FreeSpace 2 graphics engine is built just isn't intended for passing along normals, and the second is that I'm 10000 miles from home right now, using a laptop.
Title: Reflective surfaces...
Post by: Flipside on July 29, 2003, 05:51:51 pm
LOL I suppose the second problem has to be dealt with first ;)

As I said earlier, I'm not a coder, I've no idea what is feasible and what isn't. Still, the simple fact someone managed to get that exact effect suggests something may be possible ;)
Can you remember what model it was that had that effect/error on?

Flipside :)
Title: Reflective surfaces...
Post by: Kazan on August 01, 2003, 11:42:50 pm
Quote
Originally posted by Nuke
two words
pixel shaders


one word: overkill

a few more words: NEW TECHNOLOGY AS OF 2002! Not enough people with support, use older technique
Title: Reflective surfaces...
Post by: Fry_Day on August 01, 2003, 11:57:52 pm
There were GeForce 3 cards available to the masses in early 2001, kazan, so "New as of 2002" is not accurate at all. Of course, though, I tend to agree with you, added with the fact that Pixel Shaders up until  PS1.4 are basically beefed up register combiners, which is nothing special at all (Though PS1.4 has nice stuff, like a dependant texture read).
I'm all in for vertex shaders, though. Unlike pixel shaders, vertex shaders always have software emulation, and both Intel and AMD have very optimized VS1.1 emulation (even though it's nothing compared to a hardware implementation - my AthlonXP 1700+ is nearly 7 times slower than my GeForce4 Ti4200), and since we aren't talking about massive poly-counts anyway (at least not right now), the vertex shader emulation shouldn't be what's bogging down frame-rates anyway
Title: Reflective surfaces...
Post by: Nuke on August 01, 2003, 11:58:30 pm
any $50 video card on the shelf theese days suports pixel shaders. quake 3's shaders worrked fine on the machine i had got 3 years ago, now gpus blaze through those as if they were flat shaded.
Title: Reflective surfaces...
Post by: Kazan on August 02, 2003, 10:11:31 am
i must be thinking VS not PS... and it was 2001... blerg i shouldn't post when im not thinking straight
Title: Reflective surfaces...
Post by: Fry_Day on August 04, 2003, 01:35:43 pm
Quote
Originally posted by Nuke
any $50 video card on the shelf theese days suports pixel shaders. quake 3's shaders worrked fine on the machine i had got 3 years ago, now gpus blaze through those as if they were flat shaded.

Quake 3 does not use pixel shaders. In fact, Quake 3 was released before there were cards supporting pixel shaders.
A list of consumer cards that support Pixel shaders is:
GeForce 3 (any flavor)
GeForce 4 Ti series (Not GeForce 4 MX)
GeForce FX (any)
ATI Radeon 8500+ (Pixel Shader V1.4)
ATI Radeon 9500+ (Pixel Shader V2.0)
Matrox Parhelia
SiS Xabre (Terribly slow)
SiS Xabre II

And that's about it. Quake 3 uses fixed-function multitexuring for its shaders.
Title: Reflective surfaces...
Post by: Flipside on August 04, 2003, 01:59:58 pm
Yep, I had a feeling Kazaa was right :)

Besides, PS wouldn't really be the most efficient way of doing it, while it might be nice to see the reflection of your ship in a cockpit of a bomber or the like, I think it's a bit overkill and kind of limiting for those that don't have PS enabled cards.

<------ Has GeForce4 MX, in case you hadn't guessed ;)

Flipside
Title: Reflective surfaces...
Post by: Carl on August 04, 2003, 02:09:39 pm
for now i think a reflection map and spec highlights should be all that we really need. full on raytraced reflection would be too much for those with less than 1.5 ghz processors and geforce 3 ATIs, be considerate :D
Title: Reflective surfaces...
Post by: Nuke on August 04, 2003, 02:25:25 pm
my laptop has pixel shader capabilities. and whatever they called that thing used in quake 3, could we use those, because they were pretty tight and fairly fast.
Title: Reflective surfaces...
Post by: Sandwich on August 05, 2003, 01:31:01 am
Quote
Originally posted by Fry_Day
...and the second is that I'm 10000 miles from home right now, using a laptop.



Erm... I'm here... :nervous: