1. The Melee Mapping Contest #4: 2v2 - Results are out! Step by to congratulate the winners!
    Dismiss Notice
  2. We're hosting the 15th Mini-Mapping Contest with YouTuber Abelhawk! The contestants are to create a custom map that uses the hidden content within Warcraft 3 or is inspired by any of the many secrets within the game.
    Dismiss Notice
  3. The 20th iteration of the Terraining Contest is upon us! Join and create exquisite Water Structures for it.
    Dismiss Notice
  4. Check out the Staff job openings thread.
    Dismiss Notice

Fake HDR Lighting in Warcraft 3

Discussion in 'General Mapping Tutorials' started by A Void, Jul 20, 2015.

  1. A Void

    A Void

    Joined:
    Mar 29, 2011
    Messages:
    2,478
    Resources:
    10
    Models:
    2
    Spells:
    1
    Tutorials:
    7
    Resources:
    10
    [​IMG]



    This is a tutorial about using HDR - High-dynamic-range rendering, also known as high-dynamic-range lighting in Warcraft 3.

    What is it?
    High-dynamic-range rendering is the rendering of computer graphics scenes by using lighting calculations done in a larger dynamic range. This allows preservation of details that may be lost due to limiting contrast ratios. Video games and computer-generated movies and special effects benefit from this as it creates more realistic scenes than with the more simplistic lighting models used. Click here for more information.

    You may have seen or heard about ENB - graphic mod that enhances post processing effects to make games look better graphically. Warcraft 3 engine doesn't exactly support HDR, however it can produce a fake one.

    This tutorial will show you an alternative way to produce a fake looking HDR without ENB or any other graphical post-processing modifications. You won't even have to import anything into your map and it will also work in multiplayer for all players of the map. Furthermore, it is 100% configurable, meaning that you can change the tone of HDR to suit your given environment.

    Video Example


    To produce fake HDR, we will need to use screen altering image - fade filter.

    Create a new action (Trigger Editor) - Advanced Filter.
    Image
    [​IMG]

    It is very important to use White Mask texture!

    Change the blending type to - Modulated 2x blending.
    Image
    [​IMG]


    To configure the tone of HDR, change the color field values.

    Mine is set to medium tone - 65%, 65%, 65%, 65%, 65%, 65%.
    Image
    [​IMG]


    You can also add transparency to the HDR filter to make it more smooth. Both transparency fields must have same number values.

    Mine is set to half transparency - 50%, 50%.
    Image
    [​IMG]


    You're done! Now test the map with your fake HDR filter.

    Here are some final examples on what you can achieve:
    Examples
    Example 1
    [​IMG]


    Example 2
    [​IMG]


    Example 3
    [​IMG]


    Example 4
    [​IMG]


    It greatly improves the default lighting, adding more natural contrast during daytime and nighttime. Also it doesn't cost any graphical performance. Best of all, it works for all players - multiplayer or not.

    Unlike ENB it doesn't affect game interface.
    Image
    [​IMG]


    Furthermore, if you have any questions regarding this tutorial - comment!

    To test it out, download the map below.
     

    Attached Files:

    Last edited: Jul 5, 2016
  2. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,420
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Cool! I love it.

    I never considered the power of fade filters to this extent. Approved.

    EDIT: I moved this to misc. But maybe that would give people the wrong idea in thinking it is an external tool. Should I move it to mapping or triggers instead? Where would you prefer it to be placed?
     
  3. Quilnez

    Quilnez

    Joined:
    Oct 12, 2011
    Messages:
    3,216
    Resources:
    37
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    2
    JASS:
    4
    Resources:
    37
    Does this break tooltips? As fade filter does break tooltips, causing them to disappear.
     
  4. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,420
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Advanced fade filters don't call EnableUserUI(false), so it should work just fine. Only the regular ones are problematic.
     
  5. A Void

    A Void

    Joined:
    Mar 29, 2011
    Messages:
    2,478
    Resources:
    10
    Models:
    2
    Spells:
    1
    Tutorials:
    7
    Resources:
    10
    Thank you. I think it would be better moved to mapping, I guess? I'm stuck between Miscellaneous and General Mapping.

    Since map makers could use this in a general way of producing higher quality maps. There is nothing much to trigger here, just a single action related to fade filters.

    PurgeandFire is right, it doesn't. I had tested it in-game, tooltips and any other interface are unaffected.

    Image
    [​IMG]
     
  6. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,420
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Off to the mapping section!
     
  7. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,784
    Resources:
    11
    Models:
    4
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    11
    I think this is pretty cool to support volumetric environmental fogs with global colored illumination.
    For a HDR lookalike, I think it feels a little bit too linear. It basicly just brightens up the entire screen instead of increasing the contrast between shadows and light sources.
     
  8. A Void

    A Void

    Joined:
    Mar 29, 2011
    Messages:
    2,478
    Resources:
    10
    Models:
    2
    Spells:
    1
    Tutorials:
    7
    Resources:
    10
    Have you seen the comparison examples? By default Warcraft 3 lighting looks unnatural, very dull. Daytime in Warcraft 3 looks very gray, no color contrast, no illumination. This filter provides natural bright days and shady blues of night.

    If it is too much contrast you can lower the color field values, they can be edited to suit your map. Everything is written inside this tutorial.

    Also keep in mind that this filter relies on lighting models used in Warcraft 3, you can create a new lighting model to further adept your map.

    It's not perfect but it is the only option to do this without any outside game modifications.
     
  9. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,784
    Resources:
    11
    Models:
    4
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    11
    I wouldn't say it looks dull; I'm not a fan of exaggerated brightness, so I prefer the normal look.
    The shady blue at night can also be done by modifying the DNC model color. The advantage of that is that it doesn't remove your ability to use filters for artistic applications (fading cinematics, flash bang effects, etc.).

    I know that; I just said that imho it doesn't look like HDR effects to me, because these effects are highly non-linear.

    True; As I said this is useful. It just doesn't look like a bloom effect to me.
     
  10. A Void

    A Void

    Joined:
    Mar 29, 2011
    Messages:
    2,478
    Resources:
    10
    Models:
    2
    Spells:
    1
    Tutorials:
    7
    Resources:
    10
    You can lower it if you want to.

    Well it's because this is fake HDR. If you want bloom you can get ENB.

    You can still use filters according to the timing, for example you turn on a fade filter to fade in from blackness. After the fading in time has passed the screen will be visible again and you can turn on HDR filter. Once you are ready to fade out into blackness, you can turn off HDR filter and proceed.

    However there are limitations to non fading filters such as HUD where the filter stays and is transparent. You must make sacrifices on what's more important and what you are going to use.
     
  11. aple

    aple

    Joined:
    May 20, 2009
    Messages:
    807
    Resources:
    2
    Maps:
    1
    Tutorials:
    1
    Resources:
    2
    HDR and Bloom are a bit different and achieve different effects.

    This is actually more of a Bloom then HDR though.
     
  12. VladimirLastraud

    VladimirLastraud

    Joined:
    Jul 11, 2013
    Messages:
    38
    Resources:
    0
    Resources:
    0
    There seems to be a weird bug to this.

    When selecting certain units, the filter brightens or in some cases actually seems to just disappear.

    So far the current units I've identified doing this are Jaina, selecting her seems to make it disappear entirely, and the crypt lord, which makes it brighten slightly.

    I think this has something to do with Omnilights and possibly particles, so far unsure. The same thing occured with selecting a torch (Unit with the model of the prop torch doodad) Once I removed the light in magos model editor it stopped.
     
  13. A Void

    A Void

    Joined:
    Mar 29, 2011
    Messages:
    2,478
    Resources:
    10
    Models:
    2
    Spells:
    1
    Tutorials:
    7
    Resources:
    10
    Yeah I noticed that too, I can't do nothing about that. It's not that big of an issue tough.
     
  14. VladimirLastraud

    VladimirLastraud

    Joined:
    Jul 11, 2013
    Messages:
    38
    Resources:
    0
    Resources:
    0
    I've been using it for about a week, and so far those are the few instances I've noticed.
     
  15. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,256
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Cryptlord appears to have a broken free-standing light. This light is always at map point 0,0. Best seen by disabling the day night light models so that only unit lighting exists. You will notice that the middle of the map (0,0) is not in total darkness when selecting the cryptlord and is illuminated a bit in a circular pattern. This light appears to be carry in all directions and due to WC3 light degradation only having a quadratic factor of 0.0005 or something insanely small it will carry for a very long distance before degrading out of range.

    Just so people know, apparently "Modulated 2x blending" operates by multiplying the colors together and then multiplying by 2 before clamping in the range of 0 to 1.0. Not sure how transparency applies to it but I am guessing it multiplies the filter color value only. The fact lighting tints it so heavily could mean that the filter itself is subject to lighting so it increases the intensity of any tint in the lighting.

    As far as I can tell this does not really add much. The reason WC3 lighting looks so terrible is likely because you are running it at an incorrect gamma so all the brightness mathematics is wrong. In theory it is partly HDR in that it affects the maximum color saturation point. However it is far from true HDR as it does so in very uncontrolled way (lights affect the filter?) and it does not affect the minimum color saturation point.