Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Omniscaper on December 17, 2005, 02:10:18 pm

Title: Will stencil shadows ever make a come back?
Post by: Omniscaper on December 17, 2005, 02:10:18 pm
I'm still on a mad endeavor to get the BSG look as good as the 3dsmax renders INGAME. So i plopped the model in Bob's last stencil shadow build. Despite absolute black shadow ambience... let the pics speak for themselves.

(http://www.game-warden.com/bsg/staff_images/Galactica/BsgShad.jpg)

(http://www.game-warden.com/bsg/staff_images/Galactica/BsgShad2.jpg)

(http://www.game-warden.com/bsg/staff_images/Galactica/BsgShad3.jpg)

(http://www.game-warden.com/bsg/staff_images/Galactica/BsgShad4.jpg)

This is just a plea for aethestic perfection :) . From material shaders to stencil shadows to pixel shaders.
Title: Re: Will stencil shadows ever make a come back?
Post by: Ghost on December 17, 2005, 02:17:58 pm
NYraaaaaaaaargh. That looks really ****ing good. I second this plea, although I daresay that if it's Bob that's going to make it, we should let him finish the material system. Although, I'd be all for some other programmer trying it out...*winkwink*
Title: Re: Will stencil shadows ever make a come back?
Post by: Goober5000 on December 17, 2005, 02:53:39 pm
This is precisely the reason that I'm not a fan of Bobboau releasing WIP builds. :doubt:

Answer: No, not in the forseeable future.
Title: Re: Will stencil shadows ever make a come back?
Post by: Omniscaper on December 17, 2005, 03:05:18 pm
Well, this thread was not meant to rally the masses to the SCP doorstep to make demands. I just want to remind u geniouses how pretty shadows look.  :)
Title: Re: Will stencil shadows ever make a come back?
Post by: gevatter Lars on December 17, 2005, 03:10:25 pm
I agree shadows add some more atmosphere and realism to the game. I realy liked the first prototyps of the shadow coding and hope it will be finished someday.
Title: Re: Will stencil shadows ever make a come back?
Post by: Bobboau on December 17, 2005, 03:15:50 pm
not anytime soon, but I have been makeing changes with this, as well as many other things in mind, it will happen one day, but that day is currently not forseeable.
Title: Re: Will stencil shadows ever make a come back?
Post by: Turambar on December 17, 2005, 03:21:36 pm
how's all that shader business coming along anyways?
Title: Re: Will stencil shadows ever make a come back?
Post by: gevatter Lars on December 17, 2005, 03:33:41 pm
As long as they will be their in my gameing days...or as long as their are OS/PC you can FS2 with...it will be ok ^_^
Title: Re: Will stencil shadows ever make a come back?
Post by: Bobboau on December 17, 2005, 04:50:04 pm
well the materials system hit a huge snag due to the BSP format not being flexable enough for diferent vertex formats to be used, so I've spent what little codeing time I've had over the last few months fixing this (completly rewriteing the BSP code from scratch), with school over and me haveing the last few days mostly to code, I'v made major progress on this front and now have gotten models to render again (also resorting of geometry will be a snap (important for alpha blending) and there is also a neighbor index for every polygon wich will make decal code faster and easier, and it's been structured to make the shadow code work well when I get around to implementing it). I also have redone most of the HTL code and made a number of classes for manageing vertex and index buffer functionality, as well as generaly organiseing everything better. the basic materials system is in place, but I need to rewrite almost every bit of graphics code to follow the new systems. for one thing rather than simply haveing a texture and drawing a polygon everything will now need a list of textures (and pertenent data about them) as well as a material instance. I'm going to have a section in the materials table for defineing wich material gets used for hard coded effects, as well as the ability to override this default in any instance were you may want to (this should allow the use of diferent materials on weapon effects and such, so you could have for instance a weapon that subtractively blends rather than additively). there will be a good bit of rewriteing on what I have to incorporate the scripting system recently included.
Title: Re: Will stencil shadows ever make a come back?
Post by: Turambar on December 17, 2005, 06:43:03 pm
im surprised at how much of that i actually understood

well, at least i know something's going on
im sure it will work out great as usual, and it'll be even faster and better looking than before, and we'll have shaders, which will make even more cool stuff possible
Title: Re: Will stencil shadows ever make a come back?
Post by: DaBrain on December 17, 2005, 07:19:29 pm
well the materials system hit a huge snag due to the BSP format not being flexable enough for diferent vertex formats to be used, so I've spent what little codeing time I've had over the last few months fixing this (completly rewriteing the BSP code from scratch), with school over and me haveing the last few days mostly to code, I'v made major progress on this front and now have gotten models to render again (also resorting of geometry will be a snap (important for alpha blending) and there is also a neighbor index for every polygon wich will make decal code faster and easier, and it's been structured to make the shadow code work well when I get around to implementing it). I also have redone most of the HTL code and made a number of classes for manageing vertex and index buffer functionality, as well as generaly organiseing everything better. the basic materials system is in place, but I need to rewrite almost every bit of graphics code to follow the new systems. for one thing rather than simply haveing a texture and drawing a polygon everything will now need a list of textures (and pertenent data about them) as well as a material instance. I'm going to have a section in the materials table for defineing wich material gets used for hard coded effects, as well as the ability to override this default in any instance were you may want to (this should allow the use of diferent materials on weapon effects and such, so you could have for instance a weapon that subtractively blends rather than additively). there will be a good bit of rewriteing on what I have to incorporate the scripting system recently included.

Wow, you did really do much for this feature. I promise you this I'll use this system to enhance FS2 and some mods I work on with this. This much effort shouldn't go to waste.

I truly acknowledge your work.  :yes:
Title: Re: Will stencil shadows ever make a come back?
Post by: WMCoolmon on December 18, 2005, 03:54:46 pm
Hmm, are you going to want predefined variables and operators support Bobb?
Title: Re: Will stencil shadows ever make a come back?
Post by: Bobboau on December 18, 2005, 05:13:57 pm
that'd be nice
Title: Re: Will stencil shadows ever make a come back?
Post by: Ghost on December 18, 2005, 05:30:55 pm
No pressure, of course, but I think it'd be rather nice if ships actually cast real-time light... how far away is that from happening? Like, you know on the fancy new Fenris/Levy, they have the glowmaps... in a shadows build, they would create colored light that would also make shadows at different angles. Sorry if this doesn't sound clear; it makes sense in my head.
Title: Re: Will stencil shadows ever make a come back?
Post by: Col. Fishguts on December 18, 2005, 05:53:57 pm
Isn't the number of light sources pretty limited in HTL ?

And while we're at it, do beams (and blobs) still illuminate its surroundings ? It seems to be lacking these days or is very hard to see, but I remember that it was much more pronounced when spec mapping was new.

Come to think of it, every primary shot in FS1 emmitted more visible dynamic light than now in FSO, where it's very hard to see.
Title: Re: Will stencil shadows ever make a come back?
Post by: DaBrain on December 18, 2005, 06:27:28 pm
AFAIR HTL allows eight hardware lights.

The illumination works, but it needs some care in my oppinion. It neither fades, nor reacts properly to effects measured to the distance and size.

Also, not all effects work with this system. The beams would need several illumination points spread across their whole length.
Title: Re: Will stencil shadows ever make a come back?
Post by: Ghost on December 18, 2005, 06:30:15 pm
AFAIR HTL allows eight hardware lights.

The illumination works, but it needs some care in my oppinion. It neither fades, nor reacts properly to effects measured to the distance and size.

Also, not all effects work with this system. The beams would need several illumination points spread across their whole length.

Wouldn't it be better if the beam was just one big illumination point, if that's possible?
Title: Re: Will stencil shadows ever make a come back?
Post by: Black Wolf on December 18, 2005, 07:57:13 pm
I think illumination points have to be just that - points.
Title: Re: Will stencil shadows ever make a come back?
Post by: Bobboau on December 18, 2005, 08:05:08 pm
currently beams are modeled as a point light at the closest point along the length to the object being lit, in order to do it properly we will need shaders.

the maximum lights that can posably be used at a time is 8, for many of you this might very well be a smaller number, but we have it codded so it will do as many as it can at a time adding light each time.

the reason lighting seems to be not getting applied is because most lights get culled out. this is sort of a bug, sort of not.
Title: Re: Will stencil shadows ever make a come back?
Post by: Col. Fishguts on December 19, 2005, 06:18:29 am
the reason lighting seems to be not getting applied is because most lights get culled out. this is sort of a bug, sort of not.

Well, if there's ever a chance of it being reworked, that would be great. I really liked the look of that:

(http://n.ethz.ch/student/ebuerli/download/newlarge2.jpg)
Title: Re: Will stencil shadows ever make a come back?
Post by: Flaser on December 19, 2005, 07:10:50 am
No pressure, of course, but I think it'd be rather nice if ships actually cast real-time light... how far away is that from happening? Like, you know on the fancy new Fenris/Levy, they have the glowmaps... in a shadows build, they would create colored light that would also make shadows at different angles. Sorry if this doesn't sound clear; it makes sense in my head.

Check out how Omni made his glowmaps for his Star Trek models - having the lighted parts already cast into the texture.
Actually he used a variant of the very same mapping for 'realistic' shadows on his huge asteroid.

////////////////////

@Bobbau:

How much of your work is D3D specific?
AFAIK you mostly program that, so a how much of the OGL stuff will have to be rewritten?
...or does this overhaul mean that OGL and D3D will once again have similar optimisation?

Already, thanks for revealing the workings of your magic shop.
Title: Re: Will stencil shadows ever make a come back?
Post by: Ghost on December 19, 2005, 11:00:33 am
But who wants prerendered lighting? I mean, sure, for something like that, it'd be plenty effective and much better for your computer, but I want ships and asteroids and stuff to actually have light thrown onto them if they fly by a light source on a ship.
Title: Re: Will stencil shadows ever make a come back?
Post by: DaBrain on December 19, 2005, 11:14:16 am
@Bobbau:

How much of your work is D3D specific?
AFAIK you mostly program that, so a how much of the OGL stuff will have to be rewritten?
...or does this overhaul mean that OGL and D3D will once again have similar optimisation?

Already, thanks for revealing the workings of your magic shop.

AFAIK Bob's material system will be API independant.
Title: Re: Will stencil shadows ever make a come back?
Post by: gevatter Lars on December 19, 2005, 03:11:41 pm
Maybe it has been said....but I can't use the search function so I ask it here....with this new texture system...what can be done? What is different to the current one and will we have things like bumpmaps?
Title: Re: Will stencil shadows ever make a come back?
Post by: DaBrain on December 19, 2005, 03:39:53 pm
As far as I understood, almost every shader effect is possible.

But there's a lot more. Detail textures, which are extremely interesting for SoL, cause it's a efficent way to make landscapes look decent without too much memory usage.

Or even glowmap animations without frames. Like color, strenght or contrast. All this should be possible.

Even as simple phong shader will make the ships looks a lot better.
Title: Re: Will stencil shadows ever make a come back?
Post by: Bobboau on December 19, 2005, 06:59:31 pm
DaBrain's mostly got it right, it's mostly API independent, what I'm doing is abstracting the stuff that both do and haveing a common interface between them. 95% of the work is outside the API. I'm actualy trying to minimize the API abstraction as much as posable.

now the material system on it's own will not allow shaders, it will allow for every fixed function effect posable (more or less) but on it's own shaders will not be inherently suported. BUT the material system is were shaders WILL go after all bugs in the materials system are all worked out.
but the glow map animation, detail mapping, yeah that'll be a snap.
Title: Re: Will stencil shadows ever make a come back?
Post by: IPAndrews on December 20, 2005, 03:57:58 am
Those pictures are amazing Omni. Goober is right though, that stencil shadow build just teases us. Thanks again to Bobboau for the work he did on that build. Easily the most impressive addition to the game engine that never actually happened ;). I am left wondering, if (courtesy of the new materials system and BSP rewrite) stencil shadows made a comeback, what would the performance hit then be. Would we have to revise our poly counts downwards again and by how much? Since all this stuff is processed by the CPU not the GFX card right? Of course the question is sort of rhetorical since it's impossible to comment on the performance hit of code that hasn't been written. I'm just thinking out loud  :nervous:.
Title: Re: Will stencil shadows ever make a come back?
Post by: Flaser on December 20, 2005, 11:00:24 am
Those pictures are amazing Omni. Goober is right though, that stencil shadow build just teases us. Thanks again to Bobboau for the work he did on that build. Easily the most impressive addition to the game engine that never actually happened ;). I am left wondering, if (courtesy of the new materials system and BSP rewrite) stencil shadows made a comeback, what would the performance hit then be. Would we have to revise our poly counts downwards again and by how much? Since all this stuff is processed by the CPU not the GFX card right? Of course the question is sort of rhetorical since it's impossible to comment on the performance hit of code that hasn't been written. I'm just thinking out loud  :nervous:.

That's unnecesary, it would be far better to just properly set the LODs than to downgrade models.
Title: Re: Will stencil shadows ever make a come back?
Post by: DaBrain on December 20, 2005, 11:39:30 am
No content downgrades please.

If a computer is too slow to use the comming features with the content we have, they should just disable those features.


The material system should slightly speed things up though, but only as long as you don't add complex materials.

Some effects will be faster as shaders than as fixed functions. Ironically the cards which are limited to fixed functions are slower. So the speed-up probably won't even matter...  :rolleyes:
Title: Re: Will stencil shadows ever make a come back?
Post by: Fineus on December 22, 2005, 04:40:04 am
I'm inclined to agree that I'd prefer to see the best possible detail on the best possible machine but with options to disable / enable functions rather than pandering to those with less powerful machines and denying others of what could be.