Skip to main content
GameDev.net gamedev.net
🔒 Locked

Lighting in Doom 3 and HL 2.....Few questions

Started by Erock Aug 1, 2003 at 5:59 AM 48 replies 23.2k views
Original Post
Erock
Erock
As much as I have read on these to games, I still have no idea exactly what type of lighting systems each one is using. I am looking for someone/ones to clear this up for me and give me a detialed answer on which type/types of lighting they are using and how it works. From what I understand Doom 3 is using some type of real time radiosity lighting system, but not sure exactly how that is possable. HL 2 to me looks like it''s using standard precalulated radiosity lightmaps with some per pixel lighting on the models, anyone know for sure? Any help would be great, thanks.
noVum
noVum
Doom 3 uses simple perpixel lighting with stencil shadows, nothing fancy (only direct illumination, no GI)

HL light looks like precalculated light maps
Erock
Erock
Ahh ok thanks man, if anyone else has anything else to add I am all ears
cseger
cseger
Doom3''s lighting was always a big inspiration for me, and I''ve read alot of the post/interviews about the subject.

Here''s what I know:

Doom3: Per-pixel bumpmaps, diffuse, specular, and light-filter cubemaps. Stencil shadows volumes for ALL lights. While this is not that impressive in itself, the most important thing is that it is _unified_, i.e. everything in the world is exactly the same. So you get no differences between the world and the objects/characters. I guess most of carmack''s work has gone into optimizing and making sure the shadows work in ALL cases, which is easier said than done.

Half-life 2: Lightmaps on world, 1 shadow map per object/character. Which is the old way of doing things, however, from looking at the E3 films, it seams that most of Valve''s work has gone into FX-shaders, and making the world/surfaces very flexible. And also the characters of course.

Pros and cons for either strategy can be argued, but I believe that Doom wins in the graphics area, and Half-life wins in the game-play and world-dynamics area.

Erock
Erock
"Doom3: Per-pixel bumpmaps, diffuse, specular, and light-filter cubemaps. Stencil shadows volumes for ALL lights. While this is not that impressive in itself, the most important thing is that it is _unified_, i.e. everything in the world is exactly the same. So you get no differences between the world and the objects/characters. I guess most of carmack''s work has gone into optimizing and making sure the shadows work in ALL cases, which is easier said than done."

That kind of detail is more along the lines of what I was looking for, thanks. But about the bump maps, everything I have seen on Doom 3 points to normal mapping and not bump mapping. Please don''t tell me normal mapping is a form of bump mapping, I know this And can you expline a bit more about light-filter cubemaps, I think I know what they are, or at least somewhat, but not 100% sure.


"Pros and cons for either strategy can be argued, but I believe that Doom wins in the graphics area, and Half-life wins in the game-play and world-dynamics area."


Yea I fully agree with that, I saw HL 2 up close at E3 and the graphic engine never impressived me. It does a few things nice like water, but over all nothing to impressive. Its physics, AI and world-dynamics are a diffrent story though, very very impressive! Many games look better on PC then HL 2, but none come close to gameplay from the looks of it.

AN_D_K
AN_D_K
Does no one else think that the lighting in Doom 3, as clever as it is, just doesn''t look real? Everything kinda looks plastic and each object doesn''t really blend into the overall world.
sjelkjd
sjelkjd
Actually it''s the other way around to me - I watch HL2 and it looks fake, but I watch Doom3 and it looks more real(obviously still a long ways to go, but it''s the better of the two).
Yann L
Yann L
quote:
Original post by AN_D_K
Does no one else think that the lighting in Doom 3, as clever as it is, just doesn''t look real? Everything kinda looks plastic and each object doesn''t really blend into the overall world.


Yes, I agree with that.
y2kiah
y2kiah
you''re looking at still shots... trust me when you actually play the game you will be blown away by the lighting. It''s all dynamic, you''ve never seen anything like it before so why are you dissing it? The plastic effect is not from the lighting, it''s the bumpmapping which has always been a problem. It''s hard to simulate a rough dull surface with a bumpmap unless it has extreme resolution.

I like the way HL2 looks also, but I think they have their advantages in different ways. HL2 seems to rely on huge photoreal textures while doom3 is more of a "game art" style, but the engine is clean and precise.
Yann L
Yann L
[offtopic]

quote:
Original post by y2kiah
trust me when you actually play the game you will be blown away by the lighting. It''s all dynamic, you''ve never seen anything like it


I have, trust me

Actually, as you said, the D3 engine is clean and precise. Much too precise to be realistic, which is mostly due to the hard stencil shadows, which are unrealistic per-se (lack of soft shadows). The other very important thing is the lack of a pseudo-dynamic GI. When I look at D3, I feel like I''m thrown back into the times of 3DStudio 4, with simple pointlights and hard, raytraced shadows. You can do so much more on todays hardware. I think that D3 was in development for far too long. When it was originally being designed, it was surely revolutionary. But today, it is pretty much outdated before it even ships. I think it is overrated, by far. I seriously don''t know what Carmack was thinking. OK, he chose shadow volumes. Would not have been my choice, but OK. What I really don''t understand though, is the lacking support for advanced pixelshading capabilities. Where is the soft shadow option ? Where is the GI ? Carmack & friends get very early access to future hardware and specs. Had he designed his 3D engine in a more extensible way, adding support for the newest features would have been a piece of cake.

Anyway, it might also be my aversion against Doom/Quake-sytle "artwork". I guess that thrid party licensees will surely use the D3 engine in a far more impressive way.

[/offtopic]
JD
JD
I made a realtime perpixel lighting/shadow editor that you can play with. I like pixel lights and their dynamic nature. When a light moves the shadows do too, or when you open a door into a dark room you can visually see light creeping in. When jail bars retract into ceiling the shadows do also. Little things like these add atmosphere to the game world unlike the static nature of lightmapped scenes.

Forged3D world editor
Impossible
Impossible
quote:
Original post by Yann L
[offtopic]
When I look at D3, I feel like I''m thrown back into the times of 3DStudio 4, with simple pointlights and hard, raytraced shadows. You can do so much more on todays hardware. I think that D3 was in development for far too long. When it was originally being designed, it was surely revolutionary. But today, it is pretty much outdated before it even ships. I think it is overrated, by far. I seriously don''t know what Carmack was thinking. OK, he chose shadow volumes. Would not have been my choice, but OK. What I really don''t understand though, is the lacking support for advanced pixelshading capabilities. Where is the soft shadow option ? Where is the GI ? Carmack & friends get very early access to future hardware and specs. Had he designed his 3D engine in a more extensible way, adding support for the newest features would have been a piece of cake.


In defense of Carmack, I think it''s less of a technology issue and more of a content issue. First of all, IMHO, there still is no commercial game title currently on the market that looks better than Doom III (yes Doom III is technically not on the market, but it will be there very soon.) Although he could make engine changes without needed major content updates, the content is already designed for super dark, scary lighting. The current renderer was started at least 3 years ago and the rendering code has been done for at least a year and a half. I''m sure Carmack is working on a HDR, GI lighting engine as we speak. According to some of Carmack''s plan files, he''ll definitely be taking full advantage of ps 2.0 graphics cards for the next game engine. Like you said, it could just be your artwork perference though. Ever since the original Doom id has favored very dark, hard lighting as opposed to soft GI stuff, even if the GI is more realistic. They switched from a radiosity lightmap renderer in Q2 to a simple direct illumination raytracer in Q3A because they artists liked the more direct lighting. Doom III seems to be an extension of this philosophy.
merlin9x9
merlin9x9
Certainly seeing moving shadows, highlights, etc. must be impressive. But it still looks like plastic. GI won't be possible in real-time for a while (at least not in such a way that it's visually worth doing), so Carmack's alternatives were: 1) precalculated--possibly GI-based--lighting with dynamic hacks or 2) to have it completely dynamic, at the sacrifice of realism beyond the dynamics. So, I believe that it's completely a technological issue, and not a content issue.

As was mentioned earlier, the all-dynamic lighting choice wins the wow-factor contest.

[edited by - merlin9x9 on August 2, 2003 2:28:57 AM]
silvermace
silvermace
quote:

GI won''t be possible in real-time for a while (at least not in such a way that it''s visually worth doing)



have you not seen Yann''s engine, fool ?
Dominik_78
Dominik_78
Me not too. would like to see it. got a screenshot Yann?

So as far as I can say - DooM 3 looked good to me - HL2 surly got better non-Graphics issues.
And that's why I would prefer HL2 over DooM 3 - I am more into gameplay than Graphics. But would be nice too so see amaizing shadows and lights in realtime.

[edited by - Dominik_78 on August 2, 2003 3:30:22 AM]
Ingenu
Ingenu
vtales (Where Yann works) engine screenshots:

http://www.vtales.com/game/temp/

Stencil shadows can generate ''softer'' shadow by light jittering (is it the good word?).
Anyway it''s very fillrate intensive, and really only works well on PowerVR hardware. It''s a waste on most other hardware IMO.
Not the best engine design, but it''s still impressive, I believe Mr Carmack released screenshots and movies far too early which kinda cut off the ''brand new amazing'' effect for most people in the know.

Isn''t HL2 using stencil shadows for characters and other moving objects ?
(maybe it uses lightmaps, don''t remember)

-* So many things to do, so little time to spend. *-
-* So many things to do, so little time to spend. *-
AN_D_K
AN_D_K
I still admit that the Doom 3 lighting is still pretty amazing and dynamic, but it just doesn''t look real. I have the E3 videos and it doesn''t look real on that either.

Actually, I was recently more impressed with lighting when I play Sega GT on the XBOX the other day. When you start off it seems like nothing special. The modelling isn''t that good, the game is a bit uninspiring...but when I watched the replays of my race I was amazed.

Even with all the faults in the graphics, Sega GT looked more real than even Doom 3 because they had got the lighting right. The reflections weren''t too harsh, the camera blurred at just the right places of focus, there were spot on heat hazes and had a slight atmospheric fog on some smoggy tracks. The only things that took away magic was the crap art but this is a testament to how important lighting is.
cseger
cseger
Yann, your posts and engine being another major source of inspiration, do you care to comment abit on your shadow approach?
(specifically the performance factor)

I''ve read you use an extended version of shadow maps, Perspective-SM was it?
Are those directly from articles, or your own tweaked version?
Which is *the* article for PSM?

Would these be good in a multi-dynamic light scene, like D3''s?

Could you render Doom3 scenes with the same or better performace with these PSM instead of stencil SVs?
You do have to use 6 SMs for a point light (completely in the frustum), don''t you?

And just a little thought:
Comparing the scenes of the Vtales engine and HL2 engine, wouldn''t HL2 really be better off with the Vtales engine?
HL2 scenes (big towns, outdoor, etc) looks perfect for Vtales.

Now if we could only get a leaked VTales alpha =)

Yann L
Yann L
Hehe, I notice the "bash the Carmack-basher" effect...

Don't get me wrong, Doom3 will surely be one of the most impressive games on the market (unless it is going to transform into a DNF number 2...). The problem is, that as some people mentioned, the E3 demo (as well as the leaked alpha) looked very plastic. I'm fine with the dark and scary artwork, but there is a lack of rendering technology. I don't know, but I personally think that some parts of eg. Splinter Cell look better than Doom3.

From the side of the artwork, it's probably personal taste. But from a technological point of view, ID has promised very much. Too much, I think. The game was totally overhyped, and expectations sky rocketed. Unfortunately, the game was delayed again and again. The technology it uses was cutting edge a couple of years ago, but it is not anymore. If the game was released, say, one year ago, it would have been pretty alone claiming the "best looking game" title. But today, even Carmack knows he has to be careful: trying to avoid the simultaneous market release with games like HL2 or DeusEx2 is not only commercial consideration, but also the fear that D3 might go unnoticed besides its competition. Let's not even talk about the non-existing gameplay in pretty much any ID game. From that point of view, I can't wait for DeusEx-2, and I won't care about the graphics. But for a game like D3, where graphics are pretty much its only USP, it is, well, dangerously overhyped.

quote:

Yann, your posts and engine being another major source of inspiration, do you care to comment abit on your shadow approach?
(specifically the performance factor)


Very good performance, but limited to shadowmap capable 3D hardware (anything above and including GF3). No shadows on hardware below that, this is a drawback. Other than that, the SM shadows are far more performance efficient than their stencil counterparts, especially on complex geometry. They don't have the fillrate hit, and they come with (pseudo-)soft shadows for free.

quote:

I've read you use an extended version of shadow maps, Perspective-SM was it?
Are those directly from articles, or your own tweaked version?
Which is *the* article for PSM?


Yeah, they are a mixture of standard SMs, and PSMs. The PSM approach is a slightly modified version of the one described in the "Perspective shadow maps" paper you can find in this forum FAQ (a link, that is). Also, if you somehow manage to find them, I've explained pretty much the whole vtales engine from top to bottom, distributed over about 30 threads or so...

quote:

Would these be good in a multi-dynamic light scene, like D3's?


Yes, absolutely. Pretty much all lights are dynamic in our scenes, and it works rather well.

quote:

Could you render Doom3 scenes with the same or better performace with these PSM instead of stencil SVs?


I guess, that the performance would be much better than with SVs. It would surely give better quality. But I haven't yet tested it on a real Doom3 scene. I guess Carmack chose SVs because of the larger range of target hardware.

quote:

You do have to use 6 SMs for a point light (completely in the frustum), don't you?


Yes, for cubemaps. An alternative would be dual-paraboloid shadowmapping, which needs two SMs per point light. Check out Stefan Brabec's papers about shadowmapping (also linked in the FAQ). IIRC, there was a demo of DPSM on delphi3d.net some time ago (in OpenGL).

quote:

And just a little thought:
Comparing the scenes of the Vtales engine and HL2 engine, wouldn't HL2 really be better off with the Vtales engine?
HL2 scenes (big towns, outdoor, etc) looks perfect for Vtales.


Heh, they are welcome to license our engine, if they want It is not yet entirely finished, that's the problem. We're still working on the SDK. As a matter of fact, we've had some major game studios contact us about details, so perhaps you'll see games using it in the future (note to A.R from R., if you read this: your special demo version is coming up soon, we had to fix a couple of things on the space scenes, was a little more work than I thought (the artists were not really amused, when I told them about the testbed scenes ). I'll get back to you by email for the download details).


[edited by - Yann L on August 2, 2003 9:49:50 AM]
Fistandantilus
Fistandantilus
quote:
Original post by silvermace
quote:

GI won''t be possible in real-time for a while (at least not in such a way that it''s visually worth doing)



have you not seen Yann''s engine, fool ?



Wow.... stop. GI in real time?!?!? How?!?!?!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.