Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Kai on February 14, 2005, 02:23:32 pm

Title: Bump mapping
Post by: Kai on February 14, 2005, 02:23:32 pm
Thanks to the SCP Freespace 2 now has the enviromnental mapping. So what about bump mapping ? Is it possible?

For those who don't know what I am talking about:

http://freespace.virgin.net/hugo.elias/graphics/x_polybm.htm
Title: Bump mapping
Post by: FireCrack on February 14, 2005, 03:50:50 pm
We're getting there, bob has IIRC alraedy created a system in wich bumpmapping could be implemented, or somthing to that effect.
Title: Bump mapping
Post by: karajorma on February 14, 2005, 04:50:51 pm
Bump mapping is waiting for an overhaul of the texture system. At the moment FS2 has to make repeated passes in order to put in all the features we already have. Adding bump mapping or normal mapping would require yet another pass which would slow the game down even more.

The overhaul is going on at the moment though so don't that it's just an excuse :)
Title: Bump mapping
Post by: FireCrack on February 14, 2005, 05:12:53 pm
^is there going to be a new integrated texture/shader format with this overhaul or somthing? anywhere where i can get the specifics on it?
Title: Bump mapping
Post by: Bobboau on February 14, 2005, 11:10:09 pm
actualy the texture system isn't the bottle neck for bump mapping, I do intend to implement a shader system that would allow bump mapping sooner than later, but this wouldn't be the first progect of mine to fail.
Title: Bump mapping
Post by: Setekh on February 15, 2005, 06:31:36 am
When bump mapping is implemented, I'm going to cry. I promise. ;)
Title: Bump mapping
Post by: Kai on February 15, 2005, 06:38:23 am
Me too, Setekh. Me too.
Title: Bump mapping
Post by: Liberator on February 15, 2005, 08:17:21 am
As long as you can tell the difference I will too.  But if it's implemented like it is in Renegade , I'll smack you....;)
Title: Bump mapping
Post by: Overlord on February 15, 2005, 08:32:34 am
Renegade has bump mapping? ;)
Title: Bump mapping
Post by: Kai on February 15, 2005, 11:53:38 pm
One question: can anyone tell me the difference between Bump mapping and Environmental bump mapping ? Is it the same feature?
Title: Bump mapping
Post by: Carl on February 16, 2005, 02:09:09 am
environmental bump mapping is a different version of bump mapping. it simulates bumps by shifting the reflection map over by a certain amount in specified areas.
Title: Bump mapping
Post by: Kai on February 16, 2005, 02:41:01 am
ehm..thnx so what looks better? and do all the newest graphics cards support both these functions?
Title: Bump mapping
Post by: Roanoke on February 16, 2005, 03:17:38 am
G4MX doesn't pixel shaders, which if IIRC, is a factor.
Title: Bump mapping
Post by: Kai on February 16, 2005, 03:45:39 am
oh yes the pixel shaders and the whole DX9 stuff...will those things be implemented?
Title: Bump mapping
Post by: Mr_Maniac on February 16, 2005, 05:45:56 am
Err... doesn't DX8 do Pixel- and Vertex shader, too?
I've an "old" GeForce 3 which already have those features...
And AFAIK DX8 should already support this...
Well... Okay... DX8 Supports the GF3 version of shaders (version 1.1?) and for higher shader versions we really would need DX9...

Wait... OGL can do that, too ;)
Title: Bump mapping
Post by: Falcon on February 16, 2005, 06:30:23 am
Problem with Direct X 9 is that you would have to have a video card that supports it. ;)
Title: Bump mapping
Post by: Kai on February 16, 2005, 06:41:23 am
and who does not have such a card today;)
Title: Bump mapping
Post by: Singh on February 16, 2005, 06:46:51 am
me, for one :P
Title: Bump mapping
Post by: Flaser on February 16, 2005, 07:41:22 am
*Raises hand

Add me to the list.
Title: Bump mapping
Post by: Kai on February 16, 2005, 10:36:57 am
oh my...:)
Title: Bump mapping
Post by: Mr_Maniac on February 16, 2005, 10:43:15 am
I already wrote, that I only own a GeForce 3...
But for now I can play almost all games!
Title: Bump mapping
Post by: Bobboau on February 17, 2005, 09:27:07 am
I intend on makeing a shader system that can handle full/partal/or no shader suport, that is once I get done with my current projects, unfortunately people are slow to test things like the animation system and weapon models
Title: Bump mapping
Post by: Overlord on February 17, 2005, 09:37:19 am
Does your shader system support ps/vs 3.0 then?
Title: Bump mapping
Post by: Bobboau on February 17, 2005, 09:47:45 am
it would if/when I got started on it.
Title: Bump mapping
Post by: DaBrain on February 17, 2005, 10:20:26 am
Woohoo, this is great, go for it Bob.

Banzai! Banzai! Banzai!



I want so suggest a system that allows using post filter fragment programs via choice in FRED like the skyboxes can be choosen.

This would be great for some mods.
Title: Bump mapping
Post by: Taristin on February 17, 2005, 10:36:47 am
Quote
Originally posted by Bobboau
once I get done with my current projects, unfortunately people are slow to test things like the animation system and weapon models
Title: Bump mapping
Post by: Bobboau on February 17, 2005, 08:39:28 pm
yes funny how once tha gets mentioned everyone goes silent

and goob wonders why I never finish one thing before starting another
Title: Bump mapping
Post by: Turambar on February 17, 2005, 08:43:02 pm
will these be the RGP normal maps, or grayscale heightmaps?
Title: Bump mapping
Post by: Taristin on February 17, 2005, 08:43:22 pm
Yeah. Anything that requires the slightest bit of work on their part is convieniently overlooked. :doubt:

If I knew how to use the system, maybe I'd try a few simple things, but until then, I'll stick to my usual modelling ways.
Title: Bump mapping
Post by: DaBrain on February 18, 2005, 09:53:46 am
... look at my posting in the weapons thread...
Title: Bump mapping
Post by: Bobboau on February 18, 2005, 10:40:42 am
yes, and as your reward I will post speculation on what I may one day do.

how's this sound you are able the write a post procesing filter and specify variables that effect it that you can script via sExps.

the way I'm thinking about writeing the primary shader system is haveing a table that specifies three ways to render a model, a fixed function system, a system that has a vertex shader but still requiers a fixed function raster step (wich you specify in a fashion similar to the full fixed function material) and a full vertex/pixel shader system. there will be code to decide wich one of these gets used (wich can be overiden via comand line).

the way shaders are going to be writen would be to use a API independent HLSL, I am currently leaning twards Cg. I'm thinking it would be a good idea to have it broken down into sections to you have a section of a shader dealing with transformation, a section dealing with an individual light (of a specific type, we have three types) and texture coordanant generation and anything else that needs to get done after lighting is done.
there will be a number of predefined variables such as the transformation matrix, the light list, camera position, primary/secondary/teritery textures ect, as well as pre defined vertex data position, normal, uv, ect, you will be limited by what data types have been predefined (and somewere in the shader entree you will need to define what you are going to need) but it should be a simple task to add new variables and data types.
Title: Bump mapping
Post by: DaBrain on February 19, 2005, 08:06:51 am
Sounds VERY good to me.
Title: Bump mapping
Post by: Kai on February 19, 2005, 08:15:51 am
wow..get it  done asap Bobboau
Title: Bump mapping
Post by: Bobboau on February 19, 2005, 12:20:06 pm
test, code, now!

I want to do this, but I can't untill my current stuff is done, test my current stuff! ...damit!
Title: Bump mapping
Post by: Kai on February 21, 2005, 05:27:58 pm
ehm..and what is your current stuff? the multiple ship docking?
Title: Bump mapping
Post by: Col. Fishguts on February 21, 2005, 05:40:59 pm
Quote
Originally posted by Kai
ehm..and what is your current stuff? the multiple ship docking?


The animation system ...check the "Recent SCP Builds" subforum.
Title: Bump mapping
Post by: Kai on February 21, 2005, 09:08:37 pm
checked...and found nothing. you mean the animated textures on (mainly) shivan ships?
Title: Bump mapping
Post by: Taristin on February 21, 2005, 10:04:48 pm
No, the animated subobject code.

The weapons model code, and a few others...

This one:
http://www.hard-light.net/forums/index.php/topic,30458.0.html

And quite possibly this one
http://www.hard-light.net/forums/index.php/topic,29515.0.html
Title: Bump mapping
Post by: Kai on February 22, 2005, 01:12:50 am
sorry but the external weapons is imho a dumb idea..
Title: Bump mapping
Post by: Flaser on February 22, 2005, 04:39:09 am
Quote
Originally posted by Kai
sorry but the external weapons is imho a dumb idea..


Get off the high horse.

Said code would make tons of things possible. Add pods, parts ect. ect. to the ship - anything you want to add to the ship without creating a separate model.
...and with tertiary systems, and modular ships that isn't something you really want to do.

The animation code also makes it possible to have animating subobjects - moving hangar doors, turrets with protective cover, ect. ect.
Title: Bump mapping
Post by: Bobboau on February 22, 2005, 09:18:48 pm
Quote
Originally posted by Kai
sorry but the external weapons is imho a dumb idea..


sorry but that gets done first, if I just leave it hanging you'll end up with bugs out the ass, at the least you could run the build and make sure I didn't break anything else.
Title: Bump mapping
Post by: Kai on February 25, 2005, 11:49:51 pm
okey ill try it..but still i think its a worthless feature
Title: Bump mapping
Post by: Solatar on February 25, 2005, 11:56:34 pm
Quote
Originally posted by Kai
but still i think its a worthless feature


Good for you.:)  You wanna tell us why?

I can see many implications of this...I mean, it looks less than perfect now of course,  but the first models in the fs2 engine were probably untextured cubes...
Title: Bump mapping
Post by: FireCrack on February 26, 2005, 12:31:29 am
^well fs1 engine atleast, and probably more like untextured arrow shaped objects.


Anyways, is there anything other than extranl weapon code and animation code that bob needs testing for now?
Title: Bump mapping
Post by: Kai on February 26, 2005, 05:44:06 am
i just do not know *WHY* put so much effort to making missiles visible from external view...if it does serve yet another purpose tell me please
Title: Bump mapping
Post by: Fineus on February 26, 2005, 06:01:17 am
It's visual candy... in theory there's no point in having shine maps but almost everyone agrees they look darn cool. Same thing here I believe.
Title: Bump mapping
Post by: Kai on February 26, 2005, 06:02:32 am
yes the shine maps ARE COOL. this is not imho:) i think the best thing in the work now is making the hi-poly versions of ship models - THATS PRETTY DAMN COOl - and i think the GREAT hi-poly Herc is Bobboau's work isnt it? now thats a SUPERB work
Title: Bump mapping
Post by: Bobboau on February 26, 2005, 09:12:43 am
people have been asking for this for years, with WCM's techroom thing I had the idea that if every weapon had a model too then art could be dynamicly generated too, so I decided to take on the project, it's a relitively simple change, and the weapon model code is basicly complete, all it needs is lots of testing, what I realy need to get done with now is the animation code, I'm thinking I should just focus on getting the core of it done, then explain how you use it to the other coders so they can implement all the calls to it.

both of these need moders to create content and then people to play the game with that content.
Title: Bump mapping
Post by: DaBrain on February 26, 2005, 09:22:34 am
Quote
Originally posted by Kai
okey ill try it..but still i think its a worthless feature


The Starfox mod will use this feature. It's not worthless at all.


You will drool and accept this feature as a good one...
Title: Bump mapping
Post by: Bobboau on February 26, 2005, 09:55:31 am
you know the weapon stuf seems to be working without flaw, no one can say I didn't try to get it thuroughly tested, the animation code can't be made any better untill I get a lot more models suporting it to test on, I'll make a thread for coders on how to implement new animations.
Title: Bump mapping
Post by: Omniscaper on February 26, 2005, 09:59:54 am
The BSG's launch bays is more than ready to have the animation code extend and retract them! Is none rotational movement in the bag?
Title: Bump mapping
Post by: Flaser on February 26, 2005, 11:26:16 am
AFIK it was from day 1 of Bobb's implementation.