Yes, another lighting/shadow question :)

Joined
Jun 24, 2004
Messages
1,689
Reaction score
0
Now be gentle, this question is too innocent:

In Far Cry when you're walking under trees, shadows are actually cast onto your gun (one of my favorite graphical things in FarCry).

Does anybody know if HL2 is gonna have that feature enabled?
 
Yes. HL2 does this. Most shooters these days do.

Didn't HL even have lighting on the gun?
 
Yeah, but FarCry looked really good. But FarCry actually had leave shaped shadows on the gun and that's what struck me. DX2 had shadows as well, but the shadow was on the entire gun (I belive)
 
I'd say no

besides FarCry used a trick to do that, quite a simple one but one of the few things that impressed me about that game.
 
the shadows on the guns in HL2 will be the same as how the shadows on npcs are.. if you've seen the father gregory vid you can see how the shadow rolls off the gregory dude.. so part of the gun can be shadowed while other parts of it are under light, therfor you can have part of it lit up as well as another part shadowed at the same time..
 
Yeah!&^^^^^
And Father Grigory Rocks!
Hes got like this old school golden double barreled shotgun!
 
I think maybe in DX9 mode. But meh I don't even have a comp that is powerful enough to run that feature in Far Cry yet at decent frame rates so I don't care :\
 
There's a possibility of it but i won't really care that much if it isn't in the game. Doom 3 has that feature as well.
 
^^^^Cheers^^^^
I wanna take a barrel and smash it into him against a wall, again and again.

question: If we take an object with the manipulator and dont shoot it, but whack someone with it, does it do damage?
 
OH yeah, for you that don't know what I mean with shadows on the gun, here are some pics (I like those, because it looks like the grass is shading the gun):
 

Attachments

  • Far Shadow 1.JPG
    Far Shadow 1.JPG
    96.7 KB · Views: 418
  • Far Shadow 2.JPG
    Far Shadow 2.JPG
    99 KB · Views: 399
I think it can be done, plus some other nice effect like the reflections on the crowbar or the USP.
McFly maybe depending on the object? Like if you move a table around, but I don't think a cardboard box would have that effect.
 
Yeah, ut2k4/3 does it too sometimes in rare places. I'd like to know more about how it's done. A very impressive effect, imo.
 
Objects don't cast shadows onto other dynamic objects in HL2. That isn't a feature of Source. A dynamic object would be shadowed if it enters a shadowy part of a map, but you won't see things like a leaf projecting a correct shadow onto a dynamic object, like a gun. They could probably put a little hack in to mimick the effect if they wanted to, like telling the game to render shadows based on a image file onto the gun when under a tree, but I don't think they will. In Farcry you spend a lot of time under a tropical canopy, so the effect is justified. In HL2 you don't. Would be cool if it was in, but isn't a big deal.
 
yeah that is pretty much the only thing i dont like about hl2, no fully dynamic shadow volume system, like in unreal 3

this system means that EVERYTHING casts a dynamic shadow in the game, nothing is preprocessed at bsp genration with lightmaps like in hl2
 
Source features this guys when will you get it straight? Half Life 2 doesn't use it to a great extent though it can be seen in some places, check the bottle and bag over the table on the trainstation part of the E2k4 vid , or the strider's shadow projected onto the building on the strider bink. It is not use to the extent of Doom3 and not near it's level either but we might still be a bit surprised.
 
In Far Cry and UT2003/2004, the shadows cast from trees and foilage are not actually being computed in real-time using any geometry withing the level. It's a trick, the shadows are actually textures created by the artists, and projected onto the scene via an entity which is very similar to a camera (at least this is the case in UT2003). It's very effective however, and very, very useful for faking some very complex lighting effects since you can project ANY texture onto a surface (simulating the light patterns created on an object by light streaming through a stained glass window for example). I'm not sure if HL2 supports these or not.

Here is an article on it as to how it was done in UT2003/2004: http://udn.epicgames.com/Two/ProjectorsTableOfContents
 
FictiousWill said:
Yeah, ut2k4/3 does it too sometimes in rare places. I'd like to know more about how it's done. A very impressive effect, imo.
That is done using a trick. They use a projecter object to cast a light texture on you. It isn't actual lighting, although it almost looks like it!
 
these fake shadowing techniques are basically certain parts of the terrain being adjusted with brightness when a mapper compiles a map with HLrad.exe
 
Source features this guys when will you get it straight?

No, it doesn't. In Source, Dynamic objects do not cast shadows on themselves, and they do not cast shadows onto other dynamic objects. Dynamic objects DO cast shadows onto non-dynamic objects, such as the ground or a building(in your example a Strider will cast a shadow onto a non-dynamic building), but no dynamic shadows will be cast onto dynamic objects.

And no, HL2 doesn't do what Doom3 does, just to a lesser extent. Doom3 uses a unified lighting system, which means all surfaces in the game are lit the same way. this allows objects to cast shadows on themselves and other dynamic objects and non-dynamic objects alike. HL2 does not use a unified lighting system, it's shadowing system is a series of different kinds of tricks. Therefore, different surfaces are lit in different ways. This produces inconsistancies like some objects casting dynamic shadow while others don't, and some objects recieving shadows while others don't. It's just the way Source was built.
 
Devilphish said:
No, it doesn't. In Source, Dynamic objects do not cast shadows on themselves, and they do not cast shadows onto other dynamic objects. Dynamic objects DO cast shadows onto non-dynamic objects, such as the ground or a building(in your example a Strider will cast a shadow onto a non-dynamic building), but no dynamic shadows will be cast onto dynamic objects.

And no, HL2 doesn't do what Doom3 does, just to a lesser extent. Doom3 uses a unified lighting system, which means all surfaces in the game are lit the same way. this allows objects to cast shadows on themselves and other dynamic objects and non-dynamic objects alike. HL2 does not use a unified lighting system, it's shadowing system is a series of different kinds of tricks. Therefore, different surfaces are lit in different ways. This produces inconsistancies like some objects casting dynamic shadow while others don't, and some objects recieving shadows while others don't. It's just the way Source was built.



"2 - Would it be possible for a mod team to add a totally real time lighting/shadowing system (like doom3's) or would this be something that you would need the source code for?
*** You should get all of the code you need in the final SDK to do this as a mod maker." - http://www.halflife2.net/forums/showpost.php?p=553849&postcount=634
 
The source engine does not do this how ever rick ellis said it would be possible to add this in a mod without having to have the source code

Rick Ellis said that the engine does have dynamic lights (used for things like the flashlight and stuff) that can be used as an entity in a map so you could attatch it to a physics object and it will light an object realisticly but it will not cast shadows (much like the dynamic lightsin the unreal 2.x engine)
 
What's unsatisfactory about projector shadows is that their effect isn't blocked by objects they cast upon, so objects further on still get the texture applied to them. One demo image for Unreal Engine 2.0 shows sunlight through a stained glass window projecting the colors of the windows onto a wall. A player positioned in the light would have the correct pattern of colored light on him (assuming per pixel here), but the wall behind him still receives the texture as if he weren't there. If the dynamic shadow from the character cast upon the wall is not pitch black, you'll see the stained-galss pattern--now darker--but still there. In the Unreal Engine 3.0 vid, this exact situation occurs, but the area on the wall hit by the character's shadow is correctly not influenced by the stain-glass (is it a projector in this case? it's rotating, so it's not static).

Shadows are additive--two shadows striking a surface make an area darker than either shadow would by itself--but even if the projector texture is supposed to be a shadow (as opposed to the stained-glass case where it's a light), this still creates a problem. This is because, if an object casts a shadow on a wall and you stand in between, the area effected by your shadow should only be as dark as your own and not made darker by the other shadow: it should have one shadow, not two. You should be blocking the 'anti-light' cast by the other object. Notice though, a correct implementation of this is just as difficult as projecting rays of light in the first place.

This whole business of treating shadows as objects added on to the world after lighting gets tricky fast. No wonder nature doesn't do it that way. Too complicated :D
 
If you use enough projectors it'll solve that problem though. If the person standing in the stained glass projection projects their own black shadow, it covers the projection from the window. Kindof a reverse shadow overlay thing. That is, assuming the overlays are additive.
 
FictiousWill said:
If you use enough projectors it'll solve that problem though. If the person standing in the stained glass projection projects their own black shadow, it covers the projection from the window. Kindof a reverse shadow overlay thing. That is, assuming the overlays are additive.


Yes, i thought I mentioned this. A pitch black shadow will solve this (and a very dark shadow will make it less noticeable).
 
edity edity eh?

It would be a pain for non-bsp walls I guess. The general idea is that you shouldn't have to deal with all that junk, just place a lightsource and the raytraces are done for you. Thus D3 or U3 engine.
 
This whole business of treating shadows as objects added on to the world after lighting gets tricky fast. No wonder nature doesn't do it that way. Too complicated.

Too complicated? So they cant fix that problem in the source code? Or will it just take a genius and it is possible.?.?.?

Dont know much about the technical stuff but I think what you may be getting at is the shadowing problem that ive seen in the hl2 demo movies. Like when the player is lifting a container with a magnetic crane you see the container's shadow AND you can see the cricular magnet's shadow inside of the container's shadow. Ive also seen this problem with objects on top of tables and you can see their shadow on the floor as if the table was translucent.
Make me so angy!
(maybe they will have it fixed in the end, i hope i hope i hope i hope.)
 
At the end of the day even umbra/penumbra blurred unified stencil shadowing is just a trick. Someday polygonal rendering will be a thing of the past. Fps's will run on raytracing engines, and you'll have all the light effects you could ever want or need.
 
Welcome to the forums Idonotbelonghere

And yes i think its stated in the Valve Info thread that its been fixed
 
Yeah, I'm really glad they fixed that dynamic shadow on dynamic shadow problem. That was probably the biggest thing that annoyed me. On the other hand HL2 would be no worse of a game if they didn't fix it.
 
I wonder if HL2 already uses or can use a trick or needs to add code to make clouds casting shadows in terrain, like this:

http://www.unrealtechnology.com/screens/TerrainShot.jpg

In the Xpand Rally Demo the effect is cool, you can see how clouds move around slowly and the sun shines while you're not below a cloud, making glows in the car.
 
It's basically the same kind of lighting as seen on people, wouldn't you agree? What would be different anyway.
 
Idonotbelonghere said:
Too complicated? So they cant fix that problem in the source code? Or will it just take a genius and it is possible.?.?.?

Dont know much about the technical stuff but I think what you may be getting at is the shadowing problem that ive seen in the hl2 demo movies. Like when the player is lifting a container with a magnetic crane you see the container's shadow AND you can see the cricular magnet's shadow inside of the container's shadow. Ive also seen this problem with objects on top of tables and you can see their shadow on the floor as if the table was translucent.
Make me so angy!
(maybe they will have it fixed in the end, i hope i hope i hope i hope.)

What I was referring to isn't a 'problem' so much as a limitation of the design. Something like Doom3--having shadow volumes produced from the strongest/nearest light and then having them affecting all objects in the world (moving and static)--would probably require some low-level overhauling of the Source engine. I'm sure Valve has been working for quite a while now on a revision of Source that does Unreal Engine 3.0 style realtime lighting and shadowing (the Valve core tech guys supposedly finished their work on HL2 in late 2002; they must have been keeping busy since then--just don't expect to see what they've been working on in HL2; maybe we'll see these updates in TF2 or made available for mod makers).
 
Even quake1 has simple shadow on weapon feature :)
Though it just lights/darkens the weapon depending on the light the player is currectly standing in.
 
I remember playing that mod for Quake 1. I had a GeForce 4 MX at the time and boy did it run bloody slow, almost unplayable. Hopefully they've optimised it further.
 
OCybrManO said:
If amateurs can turn the Quake 1 source into THIS... I'm sure someone could do decent lighting in the Source engine.

EDIT: more screenshots
To be fair, they do have access to the complete Quake 1 source code. Half-Life 2 mod makers won't have that luxury.
 
Back
Top