Jump to content
The Dark Mod Forums

I'd like to contribute my HDR implementation


J.C.Denton
 Share

Recommended Posts

Hi,

 

I am the same guy who had done Denton's Enhanced Doom 3 mod, from which the bloom effect is now being used in The Dark Mod. I'd like to integrate my latest implementation of HDR with TDM. You can find some WIP screenshots of my HDR with automatic eye exposure and modified blinn-phong lighting with approximated fresnel, glossyness, self-shadow term and hemispheric ambient.

 

http://www.doom3worl...6eb9c286cc5070d

 

I would love to work on The Dark Mod. I hadn't been able to touch modding for almost two and half+ years, something I have always missed. Nowadays, I work on such stuff, mostly on weekends and rarely on weekdays. I'd like to contribute the HDR implementation.

 

You can check some screenshots taken from TDM with modified test.vfp that has aforementioned lighting model, HDR encoding and hemispheric ambient lighting modified to work the TDM way ;-).

 

http://www.filefront...ewLighting.rar/

 

Note that, the images are result of only changed test.vfp. To further enhance the look and to add automatic eye exposure I'll have to add the new postprocessing mechanism to TDM. Also, having worked with artist at our company to create assets that'd best utilize an engine in terms of visual goodness, I can suggest few things on content creation/modification, some of which, I suspect, you guys are already doing on dark mod (stuff like AO maps for example).

 

Also, I can work on improving the water and stuff like accurate under water fogging.

  • Like 2
Link to comment
Share on other sites

Incredible work! I just checked the screens, and to think that this was just the Training Map... How will Melan's FM look with these shaders?! Speaking of which, how big is the impact of the new shaders? I saw a difference of everything between 5 to 15 fps. I suppose this is also due to the AA, or is the impact equally high even without AA?

 

By the way, there seems to have been on and off talk about implementing soft-shadows, which seems to be a problem in Doom 3. What is your opinion on this, would you be able to implement them?

 

 

My Eigenvalue is bigger than your Eigenvalue.

Link to comment
Share on other sites

That is utterly beautiful! There seem to be some slight graphical glitches on Shot062 and Shot064 - the metal bits on the two towers look off. Otherwise, these are some exciting possibilities for TDM players.

 

...as well as hardware manufacturers, heh. ;)

 

 

[edit]Would I be able to enjoy this if I installed it on my doom3 install and loaded TDM?

Edited by Melan

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

Oh man, if you can improve water and underwater murk you will be my hero - not forgetting making the surface murk match the underwater. :) And any ideas you might have for fog volume boundaries would be welcome. Also, rain without the performance lag we get with excessive particles.

Link to comment
Share on other sites

The way it applies to the ambient level is really nice - shows up very well! Lights do seem a bit bright, but hopefully the performance hit is reasonable and perhaps it could be included as some kind of alternative, until such a stage that the performance and gameplay consequences are understood/accepted.

 

The torches and other light sources do seem a fair bit brighter, I understand why, but it does contrast a bit too much with the surrounding area, if there is a non-drastic way to bring them into line with the current ones I think that would be a good direction :)

 

As for AO maps, I think TDM 1.0 shipped with a single one, I dont know if it would be worth the effort, but maybe I should set up a scene and see.

Link to comment
Share on other sites

It would be interesting to see how this interacts with the lightgem. The screens do look better in several places, though the affect makes light seem like it goes further. It would be odd for the player to be standing next to a brightly lit edge and not be lit himself.

Link to comment
Share on other sites

It would be interesting to see how this interacts with the lightgem. The screens do look better in several places, though the affect makes light seem like it goes further. It would be odd for the player to be standing next to a brightly lit edge and not be lit himself.

 

The lightgem is pretty much affected by whatever you see on screen, so with the change in appearance of the lights...it would change the reaction of the gem accordingly. This means that someone playing with JC's mod, would likely have a different experience playing a map than someone using standard lighting. It looks more contrasty, so lights would be brighter, darks would be darker...probably less of an inbetween. I would have to test it to find out.

 

Overall performance is an issue for us, as TDM is not like vanilla Doom 3. Under the hood, tdm is a lot more intensive and our core audience generally have mid to low range systems....myself included.

 

Note that, the images are result of only changed test.vfp. To further enhance the look and to add automatic eye exposure I'll have to add the new postprocessing mechanism to TDM.

 

At most, I would be quite happy with just the test.vfp changes, we would make them an option just as we do with Rebb's enhanced interaction shader. Auto eye exposure is cool and all, but doesn't really fit the flavor of TDM in my opinion.

 

Can we download your test.vfp to try out on our own systems?

Link to comment
Share on other sites

It does look very nice. I especially like the lit roof on shots 62 and 64. But it could really become tricky for mappers, since it changes all the lighting in the map. A mission that is perfectly ghostable might not be ghostable anymore with this enhancement or vice versa. Maybe a little bit of tweaking and no overexaggeration of this effect could help here.

 

Anyway, you mentioned postprocessing, which I am highly interested in. Things like Mapper-controlled screentinting and desaturation would be awesome. This would enable mappers to create missions with a seemingly whole new appearance.

 

For those of you who know the Thief 2 Fanmission "Saturnine's Rose Cottage": I have been thinking a lot about what made this mission look so damn good and I came to the conclusion that it's the fact that those custom textures blend in really well together and that the whole map is presented in a certain colortone. My next question was, how one could achieve such a look in TDM and my personal answer was, either by creating a full set of textures or by using postprocessing, especially desaturation and screentinting... :)

Edited by STiFU
Link to comment
Share on other sites

By the way, there seems to have been on and off talk about implementing soft-shadows, which seems to be a problem in Doom 3. What is your opinion on this, would you be able to implement them?

The way right now soft shadows are being done for Doom 3 requires one extra rendering pass for shadows, which is slow as heck. I can attempt an entirely different approach with everything done on GPU, but it's a huge task.

 

That is utterly beautiful! There seem to be some slight graphical glitches on Shot062 and Shot064 - the metal bits on the two towers look off. Otherwise, these are some exciting possibilities for TDM players.

 

[edit]Would I be able to enjoy this if I installed it on my doom3 install and loaded TDM?

 

Well, I certainly like criticism, but I don't think the metal on the tower looks off. In fact, it looks metallic now than before.

 

The modified interaction shader is just drop in thing. You just need to place it in the TDM folder.

 

Overall performance is an issue for us, as TDM is not like vanilla Doom 3. Under the hood, tdm is a lot more intensive and our core audience generally have mid to low range systems....myself included.

 

At most, I think we would be quite happy with just the test.vfp changes, we would make them an option just as we do with Rebb's enhanced interaction shader. Auto eye exposure is cool and all, but doesn't really fit the flavor of TDM.

 

Can we download your test.vfp to try out on our own systems?

Wow! You almost wrote the feature off :D! Well, you can give me a chance to implement it and you can test it on different machines and if then you find out that it's not worth the performance hit (which there should not be much) then I'd agree. In such a case, you guys have nothing to lose.

 

Here's what I can do to keep the performance impact low:

 

As it is, the lighting model is an extension of blinn-phong (my very own version that can't be found in any book or paper) and not something as math heavy as cook-torrance, but visually produce almost same effect. Also, the postprocessing the right now the TDM has, is my own and I know that I can fit the new one with nearly the same performance impact. I am ready to trim down the new version of postprocessing if need be. Also, it can be turned off through console and a parameter can be hooked in into the settings GUI, so that people can easily turn it off from the menu.

 

I can factorize/approximate my version of test.vfp and make it faster without much of a visual difference. As Serpentine said the contrast is little high between the bright and dark and it can be tweaked by changing one value in the test.vfp, but I can just hook in a postprocessing parameter so that the contrast becomes user configurable.

 

What automatic eye exposure can do:

When you are standing into a bright area and looking at dark corners but could see almost nothing unless you move out of the brightness and stare at the dark are few seconds longer. Or, when you are hiding into the shadows and you see lit areas slightly brighter. Also, when you are looking at a scene with parts bright and parts dark then the contrast will be dynamically shifted giving a nice visual contrast.

 

 

As for AO maps, I think TDM 1.0 shipped with a single one, I dont know if it would be worth the effort, but maybe I should set up a scene and see.

 

Precomputed AO has advantages such as:

-For the fact that AO is constant at any time of day, it can be baked.

-The baked AO, if stored as a map can be applied based on direction of light with next to no performance loss.

-The baked AO can account for all the occluding geometry in the map as well as the normal maps and is accurate than SSAO.

-Character lighting looks far more superior with AO maps (than without them), with only drawback that, AO remains constant when character changes pose and the character does not cast soft-AO-shadows on surroundings.

 

If you could set up a room with AO maps that'd be really great! I have to change a line or two to apply AO based on direction of light. Also, AO looks very good with hemispheric ambient. A lot of current generation games use bake AO into their diffuse e.g. Rage does it for environment, crysis does it for characters (despite the fact that crysis has SSAO).

 

On a side note, I'd suggest to use specular map to store AO, specular, glossyness in R, G abd B channel respectively. We can get nice simulation of shiny as well as rusty surfaces with zero performance sacrifice. That also means the specular intensity should be a gray-scale map.

 

 

 

Link to comment
Share on other sites

Wow! You almost wrote the feature off :D!

 

 

Nope, not writing anything off.

 

In general I like the look of the new test.vfp you've demonstrated in the photos, but we would definitely want to play around with it to lessen the contrast between light and dark areas as the current implementation appears to have an effect on our light gem, which would be a problem.

 

Perhaps we could see some video of the eye adjustment in action?

Link to comment
Share on other sites

Your work is very interesting - I dont think anyone here would turn away your help!

 

Just about the AO, what I was getting at with the comment of 'theres pretty much no AO' was that it would be a huge effort to render and check the textures, there are quuuuite a few of them! :) As well as should rage come out in Oct/Nov, we might have access to the render and while it would take quite a while to convert the mod into a full release - which I think is the direction things seem to be heading, wouldnt it make senses to just take a newer approach? I'm all for AO, dont get me wrong but I think simplifying the number of files and such would be of benefit to both players and content developers :)

 

Valves SSBumps are quite interesting, I was very interested to see them in Episode 2, most of the benefits of paralax etc without the massive performance hit on lower end hardware. If you havent played around with them you might be interested by this abstract

 

I will still try produce a map with AO sometime in the next week, moving back to uni at the end of the week, so will let you know how that goes.

Link to comment
Share on other sites

Yes, we certainly won't turn away any help but please don't be offended if the team chooses not to implement your full mod in TDM.

 

There are areas, both in the main mod and in Dark Radiant, where we could certainly use your expertise. :)

 

Just to be clear JC, I didn't mean to come across as speaking in any 'official' capacity on behalf of the team. I was merely speaking in generalities.

 

As I said, I do like the look of this and am personally interested in seeing if we could use some of it. :)

Link to comment
Share on other sites

wow... just, wow.

My main gripe with the D3 engine has been it's cold, dead, digital look... I'm no graphic genius, programmer, or any of the sort (audio/music/level designer), but it looks as though you've breathed new life into the engine, with negligible performance hits to boot (judging from your hardware setup/fps in the screenies at this point, anyway).

I for one am 100% on this, although of course it needs to go through the expertise and judgment of the rest of the team :).

I'm sure they won't be able to resist such fantastic work, though.

Link to comment
Share on other sites

wow... just, wow.

My main gripe with the D3 engine has been it's cold, dead, digital look...

 

You forgot "plastic" in your list. Almost everything in vanilla doom seems to be made of plastic, which makes the whole environment very artificial. I just wish John Carmack had J.C.Denton's shaders when he released D3...  :(

My Eigenvalue is bigger than your Eigenvalue.

Link to comment
Share on other sites

You forgot "plastic" in your list. Almost everything in vanilla doom seems to be made of plastic, which makes the whole environment very artificial. I just wish John Carmack had J.C.Denton's shaders when he released D3... :(

 

lol sorry, forgot... the whole plastic thing back then was the rage, wasn't it.

Link to comment
Share on other sites

lol sorry, forgot... the whole plastic thing back then was the rage, wasn't it.

I'd say Yes and No at the same time. On the one hand, you have Quake 4 and Prey, which look a lot less like plastic IMO. On the other hand, you have the new Wolfenstein that still looks remarkably like plastic, even though it's the last and final stage of the idtech4 engine. So I (who knows zero about the technology behind it) would say that it's easy to make idtech4 renderings look artificial, but also possible to omit that.

 

 

Is there anyone who can support this claim?   ;)

My Eigenvalue is bigger than your Eigenvalue.

Link to comment
Share on other sites

You forgot "plastic" in your list. Almost everything in vanilla doom seems to be made of plastic, which makes the whole environment very artificial. I just wish John Carmack had J.C.Denton's shaders when he released D3... :(

 

This has a lot to do with the strength of the specular textures in many cases. They put specular on pretty much everything and it looked bad.

 

So I (who knows zero about the technology behind it) would say that it's easy to make idtech4 renderings look artificial, but also possible to omit that.

 

Correct.

 

The plastic look in idtech4 games comes from using specular on everything....and making them too strong.

 

When I saw the Wolfenstein screen shots, the first thing I thought was "was this game created by complete noobs, this looks terrible".

 

TDM certainly doesn't look plastic, and that is from us figuring out the best way to create a specular...and when to not use a specular texture.

Link to comment
Share on other sites

JC, I'll show you specifically what I really like about the screens and what I'm personally not a fan of. I'm curious how much is the HDR, how much is customizable and how much might just be something about the map.

 

1 & 2: I really like the way your HDR brings out the edges of things. In the default shot of #1 the wagon is nearly invisible. The way the light picks up edges really makes things more 3d, and that's an effect I think is quite desirable.

 

3: The peaked roof seems really overbright in spots, especially the bright blue seams. Also, the entire building seems REALLY brightly lit, compared to the original shot, where it is almost in darkness.

 

4: The leather on the arm seems too highlighted, IMO, as if it's been given a strong specular. That and the arrow both seem to have the "plasticky" look that D3 is infamous for.

post-9-126339389102_thumb.jpg

Link to comment
Share on other sites

But it could really become tricky for mappers, since it changes all the lighting in the map. A mission that is perfectly ghostable might not be ghostable anymore with this enhancement or vice versa. Maybe a little bit of tweaking and no overexaggeration of this effect could help here.

 

As far as I understand, adding HDR will not affect anything axcept what you see on your screen. The gameplay will be the same. The lightgem value will be computed on CPU and will be the same with and without HDR. So the conditions in which the guard sees you does not depend on HDR because HDR won't affect internal calculations (AI and illumination of player are part of them). Ghostable mission will remain ghostable by same manipulations, and inghostable mission will remain inghostable.

 

The following things should be handled carefully:

 

The look of the lightgem will be changed. If you enter a darker room, then the overall brightness will decrease, and the autoexposure will make everything including the lightgem look more bright. Moreover, the look of the lightgem will change after simply turning your face to a dark corner without any movement. So the lightgem look will be messed in some way. I don't know for good of for bad  :). Anyway, I think that lightgem can be handled separately from the other scene, so its behaviour with autoexposure can be fixed to whatever you like...

 

Another thing is the autoexposure principle itself. In the training mission there is a guide how to set gamma and brightness settings to get visually standard image. The thief spends a lot of time in shadows. And he shouldn't see anything in a very dark room. So the autoexposure should be introduced very carefully: the exposure adaptiveness should be bounded somehow.

 

Because of the performance loss some players will have to play without HDR while others will turn HDR on. So the players will get conceptually different pictures in the same level (the brightness/contrast levels will be different) with and without HDR.

 

 

 

(Please correct me if I'm wrong somewhere)

 

 

P.S: The pictures are great. And the light is more important in thief game than in any other. I would be very pleased to see HDR in The Dark Mod. 

Link to comment
Share on other sites

As far as I understand, adding HDR will not affect anything axcept what you see on your screen. The gameplay will be the same. The lightgem value will be computed on CPU and will be the same with and without HDR.

 

Not entirely true. Our lightgem could not be built in the same way it was in the Thief series (traces from light to player), this is because we did not have access to certain parts of the D3 renderer source code. So, we have a physical pyramid shaped model that is invisible to the player. A top and bottom shot of this pyramid is rendered, and the amount of light hitting the render shots is then computed, averaged and voila...you're light gem reading. What we've seen in the screen shots so far tells us that the lights behave a bit differently in this new test.vfp, and the gem is affected slightly...thereby introducing potential changes in how the map reacts from standard lighting, to enhanced, to HDR.

 

In terms of post processing, then yes...the lightgem would not be affected since the post processing is more like an overlay of sorts.

 

We would have to ensure that the lights behaved the same in all quality settings.

 

If we were taking the numerical value of the light and tracing how much of the player was hit by it, then there would be no issues at all, but since our light gem is based on an ingame model...yup, it could introduce issues.

Link to comment
Share on other sites

Apologies for late reply. Was really busy at workplace. I sometimes dont get time on weedays.

 

Your work is very interesting - I dont think anyone here would turn away your help!

 

Just about the AO, what I was getting at with the comment of 'theres pretty much no AO' was that it would be a huge effort to render and check the textures, there are quuuuite a few of them! :) As well as should rage come out in Oct/Nov, we might have access to the render and while it would take quite a while to convert the mod into a full release - which I think is the direction things seem to be heading, wouldnt it make senses to just take a newer approach? I'm all for AO, dont get me wrong but I think simplifying the number of files and such would be of benefit to both players and content developers :)

 

Valves SSBumps are quite interesting, I was very interested to see them in Episode 2, most of the benefits of paralax etc without the massive performance hit on lower end hardware. If you havent played around with them you might be interested by this abstract

 

I will still try produce a map with AO sometime in the next week, moving back to uni at the end of the week, so will let you know how that goes.

 

Thanks for the link. I had checked that out at least a year and half ago. Those guys are generating normal map in their own way. I was making a second run through episode two the last weekend and those underground caves really look awesome.

 

I understand that generating AO is quite a huge task, given the number of different textures being used. I'll talk about what I have in mind for AO soon, probably in another & more specific topic discussion.

 

 

Yes, we certainly won't turn away any help but please don't be offended if the team chooses not to implement your full mod in TDM.

 

There are areas, both in the main mod and in Dark Radiant, where we could certainly use your expertise. :)

 

Just to be clear JC, I didn't mean to come across as speaking in any 'official' capacity on behalf of the team. I was merely speaking in generalities.

 

As I said, I do like the look of this and am personally interested in seeing if we could use some of it. :)

 

Thanks for the clarification. Appreciate it.

 

 

1 & 2: I really like the way your HDR brings out the edges of things. In the default shot of #1 the wagon is nearly invisible. The way the light picks up edges really makes things more 3d, and that's an effect I think is quite desirable.

 

3: The peaked roof seems really overbright in spots, especially the bright blue seams. Also, the entire building seems REALLY brightly lit, compared to the original shot, where it is almost in darkness.

 

4: The leather on the arm seems too highlighted, IMO, as if it's been given a strong specular. That and the arrow both seem to have the "plasticky" look that D3 is infamous for.

 

Almost every aspect of lighting is tweakable. The strong specular on the leather, although can be hand tuned from shader to be more subtle, is something you'll notice on a lot of real world materials. See this screenshot for example. The bright specular on the left side of the temple (and the left edge of the nose) is not because the specular map has an intense value in that area, but because of the way specular lighting works due to subsurface scattering and the phenomenon is known as the Fresnel effect. The leather has it and the effect only shows up when viewed at grazing angles and when the light is at grazing angles. See these screenshots to see what I mean.

 

The arrow looks a bit too shiny. This can be either fixed by tweaking the shader or adding more grainy pattern to specular map. Or by doing bit of both.

 

I can tweak shader as much as possible to avoid recreation/modification of existing asset base. However, It'd really great if we could store specular exponent or what is know as "glossiness" to one of the specular map's channel.

 

Rest assured of the fact that the HDR can be be tweaked to get past any issues. I don't think of HDR as a fancy feature. In fact, it's part of the lighting model, as in, the way lighting model's designed, the shading requires broader color range to work on.

 

In addition to automatic eye adjustment, I am also going to write an alternative, cheap bloom for HDR (w/o auto exposure).

 

I do believe we're all interested in seeing this in action. So lets get the ball rolling. I guess we'll need to get some SVN access rolling for this?

 

TDM as I see it, is one of the greatest mods I have ever seen coming to life. So I consider it an honor to contribute to it. Off the topic, just voted for TDM on ModDB.

 

Oh man, if you can improve water and underwater murk you will be my hero - not forgetting making the surface murk match the underwater. :) And any ideas you might have for fog volume boundaries would be welcome. Also, rain without the performance lag we get with excessive particles.

 

An accurate underwater depth based murk while matching the the surface murk to the underwater one, is very much achievable. I'll have to write depth of the scene to a separate texture, that can be used for various purposes such as underwater murk, shore blending/soft water edges and also for effects like DOF.

 

On the other hand, you can do a fairly accurate underwater murk yourself by placing a foglight under water, matching it's volume with water's. The foglight is nothing but a simple fog volume that internally uses Doom 3's own scene-depth (the one you can see by setting r_showdepth 1) that you dont get access for. Ideally, if we could access that scene-depth then depth based effects can be done at very low performance cost. To find out which texture hold this depth, we can either mail id Software or can find it out on our own using third party tools such as gDebugger (Its license's very expensive though).

Link to comment
Share on other sites

And the label "Team Member" has mysteriously appeared under J.C. Denton's name. Great! B)

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


  • Recent Status Updates

    • freyk

      Some years earlier i created some launchers for TDM. uploaded today some new sourcecode and executables on my github repo.
       
      · 0 replies
    • Epifire

      Say, I know it's been a while since the site got overhauled from the crash. But did we ever figure out if/how to get the recent topics & replies list back? It's not a total deal breaker but it was nice for becoming a thread creeper again...


      · 2 replies
    • Epifire

      Some of you who've been on the TDM discord know I was out of work last Winter, just putting in hrs for the developer portfolio. Currently I've been working a seasonal job to pay the bills and now I'm finally in my last week before I get bumped off. Things will be tight but I'm planning a long off period to make as much content as I can. Big plans in Unreal Engine as well as my most ambitious TDM collab yet! Never been so excited to be a stuck at home to pursue my life's work. With a lotta time and maybe some luck, I'm hoping to get enough art work done that I may start applying around to studios.
      · 4 replies
    • STiFU

      I finally got around to play Prey and I truly loved it. It is an incredible homage to System Shock and Deus Ex. While the gameplay is not en par with those two titles, the game makes up for that with its well written lore and story. The whole "world" just feells so authentic and it features a ton of really god environmental story-telling. Recommended for every immersive sim fan, i.e., everyone on this forum.
      · 2 replies
    • jaxa

      Alder Lake has arrived:
      https://forums.thedarkmod.com/index.php?/topic/18055-2016-cpugpu-news/page/15/&tab=comments#comment-466190
       
      · 0 replies
×
×
  • Create New...