Shadow Rendering

Blackthorn

Newbie
Joined
Jan 11, 2008
Messages
1,617
Reaction score
3
Today I was thinking about the way shadows are rendered in games. Now I don't know much about 3D design and development, so this may be a little vague and/or misinformed. Right now, AFAIK, shadows are simply overlays on textures that make them appear darker in the shape of the model they're being cast by and only exist relative to the model (apart from things like self-shadow bump maps). Wouldn't a far more accurate level of detail in shadows be achievable by having the light properly be cast by an object, with obstructions causing shadows naturally as they would in real life? To an even greater degree, properly calculating the intensity of the light and distance of the shadow could stop all shadows having the same sharp or blurry edges.

As I said, I know little about the specifics, but please fill me in if this is being/has been done so I can stop thinking about it.
 
This is exactly what someone is doing as a project in a HL2 mod. Although currently buggy, it does look promising
 
Today I was thinking about the way shadows are rendered in games. Now I don't know much about 3D design and development, so this may be a little vague and/or misinformed. Right now, AFAIK, shadows are simply overlays on textures that make them appear darker in the shape of the model they're being cast by and only exist relative to the model (apart from things like self-shadow bump maps). Wouldn't a far more accurate level of detail in shadows be achievable by having the light properly be cast by an object, with obstructions causing shadows naturally as they would in real life? To an even greater degree, properly calculating the intensity of the light and distance of the shadow could stop all shadows having the same sharp or blurry edges.

As I said, I know little about the specifics, but please fill me in if this is being/has been done so I can stop thinking about it.

I would imagine the problem would be with processing power. The more accurate you're trying to make it, the more cpu cycles it would need to be pulled off. It's often easier to pull smoke and mirror tricks because they're less resource-intensive.
 
Today I was thinking about the way shadows are rendered in games. Now I don't know much about 3D design and development, so this may be a little vague and/or misinformed. Right now, AFAIK, shadows are simply overlays on textures that make them appear darker in the shape of the model they're being cast by and only exist relative to the model (apart from things like self-shadow bump maps). Wouldn't a far more accurate level of detail in shadows be achievable by having the light properly be cast by an object, with obstructions causing shadows naturally as they would in real life? To an even greater degree, properly calculating the intensity of the light and distance of the shadow could stop all shadows having the same sharp or blurry edges.

As I said, I know little about the specifics, but please fill me in if this is being/has been done so I can stop thinking about it.

i don't know much either...but isn't there a difference between static and dynamic shadows/lightning?
one is prerendered and one adapts on the situation.
but it's obvious to have real time shadows you need processing power.
 
Dynamic shadows still aren't the same as what I'm saying though. They move and skew relative to the position of the light source, but they're still overlays and not actual obstructions of the light. What I'm thinking about is light actually being blocked by the objects, and that's what causes the shadows, so in effect there's no shadow overlay at all, more of a dynamic light overlay. Obviously as KagePrototype said, this would require a hefty amount of processing power.
 
You did it Blackthorn. You discovered a completely new technique to rendering lighting in video games. Have it behave exactly like real life! Genius! Pure genius. Why didn't anyone else think of this?
 
Guys I just got an even cooler idea.

Why don't we program the AI to have actual brains? Like, just like humans do. That way they would behave perfectly realistically. I think it would work great, instead of relying on scripted sequences and pathfinding and stuff.

Heheh, I'm only having a bit of fun :p
 
More work to be done on the shader models please.

I can't stand when a nice face is ruined by spazzing, checked shadows.
 
Guys I just got an even cooler idea.

Why don't we program the AI to have actual brains? Like, just like humans do. That way they would behave perfectly realistically. I think it would work great, instead of relying on scripted sequences and pathfinding and stuff.

Heheh, I'm only having a bit of fun :p
Yeah yeah I realise it's asking a lot, and it's obviously what developers are eventually aiming for, I just wanna know if there's anyone doing it now.

In the meantime, me and you start out own dev team called BlackVeg to create a perfect, simulated Planet Earth.

More work to be done on the shader models please.

I can't stand when a nice face is ruined by spazzing, checked shadows.
Very much this.

MGS4 did a good job with self shadowing, but came with a sacrifice: pretty lame job at distant shadows.
 
We'll cut out all this bullshit work-around rendering techniques and just do it the way nature does it. It's really the best solution.
 
Dynamic shadows still aren't the same as what I'm saying though. They move and skew relative to the position of the light source, but they're still overlays and not actual obstructions of the light. What I'm thinking about is light actually being blocked by the objects, and that's what causes the shadows, so in effect there's no shadow overlay at all, more of a dynamic light overlay. Obviously as KagePrototype said, this would require a hefty amount of processing power.

Cry engine does that. Incredibly well too I might add.
 
More gpx = more dev time

IMO i would prefer the time and money being used for stories and dialogue.

It seems to me that dev teams are now buying 3rd party software (speed-tree,havok etc-) to cut down time on development. Then they can focus on proper IP and not have 6 and 7 games with the same name no variety.
In conclusion i prefer the time and money to be used in diferent aspects of a game.
I want games to substitute movies in 10 years, in in 7th art form.
 
Today I was thinking about the way shadows are rendered in games. Now I don't know much about 3D design and development, so this may be a little vague and/or misinformed. Right now, AFAIK, shadows are simply overlays on textures that make them appear darker in the shape of the model they're being cast by and only exist relative to the model (apart from things like self-shadow bump maps). Wouldn't a far more accurate level of detail in shadows be achievable by having the light properly be cast by an object, with obstructions causing shadows naturally as they would in real life? To an even greater degree, properly calculating the intensity of the light and distance of the shadow could stop all shadows having the same sharp or blurry edges.

As I said, I know little about the specifics, but please fill me in if this is being/has been done so I can stop thinking about it.

Um, what you're talking about is called ray tracing. It actually came about long before the overlay shadows we use in games today, and is the basis of all modern CGI rendering. One game that uses ray tracing is Doom 3.

http://en.wikipedia.org/wiki/Ray_tracing

300px-Recursive_raytrace_of_a_sphere.png


300px-Glasses_800_edit.png
 
Thanks, I can sleep easy now. I guess this'll be what to expect on the next generation.
 
I wish there'd be less ado about graphics and more about gameplay, story and narration.
 
And AI, damnit.

I want the AI in games to shock me like it did when I first played Half-Life.
 
Um, what you're talking about is called ray tracing. It actually came about long before the overlay shadows we use in games today, and is the basis of all modern CGI rendering. One game that uses ray tracing is Doom 3.

Doom 3 doesn't use Ray Tracing. Not even remotely the same principle.

http://en.wikipedia.org/wiki/Shadow_volume
 
Yup, ray tracing is what you're after. Or rather, as close as you're going to get for now.

It's still not as efficient as rasterization and all of the techniques will have to be reworked.

However, ray traycing will never be the lighting solution in games. It's going to be a mix with global illumination models as well. For example, let's say a designer is working on a scene and he sets up the scene how he wants it, but he wants to get rid of some shadows (to get proper contrast between elements or something). In pure ray-tracing, good luck with that as it would be fairly tough.

I'm actually doing work with lighting and shadow algorithms this semester, so we'll see how it goes.
 
I would imagine the problem would be with processing power. The more accurate you're trying to make it, the more cpu cycles it would need to be pulled off. It's often easier to pull smoke and mirror tricks because they're less resource-intensive.
^This

All gfx effects are smoke and mirrors though when you really think about it.

Ten years ago, there's wasn't such a thing as bump mapping and specular lighting.

It was all just plain whitewash (textures) colors painted over a series of wire-framed vectors, plains, and tangents. A few years later, better quality paints with glitter and grits (bump mapping and specular) was created in specification to the current top-end hardware to give an illusion of a more realistic, believable environment(s).

Our current cutting-edge hardware still needs programming shortcuts for the time being to compensate. It's a developing process until it becomes available.

It was the mistake Crytek developers made with Crysis when it was first released. Their techniques were far too ahead of it's time for the current top-end hardware.


I wish there'd be less ado about graphics and more about gameplay, story and narration.
^agree

It's seems publishers are more concerned with tech demos than creating an immersive/fun experience these days. Even the games I like anymore falls slighty short off the mark seemingly for this reason.
 
It's seems publishers are more concerned with tech demos than creating an immersive/fun experience these days. Even the games I like anymore falls slighty short off the mark seemingly for this reason.


Gameplay is something that you either have great or not really. With graphics, it's what helps sell the game and is what is shown to everyone (think of all the times you looked at screenshots. You were basically just looking at the graphics and how good it looked)

Usually you just have a set game design, follow it and tweak it. When you start getting something solid, you have to judge whether what you have is fun or not (most studios do this step way too late in the process). It's sort of treated like a second class citizen at time because nobody really can understand what is "fun". They'll just create the game they designed, and hope it turns out for the best.

Graphics are a lot more concrete and you can tell whether what you've created is good or bad.
 
Gameplay is something that you either have great or not really. With graphics, it's what helps sell the game and is what is shown to everyone (think of all the times you looked at screenshots. You were basically just looking at the graphics and how good it looked)

Usually you just have a set game design, follow it and tweak it. When you start getting something solid, you have to judge whether what you have is fun or not (most studios do this step way too late in the process). It's sort of treated like a second class citizen at time because nobody really can understand what is "fun". They'll just create the game they designed, and hope it turns out for the best.

Graphics are a lot more concrete and you can tell whether what you've created is good or bad.
Yeah, but what about user feedback? Forums, blogs, reviews etc?
They can still get a good idea of what gamers like and still incorporate elements from both mainstream opinion and hardcore fans alike so that everbody gets alittle of everything they like from games.

It's not that easy though is it? :p
 
Yeah, but what about user feedback? Forums, blogs, reviews etc?
They can still get a good idea of what gamers like and still incorporate elements from both mainstream opinion and hardcore fans alike so that everbody gets alittle of everything they like from games.

It's not that easy though is it? :p

Nope, it's not. For starters, if a core gameplay piece is flawed, there's very little chance of being able to go back and fix it to make things fun due to all of the repurcusions it could have on everything already created. For example, if all of a sudden you think that your character would have a much better time if they could fly, that would affect level design, rendering, AI, rethink of the controls, etc... It wouldn't be that difficult to code, but the fact that it would affect sooo many things is what makes it hard.

Nice thing about graphics is that it really only deals with one thing. While it's also a bad thing to change things as you get near the end, it's not as catastrophic usually since most of the time it's just optimization.
 
Back
Top