Author Topic: Stencil Shadows  (Read 37221 times)

0 Members and 1 Guest are viewing this topic.

Quote
Originally posted by WMCoolmon

-shine


= -spec?

 

Offline Setekh

  • Jar of Clay
  • 215
    • Hard Light Productions
Wow, those scale shots rock. Pity about the performance hit, though.
- Eddie Kent Woo, Setekh, Steak (of Steaks), AWACS. Seriously, just pick one.
HARD LIGHT PRODUCTIONS, now V3.0. Bringing Modders Together since January 2001.
THE HARD LIGHT ARRAY. Always makes you say wow.

 

Offline Turnsky

  • FOXFIRE Artisté
  • 211
  • huh?.. Who?.. hey you kids, git off me lawn!
Quote
Originally posted by Setekh
Wow, those scale shots rock. Pity about the performance hit, though.


yeah, pretty damn impressive...
lessee what Daveb thinks about all this, eh?;)
   //Warning\\
---------------------------------------------------------------------------------
do not torment the sleep deprived artist, he may be vicious when cornered,
in case of emergency, administer caffeine to the artist,
he will become docile after that,
and less likely to stab you in the eye with a mechanical pencil
-----------------------------------------------------------------------------------

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
Quote
Originally posted by Bobboau
I just realised something that's gona make things a lot harder, evey ship both casts and receives shadows - from it's self - wich means I can't do a check to see if there is nothing behind or in front of it. I will still be able to get rid of things that are too far away to be seen easily and a lot of subobjects, but this is going to make things hurt more than I thought it was going to.

I'm not sure what limits have you already placed in, but as a start, could you make it so that fighters don't cast shadows on each other at all?.
As I see it shadows have sense when casted from capships/big objects on other capships/big objects, on themself and on fighters/small objects, and from fighters only on capships/big objects.
Other useless shadows are probably those generated by fighters out of lod0 distance, and for all the ships all the shadows on lod 3 and all the shadows on lod1 and 2 except those generated by big objects, all the self shadows for lods different than 0 (lod1 for the big objects).
For fighters with shadows from big objects on them you could probably simply just turn on/off the light when lod is different than 0, and do the same for medium objects when lod is different than 0 or 1 (with the above limits they would have shadows only from big objects).
Finally, you could make it so that if a small object has shadows from a bigger ship it doesn't project shadows at all, but I like more what WMC proposed:p. It still remains the problem of partial shadows (i.e big ships partially obscured which should project a partial shadow)
BTW, as it is obvious it'd be better to have those limits setted in a function rather than categorizing the type of objects/lods, but I'm not a coder:p
« Last Edit: July 31, 2004, 11:22:28 am by 433 »

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
it's not a matter of casting shadows from one ship to another, it's a matter of casting or receiveing shadows at all, the way it workis is you render the shadow volume to the stencil buffer in such a way that only when there is a discrepency between the front of it and the back of it anything gets changed (ie were it intersects with something that has been rendered already), you have to render all the objects, then render all the shadow volumes that are to be cast, then render the ships over again but only were the stencil buffer says there is a shadow, useing the lighing mode for being in a shadow, I have it subtracting most of the light of the first directional light, sence objects cast shadows on themselves then that means there is no way to cull out objects that will not be reciveing or casting shadows from either the casting pass or the shadow renderig pass, other than completely removeing them from both considerations (wich could be done if they are in the first or second LOD) becase all ships always both cast and recive shadows, from them selves
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Deepblue

  • Corporate Shill
  • 210
*cough* :hopping:
Heres a screenie of the problem I was mentioning earlier.

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
so if I well understood, since the objects both receive and project the shadows themselves, an object OR receive and project all the shadows OR don't receive and cast shadow at all.
Would this also mean that you can't stop an object to cast shadows althought it is fully obscured by another object, right?
BTW it seem fair enough to remove an object completely when the lower lods are rendered, althought it would probably be better to discriminate between bigger and smaller objects
« Last Edit: July 31, 2004, 03:26:58 pm by 433 »

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Quote
Originally posted by mrduckman


= -spec?


Yeah.

Re: the shadow thing, barg.
-C

 

Offline Vertigo1

  • 'Scaper
  • 28
Quote
Originally posted by Bobboau
ok, this will defenately be the last build I post on the matter, I'm prety sure everything looks right (as far as placement of shadows is concerned), this friday, I will start to actualy implement a final implementation.

http://freespace.volitionwatch.com/blackwater/fs2_open_shadow3.zip


You might want to fix this bug first:

click me

This only happens when you use opengl.  In D3D it renders just fine.  This bug was introduced in build #2.  (I would've posted about it earlier, but I've been a little busy for the past couple of days.)

Specs:

AMD Athlon XP 2800+
512MB Corsair PC2700 DDR
Visiontek GF3 Ti200 (64MB DDR, 4xAGP running 53.03 dets...kinda stupid to use the newer ones since they don't offer any real benefits for me since my card is a couple generations back.)  I have no problems at all running the main 3.6 release for FS2_Open nor your first build.  (to be honest, this same bug is present in D2x in the briefings)

Deepblue: FFS man, atleast shrink the damn screenshot down before embedding it or atleast have the courtesy of just using an embedded link instead.  Horizontal scrolling = teh suck.
Gargoyles, Season 1.  Buy it, or DIE! :)

"Professor! This ship is capable of traveling 90 percent the speed of light! Why are we only doing 35 miles an hour!" - Leela
"Because we're in a hurry!" - Professor

"from a purely stastical standpoint japanese men DO have smaller penii on average" - Kazan

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
yeah, I don't do OGL, expect it to be brocken when ever I am developing something new
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Vertigo1

  • 'Scaper
  • 28
Quote
Originally posted by Bobboau
yeah, I don't do OGL, expect it to be brocken when ever I am developing something new


Tis a shame, but it still looks nice in D3D.

I also noticed that build 2 made the engine flares translucent.  I haven't had a chance to check build 3 yet. (noticed this on the Iota transports and the Psamtik in mission 1)
Gargoyles, Season 1.  Buy it, or DIE! :)

"Professor! This ship is capable of traveling 90 percent the speed of light! Why are we only doing 35 miles an hour!" - Leela
"Because we're in a hurry!" - Professor

"from a purely stastical standpoint japanese men DO have smaller penii on average" - Kazan

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
that would be becase the shadow rendering pass subtracts light, and it's after thruster glows are drawn.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Flipside

  • əp!sd!l£
  • 212
So what we are looking at is basically a choice between high poly models or shadows for everything except for very fast cards? I can live with that personally, it's no different to the requirements of most other graphically demanding games out there :)

 
Damnit, Bob, I'm not gonna be able to use a GF MX 440.  I'm gonna hafta get something bigger to get all the pretty stuff :(

Still, that shadow stuff looks awsome.
Mertakk monae ki ienikk du bellou zhello.
Kuek mertakk monae ienikk divakkou zhello.

What does it mean if the most fun you had all night was blowing up asteroids...?

"Its a Babylon Space 2 HercFury!" --mikhael on seeing my first fighter design.

 

Offline Aspa

  • 25
Unbelieveable fantastic stuff. I'm on a 1300Mhz with Geforce 2 and I'm not noticing any slowdown compared to other builds. :nod:

A couple of issues though - missile and afterburner trails get stippled, and when flying nebula missions, the shaded polygons aren't faded out properly, you can clearly see them when the rest of the ship is barely visibe.

 

Offline Singh

  • Hasn't Accomplished Anything Special Or Notable
  • 211
  • Degrees of guilt.
Another slight problem - any mission with over 30-40 ships (of any class) CTDs. Running other builds, the mission loads fine.
"Blessed be the FREDder that knows his sexps."
"Cursed be the FREDder that trusts FRED2_Open."
Dreamed of much, accomplished little. :(

  

Offline Singh

  • Hasn't Accomplished Anything Special Or Notable
  • 211
  • Degrees of guilt.
Quote
Originally posted by Atalhlla
Damnit, Bob, I'm not gonna be able to use a GF MX 440.  I'm gonna hafta get something bigger to get all the pretty stuff :(

Still, that shadow stuff looks awsome.


pretty much what im running as well....the FPS is ok if you remove the explosions and stuff. FS2 looks pretty darn sweet with just Specular (which, IMO, makes THE greatest difference to date)

Hey Bob, any idea if we can have a -noparticle line that reverts back to the old code? The new one gives me lots of slowdowns, especially when it comes to seeing a lot of Flak on screen.
"Blessed be the FREDder that knows his sexps."
"Cursed be the FREDder that trusts FRED2_Open."
Dreamed of much, accomplished little. :(

 

Offline übermetroid

  • Current Father Of Samus
  • 28
  • He who dares wins.
Quote
Originally posted by Flipside
So what we are looking at is basically a choice between high poly models or shadows for everything except for very fast cards? I can live with that personally, it's no different to the requirements of most other graphically demanding games out there :)


Ah, just put everything in, and make it an option to use it.  :D
"This is your life and it's ending one minute at a time."

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
the new particle code I am working on has never been displayed, becase it is not in any condition to be viewed
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Beowulf

  • 27
Quote
Originally posted by WMCoolmon
HOLY ****!! :eek:


...

My god.

My heart just jumped through my mouth.

My. God.

:yes: :yes: :yes: :yes: :yes: :yes: :yes: :yes:
Never Forget

"It is always better to avenge dear ones than to induldge in mourning. For every one of us, living in this world means waiting for our end. Let whoever can win glory before death. When a warrior is gone, that will be his best and only bulwark."
                               --Beowulf


"... and no, real life sex is not just a myth. You just need to come out of your house once every while..." ~Tiara

YeeeeHoooooh! is the mood of the day. :p