PDA

View Full Version : OT: about half life 2 engine



tellaman
11-20-2004, 06:35 PM
did you guys have the chance to try hl2?
i must say i'm disappointed with the overall engine visual technology
reflections seem to be based on static precalc-ed lo-res cubemaps that dont shift according to your movements, you usually end up getting reflections in all the wrong places, even behind walls that occlude light sources
shadows are somehow ridiculous, just try to pick up any object and carry it in front of you from one place to another: you get only 1 shadow even if you got more light sources, and as a consequence of that it wont cast in the right way, should you even choose a 'primary' light source for the scene
seems like they're averaging source positions to get only one (wrong) shadow
i must admit i've been playing for no more than 10 mins, but all i could see is gloss-mapped wrong reflections, not a single bump mapped thing!
and most of all, where is hdr?
this is at max details on both ati 9800 pro and nv 5900 ultra
i'm obviously talking about visuals, the game is great on other sides, i especially liked physics (based on havok tho) and lip-synching
but at this stage doom3 engine is ages beyond
anyway, just to say i would love to hear your impressions!
i can provide some shots if you like
bye!

zed
11-20-2004, 08:20 PM
for those that dont know i noticed valve have got a hardware survey going.
http://steampowered.com/status/survey.html

more than a million different rigs! a excellant representation of what the 3d gamer has,
couple of observations
*im surprised with low percentage of decent graphics cards.
*nearly as many amd's as intels
*only ~4% have dialup

rgpc
11-20-2004, 11:28 PM
and most of all, where is hdr?After 10 minutes you won't have reached a part of the game that has HDR.


but at this stage doom3 engine is ages beyondExcept this game has a story, characters, light, vehicles, true outdoor scenes and a physics engine.

Jan
11-21-2004, 02:09 AM
Well, i like the graphics. Although, you have to take into account, that D3 was made for high-end machines, whereas Hl2 was made for DX7 cards and up.

There are bumpy reflections, even a lot. I didnīt look that closely, therefore i didnīt recognize, that reflections are wrong, but since they use cubemaps, i was expecting that.

The water simply looks great. Itīs the best looking thing i ever saw in a game!

I noticed the wrong shadows too. It is a bit disappointing, but it looks much better, than no shadows at all. And this is really because they want to run it at decent framerates on all PCs. I can live with that.

About HDR: I have played the biggest part of the game and i didnīt see any real HDR at all. There are scenes, where you do have a glowing window or door, but that is definitely no HDR. They simply place a portal at all windows, doors and at the end of tunnels and depending on how far away you are from that portal, they but a glowing polygon there. In tunnels this is used to be able to put a loading point there, in rooms and in the city it is used to blend out the outside world (or inside), which is simply an optimization.

Maybe the skybox is an HDR image, but i doubt that very much, i havenīt seen anything like what they showed off in one of their videos a year ago.

I use a Radeon 9600XT and i am quite sure HDR should work on it. Though i donīt have a checkbox to en- or disable it. I am pretty sure it is not used in the engine, at all. Maybe it was to slow, so they discarded it.

Counterstrike Source seems not to use HDR either.

However, if you ask me about my opinion of the GAME (not the graphics alone), i have to say, that it is the goddamned best game i ever played!

Jan.

tellaman
11-21-2004, 03:04 AM
Except this game has a story, characters, light, vehicles, true outdoor scenes and a physics engine.you probably have not read the whole post, i do agree with you, i was talking about the visuals only

to jan: i love it too, this was surely to make the game playable on all machines, but i guess they could have thought of different paths for different cards, at least i was expecting that after years of development

in one word, i would never say this game is representative for what my video board can do, that's all

thanks for your thoughts!

SirKnight
11-21-2004, 08:45 AM
I saw HDR quite a lot. It's from the HDR skyboxes. That part in the HDR video from last year or whenever it was is still in the game. It's when you get on the roof when the combine soldiers are chasing you in the beginning. I stopped for a few seconds to look around like they did in the video and everything behaved just like in the video. Many times later in the game I noticed HDR from the sky and it made the scene look really nice. I took a few screenshots of places I thought had exceptional graphics. There are a few times where I thought some of the surfaces could have used some bumpmapping but overall it looked quite good.

Oh btw, doom 3 DID have a physics engine, it just wasnt used a whole lot. Definately not in the same way HL2 does.

BTW, I'm playing it with a 6800 GT.

-SirKnight

tellaman
11-21-2004, 04:25 PM
hi sirknight, since i dont see any light bloom/glare/gloom in the skyboxes then i guess a 6800 is required
can you post those shots you were talking about?
thanks!

rgpc
11-21-2004, 05:13 PM
tellaman posted
you probably have not read the whole post, i do agree with you, i was talking about the visuals onlyYes I did, you said the Doom3 Engine was better. There's more to an engine than just visuals (otherwise we'd all be playing "Lightwave").

Re: HDR I think this (http://www.southurst.id.au/files/opengl/bloom.jpg) is the only example I have captured in screenshots so far. But I have seen other examples in the skybox on my 5900 Ultra.

Reflections have 3 levels, simple, world only and all. On my card I honestly can't see any difference. They all perform exactly the same (same frame rate) so I expect I'd need the next generation for it to work. Likewise I haven't seen any difference with the difference Anisotropic levels (And I'm not sure but I think the AA settings don't work either - it looks quite different when I set a level in the driver to when I set it in the game - but I haven't confirmed that yet).

Ysaneya
11-21-2004, 11:10 PM
That's not HDR, that's a billboard displayed on top of the screen at the sun's position.

I haven't seen any hint of HDR myself, everything is hacks. For instance, look at the windows. The blend the window texture and a "white" texture depending on the camera distance. The areas of the game with high contrasts (like the end of the tunnels) are also billboard-like textures blended over the scene.

Y.

Jan
11-22-2004, 12:10 AM
I havenīt tested the different reflection-modes, but with "everything" the water looks awesome.

Anisotropy definitely works. When using trilinear filtering the rails are very blurred and very ugly. With 8X anisotropic filtering it looks really nice.
Though it doesnīt impact the rest of the textures very much.

As i already said, everything which glows is hacked as it was already done in the past. There is nothing which seems to be hdr. At least not on my card.

Jan.

VikingCoder
11-22-2004, 12:18 PM
You guys haven't posted about the flashlight, yet.

Take a look again at how perfectly the Doom 3 flashlight behaves, and then take a look at how horrible the HL2 flashlight is. It's a total hack. It looks 'good enough' most of the time, but it's just WRONG. Specifically, if you shine it on a wall at an angle, you can see that the light doesn't *project* out of the flashlight.

I disagree about the water. It looks pretty good most of the time, not great. There's just something *wrong* with the clear water. But the MUDDY water is amazing. I think it's right after you get the machine gun mounted on the boat (or maybe right before that?) that you come to some really muddy water, and it just blew me away. I know this sounds stupid, but the clear water is bad - the muddy water is great! :)

Oh, plus, it's one of the most fun games I've ever played. Some people don't like the fact that you're really limited in what you can do at any given moment, but I compare it to a rollercoaster ride. You don't need to have choice about what happens next to have a blast. You don't need to inspect every screw on every air duct to look for secret passages to enjoy a game.

Bobo.Bobo
11-30-2004, 01:16 AM
Have you seen water reflections on DX8.1? On DX9 it looks great, but on DX8.1 it look terrible...
This is what I hate most - they don't want to push older cards to the limits.
Realistic water is possible on GF4 so DX8.1 - look at Beyond Good and Evil game - there is realistic water that reflects all and it works very fast on GF4.
But this is how it must be... you wanna play HL2? Buy new video card, even if it would work on your card.

jwatte
11-30-2004, 11:57 AM
This is what I hate most - they don't want to push older cards to the limits.
I would do the same thing. There's finite amount of programmer and artist time. Focus on two goals:

1) Make it look great on the highest-end platforms, which means you get vendor support and buy-in, and great screen shots and reviews.

2) Make it play great on as much hardware as possible. People remember good gameplay more than good graphics. People who really care about what a game looks like, will have updated to a graphics card that's newer than two years old on release (Radeon 9700 came out in August 2002).

For OpenGL, this could translate into "full GLSL pipeline, or fixed function with 2 texture units". Spending time on the intermediate targets just doesn't make much sense.

rgpc
11-30-2004, 01:48 PM
Originally posted by Bobo.Bobo:
But this is how it must be... you wanna play HL2? Buy new video card, even if it would work on your card.You want to play it or look at the scenery? If it's playable on older cards (plays and looks good on my fx 5900 Ultra) then you can play it.

If you want eye candy, play Far cry.

As Jon said, people remember how it plays more than how it looks. I've recently seen people that still play the original Quake - and it looks appaulling - but they do so because it's fun.

Bobo.Bobo
12-01-2004, 01:25 AM
But hey! If it is possible to do and easy to do (I've done such watem myself on GF4 so it couldn'y be so hard) so why they don't do it?
It COULD look better and it could take just a few moments to implement it, but they didn't do it! So why not make it look better if it is possible?? I don't mean to do something that is impossible, but to do what is possible and easy to do!

Btw. Look at BG&E - there is fine blur and DOF - it looks great. And look at Doom 3... when you take something there is a blur effect, but it looks horrible. I don't know why they don't use post processing in games. Now they start to use it but only on GF 6800 (great blur, DoF, radial blurs and so on are avaible on GF4, and on GF FX just everything is possible). Such effects as blurs and glows (as I said: avaible on GF4) makes game look better and even makes it to be breathtaking - like Prince of Persia: Sands of Time.

knackered
12-01-2004, 02:33 AM
Water looks bad with a geforce3, but looks ok on a radeon8500. This is probably down to gf3 limited to ps1.3, while 8500 can do ps1.4. But I can do better water using register combiners + texture shaders on the gf3....but of course, that level of control is only available in opengl, while half life 2 uses direct3d. I'm surprised they don't have an opengl renderer as an option - because combined with Steam, they could be updating the graphics as and when new hardware appears rather than waiting for the next dx release.
As for the shadows from objects you pick up being incorrect - I'm pretty sure that's deliberate, the shadow is directly under the object being moved so that you can tell where the object would be when dropped...that's gameplay over realism, which is A-OK with me. So glad I don't have to try to do the vector maths in my head with multiple light sources so I can tell where the hell the object is in 3d space. Of course, if we all had stereo hardware this wouldn't be a gameplay issue, but it is at the moment.
I'm really enjoying half life 2...savouring it like a belgian chocolate. Just got past the brilliant crane sequence....incredible fun. Buy it.

M/\dm/\n
12-01-2004, 07:21 AM
Sorry guys, I know it will start flamewar, but there are some linkies, that graphic programmers should check out.

1) http://www.nvnews.net/vbulletin/showthread.php?t=41625
2) http://www.doom3world.org/phpbb2/viewtopic.php?p=64270

I think it is not realy a good business plan to develop engine for last gen cards, 6800GT getting over 150 fps with AA and AF is radiculous. And hacks, no matter how good are a bit old-school.
Doom3 looks a lot better, though darkness and gameplay kills it all.
HDR - you've seen it in action via FarCry patch 1.3, hungry effect....

But gameplay is really fun in HL2 :D

Aeluned
12-01-2004, 09:15 AM
I think it is not realy a good business plan to develop engine for last gen cards
I'm not so sure about that, but I agree.
It's a shame to see new games coming out not taking advantage of the newest technologies so that they can cater to older cards.

I appreciate that a lot of time and effort must go into developing a game and you want to target the largest possible audience, but for f**k's sake, give those of us with top notch video cards something pretty to look at and have a dumbed down branch for cracker-jacks cards.

ZbuffeR
12-01-2004, 09:17 AM
I must say that I was disappointed by HL2 graphics.

After playing Doom 3, HL2 looks like some old Quake3 engine, with low res outdoors lightmaps ABSOLUTELY not aligned with the sun's lens flare, very dull flashlight, and simple cubic corridors and rooms.

Everything is a hack, and the switch to a different reflection cubemaps is quite annoying.

Only characters are well detailed (contrary to D3 "pointy heads") and the water is quite nice on my 6800, but the bad lighting spoils all that.

OT: I don't find the gameplay that good, long distance gunfights are boring, and even if the havoc engine lets you pile crates so that you may exit a canal, well you can't, thanks to some invisible barrier... For that Deus Ex was MUCH better.

3k0j
12-01-2004, 10:28 AM
Want something funny about Source engine? Here:

Viewport CullMode CreateTexture DeleteTexture IsTexture IsTextureResident TexSetPriority TexImage2D TexSubImage2D BindTexture DepthRange ClearBuffers ClearColor ReadPixels SelectionMode SelectionBuffer BlendFunc AlphaFunc FogMode FogColor3f FogColor3fv FogColor3ub FogColor3ubv MatrixMode PushMatrix PopMatrix LoadMatrix MultMatrix Ortho Rotate Translate Color3f Color3fv Color4f Color4fv Color3ub Color3ubv Color4ub Color4ubv

This is subset of names of virtual methods found in certain class in Source engine. The class is abstract (like interface in java or COM), and the class' name has "API" suffix :D

Korval
12-01-2004, 11:57 AM
Btw. Look at BG&E - there is fine blur and DOF - it looks great. And look at Doom 3... when you take something there is a blur effect, but it looks horrible. I don't know why they don't use post processing in games. Now they start to use it but only on GF 6800 (great blur, DoF, radial blurs and so on are avaible on GF4, and on GF FX just everything is possible). Such effects as blurs and glows (as I said: avaible on GF4) makes game look better and even makes it to be breathtaking - like Prince of Persia: Sands of Time.I'd like to point out that BG&E and Prince of Persia are console games, while Doom3 is a PC game. On consoles, getting access to the framebuffer is much easier and faster than on a PC (due to API's hiding the internals of the hardware). On a console, you can walk right in and start reading data without doing much real work. On a PC, you aren't allowed to do that. Either you or the driver must copy that data into a buffer that you can walk through.

It's one of the reasons why giving fragment programs the ability to read as well as write to the frame buffer is considered by many to be important. Post-processing effects just aren't worth the time on a PC.

Bobo.Bobo
12-01-2004, 12:08 PM
Originally posted by Korval:
It's one of the reasons why giving fragment programs the ability to read as well as write to the frame buffer is considered by many to be important. Post-processing effects just aren't worth the time on a PC.Damn man... Do you know what you are talking about?! I played BG&E and PoP on PC and it worked very very fast. If you can do post-processing well so it is not a problem, I think that you can't.
I see that you have necer seen a great blur and glow with great music - you have never felt the atmosphere of game with such great graphics!

Stephen_H
12-01-2004, 12:54 PM
To do image processing like you would do in photoshop, the ability to read/write the framebuffer is very important. Photoshop supports custom blend modes beyond the configurable blend modes that OpenGL supports that would require framebuffer access to implement. There are also various recursive filtering algorithms and doing things like building summed area tables that won't really find a home on the GPU until they implement fast framebuffer access in fragment programs.

Unfortunately, framebuffer access goes against the pipelined stream processing model of the GPU -- you are accessing results from further down the pipeline and you have problems with things like fragment/texture caches. I think we might see programmable 'blend' shaders that will subsume the blending portion of the pipeline soon, but not sure about framebuffer access...

Korval
12-01-2004, 02:14 PM
Damn man... Do you know what you are talking about?! I played BG&E and PoP on PC and it worked very very fast. If you can do post-processing well so it is not a problem, I think that you can't.
I see that you have necer seen a great blur and glow with great music - you have never felt the atmosphere of game with such great graphics!I'm not sure I fully understood the totality of your comment. However, I was not aware of a PC port of those two games. While I have not played them, if they are like most console-to-PC ports, then the developers didn't do much to take advantage of the added power of (then) modern PC graphics cards. As such, it's likely that they had the time to spare to do readback operations.

jwatte
12-01-2004, 05:26 PM
Korval, just look at the games, OK? Prince of Persia looked AWESOME! (and it played well, too) Much of it was the thorough job of the animations, but the shading and effects weren't bad, either.

Regarding post-processing, if you first render to a float framebuffer (which you can now blend into -- thanks, NVIDIA!) and then do all your post processing from the rendered image as a texture into the scan-out framebuffer, you can do most of the things that Stephen H talks about. For example, auto-generated MIP maps give you hardware accelerated (very fast!) area summing, by using explicit LOD levels when reading from the texture during post-process.

zeckensack
12-01-2004, 05:43 PM
Originally posted by Korval:
However, I was not aware of a PC port of those two games.Prince Of Persia: Sands Of Time demo mirrors:
http://www.3dgamers.com/games/princepersia4/downloads/

http://www.gamershell.com/download_4925.shtml

Beyond Good And Evil demo mirrors:
http://www.3dgamers.com/games/beyondgoodevil/downloads/

http://www.gamershell.com/download_3584.shtml
( this (http://www.gamershell.com/download_3863.shtml) may also be required)

Looks to me like mostly glow, blur and motion trail effects.

zed
12-01-2004, 06:55 PM
OK? Prince of Persia looked AWESOME!hey ive got that lying around on dvd (havent gotten around to installing it yet), might have to sometime.
have a look at screenshots of BG&E (no proper shadows)

is doom3 the only game using proper shadows? ( + i mean for everything ie every light castss shadows, though as i aint played doom3 perhaps it doesnt do this either )

knackered
12-01-2004, 11:31 PM
The Splinter Cell games also used lots of image based processing, even on the PC version.

Korval, you really ought to actually see modern examples of realtime graphics in action (ie. moving!) before offering up more than passing observations to other programmers. I remember the Doom3 thread where you dissected its graphics, giving critiques on shadow aliasing, colour banding etc. only to later anounce that you hadn't actually installed the game and had a look yourself, but the screenshots were enough. They're not enough. For example, if you take a look at POP:Sands of Time screenshots, you could assume that all that blooming is a plethora of 2D billboards, but when in motion it becomes obvious it's a volumetric effect (maybe not truly volumetric, but enough of a trick to give the same effect).
Zbuffer - you're looking at the graphics too closely! :) If you look at any environment mapping technique (sphere/cube) closely enough, you'll notice it's a hack. The question is do you let the fact that it's a hack cloud your opinion of the whole scene, or do you accept that it's a hack that works in the context of all the other "suspension of disbelief" effects. There is a point where making some graphics effect more realistic no longer has any dramatic returns, and seeing as though drama is what the graphics are trying to achieve, the hacks are sufficient. I certainly prefer the 'splat' approach valve has taken to a graphics engine (throw lots of different techniques together to get a natural overall effect) to the purist approach taken by ID (pure unified lighting model). Until realtime global illumination becomes practical, the unified lighting model has limited uses in a game. Fair play to ID for trying, but I believe Valve has put the most thought into their engine.

rgpc
12-01-2004, 11:43 PM
Originally posted by ZbuffeR:
long distance gunfights are boringSo quit camping and get in there and fight...

ZbuffeR
12-02-2004, 02:30 AM
An other game that had proper ligthing and shadows :
- Thief 3 deadly shadows : the player not only cast real shadows (like D3, as option g_showPlayerShadow 1), but you also you see your real legs, arms etc.
I feel much more 'inside' the place that way. In HL2 the player is only an invisible vampire (no shadow), holding crates by mental power...

Knackered, my whole life my head was trained to see real shadows, so I find it not natural to deal with "shadow is always rigth down the object being moved". Maybe it is just me.

Right after real shadows, I would really like proper stereoscopic vision. I would give imho a much better realism with only twice the rendering cost. Compared to GI, it is easy to do :)

Bobo.Bobo
12-02-2004, 02:31 AM
Originally posted by zed:
is doom3 the only game using proper shadows? ( + i mean for everything ie every light castss shadows, though as i aint played doom3 perhaps it doesnt do this either )Really, if game is good and have great gameplay so don't look at shadows. Trully I didn't noticed shadows at all when I played BG&E because game (and great glow and blending effects) looked great and played great^10 so I just played, not looked at shadows.
Anyway, if you want to see proper graphisc (specular, diffuse, shadows) you have to do too many things like normalize vectors in fragment shaders (even normalize a normalTexture!). So don't put attension to perfection! I like to see games look awesome and make me even cry.
Doom 3 looked well, graphics was perfect but so what? Does it have climate? Does it scares? NO! Too many monsters, no glow effect (glow makes everything look brilliant - I'm gonna put my glow demo, so you can see, with glow you can do psycho-effects, for example when you got hit the view is glow-blurred, yeah, just wait some time and I'm gonna put my demo) and game is boring... I played D3 once...

M/\dm/\n
12-02-2004, 03:25 AM
I think there was a glow effect in D3, though DX9 gen card was required. I played on FX5200 and saw it in few places. It's just that its not overdone like in DX2:IW. NFSU2 also has cool glow effects, but they are more annoying than pretty.

knackered
12-02-2004, 05:41 AM
Zbuffer, you're obviously not looking close enough then. If you think doom3 and thief3 offer a realistic lighting model, then you're obviously taking different drugs to me :)
As I say, the only lighting models that approach realism are the global illumination models, such as radiosity, spherical harmonics etc. If you're not going to implement something like this then your shadows are simply wrong. It's just a question of what looks more natural for a specific scene, which is why renderers like Source offer runtime choices of lighting setups....use stencil volumes in this gloomy underground scene, use softer shadow maps in this outdoor section, use static radiosity lightmaps combined with light blooms and shafts in this 'crawling through rubble' scene. It's the same as a director of a film, he needs lots of choices to get the atmosphere he imagined, mixing and matching different setups. Whereas with the Doom3/thief3 engine you're being forced into accepting a harsh diffuse/specular direct illumination model, with hard edged shadows...which as far as I can make out is only really appropriate for...doom/thief-type environments.

ZbuffeR
12-02-2004, 10:57 AM
Yeah, I was very fond of GI too, and made some nice skylighted teapot with offline renderers such as brasil and entropy. But the raw power needed to have some nice smooth and precise lighting is just ... way too much. A single GI picture costs as much as a 1 minute animation with lightmaps/raytraced shadows.

>> ...forced into accepting a harsh diffuse/specular direct illumination model, with hard edged shadows...which as far as I can make out is only really appropriate for...doom/thief-type environments.

And what is wrong with that ? In HL2 there are dark corridors and such scenery where d3-like shadows would be appropriate, but you are forced to have dull hacked and wrongly oriented map shadows...

No problem with that, different peoples want different things.

Korval
12-02-2004, 01:43 PM
And what is wrong with that ? In HL2 there are dark corridors and such scenery where d3-like shadows would be appropriate, but you are forced to have dull hacked and wrongly oriented map shadows...The point he's trying to make is that, given the current limitations of realtime CG, using any single model for all situations will mean that some situations are not as well represented as others.

The problem with having fundamentally different models for different situations is the transition. Walking from an outdoor scene dominated by global diffuse interreflections into a darker indoor scene dominated by sharp point lights is not an easy switch to make. HDR could help this transition along, but it is only the beginning of a real solution.

Personally, given a choice one way or the other, I would tend to prefer an engine that gets outdoor scenes working better than indoor scenes, but that's just due to my own personal dislike of "cave-crawling".

zed
12-02-2004, 05:40 PM
had a look at thief3 (they must be proud of the thier shadows since they used the word shadow in the title)
anyways heres a screenshot
http://www.gamerankings.com/itemrankings/launchreview.asp?reviewid=378534
it looks like its using selected shadows as in only some objects are casting shadows, is doom3 the same, are there no engines that have a unified lighting model?

Zbuffer, you're obviously not looking close enough then. If you think doom3 and thief3 offer a realistic lighting modeltrue theyre not realistic but they are a generation higher than say HL2/halo2 etc. which are basically quake3 level with bumpmaps and better quality textures.
glows, blows, i class them in the same catogary as lensflares.


Personally, given a choice one way or the other, I would tend to prefer an engine that gets outdoor scenes working better than indoor scenes youll be wanting the bollux engine then, its totatlly bollux :)

Korval
12-02-2004, 06:34 PM
it looks like its using selected shadows as in only some objects are casting shadows, is doom3 the same, are there no engines that have a unified lighting model?Of course not. That would require more performance than any card can produce. Or such a restricted lighting situation that you wouldn't be able to design very many games in it. If every light casts a shadow, every light causes a massive performance impact. Even with shadow mapping (better performance than shadow volumes, but we haven't fixed the visual quality problem), that adds up to a lot of multipassing.


youll be wanting the bollux engine then, its totatlly bollux ?

Bobo.Bobo
12-03-2004, 01:30 AM
Don't pay attension to perfection! Does movies have proper shadows and lighting? No! It doesn't matter! Game has to look good and play well! If you have unproper shadows just put glow-blur and everything look even more awesome and you go: "Yeeehaw!" and if you see proper shadows and lighting and everything jsut perfect you go: "ok, it's perfect. Ok I'have seen it so I'm gonna play other game". That's the difference.

Btw. I played Doom 3 on GF4 and it looked well. Now I got GF6800 and I tryied to play D3. I launched the game, set Ultra settings and... the game looks the same... maybe textures are more detailed, maybe models are more detailed, but it does no matter! If you play these details are invisible. Doom 3 is a game for GF4 - it pushes GF4 to the limits - this is good.
Btw. Doom 3 glass effect is possible on GF4... (just move vertices that are behind glass a little (like noise) in vertex program and you got it - why it's only avaible on FX? I don't know...)

ZbuffeR
12-03-2004, 02:57 AM
Doom 3 glass effect is possible on GF4... (just move vertices that are behind glass a little (like noise) in vertex program and you got it - why it's only avaible on FX? I don't know No, if you do the distorsion on vertices, you will see cracks and straight lines depending on the tesselation.

This is done per fragment, sine or noise map to fetch texels on the rendered 'behind glass' scene.
Same for the heat effects (around lava parts).

Adrian
12-03-2004, 03:19 AM
Originally posted by zed:
are there no engines that have a unified lighting model?Mine does :)
http://www.mars3d.com/dm3test.m1v

Bobo.Bobo
12-03-2004, 03:44 AM
Originally posted by ZbuffeR:

This is done per fragment, sine or noise map to fetch texels on the rendered 'behind glass' scene.
Same for the heat effects (around lava parts).Yes, I was wrong. But per fragment offset map (this effect is nothing else than offset texture) is possible on GF4.
But I don't know one thing: my engine works with 256x256 scene textures (because it need to do a scene read to use offset tex, and for bigger textures it works slower) and in D3 it looks that it makes this fragment disortion on real size texture (I mean, all details are preserved).
Does it do screen read? Or it does something else?

Chuck0
12-03-2004, 04:41 AM
well im copying the screen from a 1024x1024 pbuffer into a second 1024x1024 texture to do some heat and depth of field stuff and it works reasonably fast on my radeon 9700pro (using glcopytexsubimage twice... once for depth and once for rgb components).

here (http://stud3.tuwien.ac.at/~e0125958/blurtest.jpg) a little screenshot :) (the heat effect isnt visible very well from this angle)

knackered
12-03-2004, 05:47 AM
Originally posted by ZbuffeR:

Doom 3 glass effect is possible on GF4... (just move vertices that are behind glass a little (like noise) in vertex program and you got it - why it's only avaible on FX? I don't know No, if you do the distorsion on vertices, you will see cracks and straight lines depending on the tesselation.

This is done per fragment, sine or noise map to fetch texels on the rendered 'behind glass' scene.
Same for the heat effects (around lava parts).Doesn't need to be done per fragment.
One way:-
Render scene without glass into framebuffer, then copy image into texture.
Then render glass mesh, with peturbed texture coordinates at every vertex - how you peturb them is up to you.
This works well on any card - cpu can be used to peturb the texture coordinates. Obviously the glCopySubimage is going to be the bottleneck.
You gain little by going per-fragment, unless you want lots of bumpiness on your glass of course.

BTW, cool looking images from Adrian and chuck0!

Sunray
12-03-2004, 06:15 AM
Originally posted by Adrian:

Originally posted by zed:
are there no engines that have a unified lighting model?Mine does :)
http://www.mars3d.com/dm3test.m1v Awesome! Looks like area shadows too.

KRONOS
12-03-2004, 07:07 AM
Originally posted by knackered:
Doesn't need to be done per fragment.
One way:-
Render scene without glass into framebuffer, then copy image into texture.
Then render glass mesh, with peturbed texture coordinates at every vertex - how you peturb them is up to you.
This works well on any card - cpu can be used to peturb the texture coordinates. Obviously the glCopySubimage is going to be the bottleneck.
You gain little by going per-fragment, unless you want lots of bumpiness on your glass of course.
Except that Doom3 glass uses a normal map for per pixel distortion. There are a lot of ways to do glass, some better than others. The way Doom3 does it, it must use a fragment program, so no GF4...

Chuck0
12-03-2004, 08:22 AM
Originally posted by Adrian:
Mine does :)
http://www.mars3d.com/dm3test.m1v Wow... Are there Soft Shadows in there?

Adrian
12-05-2004, 01:44 AM
Originally posted by Chuck0:

Originally posted by Adrian:
Mine does :)
http://www.mars3d.com/dm3test.m1v Wow... Are there Soft Shadows in there?Yes, all the shadows are soft, the engine only supports area lights. It's also hdr, though the only hdr effect implemented is exposure.

Performance is 10-20fps on a FX51+6800GT.

zeroprey
12-06-2004, 02:25 PM
Originally posted by Adrian:

Originally posted by Chuck0:

Originally posted by Adrian:
Mine does :)
http://www.mars3d.com/dm3test.m1v Wow... Are there Soft Shadows in there?Yes, all the shadows are soft, the engine only supports area lights. It's also hdr, though the only hdr effect implemented is exposure.

Performance is 10-20fps on a FX51+6800GT.Wow, I'm very impressed. May I ask how you are doing the soft shadows?

Adrian
12-10-2004, 09:09 AM
The technique is pretty simple. To calculate the light at a point on the screen I render from that point in worldspace each light and any occluding geometry. I use occlusion queries to measure the amount of light visible.

The lighting is calculated at a lower resolution than the screen resolution. The demo in the video was running at 640x480. The lighting was done at 160x120 and most of those points were interpolated from surrounding points. In fact the engine usually 'only' has to do about 10,000 renders per frame.

It's a brute force approach that has been highly optimised.

knackered
12-10-2004, 09:37 AM
You render the scene at full detail from every point?!
Not exactly scalable, don't you think?

Adrian
12-10-2004, 10:15 AM
Not the scene at full detail, just the light and any (if any) geometry occluding it.

I'm not sure what you mean by scalable. If I was vertex transform limited and doubled the geometry the speed would half, like with most other engines. The level in the video is not vertex transform or fill rate limited, it is cpu limited.

Clearly the algorithm requires rendering a lot more geometry than normal engines so any game using this technique would have to have a much lower poly count.

Aeluned
12-10-2004, 11:24 AM
Well, what he means is as your scene gets more complex the engine goes down the tubes at exponential rates.
What frame rates where you getting for the scene you showed in that short clip?

Don't get me wrong, it looks real nice...
The engine is doing A LOT of work though, and I think such a low resolution restriction is sort of limiting. I haven't played a game in 640x480 since Diablo 1.

zed
12-10-2004, 02:48 PM
Originally posted by Aeluned:
I haven't played a game in 640x480 since Diablo 1.[/QB]try this (raytracing)
http://www.realstorm.com/
640x480 is not nice on a 19inch monitor, the pixels are nearly the size of my knob, wheres the option to run it in a window


Clearly the algorithm requires rendering a lot more geometry than normal engines so any game using this technique would have to have a much lower poly countnothing wrong with that eg look at doom3 aka the attack of the pointyheads, polycounts not high but the shadings great, good to see u trying something different adrian, now if u could just somehow get that visablity checking stuff onto a texture + fragment program youre laughing

Adrian
12-10-2004, 03:09 PM
Originally posted by Aeluned:
What frame rates where you getting for the scene you showed in that short clip?10-20fps on a FX51+6800GT.


I think such a low resolution restriction is sort of limiting.The engine has two different resolutions, a screen resolution and a lighting resolution. The screen resolution hardly effects performance. The lighting resolution controls the quality of the shadows and heavily effects performance. So running at a screen res of 1024x768 is not a problem and wouldnt slow it down much but at that size you might start noticing the coarseness of the lighting/shadowing unless the lighting res was also increased.

Chuck0
12-11-2004, 03:18 AM
:eek: ... If i understood this right this is really a nice way to get extremely robust and correct soft shadows ... so i guess the cpu bottleneck comes from reading back the depth buffer extracting the world space positions and rendering the lights and the occluding geometry... did you think about optimisations like rendering lights that are close together only once (or broadening the view fustrum in order to see more than one light)?

Adrian
12-13-2004, 12:41 AM
Originally posted by Chuck0:
If i understood this right this is really a nice way to get extremely robust and correct soft shadowsThat's right. It's not artifact free due to some of the optimisations I've used but the method can produce perfect soft shadows. It can also be extended to perform indirect lighting.


did you think about optimisations like rendering lights that are close together only once (or broadening the view fustrum in order to see more than one light)?It would be a little tricky to implement but that is a possible optimisation. The reason I am rendering lights individually is so I can 'zoom in' and get high quality lighting with a small viewport size thus saving me fillrate and allowing me to use small area lights. A broader view frustrum would require a larger viewport to maintain quality.