KozGit / DOOM-3-BFG-VR

Doom 3 BFG VR: Fully Possessed. Doom 3 BFG with native Oculus Rift/Touch or OpenVR support
GNU General Public License v3.0
372 stars 52 forks source link

Hi Def models and VR #277

Open KozGit opened 6 years ago

KozGit commented 6 years ago

While taking a break from working on hand interactions, I started looking at some of the hi def mods available, and was a little surprised. I don't want to criticize, because it's awesome that anyone wants to work to improve D3, but there are definitely varying levels of quailty, especially in some of the updated models. For example, in the first texture pack I looked at, some of the updated models had their geometry changed, but the UVs weren't updated, so the textures were completely distorted in game. It also appeared that some models were just run through a smooth subdivide with no further changes, which resulted in a radical increase in polygon count without much visible improvement. I've attached a few sample images to show the difference between the original models and some of the updated ones. These were literally the first two models I looked at:

Here is the original bioscanner eye:

orig_bioscanner

Here is the bioscanner eye from the texture pack. Notice the deformation in the textures, especially the red triangle and the circle around the scanner:

hidef_bioscanner

The original kitchen chair. This chair was originally about 400 triangles:

orig_kitchenchair

Here is the chair from the texture pack. The textures don't map correctly at all, resulting in incorrect shading and distorted texture. Also, the geometry increased to over 6000 triangles for this model:

hidef_kitchenchair

I'm not trying to criticize - I just think VR has different modelling requirements. For example, if you can pick an object up and hold in directly in front of your face, it may need greater detail than something you will never get too close to. For this reason, I want to start putting together a texture pack/hi def mod specifically for the VR version of the game.

Anyway, my idea is for people to post items/objects/textures from the game that look glaringly bad in VR, so we can address those first. I started going through some of the moveable objects already - I started in the break room, and made updated models for things like the kitchen chair, coffee cup, hamburger etc.

So post your thought, and if you're a modeler/artist, speak up amigo!

CarlKenner commented 6 years ago

Yeah, that's pretty bad.

BTW, when I added BINK support, I first added RoQ video support from the original Doom 3 (not BFG) and I think those videos are higher quality. So it should be possible to put together a higher quality videos pack. One issue is that they changed Sergeant Kelly's appearance in-game, so some of the Doom 3 videos don't match his new appearance.

The main problem with the textures in Doom 3 BFG is that they're (lossy) compressed versions of the original Doom 3 textures. If we could just get it to use the original Doom 3 textures without compressing them, that alone would make a huge improvement to the quality.

Even if we replace the textures with hi-def ones, I think the first thing Doom 3 BFG does with them is compressing them to make them look worse. We should probably investigate that behavior first.

KozGit commented 6 years ago

Makes sense to me. I also wouldn't mind looking at the gloss map implementation from the Steel engine motorsep posted.

Mannbaerschwein commented 6 years ago

Yeah, I talked about this in the Oculus forums and on Reddit a few times The majorty of people isnt aware of this and the impact it has on performance.. they just do what the youtube tutorial videos suggest,

on a different note: Do you think it's possible to add support for parallax mapping? There was a mod for the original D3 which enabled height maps. It was pretty impressive with the Wulfen Texture pack. https://youtu.be/kBx6_3yLKJU I think VR would benefit greatly from that since the effect itself works in VR.

motorsep commented 6 years ago

@KozGit If you want to support higher quality models and still get a decent performance in VR, you might want to add LOD support (Storm Engine 2 has one ;) ).

motorsep commented 6 years ago

@CarlKenner Doom 3 BFG allows for various compressions to be used on textures. In Storm Engine 2 we used YCoCg scaled DXT5 to achieve highest quality possible yet small in size textures. I am not sure if it's possible to make Doom 3 BFG to use both methods at the same time, allowing to run original content and yet allowing new content to have a much better quality when compressed with YCoCg scaled DXT5 method.

I also recall it's possible to set compressor to use RGBA (uncompressed), but then you end up with massive .bimage containers due to generated mipmaps.

CarlKenner commented 6 years ago

In Dolphin we use BC7. https://dolphin-emu.org/blog/2017/09/02/dolphin-progress-report-july-and-august/

motorsep commented 6 years ago

@CarlKenner Yep, but I don't recall seeing GPL v3 compatible BC7 authoring tools in the wild. That was the reason we went with YCoCg scaled DXT5 - it was somewhat supported in the shaders already in Doom 3 BFG and the authoring tool was already available (GIMP DDS plugin), which we integrated into Storm Engine 2.

That's the entire reason I brought it up - it's already available for integration into Doom 3 BFG VR.

CarlKenner commented 6 years ago

What did the original Doom 3 do? Everyone seemed to like that better than BFG's approach.

motorsep commented 6 years ago

@CarlKenner Original didn't do anything. It used RGBA .TGA textures and generated mipmaps on the fly. The only good thing about original Doom 3 is that how modders had all the tools and didn't have to jump through hoops to mod the game. That's about it. Doom 3 and Doom 3 BFG have entirely different way they handle assets and if someone wants it to be old way - there is fhDoom (original Doom 3 with GLSL renderer and all the fancy rendering features).

Btw, we restored all the tools in Storm Engine 2 and someone even went into troubled porting all that into Doom 3 BFG VR fork. So it should be fairly easy to backport it into master here.

CarlKenner commented 6 years ago

No, the texture quality is the other good thing about original Doom 3. And the flashlight, but we've already brought that back.

The problem with them porting the tools into the Doom 3 BFG VR fork is they didn't include the solution or CMake files, and I couldn't get it to build. I guess I should have another go.

motorsep commented 6 years ago

Odd, we have cmake stuff in Storm Engine 2.. You might want to look into it instead then (or use our cmake stuff for that fork of Doom 3 BFG VR with tools).

If you hunt for textures, then maybe.. I played unmodded Doom 3 BFG several times and only got bothered by butchered skyboxes :) I say it's a nitpicking - better have YCoCg scaled DXT5 and almost unnoticeable artifacts than hack engine to do RGBA instead and have it take a way more disk space (compare to DXT5). On top of that you can't redistribute original textures repackaged as RGBA in the .bimage containers.

CarlKenner commented 6 years ago

I think this is the problem (quoting your Storm Engine 2 readme):

"3. Download and install MFC multibyte update https://www.microsoft.com/en-us/download/details.aspx?id=40770 (MSVC 2013 only)"

motorsep commented 6 years ago

Yeah, original tools require that too.. It would be a way too much work to port it to Qt, for example (and pointless, since only a few people mod Doom 3 anyway and all of them have Windows).