1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[RenderEdge] Graphic modification for Warcraft III

Discussion in 'Warcraft Editing Tools' started by ENAleksey, Sep 20, 2016.

  1. oger-lord

    oger-lord

    Joined:
    Jul 24, 2006
    Messages:
    156
    Resources:
    2
    Maps:
    1
    Tutorials:
    1
    Resources:
    2
    What about stretching the 1024p height to 1080p instead of making the screen larger? That should fix the issue.
     
  2. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,718
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Can it set the output buffer to sRGB for correct gamma?
     
  3. actboy168

    actboy168

    Joined:
    May 1, 2012
    Messages:
    95
    Resources:
    1
    Tools:
    1
    Resources:
    1
    It's great. Can you tell me how to implemented widescreen support?
     
  4. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1
    Yes, of course: link
    And thank you very much for your YDWE project, without it I would not have started to work on RenderEdge!
     
    Last edited: Oct 3, 2016
  5. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1
    By the way, there are some progress with widescreen support, wait for the announcement!
     
    Last edited: Oct 4, 2016
  6. actboy168

    actboy168

    Joined:
    May 1, 2012
    Messages:
    95
    Resources:
    1
    Tools:
    1
    Resources:
    1
    Thank you too
     
  7. Mark Mocher

    Mark Mocher

    Joined:
    Apr 24, 2014
    Messages:
    26
    Resources:
    0
    Resources:
    0
    Just wait for war 3 hd
     
  8. pyf

    pyf

    Joined:
    Mar 21, 2016
    Messages:
    2,441
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    cwal :wink:
     
  9. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1
    By the way, it is an example of how looks my old map made using RtC after the transfer to RenderEdge (until without graphical improvements and post-effects) + demonstration of one of the upcoming features:
    Before: After:
    War3 2015-05-28 14-42-38.png War3 2015-05-28 14-59-06.png WC3ScrnShot_101516_171356_01.png WC3ScrnShot_101516_171421_02.png

    And it's possible to implement Shadow Mapping:
    War3 2015-05-28 14-59-06.png war3_2016-10-21_19-51-52-61.png
     
    Last edited: Oct 22, 2016
  10. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,718
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    I doubt it is colour model correct though...

    As far as I am aware WC3 lacks a linear to sRGB conversion.
     
  11. Spellbound

    Spellbound

    Joined:
    Jan 9, 2005
    Messages:
    1,956
    Resources:
    16
    Icons:
    1
    Skins:
    5
    Spells:
    9
    JASS:
    1
    Resources:
    16
    Woah this looks fanastic. Could you maybe elaborate on the UI possibilities of this plugin? Can you create new space for buttons (and hide/remove existing ones?) so that I can, for example, create a Command and Conquer-like interface in wc3?
     
  12. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1
    Yes, I implemented it today.
    But in your example, there are some inaccuracies. As I understand you just do pow(img.rgb, 1/2.2) for final image, but it should be implemented in the shader like that:
    Code (C):
    float3 tosRGB(float3 rgb)
    {
        return (rgb.xyz*rgb.xyz)*(rgb.xyz*float3(0.2848,0.2848,0.2848) + float3(0.7152,0.7152,0.7152));
    }

    float3 toRGB(float3 srgb)
    {
        return pow(abs(srgb), 1/2.2);
    }

    float4 mainPS()
    {
        float3 diffuseCol = tosRGB(tex2D(diffTex, UV));
        float3 finalCol = do_all_lighting_and_shading();
        float pixelAlpha = compute_pixel_alpha();

        return float4(toRGB(finalCol), pixelAlpha);
    }
    These are some screenshots. I convert only some diffuse textures in the sRGB, eg I skip heroic glow (but soon I will fix it), so the picture is not completely correct.

    Uncorrected | Corrected



    [​IMG][​IMG]
    [​IMG][​IMG]
    [​IMG][​IMG]
    [​IMG][​IMG]
     
    Last edited: Dec 18, 2016
  13. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,718
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    sRGB is not a gamma curve of 2.2. It is only approximately a gamma curve of 2.2. The Wikipedia article explains. It is a much more complex function so yes my guide is inaccurate. In summary it consists of a linear part at very dark levels and a non linear, gamma like (but not true gamma curve) with a power of 2.4, part for the rest.

    If one specifies the display output buffer as sRGB (D3D9/OpenGL equivalent required) then the GPU automatically does the transformation from linear to sRGB completely for free as modern GPU hardware has special functional units just to do this colour space conversion in real time. Like wise one can specify input textures as sRGB for them to be converted to linear as required completely for free. Warcraft III was made with D3D7 technology and by people who were used to sprite graphics up till then so were likely unaware of colour management.

    It is worth noting that HDR displays apparently also use sRGB response although with a different colour profile.
     
  14. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1
    I decided to post the current version which is still in development, it is more stable than the previous one, but many functions from experimental version have not been added yet.

    Download (sample map included).

    Change Log (v0.2.0dev):
    • (+) Direct3D9 support;
    • (+) Blocking CtrlGetFromPoint function while game is paused;
    • (+) Showing the GUI only after the map loading;
    • (+) Fixed a problem that the width and height of the texture were confused;
    • (+) Fixed too large FoV of camera when Widescreen Fix is used;
    • (+) Fixed an issue where it was not possible to launch the application on the first try;
    • (+) Updated FreeType to 2.7;
    • (+) Launching more than one instance of war3.exe;
    • (+) RenderEdge.dll optimization;
    • (+) Fixed safety issues;
    • (+) Updated project logo and added app icon;
    • (+) Improved debug log;
    • (-) Fixed crashes while loading the map;
    • (-) 1.27a patch support (1.27b?);
    • (-) Windows XP support (is it necessary?);
    • (-) HDR Rendering;
    • (-) Post Process Effects;
    • (-) ShaderSetInt/Float/Bool/Texture;
    • (-) Anisotropic texture filtering;
    • (-) SetLightDirection/Diffuse/Ambient.
     

    Attached Files:

    Last edited: Mar 17, 2017
  15. datsatthune

    datsatthune

    Joined:
    Sep 9, 2015
    Messages:
    23
    Resources:
    0
    Resources:
    0
    WOW! Unbelievable, it work with 21:9 ratio on my LG ultrawide monitor without stretched. But in 21:9 ratio, the camera look closer, it's look like crop top and bottom from 16:9 (but not problem because i can change the camera distance on my custom map ^^)

    Although very exciting but i cant use this to play online, because in my country people only play warcraft 3 1.24e version. So i hope you make it run in 1.24e too.

    21:9 (2560x1080)
    WC3ScrnShot_041517_055150_01.png

    16:9 (1920x1080)
    WC3ScrnShot_041517_055415_01.png

    4:3 (1440x1080)
    WC3ScrnShot_041517_055802_01.png
     
    Last edited: Apr 15, 2017
  16. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,718
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Actually its still does not support wide screen. Minimap and icons are still rectangles instead of squares.
     
  17. datsatthune

    datsatthune

    Joined:
    Sep 9, 2015
    Messages:
    23
    Resources:
    0
    Resources:
    0
    Yes, i known. But this is the best we can get. I'm waiting for a 1.24e version :D
     
    Last edited: Apr 15, 2017
  18. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1
    I already fixed it.
    war3 2017-04-15 08-58-48-38.png war3 2017-04-15 08-59-06-79.png war3 2017-04-15 08-59-28-15.png
    You can download RenderEdge.dll and put it your RenderEdge folder.
    About the 1.24e patch, I can't add its support in basic version of RenderEdge, but I'll try to make a version without GUI, only with widescreen fix.

    I'm working on this, and there's already some progress:
    Old stretched interface
    [​IMG]
    With widescreen fix
    [​IMG]

    Now the standard interface is almost completely editable, but at this moment to take effect of UI editing you need to restart the map.
     

    Attached Files:

    Last edited: Apr 15, 2017
  19. datsatthune

    datsatthune

    Joined:
    Sep 9, 2015
    Messages:
    23
    Resources:
    0
    Resources:
    0
    Yeah. Tested with new dll file and it worked perfectly :3 Thank you very much!

    WC3ScrnShot_041517_173038_01.png

    And hope you will make a version for 1.24e with only that widescreen fix features soon (y)
     
  20. datsatthune

    datsatthune

    Joined:
    Sep 9, 2015
    Messages:
    23
    Resources:
    0
    Resources:
    0
    Look like you have done a lot more than the Blizzard dev in many years =))