News:

One Minute Game Review by The Happy Friar: https://ugetube.com/@OneMinteGameReviews
Also on Rumble: https://rumble.com/c/c-1115371

idTech 4 (aka Doom 3 tech) Discord Server! https://discord.gg/9wtCGHa

Main Menu

fhDOOM (modernized idTech4)

Started by eXistence, April 10, 2016, 12:35:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

oneofthe8devilz

#30
Quote from: motorsep on April 13, 2016, 08:23:12 AM
Fair 'nuff

Man are we relieved that you find eXistence's explanation for why he chose to stick with the Doom 1.3.1 build "Fair 'nuff". God forbid if you hadn't approved it! ;D
I got six little friends and they all run faster than you ;)


Check out our mods at
moddb or the SPS Homepage

SteveL

Quote from: eXistence on April 11, 2016, 10:24:41 AM
yep, shadow mapping for parallel/directional lights is not implemented yet (the issue is also noted on the github page), but its definitely on my ToDo list. Parallel lights are used very rarely in the original game, so priority is kind of low.
Parallel lights might not be hard for you to support. They are just omni lights with the light origin moved 100000x further away from the centre of the light volume than where the mapper put it. The hack to turn an omni light into a parallel one is in tr_lightrun.cpp R_DeriveLightData

Great work. I've been exploring the idTech4 vanilla engine on and off for the last 18 months working on TheDarkMod. I implemented soft particles in ARB (ugh) but have been experimenting with glsl in the engine for other effects. I'll be studying your work :)

oneofthe8devilz

#32
Maybe reading through trebor's RBDOOM-3-BFG source could speed up that process as he already has a working solution for parallel lights.

I didn't yet get to test the latest RBDOOM-3-BFG build but do the actual origin coordinates of the parallel light, relative to the geometry it illuminates still influence the quality of shadows generated ?

I got six little friends and they all run faster than you ;)


Check out our mods at
moddb or the SPS Homepage

SteveL

#33
Quote from: oneofthe8devilz on April 14, 2016, 01:12:54 PM
Maybe reading through trebor's RBDOOM-3-BFG source could speed up that process as he already has a working solution for parallel lights.

I didn't yet get to test the latest RBDOOM-3-BFG build but do the actual origin coordinates of the parallel light, relative to the geometry it illuminates still influence the quality of shadows generated ?

Cool I just had a look at RBDOOM-3-BFG and it still has the same 100000x technique in there. But my point was that if you've solved the problem for omni lights, you've already solved it for parallel too. You just need to increase your penumbra spread for those lights at the same time, if your shadow technique uses light origin to calculate penumbra spread.

EDIT: Hmm maybe not true for shadow maps come to think of it. I've not messed with them, but I reckon you'd need to set a special resolution or frustrum at least to generate a map from that "distance"

vladdrak

Quote from: The Happy Friar on April 11, 2016, 07:21:45 AM
I downloaded the source but haven't had a chance to compile yet.  I'm eager to get it going in Community 2015 & I'll throw Brandon Chung's D3 basic assets setup at it, see if it works with that.
just tried the starter kit with
- dhewm3 binaries
freshly compiled
- iodoom3
- fhdoom

all crashed at startup.

here's fhdoom:

fhDOOM 1.5.0 (alpha).1406 win-x86 Apr 15 2016 17:25:44
3392 MHz Intel CPU with MMX & SSE & SSE2 & SSE3 & HTT
16352 MB System Memory
1024 MB Video Memory
Winsock Initialized
Found interface: {99403915-59F4-419E-B9F6-2776D281EDB8} Qualcomm Atheros AR8161 PCI-E Gigabit Ethernet Controller (NDIS 6.30) - 192.168.0.11/255.255.255.0
Sys_InitNetworking: adding loopback interface
doom using MMX & SSE & SSE2 & SSE3 for SIMD processing
enabled Flush-To-Zero mode
enabled Denormals-Are-Zero mode
------ Initializing File System ------
Current search path:
d:\SANDBOX\DOOM3\sk/base
game DLL: 0x0 in pak: 0x0
Addon pk4s:
file system initialized.
--------------------------------------
----- Initializing Decls -----
------------------------------
------- Initializing renderSystem --------
renderSystem initialized.
--------------------------------------
WARNING: Unknown string id #str_04344
WARNING: Couldn't load image: textures/gui/black
WARNING: Couldn't load image: textures/gui/black
Couldn't open journal files
WARNING: Unknown string id #str_04345
couldn't exec editor.cfg
execing default.cfg
couldn't exec DoomConfig.cfg
couldn't exec autoexec.cfg
WARNING: Unknown string id #str_04346
----- Initializing Sound System ------
sound system initialized.
--------------------------------------
WARNING: Unknown string id #str_04347
WARNING: Unknown string id #str_04348
----- R_InitOpenGL -----
Initializing OpenGL subsystem
...registered window class
...registered fake window class
...calling CDS: ok
...created window @ 0,0 (1024x768)
Initializing OpenGL driver
...getting DC: succeeded
...PIXELFORMAT 10 selected
...creating GL legacy context: succeeded
...making legacy context current: succeeded
...initializing GL extensions (GLEW): succeeded
...creating GL core profile context: succeeded
...making core profile context current: succeeded
...deleting old GL legacy context...initializing GL extensions (GLEW): succeeded

------- Input Initialization -------
Initializing DirectInput...
mouse: DirectInput initialized.
keyboard: DirectInput initialized.
------------------------------------
sound: STEREO
Check extension 'GL_ARB_multitexture': OK
Check extension 'GL_ARB_texture_cube_map': OK
Check extension 'GL_ARB_texture_env_dot3': OK
Check extension 'GL_ARB_texture_env_add': OK
Check extension 'GL_ARB_texture_non_power_of_two': OK
Check extension 'GL_ARB_texture_compression': OK
Check extension 'GL_EXT_texture_compression_s3tc': OK
Check extension 'GL_EXT_texture_filter_anisotropic': OK
   maxTextureAnisotropy: 16.000000
Check extension 'GL_EXT_depth_bounds_test': OK

GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce GTX 560 Ti/PCIe/SSE2
GL_VERSION: 4.3.0 NVIDIA 364.72
GL_MAX_TEXTURE_SIZE: 16384
GL_MAX_TEXTURE_UNITS_ARB: 4
GL_MAX_TEXTURE_COORDS_ARB: 8
GL_MAX_TEXTURE_IMAGE_UNITS_ARB: 32

PIXELFORMAT: color(32-bits) Z(24-bit) stencil(8-bits)
MODE: 5, 1024 x 768 fullscreen hz:N/A
CPU: Intel CPU with MMX & SSE & SSE2 & SSE3 & HTT
-------
glFinish not forced
swapInterval not forced
load vertex shader glsl/fogLight.vp
: File not found
WARNING: failed to load GLSL vertex shader: fogLight.vp
load vertex shader glsl/blendLight.vp
: File not found
WARNING: failed to load GLSL vertex shader: blendLight.vp
load vertex shader glsl/shadow.vp
: File not found
WARNING: failed to load GLSL vertex shader: shadow.vp
load vertex shader glsl/depth.vp
: File not found
WARNING: failed to load GLSL vertex shader: depth.vp
load vertex shader glsl/shadowmap.vp
: File not found
WARNING: failed to load GLSL vertex shader: shadowmap.vp
load vertex shader glsl/default.vp
: File not found
WARNING: failed to load GLSL vertex shader: default.vp
load vertex shader glsl/depthblend.vp
: File not found
WARNING: failed to load GLSL vertex shader: depthblend.vp
load vertex shader glsl/skybox.vp
: File not found
WARNING: failed to load GLSL vertex shader: skybox.vp
load vertex shader glsl/bumpyenv.vp
: File not found
WARNING: failed to load GLSL vertex shader: bumpyenv.vp
load vertex shader glsl/interaction.vp
: File not found
WARNING: failed to load GLSL vertex shader: interaction.vp
load vertex shader glsl/vertexcolor.vp
: File not found
WARNING: failed to load GLSL vertex shader: vertexcolor.vp
load vertex shader glsl/flatcolor.vp
: File not found
WARNING: failed to load GLSL vertex shader: flatcolor.vp
load vertex shader glsl/intensity.vp
: File not found
WARNING: failed to load GLSL vertex shader: intensity.vp
load vertex shader glsl/fogLight.vp
: File not found
WARNING: failed to load GLSL vertex shader: fogLight.vp
load vertex shader glsl/blendLight.vp
: File not found
WARNING: failed to load GLSL vertex shader: blendLight.vp
load vertex shader glsl/shadow.vp
: File not found
WARNING: failed to load GLSL vertex shader: shadow.vp
load vertex shader glsl/depth.vp
: File not found
WARNING: failed to load GLSL vertex shader: depth.vp
load vertex shader glsl/shadowmap.vp
: File not found
WARNING: failed to load GLSL vertex shader: shadowmap.vp
load vertex shader glsl/default.vp
: File not found
WARNING: failed to load GLSL vertex shader: default.vp
load vertex shader glsl/depthblend.vp
: File not found
WARNING: failed to load GLSL vertex shader: depthblend.vp
load vertex shader glsl/skybox.vp
: File not found
WARNING: failed to load GLSL vertex shader: skybox.vp
load vertex shader glsl/bumpyenv.vp
: File not found
WARNING: failed to load GLSL vertex shader: bumpyenv.vp
load vertex shader glsl/interaction.vp
: File not found
WARNING: failed to load GLSL vertex shader: interaction.vp
load vertex shader glsl/vertexcolor.vp
: File not found
WARNING: failed to load GLSL vertex shader: vertexcolor.vp
load vertex shader glsl/flatcolor.vp
: File not found
WARNING: failed to load GLSL vertex shader: flatcolor.vp
load vertex shader glsl/intensity.vp
: File not found
WARNING: failed to load GLSL vertex shader: intensity.vp
WARNING: SetDeviceGammaRamp failed.
WARNING: Couldn't load image: textures/gui/black
WARNING: Couldn't load image: textures/gui/black
WARNING: Unknown string id #str_04343
WARNING: Unknown string id #str_04349
WARNING: Couldn't load image: ui/assets/guicursor_arrow
WARNING: Couldn't load image: ui/assets/guicursor_hand
WARNING: Couldn't load image: ui/assets/scrollbarh
WARNING: Couldn't load image: ui/assets/scrollbarv
WARNING: Couldn't load image: ui/assets/scrollbar_thumb
WARNING: Couldn't load image: ui/assets/scrollbar_right
WARNING: Couldn't load image: ui/assets/scrollbar_left
WARNING: Couldn't load image: ui/assets/scrollbar_up
WARNING: Couldn't load image: ui/assets/scrollbar_down
WARNING: Unknown string id #str_04350
DLL file name: fhGame-x86.dll
look for DLL next to executable: D:\SANDBOX\DOOM3\sk/fhGame-x86.dll
game using MMX & SSE & SSE2 & SSE3 for SIMD processing
enabled Flush-To-Zero mode
enabled Denormals-Are-Zero mode
--------- Initializing Game ----------
gamename: baseDOOM-1
gamedate: Apr 15 2016
Initializing event system
...473 event definitions
Initializing class hierarchy
...142 classes, 191092 bytes for event callbacks
Initializing scripts
--------- Game Map Shutdown ----------
--------------------------------------
********************
ERROR: Error: file script\doom_events.script, line 49: Unknown event 'setGui'


********************
Error during initialization
Shutting down OpenGL subsystem
...wglMakeCurrent( NULL, NULL ): success
...deleting GL context: success
...releasing DC: success
...destroying window
...resetting display


plz post your results/fixes on the issue if you try it, thx.

vladdrak

eXistence: fhdoom could be the new de facto solution for idtech4-based projects, but i really like openal. don't you consider forking/moving yr changes to dhewm3 instead of vanilla d3?

argoon

Quote from: vladdrak on April 15, 2016, 11:51:55 AM
eXistence: fhdoom could be the new de facto solution for idtech4-based projects, but i really like openal. don't you consider forking/moving yr changes to dhewm3 instead of vanilla d3?

Don't know if you are aware but Doom 3 supports OpenAL natively, ever since it came or are you saying," i like OpenAL soft"? Because there's a diference, Doom 3 comes with Creative's hardware accelerated OpenAL (with EFX and EAX 4.0 support).

caedes

Quote from: argoon on April 15, 2016, 12:53:52 PM
Quote from: vladdrak on April 15, 2016, 11:51:55 AM
eXistence: fhdoom could be the new de facto solution for idtech4-based projects, but i really like openal. don't you consider forking/moving yr changes to dhewm3 instead of vanilla d3?

Don't know if you are aware but Doom 3 supports OpenAL natively, ever since it came or are you saying," i like OpenAL soft"? Because there's a diference, Doom 3 comes with Creative's hardware accelerated OpenAL (with EFX and EAX 4.0 support).
only on windows and you only get the EAX stuff with creative cards, in dhewm3 you get it everywhere with all hardware

argoon

Quote from: caedes on April 15, 2016, 03:58:33 PM
Quote from: argoon on April 15, 2016, 12:53:52 PM
Quote from: vladdrak on April 15, 2016, 11:51:55 AM
eXistence: fhdoom could be the new de facto solution for idtech4-based projects, but i really like openal. don't you consider forking/moving yr changes to dhewm3 instead of vanilla d3?

Don't know if you are aware but Doom 3 supports OpenAL natively, ever since it came or are you saying," i like OpenAL soft"? Because there's a diference, Doom 3 comes with Creative's hardware accelerated OpenAL (with EFX and EAX 4.0 support).
only on windows and you only get the EAX stuff with creative cards, in dhewm3 you get it everywhere with all hardware

Ah ok i stand corrected.

nbohr1more

Extra food for thought:

Pat Raynor has a hybrid Vanilla\BFG Doom 3 here:

https://github.com/raynorpat/Doom3

Relevators vanilla Doom 3 with Depth Bounds and BFG fixes:

https://github.com/revelator/Revelation

Perpixel's Oculus Rift branch:

https://github.com/Perpixel/Doom3

Sikkpin Feedback. Prey style shader system:

https://github.com/RobertBeckebans/Sikkpin-Feedback

eXistence

@oneofthe8devilz
@SteveL


Shadow mapping for parallel lights is on my ToDo list and i am aware of trebors implementation.
Right now i am focussed on performance (especially on AMD), cleaning up a lot of things and fixing a couple of bugs.

@argoon

No, i will not switch to dhewm3 any time soon.
I tinkered with the idea of updating the sound engine as well, but it's very low priority right now.


@nbohr1more

Thx for the hints! I remember some GLSL-related work on Doom3 from Pat Raynor a few years(?) ago, but totally forgot about it.

argoon

#41
Quote from: eXistence on April 21, 2016, 02:21:45 AM

@argoon

No, i will not switch to dhewm3 any time soon.
I tinkered with the idea of updating the sound engine as well, but it's very low priority right now.


Ok nice to know, btw i was not asking you to go to dhewm3 i was responding to vladdrak .   ;D   :)

btw trying to compile your source code with VS2013 and i'm guetting this error 3 times
QuoteError   1   error LNK1104: cannot open file 'nafxcwd.lib'   M:\fhDOOM-master\build\msvc2013-x86\neo\TypeInfo\LINK   TypeInfo
i have VS2015 and the windows SDK 8.1 installed, i'm a noob at this so sorry if is something obvious.

Edit: it seams i'm dumb i didn't installed the MBCS-Addon for VS 2013 now it works.

eXistence

#42
Hi,

I worked on a couple of things over the last weeks (mainly related to AMD and performance)
and i think it's time for a new release for those who are interested.

download: http://www.facinghell.com/fhdoom/fhDOOM-1.5.1-1413.zip

changes:

  • AMD texturing issues solved (r_amdWorkaround is gone)
  • Lots of performance improvements

       
    • optimized draw calls and state changes
    • use a 4k*4k dynamic shadow map atlas to batch shadow maps
    • modified dmap to generate optimized occlusion geometry for shadow map rendering

             
      • occlusion geometry is stored in a separate *.ocl file (*.map and *.proc are still the same)
      • ocl file optional, maps without ocl file work just fine (at the expense of performance)
      • dmap option 'exportObj' will export occlusion geometry to obj files (i needed that for debugging, not sure whether it is useful to others)
      • fhDOOM release includes ocl files for all maps of the original game
    • more aggressive culling
    • performance improvements are huge on AMD (on nVidia the improvements are not that significant, but still noticeable).
  • fixed (time)demo rendering
  • implemented shadow mapping for parallel lights

       
    • uses cascade shadow maps
    • not final, there are still some things to improve (flickering, light bleeding)
  • improved shadow filtering

       
    • poisson filtering
    • softness is constant across the light range, making shadows alot easier to tweak
  • fixed some smaller editor issues
  • changed required OpenGL version to 3.3 (core profile)

       
    • will not necessarily stay at 3.3, future releases may require 4.x again (depends on what exactly i will work on)
    • still requires GLSL extension "GL_ARB_shading_language_420pack" (should be available with all modern drivers even on older hardware, at least on AMD and nVidia)
  • added soft-particles and soft-shadow-quality options to main menu
  • removed cvars:

       
    • r_amdWorkaround
    • r_smQuality (replaced by r_smForceLod)
  • new/modified cvars:

       
    • r_smForceLod (same as previous r_smQuality, forces a certain lod on all lights)
    • r_smLodBias (increase lod on all lights)
    • r_smUseStaticOcclusion (enable/disable static occlusion geometry from ocl files)
    • com_showFPS (0=Off, 1=FPS, 2=ms, 3=FPS+ms)
    • com_showBackendStats (show various backend perf counters)
    • g_projectileLightLodBias (reduce shadow quality from projectile lights, usually not noticable)
    • g_muzzleFlashLightLodBias (reduce shadow quality from muzzle flashes, usually not noticable)

I did all the development with an AMD Radeon HD6950 (CPU: Intel Core2Quad 2.8GHz). The AMD Gaming Evolved App ("Raptr"?) causes a significant performance drop, so i recommend you disable that before starting fhDOOM.
At highest quality settings, there are still some scenes where framerate drops below 30FPS ;( Changing shadow quality to medium (via main menu or r_smLodBias 1) improves the situation a lot. Can someone with a modern AMD card verify this?

There are still some things i would like to implement to improve performance, but right now i am a bit tired of it. There are a couple of new features i want to test out and few more content-related things i want to try out, before eventually getting back to performance.

Feedback appreciated :)

motorsep

Nice list!

You should port some of the features and tools from Storm Engine 2 to your project ! :)

0x29a

There's one thing that particulary bothers me...
While your engine is great from what I've seen, and it yealds tons of potential, folks won't use it without... SikkMod. Sikk's special effects (motion blur, screen frost, etc. gameplay modifications aside, not important) had become something like an industry standard in D3 modding community.
Is it really that hard to port SM into your engine? Or making it backwards-compatible?
Thanks in advance for reply!
P.S. I'd love to use your engine, especially because of the performance improvement, but some of Sikk's features are important for the overall gameplay in my mod, so - wether I like it or not - I'm stuck with 1.3.1 GPL version.