Jump to content
The Dark Mod Forums

I'd like to contribute my HDR implementation


J.C.Denton

Recommended Posts

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

 

Welcome, J.C., it is an honour to have you on board.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Welcome, J.C., it is an honour to have you on board.

 

Thanks!

 

@J.C

Just out of curiosity, what system/hardware did you use when making those screenshots ?

 

Windows vista ultimate 32 bit, SP 2

AMD Phenom II X4 940 processor 3.0 Ghz.

4 GB RAM, DDR2 800 MHz.

NVIDIA Geforce GTX 275, 896 MB.

 

It's quite a decent system. However, do not go by the FPS shown in the images. First because, the framerate goes up and down while taking screenshots and second, as I said earlier, there is still room for optimization.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

So is this still going anywhere? Didn't see any posts... What is planed right now? :) I am really looking forward to this feature!

 

Apologies. Been busy as hell with office work. I have integrated the HDR + lighting quite a while ago with the source code I got from the download section and not from SVN repository. I have been playing Dark mod a lot these days and I tweaked the lighting quite a bit to, what I thought, would be more suitable for Dark Mod.

 

I am in the process of updating the source code I got from SVN repository and you'll get to try out the lighting very soon.

 

I'll start a new thread about this once I put everything on SVN probably today or tomorrow. I had run out of space on my home PC and I just bought a new HDD yesterday that I am going to put all the SVN downloaded content of Darkmod on.

 

I'll post a couple of screens here if it's OK.

Link to comment
Share on other sites

Hehe ok. It's no big deal, I was just a little confused because I saw no thread about this in the private forums.

 

And screenshots are always welcome, but I'd rather check out the SVN and see it myself... :)

 

Sure thing, but let me warn you: The current implementation is not optimized and it might cause a slow down. I have plans to optimize it to an extent where I don't have loose precision and further if, need be, to approximate few things, sacrificing precisions. I'll open thread as well I am done with the SVN update.

 

Here goes some screens:

shot000361.th.jpg shot000131.th.jpg shot00037l.th.jpg shot00036i.th.jpg

 

shot00022b.th.jpg shot00007t.th.jpg shot00013xy.th.jpg shot00014uj.th.jpg

 

 

Some might complain about the overall darkness. But it can be changed from console and also I can increase the default middlegray value (for which there's a console variable) a little for slightly brighter results.

Link to comment
Share on other sites

Sure thing, but let me warn you: The current implementation is not optimized and it might cause a slow down. I have plans to optimize it to an extent where I don't have loose precision and further if, need be, to approximate few things, sacrificing precisions. I'll open thread as well I am done with the SVN update.

 

Looking good so far, I am still curious to see this integrated into our "ambient light switcher" that provides different base ambient light depending on the zone you are in. Would be interesting to see if the HDR copes with the light fading or if we can skip it entirely and just use a single default very low grey for it. (I am unclear on wether the HDR computes an "overall" lighting color from all lights in the current zone, or just the overall color from the lights hitting each surface. If it is the latter, the ambient fade would greatly enhance it I believe.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Those are some impressive shots, and I agree with Goldchocobo that it increases the "liveliness" of the engine. Well done, and keep going. :)

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

Looking good so far, I am still curious to see this integrated into our "ambient light switcher" that provides different base ambient light depending on the zone you are in. Would be interesting to see if the HDR copes with the light fading or if we can skip it entirely and just use a single default very low grey for it. (I am unclear on wether the HDR computes an "overall" lighting color from all lights in the current zone, or just the overall color from the lights hitting each surface. If it is the latter, the ambient fade would greatly enhance it I believe.

 

If the ambient light switcher worked with Rebb's interaction then it should work with this implementation, since I am using the same way to detect whether the light being passed to the interaction is an ambient light or not.

 

Looks very nice. Please don't hold back on the amount of console-cvars. I always like a high customizabilty, including a toggle-switch so that you can actually see the difference. :)

 

I have uploaded the changes on SVN repository and started a new thread here:

http://modetwo.net/d...w-hdr-lighting/

 

You can find there, a list of new CVARs and short description accompanying each.

 

Wow, wow, wow. It eliminates the "deadness" from the original D3 engine. The shadows almost look soft!

 

Those are some impressive shots, and I agree with Goldchocobo that it increases the "liveliness" of the engine. Well done, and keep going. :)

 

Thank you very much for appreciation.

Link to comment
Share on other sites

If the ambient light switcher worked with Rebb's interaction then it should work with this implementation, since I am using the same way to detect whether the light being passed to the interaction is an ambient light or not.

 

Hm, yeah, all what the ambient light switcher does is:

 

* the mapper only places on ambient light named "ambient_world" that covers the entire map

* the script checks 3 times a second the location the player is in, and takes from that a "minimum default ambient light" (can be colored for effects), it then adds all the current lights in the current location (scaled down quite a lot) as "dynamic ambient light", then over the next 1/3 (or so) second fades the "ambient_world" light to the new value.

 

So basically the ambient light is always adjusting to what location you are in (blue moonlit outside, red lava cave etc) and also reacts to torches going off etc.

 

I guess it will compete a bit with your automatic eye exposure etc, but if you effect is as subtle as the dynamic ambient light, they should go well together.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Hm, yeah, all what the ambient light switcher does is:

 

* the mapper only places on ambient light named "ambient_world" that covers the entire map

* the script checks 3 times a second the location the player is in, and takes from that a "minimum default ambient light" (can be colored for effects), it then adds all the current lights in the current location (scaled down quite a lot) as "dynamic ambient light", then over the next 1/3 (or so) second fades the "ambient_world" light to the new value.

 

So basically the ambient light is always adjusting to what location you are in (blue moonlit outside, red lava cave etc) and also reacts to torches going off etc.

 

I guess it will compete a bit with your automatic eye exposure etc, but if you effect is as subtle as the dynamic ambient light, they should go well together.

 

Well, if that's how your dynamic ambient light works then I see no reason for it to compete with automatic eye exposure, subtle or not. It should work just fine.

Link to comment
Share on other sites

Well, if that's how your dynamic ambient light works then I see no reason for it to compete with automatic eye exposure, subtle or not. It should work just fine.

 

You can test it in the level maps/test/ambient_fade.map (needs probably dmapping) - walk from the outside to the inside and the light fades to the new color over several seconds. In the second room inside are a few (colored) light sources and water/fire arrows to play around with. Extinguishing/Lighting the lights will also change the ambient light (seen if you look at the wall near the table - it is not hit by any light except the ambient).

 

Would love to see screenshots of this, but can't currently run TDM main :(

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

  • 2 weeks later...

Hi JC

 

I like looking at the screen shot of my map -

 

 

Yep, the HDR really comes out in that shot. Really nice stuff

 

Thanks guys.

 

When I first implemented the HDR, I also spent quite a while in that room just looking at the fireplace and stuff. btw, Bikerdude did get to try it the lighting out yet?

Link to comment
Share on other sites

  • 2 weeks later...

So, are we going to see a HDR option in the next release?

 

Well, textures/speculars are tweaked, as well as the HDR options. It works so far, and could be included, but it really needs more tweaking and testing. Also, we need to see how we can offer still the fast ambient, as far as I understand, you can only have two interaction shaders, so having "fast ambient, "standard ambient" AND "HDR ambient" are not possible at the same time.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

  • 1 month later...

Any news on this front?

 

J.C. Denton improved his HDR interaction shader and tweaked somethings, which we are currently testing. However, it is safe to say that TDM 1.02 will not yet include HDR. Maybe v1.03 if we can work out all the kinks :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

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.


  • Recent Status Updates

    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
×
×
  • Create New...