[1.10] D2GFEx - New Graphics Driver => Feedback Stage

This forum is for members of the public to post any announcements relating to Diablo 2 Mod Making including mod and patch releases amongst other similar subjects.
Post Reply
User avatar
Necrolis
Site Admin
Throne
Posts: 8904
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

[1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by Necrolis » Tue May 08, 2018 2:12 am

D2GFEx aims to replace D2's graphics driver(s), that is D2GFX.dll and its various backends (GDI+, 3DFX, DDraw, D3D); in doing so it will provide better compatibility, with vastly improved performance, new features and more stability.

Right now this is a placeholder I will be filling out in the coming weeks as time allows, leading up the the first Alpha release for testing.

PLEASE NOTE: As of current, this is only planned for 1.10. This driver replaces D2GFX.dll, but also applies a lot of custom patches to D2Client, D2Common, D2CMP and D2Win.

As of current, D2GFEx will provide the following features:
  • A new graphics driver, based on OpenGL 2.1, which will work from Win95 to Win10, providing much better performance and memory usage.
  • 100% recreation of D2's graphics output, bar any bugs that existed in original D2 (like the ModRandPalette bug for instance). Perspective will not be supported on initial release.
  • Vastly improved limits for mods, mainly to do with the number of concurrent sprites and shadows on screen (this includes both the assertion, memory cache and render slot limits), and removal of the maximum image frame size on DC6 files. DCC files technically have the limit removed as well, but using DC6 for all future graphics bar tiles is preferred.
  • Extended resolution support, you can run D2 in 4k, but I wouldn't recommend that unless you want to not be able to see anything. Unlike many of the extended resolution patches, this is done correctly, including expanding of the unit light mapping code, tile rendering, draw culling, render tiling/binning.
  • Proper VSync and adaptive VSync support (there is actually no point to render faster than your monitors refresh rate, so just save some power/heat/GPU life). Originally D2 had support for this but no actual setting; it will no be a setting in the graphics menu, which will be expanded to accommodate the new features, and have useless settings removed (such as lighting quality & blended shadows which are now always at their best setting).
  • Windowed mode will now have Gamma & Contrast support, as well as colored light support. Windowed mode also supports borderless mode and borderless full screen mode.
  • All units seamlessly support DC6 or DCC animations, this follows on the recommendation to use DC6 files for future graphics, as it allows new features with backwards compatibility. The removal of the limits also mean large monsters need no longer be sliced up, and for modders/coders, new UI drawing can be done with a singular draw call.
  • Finishing of poorly coded D2GFX functions: there are a few functions that didn't fully work, one such function is the clipped text drawing, which can't apply palettes to cropped text, it now does (fixing a but with colored NPC scrolling text). With this also comes extensions to standard D2GFX API, most drawing functions take in an image blend color that is never used, it is now used.
  • Many new configurable options, such as cut scenes in windowed mode, disable screen shake, auto-minimizing, frame-limiting. These will be both put into a config file, and the games UI. the config file will shift all the graphics settings from the registry to the file, meaning multiple mods can each have their own settings.
  • Faster file decode for faster act loads and less hitching on slow machines.
  • The way tiles are handled are also improved, meaning less memory is consumed; in future tile lookups will be changed and various misc data D2 used will removed to improve tiles even more.
  • Improved /fps display, and in-game graphics debugging tools (profiling, tileset viewer, palette viewer, display modes).
  • Better system-cursor toggling support in windowed mode, along with mouse capture support and various fixes to D2Win's buggy mouse bounding.
  • Fixes the -ns crash bug.
  • Improves compatibility with newer Windows versions.
Then the planned extra's will be added once the above is proved to be stable (many of these - like 32bit color support - are actually mostly done, but not exposed):
  • 32bit color support for non-palshift images; DC6 will become a container format supporting DXTn and RGBA32. NOTE: these will need a new encoding tool.
  • Image local palettes for images. NOTE: these will need a new encoding tool.
  • Mod API: this will provide an SDK and a lot of additional low level gfx functions for shader support, render-to-texture, sprite and primitive batching, font loading, post processing.
  • Debug API: this will extend the game with an easy to use debug API, based of off ImGUI.
  • Fixing of various graphics related D2 bugs, such as the improper palette index caching, which breaks when act palettes are changed.
  • Game-interactive debug mode, for inspecting sprites and units.
  • Blit stretch support, along with quality enhancing shaders like HQx.
  • Better CPU usage in the main message loop - this is primarily a power fix, to prevent D2 using 100% of the CPU time. The process is also pinned to the CPU core its launched on, to prevent the system scheduler from shuffling it around which can cause hitches and thread-related instability.
  • Actual async file loading (yep, D2's async file loading system is broken...).
  • Custom post processing shader support, split into UI and world layers.
  • Improved animated tile effects, fading and animation.
  • Improved shadows and blending.
  • Vastly improved text rendering, supporting 32bit color (based on the Mod API) and new font files. This API will both replace D2's font API, and have an extended API for truetype fonts for better quality, bolding and underlining.
  • Vastly improved particle system (rain & snow) that causes far less lag (based on the Mod API) and are correctly batched into a single draw call.
  • Vastly improved automap system, that doesn't require hundreds of draw calls per frame to render maps (based on the Mod API).
D2GFEx has also been designed in a very specific manner to support mods; this means that many of the patches it applies are done in such a way as to allow most code-based mods to work out the box. For mods that don't work, based on demand and the exact reason they don't work, additional patches may be added. For mods still in development, every function replacement or required change will be exposed by the API, so it can be easily incorporated by the modder. The Mod API will also make it very easy to code with the full power of the D2 graphics API, for drawing sprites and primitives.

Oculus
Oculus will be a new graphics tool for D2, designed primarily for use with D2GFEx, but also usable for vanilla D2. It will provide support for all things graphics related: DCC files, DC6 files, COF files, PL2 files, PalShift files, AnimData editing, merging, recoloring, cropping, verification. By unifying the files into one tool, many mismatch bugs can be eliminated, as well as the reduction of work (COF files can be partially built from the DCC info and AnimData info).

Planning Stage
The purpose of this post currently is to gather a list of features that people are interested in that are not mentioned; but please note: just because you ask doesn't mean it'll be done, it needs to be feasible. To this end, I am currently not planning to support 3D units/tiles, because there are just too many custom formats, and using a standard format like FBX is possible, but then you need to encode a ton of extra info for poses and UV data etc, all for no gain (the model will still need to be lit in 2D, and matched to one the of 64 directions), it ends up being better to just pre-render it.

When the alpha launches, it will be added to this thread.

[07/05/2018] Initial Announcement.
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
AlphA - The Real One
Hosted Forum Moderator
Champion of the Light
Posts: 288
Joined: Sat Oct 31, 2009 12:28 pm
Location: China
Germany

Hand-picked

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by AlphA - The Real One » Tue May 08, 2018 6:01 am

I assume you already thought of that, but just to make sure, it will work with D2Mod system and Dreamland?

Cheers
AlphA

User avatar
thaison
Dark Alliance Beta Test
Crusader
Posts: 60
Joined: Fri Apr 03, 2015 11:59 am
Location: Viet Nam
Vietnam

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by thaison » Tue May 08, 2018 6:48 am

It is a great work :D

User avatar
jetaman
Junior Member
Champion of the Light
Posts: 271
Joined: Sat Jul 18, 2015 7:00 pm
Location: Ukraine
Ukraine

Hand-picked

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by jetaman » Tue May 08, 2018 7:29 am

Okay. I will post some of the things that I'm interested in.
1. Debug mode - this is something I thought of and wanted to have. You mention the it's only for inspecting and viewing sprites. I would also suggest adding a couple editing functions. Sometimes it happens that in the process of converting tiles or units a minor mistake was made, and you need to move a tile a few pixels higher or lower, and to avoid doing all the conversion process again, you can do it in debug mode.
2. 3D Mode - I know you're not planning to support it now, but I would also suggest looking at .md5mesh and .md5 anim format.

User avatar
themastercaster
Dark Alliance Beta Test
Paladin
Posts: 216
Joined: Fri May 28, 2004 2:00 pm
Germany

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by themastercaster » Tue May 08, 2018 8:32 am

Necrolis wrote:
Tue May 08, 2018 2:12 am
this is only planned for 1.10
Are you going to release the source code for D2GFEX? I guess not because most of the graphical changes could be misused for bnet h4cks. Am I right? But if you do, others could help to port it to different patches, so not all the work has to be done by you alone.

Nevertheless: this is an incredible announcement and I can't wait for it to release!

User avatar
Necrolis
Site Admin
Throne
Posts: 8904
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by Necrolis » Tue May 08, 2018 10:32 am

AlphA - The Real One wrote:
Tue May 08, 2018 6:01 am
I assume you already thought of that, but just to make sure, it will work with D2Mod system and Dreamland?
Yes, it will be, bar maybe a few plugins that do major GFX changes (which is basically D2ExpRes).
jetaman wrote:
Tue May 08, 2018 7:29 am
Okay. I will post some of the things that I'm interested in.
1. Debug mode - this is something I thought of and wanted to have. You mention the it's only for inspecting and viewing sprites. I would also suggest adding a couple editing functions. Sometimes it happens that in the process of converting tiles or units a minor mistake was made, and you need to move a tile a few pixels higher or lower, and to avoid doing all the conversion process again, you can do it in debug mode.
I'll see what I can include in the regard, but it'll follow after the rest is done.
jetaman wrote:
Tue May 08, 2018 7:29 am
2. 3D Mode - I know you're not planning to support it now, but I would also suggest looking at .md5mesh and .md5 anim format.
Its not about the format, but the extra work for no gain, its better to just pre-render the sprites
themastercaster wrote:
Tue May 08, 2018 8:32 am
Necrolis wrote:
Tue May 08, 2018 2:12 am
this is only planned for 1.10
Are you going to release the source code for D2GFEX? I guess not because most of the graphical changes could be misused for bnet h4cks. Am I right? But if you do, others could help to port it to different patches, so not all the work has to be done by you alone.
Not at the moment, when things are stable, then most likely, right now I don't want to deal with forks or versioning causing confusion, the other issue is if other devs decided to radically change things, it won't upstream properly. On that note, I did forget to mention, 1.09d support is very easy to add, so I will tackle that first, from there the other versions depend on interest, 1.11b & 1.13d are the likely candidates; 1.14x is another can of worms...
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
themastercaster
Dark Alliance Beta Test
Paladin
Posts: 216
Joined: Fri May 28, 2004 2:00 pm
Germany

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by themastercaster » Tue May 08, 2018 10:34 am

Necrolis wrote:
Tue May 08, 2018 10:32 am
Not at the moment, when things are stable, then most likely, right now I don't want to deal with forks or versioning causing confusion, the other issue is if other devs decided to radically change things, it won't upstream properly. On that note, I did forget to mention, 1.09d support is very easy to add, so I will tackle that first, from there the other versions depend on interest, 1.11b & 1.13d are the likely candidates; 1.14x is another can of worms...
That's great news. Thanks for the quick reply :)

User avatar
jetaman
Junior Member
Champion of the Light
Posts: 271
Joined: Sat Jul 18, 2015 7:00 pm
Location: Ukraine
Ukraine

Hand-picked

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by jetaman » Tue May 08, 2018 2:58 pm

How is big one-component monster different from big multi-component monster in terms of performance gain?

User avatar
Necrolis
Site Admin
Throne
Posts: 8904
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by Necrolis » Tue May 08, 2018 3:05 pm

jetaman wrote:
Tue May 08, 2018 2:58 pm
How is big one-component monster different from big multi-component monster in terms of performance gain?
every new component is a bunch of renderstate changes, another texture bind an additional draw call; there is also extra memory overhead. Multi-comp monsters also don't play well with blended shadows and require all the rendering calcs to be redone. End of the day, you should only use multi-comps if you are actually swapping out comps. D2 had the 256x256 texture limit from 3dfx, that no longer exists.
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

P.J.
Posts: 65
Joined: Wed Jan 13, 2010 7:47 pm
Russia

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by P.J. » Tue May 08, 2018 3:10 pm

sounds great. Panel positions will be softcoded for some way?

User avatar
Necrolis
Site Admin
Throne
Posts: 8904
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by Necrolis » Tue May 08, 2018 3:38 pm

P.J. wrote:
Tue May 08, 2018 3:10 pm
sounds great. Panel positions will be softcoded for some way?
No, its actually outside the scope of D2GFEx. The only thing recoded by way of panels is the control panel, help overlay (later on) and the bordering; everything else just scales as is.
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
jetaman
Junior Member
Champion of the Light
Posts: 271
Joined: Sat Jul 18, 2015 7:00 pm
Location: Ukraine
Ukraine

Hand-picked

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by jetaman » Tue May 08, 2018 5:42 pm

1. When is the estimated time of arrival of new encoding tools?
2. What should the pre-rendered sprites be like before converting to new engine? A compiled .gif or a series of sprites?
3. Say, for example, I have a character with like 20 different armor variations - how would local palettes work in this case?

User avatar
Necrolis
Site Admin
Throne
Posts: 8904
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by Necrolis » Tue May 08, 2018 5:55 pm

jetaman wrote:
Tue May 08, 2018 5:42 pm
1. When is the estimated time of arrival of new encoding tools?
When its ready its ready, there isn't going to be a set date; the tool will come out in a basic version and be built up as time goes on.
jetaman wrote:
Tue May 08, 2018 5:42 pm
2. What should the pre-rendered sprites be like before converting to new engine? A compiled .gif or a series of sprites?
I'd recommend a series of lossless images, the tool uses stb_image to load files, crunch to do HW compression if required, so what ever formats those support.
jetaman wrote:
Tue May 08, 2018 5:42 pm
3. Say, for example, I have a character with like 20 different armor variations - how would local palettes work in this case?
the palette is local to each image file, like how GIF files work.
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal


User avatar
Necrolis
Site Admin
Throne
Posts: 8904
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by Necrolis » Wed May 09, 2018 1:25 pm

jetaman wrote:
Wed May 09, 2018 7:27 am
Another one: does it mean that all expanded resolution plugins are redundant?
Yes, the only feature that they really would provide is the ability to move UI elements around (which I think only one does). I can't provide this feature because I haven't recoded any of the UI, I have actually just updated the game correctly to handle different resolutions (similar to what D2MultiRes does, but in a different, more performance-orientated manner).
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
Nizari
Posts: 25
Joined: Fri Feb 16, 2018 11:39 pm
Poland

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by Nizari » Wed May 09, 2018 1:51 pm

Anything about AI's which are horrifyingly terrible in bigger resolutions?

User avatar
Necrolis
Site Admin
Throne
Posts: 8904
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by Necrolis » Thu May 10, 2018 7:38 am

Nizari wrote:
Wed May 09, 2018 1:51 pm
Anything about AI's which are horrifyingly terrible in bigger resolutions?
The AI issues are a seperate problem, and left up to the modder to solve, especially because there is no ideal solution.
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
Quirinus
Posts: 3
Joined: Tue Jan 20, 2015 9:26 am

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by Quirinus » Thu May 17, 2018 2:30 am

Impressive stuff!

GreenDude
Posts: 7
Joined: Sun Jan 31, 2016 2:20 am

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by GreenDude » Fri May 18, 2018 10:25 pm

Have been looking forward to this for awhile now. Thanks for the info.

User avatar
Xaphan
Hosted Forum Moderator
Arch-Angel
Posts: 1101
Joined: Fri Oct 08, 2010 10:55 am
France

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by Xaphan » Sat May 19, 2018 3:03 am

Hey

This look interessting ! Will there any way to prevent users to set the game to run on very high resolutions ? Or can the modder chose wich resolutions are avaiable for his mod ? That could be a solution to the AI issue at high resolutions.

Also, from what I have read, I guess the panels in the game will not be increased in size (unlike with d2ExpRes wich increase thems to use a resolution of 1024x768 at minimum), so they will still be in a 640x480 resolution and large borders will be added for higher resolutions (like in d2multires) ?

Anyway, good luck with your project ! :)

User avatar
Necrolis
Site Admin
Throne
Posts: 8904
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by Necrolis » Sat May 19, 2018 11:33 am

Xaphan wrote:
Sat May 19, 2018 3:03 am
This look interessting ! Will there any way to prevent users to set the game to run on very high resolutions ? Or can the modder chose wich resolutions are avaiable for his mod ? That could be a solution to the AI issue at high resolutions.
There is a configuration file, the issue is making sure that a user can't just change the file
Xaphan wrote:
Sat May 19, 2018 3:03 am
Also, from what I have read, I guess the panels in the game will not be increased in size (unlike with d2ExpRes wich increase thems to use a resolution of 1024x768 at minimum), so they will still be in a 640x480 resolution and large borders will be added for higher resolutions (like in d2multires) ?
Its a bit of "to be decided", but I'd like to eliminated 640x480 entirely and use 800x600 as the minimum resolution. There will be a configure file that will control this, so if you want 1024x768 as the minimum, then you can do so. The whole idea is that is the modder can configure whatever is needed (It should be noted: I am not recoding UI panels, about the only panel that is being changed is the gold withdraw/deposit, because its so poorly programmed).
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
Xibalba
Dark Alliance Beta Test
Champion of the Light
Posts: 280
Joined: Thu Aug 29, 2013 2:38 pm
Location: Skyrim

Re: [1.10] D2GFEx - New Graphics Driver => Feedback Stage

Post by Xibalba » Sun Jul 29, 2018 11:20 am

I was waiting for this for a looong time. Can't wait for the release date, insane work!
Life is too short to drive boring cars.

Post Reply

Return to “Member Аnnouncements”