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.

eXistence

Hi folks,
since some time i am playing around with the original Doom 3 engine. At first i was just exploring the code and getting a feel for how certain things work. I applied more and more small changes, just for making it easier for me to work with the code (like making it compile with a modern VisualStudio). As a part of this endeavour, i ported the renderer from fixed-function/ARB2 to modern GLSL-based OpenGL. After that was done, experimenting with some more modern rendering features (like soft shadows) seemed feasible and worthwhile.

Here are some of the core changes:

  • Ported to OpenGL 4.3 core profile (replaced all FixedFunction/ARB2 by GLSL)
  • Added Soft Shadows via Shadow Mapping
  • Added Soft Particles
  • Added Parallax Occlusion Mapping
  • Added support for Qt-based GUI tools
  • Changed build system to CMake and upgraded compiler to Visual Studio 2013/2015
  • Tons of smaller changes, see the github page for more details



Of course its open source and available on github: https://github.com/eXistence/fhDOOM
You can also download a binary release here:
http://www.facinghell.com/fhdoom/fhDOOM-1.5.0-1405.zip
http://www.facinghell.com/fhdoom/fhDOOM-1.5.1-1413.zip (Update: 2016-06-27 details)
http://www.facinghell.com/fhdoom/fhDOOM-1.5.2-1414.zip (Update: 2017-08-16 details)

If you want to check out the code or compile it yourself, feel free to do so, but be warned: a lot of things are still in a state of flux and quite messy :)

My version of the engine works fine on my machines and first benchmarks look good, but both of my machines (Windows workstation, Linux notebook) are quite dated. There are still tons of things to fix and improve (see github page) and i already encountered some serious issues with AMD hardware and implemented a quick workaround for it (at the expense of performance, nVidia is fine though). I am working on the AMD issue to get an actual solution, but i would like to get some more feedback, especially from modern nVidia and Intel systems. I did some simple benchmark runs with 'timeDemo demo1.demo', but i am not sure if those results are reliable because they look just a bit too good.

I would be happy, if some of you could help me here: give it a try, give me some feedback, run some benchmarks :)

Thx in advance!

oneofthe8devilz

Amazing !

It was about time for someone to update the original Doom3 1.3.1 renderer and release it.

I just ran the intro scene and the new shadowmapping looks really nice !

Looks like it is quite taxing on the system but I need to run more in-depth testing to give detailed feedback.

Is custom gamecode (gamex86.dll) supported out of the box with your build ? (are we able to run existing mods with your build without the need to recompile ?)

Thanks for your contribution and welcome to the community :)
I got six little friends and they all run faster than you ;)


Check out our mods at
moddb or the SPS Homepage

eXistence

I just added some info about new/changed cvars to the github page (if you want to play with this kind of stuff).

@oneofthe8devilz: thanks for looking at it :) regarding customcode: mod support is pretty much unchanged. I have not explicitly tested it, but you should be able to load a custom fhGame-x86.dll. That beeing said, i am not sure you can load a gamex86.dll from the original game (by renaming it). I don't think so.... never tried that. I may take a look at it later.

trebor


Arl

This is exiting, sadly I'm getting a black screen launching the .exe. Sounds and music are there, but the image is black.

eXistence

Please post your system spec (especially graphics vendor and driver version), console log (if available) or screenshots when you run into problems.
Just anything that might help to track the issue down :)

oneofthe8devilz

#6
I got to spend more time testing fhDOOM and... holy shit, this is a wonderful shadowmapping implementation and it is blazing fast !

I have no idea what was causing the slowdown when I initially ran it for the first time on my machine but now after setting the cvars according to your cvar info at the github page this baby flies and looks super sexy...

The proving grounds for any Doom3 shadowmapping implementation IMO is the canteen/cafeteria scene at the "mars_city"1 intro level. It is a worst case scenario for shadowmapping since it has an external pointlight outside the room simulating sunlight and a bunch of other tricky pointlights, making it a pretty tough scene for shadowmapping (with all kinds of precision/bias/lightbleeding/artifacts issues) compared to the default stencil shadows (When I get to it I will create a comparison GIF putting all 3 currently to me available shadowmapping solutions, showcasing how each of them handles that scene).

And your implementation so far seems to work great with that scene.

Last week when I was browsing through the Doom3 engine code I noticed some unnecessary rendering code that all 3 shadowmapping implementations (including yours too) seem to be still using while I think it is still being a relic from the stencil shadow rendering era.

When Doom3 was being developed and later released some people noticed a rendering artifact called "polypopping/shadowpopping". And while you and trebor are now using shadowmapping instead of stencil shadows it still happens/appears in your engines (RBDOOM-3-BFG & fhDOOM).

Back in the days we found a nice scene (also located in the mars_city1 intro level) which very nicely replicates that popping issue and both your engines still produce it.



So the solution was simply to always force BackFaceLighting to get rid of it in your engines.
I got six little friends and they all run faster than you ;)


Check out our mods at
moddb or the SPS Homepage

Arl

#7
Quote from: eXistence on April 10, 2016, 04:56:41 PM
Please post your system spec (especially graphics vendor and driver version), console log (if available) or screenshots when you run into problems.
Just anything that might help to track the issue down :)


Sure, sorry for not saying it first:


i7-3770

ATI Radeon HD 5770 (Sapphire Vapor-x)
(Driver Packaging Version: 15.20.1062.1004-150803a1-187669C)
(Catalyst Version:   15.7.1)

RAM: 8 GB

I have no console log.

VGames

How extensive would this be to add to Sikkmod source?
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

Bladeghost

This is quite impressive, I like the sliders on the light editor.
I'll have to look into this more as it is very promising so far----- fhdoom 1.5.0 (alpha). 1405
I do however get one warning though...
WARNING: Check extension 'GL_EXT_shared_texture_palette': failed

still great to see this, I'm excited to see what else it can do. as I just learned about it.

trebor

Quote from: oneofthe8devilz on April 10, 2016, 05:38:27 PM
Back in the days we found a nice scene (also located in the mars_city1 intro level) which very nicely replicates that popping issue and both your engines still produce it.



So the solution was simply to always force BackFaceLighting to get rid of it in your engines.

I fixed this in my latest build.

oneofthe8devilz

#11
Quote from: trebor on April 11, 2016, 02:54:37 AM
I fixed this in my latest build.

Oh okay... cool

@eXistence: I just notice that you haven't yet implemented shadowmapping for the third type of lights in Doom3 called parallel lights (first type = point lights and second type = projected lights). I use parallel lights to simulate sunlight in MCS and I wonder if you plan on writing a shadowmapped version of them ?
I got six little friends and they all run faster than you ;)


Check out our mods at
moddb or the SPS Homepage

The Happy Friar

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. 

eXistence

Quote from: oneofthe8devilz on April 10, 2016, 05:38:27 PM
When Doom3 was being developed and later released some people noticed a rendering artifact called "polypopping/shadowpopping". And while you and trebor are now using shadowmapping instead of stencil shadows it still happens/appears in your engines (RBDOOM-3-BFG & fhDOOM).

@oneofthe8devilz: i was aware of those artifacts, but i didn't looked into it yet, thx for hint :)

Quote from: Phobos Anomaly on April 10, 2016, 04:31:33 PM
This is exiting, sadly I'm getting a black screen launching the .exe. Sounds and music are there, but the image is black.

@Phobos Anomaly: HD 5770? Phew! Thats even older than my test card (HD 6950)... but the specs look fine.
This starts fhDOOM in a window, enables OpenGL debug message, dumps the console to console.txt and quits the game.
fhDOOM.exe +set r_mode 6 +set _fullscreen 0 +set r_glDebugOutput 2 +condump console.txt +quit
Please send me the console.txt file via pm.

Quote from: VGames on April 10, 2016, 09:30:34 PM
How extensive would this be to add to Sikkmod source?

@VGames: Hmmm, it's been a while since i had a closer look at sikkmod, but i think what you ask for is not even possible.

Here is why (correct me if i am wrong, or if i misunderstood your question):

1. sikkmod is a mod for Doom3. fhDOOM is a modernized Doom3 engine. Those are two very different things, you can not integrate an engine into a mod. For beeing just a mod sikkmod is very impressive, but fhDOOM does a lot of things that are not even remotely possible in a mod.
2. You may ask if its possible to do it the other way round: integrate sikkmod into fhDOOM. Thats not possible either. AFAIK sikkmod is based on a couple of very clever ARB2 shader hacks to achieve effects like POM and Bloom. In fhDOOM those ARB2 shaders are completely gone (i am going to remove the last remaining bits of ARB2/FF very soon). Getting rid of this old and deprecated stuff is one of the major goals for fhDOOM.

Quote from: Bladeghost on April 11, 2016, 01:54:38 AM
I do however get one warning though...
WARNING: Check extension 'GL_EXT_shared_texture_palette': failed

@Bladeghost : this warning is bogus, just ignore it. This extension is not even used and i will remove the check and its warning for the next release.

Quote from: oneofthe8devilz on April 11, 2016, 06:26:24 AM
@eXistence: I just notice that you haven't yet implemented shadowmapping for the third type of lights in Doom3 called parallel lights (first type = point lights and second type = projected lights). I use parallel lights to simulate sunlight in MCS and I wonder if you plan on writing a shadowmapped version of them ?

@oneofthe8devilz: 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. My focus is currently AMD, but maybe i will look into parallel lights after that.

VGames

Understood. I'll just stick with trusty old Sikkmod. It requires more resources but it does the job. Thanks for replying. Nice work by the way.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500