Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Krackers87 on November 02, 2003, 10:36:32 pm

Title: reflective and other cool textures
Post by: Krackers87 on November 02, 2003, 10:36:32 pm
we need a option to have reflective ish textures or like shine maps where the whiter they are tyhe more reflective a material becomes.

Also im not sure what to call this but theres this crhome effect that sorta shimmers and changes as you move the angle fromn which u face it. Sorta like the boss milkshape viewer model from this site:
http://www.swissquake.ch/chumbalum-soft/models/

maybe someone else can define it for me, but id REALLY like to see this in FS2.
Title: reflective and other cool textures
Post by: Bobboau on November 02, 2003, 10:38:16 pm
it's called environment mapping, and I want to do this
infact I made an interesting experement today to try, unfortunatly it failed but this is the third time I've tried and I'm getting closer every time

actualy the only thing I wasn't able to do was stabley generate the environment map, and I was trying cubic mapping wich is the hardest thing to do, so tecnicaly I could hack in spherical mapping with a predefined texture easily
Title: reflective and other cool textures
Post by: Krackers87 on November 02, 2003, 10:42:31 pm
i have little idea of what most of it meant but progress = good
Title: reflective and other cool textures
Post by: Fry_Day on November 03, 2003, 04:36:18 am
I was thinking that envmapping could use the shinemap as a mask, which would be even better (As specular lighting is light that is directly reflected from the light source to the view point, and enviroment maps are generally simulating reflections, so less shiny parts are also less reflective)
Title: reflective and other cool textures
Post by: Bobboau on November 03, 2003, 08:25:21 am
agreed
Title: reflective and other cool textures
Post by: Lightspeed on November 03, 2003, 08:32:07 am
yep use the shinemap as a base image.

Also, would this improve effects like when shoot with my Subach HL7 near a capship to get a nicer reflection on the hull of it?
Title: reflective and other cool textures
Post by: Flipside on November 03, 2003, 06:25:33 pm
You would see the light, but you would be unlikely to see the reflection of the shot, I would have thought that to have full ray-traced reflections such as those would take a lot of processor time? However, Environment mapping would be good, not only could it be used for the skybox, but if you then used the same Bitmap for the Cockpit environment map as you do for the Skybox, it should produce a pretty good effect ;)

Flipside :D
Title: reflective and other cool textures
Post by: Lightspeed on November 03, 2003, 06:37:28 pm
Quote
Originally posted by Flipside
...You would see the light, but you would be unlikely to see the reflection of the shot, ...


yes, that's what i meant. Because the old system kinda had something similar but it never really worked (sometimes things werent lit at all, or lit completely wrong). With HT&L that thing seems to have stopped working nearly completely.
Title: reflective and other cool textures
Post by: Starks on November 03, 2003, 06:41:19 pm
WTF is the "Skybox"?
Title: reflective and other cool textures
Post by: Flipside on November 03, 2003, 06:45:46 pm
Skybox is something Phreak is working on, it places a pof around the play area that you can put bitmaps onto for nebula, stars etc :) The problem at the moment is the mapping of a sphere, something Environmental mapping should be able to fix if I remember correctly :)

http://www.hard-light.net/forums/index.php/topic,18314.0.html

Flipside :D
Title: reflective and other cool textures
Post by: Starks on November 03, 2003, 06:50:13 pm
PHREAK! Why did you take down the pics?
Title: reflective and other cool textures
Post by: Flipside on November 03, 2003, 07:03:18 pm
(http://www.aqsx85.dsl.pipex.com/images/NewSky1.jpg)

;)

Anyway, no more thread hijacking from me ;)

Flipside :D
Title: reflective and other cool textures
Post by: Starks on November 03, 2003, 07:10:10 pm
It looks like any Targa or PCX would...
Title: reflective and other cool textures
Post by: Flipside on November 03, 2003, 07:13:19 pm
That's what it's supposed to look like, except it covers the entire sky, stars & all, consider it a sky-sized decoration ;)

Flipside :D
Title: reflective and other cool textures
Post by: Bobboau on November 03, 2003, 07:14:34 pm
now with environment mapping you would be able to see the nebulas and suns and stuff reflected on the ships, this is not ray traceing, it is environment mapping, BIG HUGE UNBELEVABLY MASSIVE diference, in fact they are not even in the slightest bit related, they are about as far apart as two thing can be while at the same time being rendering effects for use in CG.
environment mapping is a lot simpler than you probly think, you basickly render the background to a texture then use the polygon's normals to determine what part of the texture they should be showing, in this way they aproxamate the visual apearence of extreem reflectability
Title: reflective and other cool textures
Post by: phreak on November 03, 2003, 07:24:45 pm
LL: swooh is being a pain again.  time to beat stealth

to linux coders: uh.. rendering to a texture will require some wgl extensions for maximum speed (i'm sure you can use CopyTexImage)
Title: reflective and other cool textures
Post by: Setekh on November 04, 2003, 12:31:22 am
Quote
Originally posted by LLivingLarge
It looks like any Targa or PCX would...


Or JPG. TGAs are slow as heck, the size increase even outweighs the CPU cycles needed for JPG decompression.
Title: reflective and other cool textures
Post by: Fineus on November 04, 2003, 05:05:00 am
What if we just used uncompressed JPEG files? The size would still be much smaller than TGA...
Title: reflective and other cool textures
Post by: Lightspeed on November 04, 2003, 06:11:09 am
the current TGAs i have work fine for me :)
Title: reflective and other cool textures
Post by: Taristin on November 04, 2003, 04:29:28 pm
Because you have an uberPc... bugger.
Title: reflective and other cool textures
Post by: Fry_Day on November 06, 2003, 06:21:54 am
I highly encourage all y'all to use .dds files. Texture compression saves not only file size, but improves preformance for cards that support it (Which includes GeForce 2MX cards, which just about everyone and his grandmother has).
Title: reflective and other cool textures
Post by: karajorma on November 06, 2003, 06:42:36 am
are .dds files 8, 24 or 32 bit? Or can you choose?
Title: reflective and other cool textures
Post by: Ashrak on November 06, 2003, 07:48:06 am
wont cubic env mapping kill most of the older than gf3ti500 cards?
Title: reflective and other cool textures
Post by: ChronoReverse on November 06, 2003, 10:08:41 am
Wasn't cubic environmental mapping first implemented in the original GeForce?  I seem to remember some bullahoo made by nVidia about how it was way superior to Spherical mapping
Title: reflective and other cool textures
Post by: Ashrak on November 06, 2003, 10:57:38 am
it is way superrior
Title: reflective and other cool textures
Post by: bKtHeG on November 06, 2003, 11:03:19 am
dds - this is not a very good idea
as far as i can see the loading code is part of directx which means no support for linux
better use something like jpeg oder tga
Title: reflective and other cool textures
Post by: Carl on November 06, 2003, 11:03:59 am
wouldn't it look kinda silly, though? what would there be to reflect? the environment map would be a bunch of stars.


...unless you can make each mission create a specific environment map from that mission's background, so you could have reflected nebula ect.
Title: reflective and other cool textures
Post by: Drew on November 06, 2003, 11:18:39 am
Quote
Originally posted by Carl
what would there be to reflect? the environment map would be a bunch of stars.

uhh, think window reflections. You zoom past the window of a capship and you see your ship in the reflection
;7
Title: reflective and other cool textures
Post by: Styxx on November 06, 2003, 11:28:44 am
Quote
Originally posted by Drew
uhh, think window reflections. You zoom past the window of a capship and you see your ship in the reflection
;7


Hah, you realize that's not realistically possible with current hardware, right? You'd need to render the environment maps for each ship's position for each frame.

:p
Title: reflective and other cool textures
Post by: karajorma on November 06, 2003, 11:38:21 am
Quote
Originally posted by bKtHeG
dds - this is not a very good idea
as far as i can see the loading code is part of directx which means no support for linux
better use something like jpeg oder tga


Encourage the use of both then :) The Windows users get faster performance using .dds but it's not like the modder doesn't have to make all the individual maps first anyway.

If those of us using Windows shouted at anyone who distributed a mod with only .dds files instead of .dds and another more general format would that make you happy? :D
Title: reflective and other cool textures
Post by: Carl on November 06, 2003, 11:38:55 am
Quote
Originally posted by Drew

uhh, think window reflections. You zoom past the window of a capship and you see your ship in the reflection
;7


we're talking about environment maps, not ray tracing.
Title: reflective and other cool textures
Post by: Flipside on November 06, 2003, 11:58:45 am
Quote
Originally posted by bKtHeG
dds - this is not a very good idea
as far as i can see the loading code is part of directx which means no support for linux
better use something like jpeg oder tga


I thought Phreak had already implemented DDS in OpenGL anyway?

Flipside :D
Title: reflective and other cool textures
Post by: Bobboau on November 06, 2003, 12:12:14 pm
Quote
Originally posted by Carl
...unless you can make each mission create a specific environment map from that mission's background, so you could have reflected nebula ect.


isn't that what I said I was going to do
Title: reflective and other cool textures
Post by: Carl on November 06, 2003, 02:03:25 pm
likely.
Title: reflective and other cool textures
Post by: bKtHeG on November 06, 2003, 02:39:47 pm
Quote
Originally posted by Flipside


I thought Phreak had already implemented DDS in OpenGL anyway?

Flipside :D


As far as I understand the sources the loading code for dds uses directx code or at least many directx structures and constants (ddsutils/ddsutils.cpp should be the right file). These means no problem under windows (directx is available) but under linux there are no directx headers or libs which makes it very complicated if not nearly impossible to port it to linux.

One idea: perhaps the directx code can automatically convert the images (tga/jpg) the first time they are loaded. This way all mods could be distributed with linux-compatible files (and the windows-version could use dds-files).
Title: reflective and other cool textures
Post by: karajorma on November 06, 2003, 03:00:29 pm
That's what I said. But there's no need to have FS2 generate the files. Just complain at mod authors who don't distribute them :)
Title: reflective and other cool textures
Post by: Carl on November 06, 2003, 03:03:29 pm
what? no, each Fred mission will have it's own environment map, not each ship.