Shadows with flashlight

Shadows do not float in the air in Doom 3. You have to look closely to notice it's not really floating.
Bolds are mine, which exemplifies what is wrong and illustrates perfectly why I started this thread.

This (dynamic lights -- the flashlight -- and the shadows it casts) is just not something JC worked on.
 
anyone try using the flashlight on a hanging body of a zombie? the shadow looks like it's floating...
 
the shadow looks like it's floating...
using the console command "r_showShadows 1" doom3 will render in wireframe the shadow volumes. in motion you can easily see that the shadows cast from the flashlight do in fact have a limited range. they effectivly float a at a capped distance from the projecting object. here's a screenshot, but you really need to see it in motion. the shadows only project a limited distance from the object.
d3volume.JPG
 
floating shadows? LOL.
How do you think this could work?
The shadow being projected to nothing?
Impossible.
 
see colon said:
ok, so the shadow should just float in the air like it does in doom?

GEEZ! How many times do we have to tell you before you finally get it? Shadows DON'T FLOAT!!! Do you even know what the shadows are in Doom3?

They're stencil volumes created by finding the outline of a 3D model and then extruding said outline backwards away from the light! The areas that new 3D model touches other geometry will be shadowed. Per definition, shadows CAN'T float with that technique because unless the shadow volume intersects with other stuff there won't be any shadowing. If the volume stopped in thin air there would be nothing rendered!

Just check this yourself by finding a nearby imp and have it toss fireballs at you, you'll see the shadows cast by it cling to nearby geometry like white on rice.

Like it has been repeated about half a million times by now, the reason shadows cast by the torch seem to be floating is because the torch and the eye-line of the player are nearly parallel and the screen is two-dimensional so you get no parallax effect (depth perception).

Could you PLEASE stop perpetuating this bullshit now?

what i did say, is that if doom3 used a non-unified lighting system like those featured in other games (farcry, painkiller) it would perform better and have nearly the same effect 80% of the time.

That's also bullshit by the way. FC and PK don't look like Doom3 at all, nowhere in either game do they look like D3. I have both right here next to me on my shelf and they Don't Look Like Doom3. Period.

...Obviously, by the way, since their lighting systems aren't anything like Doom3's... :rolleyes:

no, it's dynamic, not unified.

You're wrong. D3 has unified lighting; all lights in the game use the same technique on all geometry; level, objects, creatures. That's what unified means.

the lighting system in doom3 (the game, not the engine) is being artificially limied in a number of ways, like...
Sxotty said:
selfshadowing, monsters dont' therefore shadow eachother

That's not a limitation of the lighting system, if anything it would be a limitation of the shadow renderer. However, you can turn on self-shadowing yourself with a console command as I recall. It's likely as much a performance consideration as anything else it's not on as standard.

Btw, quite a few objects DO self-shadow. Kick over a mop/bucket and study the four little wheels underneath; you'll see them casting shadows on the bottom of the bucket.

not everything is lit the same in doom3 (the game, not the engine), thus making the lighting system NOT unified.

Wrong, all objects are lit the same way.

alpha textures don't cast shadows when you shine the flashlight on them either.

Duh. You fell on your own move there pal. Like you said; alpha textures. Textures can't cast stencil shadows, as these are generated from GEOMETRY. And the shadowing system is separate from the lighting system like I already said, so you're clearly so very wrong here. Please give up now.

here's a couple of pictures to chew on...

This is just you complaining again about stuff that's already been explained to you, shadows don't float. Period. Go find an imp and check yourself.
 
see colon said:
in motion you can easily see that the shadows cast from the flashlight do in fact have a limited range.

Of course it has a limited range. All lights in Doom3 have a limited range, if they did not, performance would be horrible. Also, it would be unrealistic if you had a flashlight with unlimited reach of its light-beam. In real life, light grows progressively fainter the further away it's cast.

they effectivly float a at a capped distance from the projecting object.

NO NO NO. They need to be projected ONTO something to be visible. You can't "project" onto thin air. What you see in wire frame mode is like you said yourself, the shadow VOLUME, not the SHADOW ITSELF.

Shadows appear where shadow volume and other geometry intersect.
 
Luminescent said:
Does anyone know why the player's shadow does not include his feet?

Yes! At least I have an opinion.

If the feet were actually drawn you would not see a shadow. I think the engine therefore doesn't draw the shadow under the feet, only from where the edge of the foot is, that is another reason it looks so crazy.
 
see colon said:
and since the engine has a unified lighting solution treating every light and surface the same, that quad with the grate would project a shadow of a quad....
but it doesn't have a unified lighting solution, otherwise the quad would be projecting a black box for a shadow. that was my point, the unified lighting system hyped up before doom3's release has been stripped down. not all objects are treated the same by the lighting system in the game, so the system is not unified.

The quad does project a black box. Obviously, that is not correct because the idea is to have a grate. The shader of the grate has to have implicitly a flag called "noShadows", because the game lights and shadows everything the same way (including the quad). In this case, that wouldn't look good...

Turn r_showSurfaceInfo on. Then find out the material of the grate. Go to the materials, find it out and see if it doesn't have noShadows... Then, remove the noShadows.
 
Guden Oden said:
see colon said:
they effectivly float a at a capped distance from the projecting object.

NO NO NO. They need to be projected ONTO something to be visible. You can't "project" onto thin air.

Actually, you CAN project into thin air. Simply cut off the projection at a certain range, and use THAT cut-off surface as the shadow surface. (In other words: The cut-off surface acts as an artificial geometry for projecting the shadow on)

Not saying that that is what is happening, but technically it's easily possible, and it would create floating shadows.
 
see colon said:
using the console command "r_showShadows 1" doom3 will render in wireframe the shadow volumes. in motion you can easily see that the shadows cast from the flashlight do in fact have a limited range. they effectivly float a at a capped distance from the projecting object. here's a screenshot, but you really need to see it in motion. the shadows only project a limited distance from the object.

ah... that's starting to make sense now. :)

But it seems like the distance cap is very very short. I was flashing a light at a hanging body, which was in the middle of a hallway, pointing the light at the wall.

Any way to extend this cap? (in one of the def or script files?)
 
Heh I see how so many people like to comment on how they think things are working in Doom 3 without at least using the various commands that could have showed them how it really was :p Too bad I wasn't around when this was posted two days earlier :/

Anyways most the issues seemed to have cleared up though.

Ylandro said:
It's painfully obvious that while you see some thirty lamps in the hangar, there are very few, maybe only two (!) true lightsources...

All these lamps on the walls and above the door are fake.

And its painfully obvious you didn't even bother to confirm what you think and you happen to pretty wrong.

Hehe though I see kyleb has covered it but just figured I throw in some screenshots real quick.

Everyone of the boxes you see below is a light

lightcount.jpg


Now this image below shows you how many lights are actually interacting on a surface.

For reference
Black - No Lights
Red - 1 Light
Green - 2
Blue - 3
Light Blue 4
Pink - 5
White - 6+

number.jpg


There is no floating shadows in Doom 3 considering a shadow is just the lack of light on a surface. So for a shadow to be there in the Doom 3 engine it has to mean some surface is not being lit due to falling within the stencil shadow. There is no fake projected shadows like most engines have traditionally done so no more discussions on these floating shadows. :p

Heh on a side note I wish they had the playermodel drawn like in Thief 3 so when you looked down you could see your body (except your head).

Also why did Reverend show 2 screenshots from like 2 different systems (color tone and FPS are completely different so I'm assuming they are two different systems)?
 
When I look at the hangar scene then it feels like there is a big discrepancy between the myriads (well, dozens) 'apparant' light sources and the actual lighting of the place.

For example, if you stand in the place where shot_demo001 was taken then the shadows of the boxes seem to be off - the half dozen or so strong lights on the wall that are closest do not cause visible shadows (except for a faint one from a non-existent point light in the middle between two fluourescent tubes) and the visible strong shadow is not correlated to any of the lights - in fact the shadow points towards the lights on the wall and it could only be explained if there were one hell of a big strong light in the middle of the ceiling - like on the order of megawatts - whose light magically bends around the dropship.

Also, there's way too many pitch-black shadows on surfaces that 'see' quite a lot of the lights on the wall (not to mention things like diffuse reflection). If you are on the walkway that connects the shot_demo001 platform to the level were the entrance is and the guy who wants to get the hell of Mars then the dropship shadow and the guy's shadowed parts are so close to RGB(0,0,0) as makes no odds. This may have been a conscious decision to avoid the banding that can be very noticable in areas that are 'merely' dark instead of pitch-black, but it does look unnatural.

Current hardware may be unable to render the scene at adequate framerates if the light definitions were more accurate but it was id's choice to place more than two dozen apparent light sources into the scene, nobody forced them to do this.

There were only two other scenes were the wrong lighting pulled me right out of the game and so it isn't a big deal, but on the other hand you'd think that id would want the first scene in the game to look good instead of showcasing the limits of the engine. Same for the very low-res textures and polygonish look of the things that you are pretty much forced to look at closely while you wait for the bio scan to complete.
 
@Cryect
If you just look at your own pictures, you see your arguments don't hold.

Look at your bottom picture: The majority of surfaces is interaction with 1 to 3 lights. The complete floor is only interacting with 2 and 3 lights. Isn't that exactly what I said?

Those supposedly many light thus simply don't exist in practice... Maybe you should think about why the floor is interaction with 2 lights, when there's supposed to be 30 definied that are close enough to interact....

Anyway, I don't care at all how it's coded. I care about what I see as the end result. And when you look at the game, you see clearly that the majority of the 'lamps' are absolutely not true radiating lights, simply by the lack of shadows that they should produce.

Exactly the same as DarthFrog is describing. The visisble lamps don't correlate to the shadow casting lights.

It's not only here, you see that everywhere. Three spotlights over a bench, but only one shadow... Simply impossible.
A guy standing next to an object. The object has 2 shadows coming from two lights. The guy has one shadow, although he's closer to the lights.... Again, not possible.

Now, I don't mind that much. Clearly, it's neccesary for performance.
But please don't go pretending that D3 doesn't cut corners...


Still haven't figured out the 'floating shadows'. There seem to be situations where the explanation of an optical illusions doesn't hold. The picture with the pipe from 'see colon' is such an example...
 
Ylandro said:
@Cryect
If you just look at your own pictures, you see your arguments don't hold.

Look at your bottom picture: The majority of surfaces is interaction with 1 to 3 lights. The complete floor is only interacting with 2 and 3 lights. Isn't that exactly what I said?

no, you said:
Ylandro said:
there are very few, maybe only two (!) true lightsources...

All these lamps on the walls and above the door are fake.

When, in fact; there are dosens of light sorces in the room, each playing off the surfaces within the range of it's brightness.
 
BTW you are wrong about the pipe shadow. The shdaow is correct on the geometry, but the pipes are not real. They are faked so the shadow doesn't bend around them.

Like the cabinets and medicine bottles if you noticed they had a psuedo 3d look but it was fake.
 
Sxotty said:
BTW you are wrong about the pipe shadow. The shdaow is correct on the geometry, but the pipes are not real. They are faked so the shadow doesn't bend around them.

So why does such a high tech fancy pants 3D engine still use fake pipes!! :devilish:
 
Ylandro said:
@Cryect
If you just look at your own pictures, you see your arguments don't hold.

Look at your bottom picture: The majority of surfaces is interaction with 1 to 3 lights. The complete floor is only interacting with 2 and 3 lights. Isn't that exactly what I said?

Well you said

It's painfully obvious that while you see some thirty lamps in the hangar, there are very few, maybe only two (!) true lightsources...

Which is completely false, now how many surfaces the light interacts compared to what it should interact with (practically everything if its bright enough). But most those aren't very bright lights so they falloff outside of the range of those boxes. Most lightsources shouldn't be effecting every damn thing in a room and only that which is close to it.

Also just because a surface "sees" a light doesn't mean the light hasn't fallen off to black by then.

On the shadows, not every light casts shadows in Doom 3. Not sure how if shadows have been disabled for it then its not a "true" radiating light.

Never said Doom 3 doesn't cut corners, but is there a reason to have light boxes be so huge when the light level has already fallen to less than 1%?
 
Ylandro said:
Look at your bottom picture: The majority of surfaces is interaction with 1 to 3 lights. The complete floor is only interacting with 2 and 3 lights. Isn't that exactly what I said?

Those supposedly many light thus simply don't exist in practice... Maybe you should think about why the floor is interaction with 2 lights, when there's supposed to be 30 definied that are close enough to interact....

Anyway, I don't care at all how it's coded. I care about what I see as the end result. And when you look at the game, you see clearly that the majority of the 'lamps' are absolutely not true radiating lights, simply by the lack of shadows that they should produce.

Exactly the same as DarthFrog is describing. The visisble lamps don't correlate to the shadow casting lights.

It's not only here, you see that everywhere. Three spotlights over a bench, but only one shadow... Simply impossible.
A guy standing next to an object. The object has 2 shadows coming from two lights. The guy has one shadow, although he's closer to the lights.... Again, not possible.

Now, I don't mind that much. Clearly, it's neccesary for performance.
But please don't go pretending that D3 doesn't cut corners...

:oops: You joke right? I mean, even if you think about it, it is very simple. All lights in this earth are attenuated, meaning that a small light will not lit something far away... Obviously, Doom3 calculates where the light reaches. Outside the lights frustum, there is no need to light the surface or cast shadows of surfaces out of the frustum... Isn't it obvious?

Little lights on the ceiling will not contribute to the final color of the surface of the floor because they are not close enough to interact or simply, if they are spotlights, not turned into the surface's direction. If you had indeed think about it, if Doom3 would lit a scene like you said, then we would see only one color for every surface...

Again, think of light attenuation and frustum and you may get an answer to your problem of: "The object has 2 shadows coming from two lights. The guy has one shadow, although he's closer to the lights"
 
kyleb wrote "When, in fact; there are dosens of light sorces in the room, each playing off the surfaces within the range of it's brightness."

Then why do most lights not affect the barrels/boxes? I pushed them all over and very few lights affect them. most notably, the lights along the floor do nothing at all.


Cryect wrote: "Everyone of the boxes you see below is a light "
Every one is a light but they most certainly are not all rendered in the same manner.

Edit: After some thought, I may be wrong about the lights not being rendered in the same way . The dynamic lights and dynamic objects are probably done on a seperate pass from the static ones... rendered afterwards. That would explain what I am seeing.
 
Sigma said:
:oops: You joke right?

I haven't been more serious in my life.

I mean, even if you think about it, it is very simple. All lights in this earth are attenuated, meaning that a small light will not lit something far away... Obviously, Doom3 calculates where the light reaches. Outside the lights frustum, there is no need to light the surface or cast shadows of surfaces out of the frustum... Isn't it obvious?

That's NOT what is happening. Most apparant lights either
1. don't radiate at all, or
2. their attenuating is ridicilousy high, giving the same effect.

And that is exactly why the floor, which even with attenuated lights, SHOULD interact with a lots of lights, actually is reached by very few.

There's lots of cases, where close by apparant lightsources with high intensity, do not light and cast shadows at close by objects, while at the same time it is illuminated by some unclear far away lightsource.

Again: The apparant lightsources and their intensity, quite often simply don't match with the rendered shadows and illumination.

That is not a simple obvious attenuation problem.


NB: Just cutting of attenuated lights is acutally not as obviously acceptable as you think... Light traveling through air doesn't disappear into nothingness. Just the illumination area grow larger. 10 lightsources that illuminate adjactent area's, are not stronger than 10 lights that are placed far away and shine on the same area... You have to be VERY carefull with cutting off the area of effect of lightsources on the argument of attenuation.... In D3 it seems that that went wrong quite often.

Little lights on the ceiling will not contribute to the final color of the surface of the floor because they are not close enough to interact or simply, if they are spotlights, not turned into the surface's direction. If you had indeed think about it, if Doom3 would lit a scene like you said, then we would see only one color for every surface...

What???? In your words: ":oops: You joke right?"

Again, think of light attenuation and frustum and you may get an answer to your problem of: "The object has 2 shadows coming from two lights. The guy has one shadow, although he's closer to the lights"

Oh? light atenuation can explain why an object that is farther away from the lightsources gets more shadows than the one close by?
And it can explain why a bench that is illuminated by three similuar spotlights at the same distance still only receives one shadow, and not three?

Please explain! I'm apparanly too stupid for that.
 
Back
Top