Shadow casting explanation for non-programmers

I

IronHand

Guest
Ok. I'll explain it here, cause it took only 16 minutes to close my thread without letting me explain my point of view.

There are four basic types of shadow casting techniques (if you don't care - skip it):
1. Shadow volume generation - nice looking (very realistic), but takes a lot of CPU power to compute. Every single polygon casts shadow, that clips every poligon behind (in the line from lightsource).
2. Stencil buffer shadowing - very efective for less lightsources. Scene is rendered from the view of every lightsource with only visibility that counts (no color, no shading). Information about visibility from this rendered plane is vital for determine whether pixel is behing some face or not.
3. Texture shadowing - nice looking (makes soft shadows possible) shadowing technique. Calculating shadow for every polygon and multitexturing is the point here. Not very fast, but worth implementing (take a look at Splinter Cell).
4. Ray tracing - extremely realistic technique. Requires casting rays of light from every lightsource, calculating reflection, etc. Slooow on every machine.
There is smth called energetic method, but it's used in 3D programs, like Softimage, 3DStudio or so only.

Generally methods 1-3 are fakes. Not my fault, sorry. Method 4 is somehow accurate to what happens with light IRL. That's why I called HL2 shadowing method fake.
And one more thing about it - fake means great and not bad in terms of gfx programming algorithms.

Now the answers...
Chris_D: "but what on God's green Earth are you going on about"
I mean, that they (HL2 developers OR level editors) forgot to cast shadow for some objects. Please, before you judge me and compare to some guy from Amazon, read my post carefully. I said, that there is a bug in scene showed in hl2-source.avi. Did you checked it or just answered and killed that thread? Finding a bug doesn't mean, that I don't like your beloved game. I do like it: it's concept, code, graphics... (but I do admit, that I didn't like the physics in HL1).

PvtRyan: "(...)and tell all effects are faked (which is pure bullshit)."
Well... They are, but...

PvtRyan: "And, do we look like we care about this?"
...now I know you don't care. :) Ok. I'm just keen on tech stuff and thought, that this buggy part is...hmm... nice in some way. But _now_ I know, that I was wrong.

scrayN: "lol what is this idiot blabbing about?"
Forum rules: "there is to be no name calling". Idiot is not my name, scrayN.

chris_D: "Well this thread is going to hell."
And this one probably too...

Nothing more to add. If you (moderators) don't like this thread - don't close it. Delete it. There's no point in this kind of thing (that don't interest you) hanging around here.

And what does "biozeminade" mean???

Best regards
 
I think you may just have redeemed yourself somewhat!


Good post.
I don't think people understood your last post. People fear what they dont understand (Cookie to who knows where I stole that quote from)


:)
 
Ah, alright now I get your point, sorry if I offended you in any way :)
I thought it was another post bitching about wrongly rendered shadows on the texture and calling shader effects false.

But, it wouldn't call the lighting fake, in that case even raytracing is fake because it doesn't include all aspects from what happens to a real light, like radiosity. You can do radiosity with photon maps and indirect illumination. So even raytracing isn't the whole picture of realistic lighting, considering that we're still a long time away from realistic lighting implemented in real time games.
 
Originally posted by PvtRyan
(...)even raytracing isn't the whole picture of realistic lighting, considering that we're still a long time away from realistic lighting implemented in real time games. [/B]

That is true. But IMO raytracing is closest to RL lighting. That's just I like the way it look (although texture shadows looks better in RT games).

BR
 
Photon mapping is so sexy. It makes a box with no texture look like a photorealistic room with white walls. :dozey:
 
Great, so what are you people talking about? I mean I know lighting and stuff, but what brought this up?
 
aieee... photons, learning about that in physics. interesting stuff though ;)
 
(I wasn't around to know what's going on) Sounds likes someone started an argument because they were looking for looking for certain graphics technologies in a game that doesn't want anything to compromise its gameplay goals.
I'd just add that Valve uses their Cabal system where maps are built from gameplay/story up and graphical polish is added in the final stages.
'Faking it' (if you think about gaming as an art rather than a technology) is to achieve an effect. The way you achieve this effect doesn't matter (if someone writes on a typewriter instead of a PC, it doesn't change the quality of writing).
 
Short about: My thread was killed because of misunderstanding. It was about shadow bug (or feature, or nothing - depends on view) in HL2 engine, visible in hl2-source.avi. I wanted to explain myself. That's all.

Regards
 
Umm, has it no occured to anyone that everything you see on your computer monitor is faked? Christ, if you want 'real' lighting look out the friggin window every now and again.
 
Originally posted by iamaelephant
Umm, has it no occured to anyone that everything you see on your computer monitor is faked? Christ, if you want 'real' lighting look out the friggin window every now and again.

best idea ever.
 
Real light frightens and confuses me.

I'm sure you could have your game with super-realistic lighting if you wanted, but some people have a problem with playing a game that takes 2days to render a frame, therefore shortcuts must be taken.
 
Originally posted by iamaelephant
Umm, has it no occured to anyone that everything you see on your computer monitor is faked? Christ, if you want 'real' lighting look out the friggin window every now and again.

You are right in the way you understand 'fake' or 'real'. :) I use word 'real' to express 'real simulation', not 'real life'. I do not expect anyone to believe, that what you see on CRT is real (oh my gawd! they lied to me!!! ;) ).

Best regards
 
Originally posted by iamaelephant
Umm, has it no occured to anyone that everything you see on your computer monitor is faked? Christ, if you want 'real' lighting look out the friggin window every now and again.

What if your seeing the picture from a Camera? Is that faked?
 
Originally posted by IronHand
Nothing more to add. If you (moderators) don't like this thread - don't close it. Delete it. There's no point in this kind of thing (that don't interest you) hanging around here.

We'll be the ones deciding whether to lock or delete, thanks. The majority of useless threads do get deleted, yet a small portion remain locked on the forum. The reason for this is usually specific- if it's a thread that actually had some kind of conversation going, it will probably stay, due to the fact that we'll usually get another thread made by the author of the first one asking where it went.

Alternatively, it'll be because we want to convey a message/warning over to the author or posters on the thread.
 
Originally posted by IronHand
You are right in the way you understand 'fake' or 'real'. :) I use word 'real' to express 'real simulation', not 'real life'. I do not expect anyone to believe, that what you see on CRT is real (oh my gawd! they lied to me!!! ;) ).

Best regards

Well I understand you. It's Simulation vs Emulation, right?
 
Originally posted by jameth
what is this bug in the hl2-source video?

Somewhere in the beginning of the video, in the building, a beam of light shines through a plank of wood on the ceiling (I believe, someone correct me if I'm wrong, this is purely based on my memory)
 
HL2 will have shadows and real time dynamic shadows but, no one can compare it to D3. D3 is by far the best technology in this way. I think the thread starter is made a comparison between the shadows in both games, but let me say this, D3 calculation of shadows is way advanced.

Moreover we never seen any real stuff yet from HL2, except the HDR tech but this is not enough to judge which game has better shadows. I hop valve release this xmaz a new vid which covers all the latest technology up to that date.
 
Originally posted by iamaelephant
Umm, has it no occured to anyone that everything you see on your computer monitor is faked? Christ, if you want 'real' lighting look out the friggin window every now and again.

Belive me when saying, what you see on the screen is not fake, its there. But what you see might be a fake of something in the real world.
 
Light in real life isn't "rays" so all of them are fake.. LoLz!!
 
How do people know that the source engine can not produce better lighting than what is shown in Half-Life 2? They have said it can do full dynamic lighting but most of the videos we have seen do not use it. The fact is dynamic lighting requires huge gfx resources, Doom III requires dynamic lighting, it just wouldn't work as a game concept without it, where as with half-life 2 it would only add nicer gfx, but if they used it they would have to cut back somewhere else. Look at the game Vampire (built on the source engine) that is a dark game and where you will see the dynamic lighting the source engine is able to produce.
 
Originally posted by Slash
Light in real life isn't "rays" so all of them are fake.. LoLz!!

Yes Slash, you're right. They've waves AND particles simultaneously (according to wave particle duality).

Isn't physics fun?

Speaking of which, I've got to write a raytracer for a week Monday :S
 
Originally posted by G0rgon
HL2 will have shadows and real time dynamic shadows but, no one can compare it to D3. D3 is by far the best technology in this way. I think the thread starter is made a comparison between the shadows in both games, but let me say this, D3 calculation of shadows is way advanced.

Moreover we never seen any real stuff yet from HL2, except the HDR tech but this is not enough to judge which game has better shadows. I hop valve release this xmaz a new vid which covers all the latest technology up to that date.

HL2 and D3 will probably use similar tech for dynamic lights and shadows. The only difference is that D3 uses a lot more of it, whereas HL2 will have lightmaps.
 
Originally posted by ElFuhrer
HL2 and D3 will probably use similar tech for dynamic lights.

As far as i know D3 uses stencil buffer, not texture shadows, but I may be wrong.
 
Originally posted by IronHand
As far as i know D3 uses stencil buffer, not texture shadows, but I may be wrong.

Nah, HL2 uses stenciled shadows and D3 uses the lighting best described by your volume shadow generation description. D3 uses 3D "light" models to determine where the light will fall and where it won't, thereby casting shadows in the appropriate places whether it be on an object or a character.
 
Also, its known from HL(1) that Valves levels arnt made with the best gfx and detail, compared to what can be accomplished with their engine. Im sure the community can, if HL2 supports as advanced lightning as D3 engine, make levels that looks very good and are very light-complex...
 
HL2 will not have D3 shadow technology- it is a whole different way of rendering. It will, however, achieve many of the effects seen in D3 by cheaper means- allowing more elements in gameplay. It is a trade off (that all games have to make) and honestly, if your interest lies solely in bleeding edge shadow technology, you probably wouldn't be very interested in games.
 
I can think of three other methods of shadowing, please correct me if these are mentioned above, sometimes explanations of similar concepts may sound similar.

HL1-style shadowing! Don't forget it, it is a historical method of shadowing! Simply place a semitransparent quad with a circular shadow below your game character/element, and bingo - you've got a shadow.

Flat-mesh shadowing. Redraw the mesh of the character or object but flatten all the Z coordinates of each vertex to the floor, and render the mesh with all-black textures. The result is a flat version of the character, in black. Check out the Nvidia 'toy soldiers' demo in wireframe mode to see what I mean. I'll post a screenshot if I find one.

Similar to flat mesh shadowing, (since I'm making up method names here I'll call this method mip-flat-shadowing!) Exactly the same as flat-mesh-shadowing except the mesh used is a less-detailed version.
 
Hmm, you guys might know that there was shadows in HL(1) once, accesable through the cvar r_shadows 1, what is that method called, it was like a black "model" that was on the ground, and it looked terrible when you stod on uneven ground.
 
You and it used to slow my system down something chronic :) Back then the old pIII450 with 128mb ram and a TNT2 was top of the line. Sadly I'm typing this message on the same machine, albeit with 256mb.
 
Originally posted by iamironsam
Nah, HL2 uses stenciled shadows and D3 uses the lighting best described by your volume shadow generation description.

Thanks for info, but... it's hard to believe, that HL2 uses stencil. That shadow bug denies what you say - those wooden boards were not processed when rendering to stencil. Why?

Originally posted by FictiousWill
I can think of three other methods of shadowing(...)

HL1-style shadowing! (...) Simply place a semitransparent quad with a circular shadow below your game character/element (...).

Flat-mesh shadowing. Redraw the mesh of the character or object but flatten all the Z coordinates of each vertex to the floor, and render the mesh with all-black textures.

The first one wasn't even worth mentioning. :) The second one is only a variation of described by me, but yes, there are this kind of shadows.
 
Doom 3 doesn't shadow some objects either if you look at some of the screen shots- trites' head don't shadow onto its legs. Objects can be selected as to whether it shadows from a certain lightsource or not. That is how Doom3 will light rooms with several lights and not kill the computer having to do hundreds of shadows. I'm sure trites would attack in groups and be very hard on the computer for very little gain. This does not mean that the wooden plank is not a bug- it just doesn't seem like a big deal to me.
 
If DIII has objects selecting (what I'd imagine) the closest light to use for its shadow casting. How does it handle the transition? Will it be a smooth transition, or a fade, or just a straight cut from light to light, which would look ugly.
 
The world of DOOM III is alive. Little interactive objects are everywhere and everything moves. Fans turn, shadows of different shapes, sizes, and intensities cast on everything from everything, and it all feels very tangible, very thick and solid.

But graphics aren't the only thing that DOOM III will change up. This time around the space marine is an actual guy with an actual face, but you only see him in the beginning and few choice instances throughout. For most of it the newly designed helmet stays on round the clock. Think of Half-Life... Gordon Freeman is seen in the load screens and a couple of other places, but he's supposed to be you, the player. Also similar Half-Life is the great amount of emphasis being placed on scripting, Obviously another method to instill fear, forward the story, and ensure that the world is there and happening while you do things.

The last Half-Life connection (believe me, I hate using that pass? comparison more than you hate reading it) is that the world of DOOM III will be one continuous trek. No level ends with stat screens will appear. Instead, load times will separate large portions of the greater map, because there simply is not enough RAM to remember it all.

check this:
http://www.ownt.com/specials/2003/doom3/doom3.shtm
and here is very interesting info:
http://www.theforumz.com/forumz/sea...id=39803&sortby=lastpost&sortorder=descending
 
Back
Top