Doom 1 Parallax Mapping (2 versions available)

Re: Doom 1 Parallax Mapping

Postby Darkcrafter » Fri Sep 28, 2018 3:40 am

I found out the technique is called Parallax Occlusion Mapping with Silhouettes.

https://chetanjags.wordpress.com/2013/0 ... lhouettes/

http://developer.amd.com/wordpress/medi ... D07%29.pdf
Darkcrafter
 
Joined: 23 Sep 2017
Location: Russia

Re: Doom 1 Parallax Mapping

Postby Chris » Fri Sep 28, 2018 8:29 am

That will still have issues with polygon edges. It's simply an unescapable fact that Parallax Mapping works by taking a to-be-rendered flat triangle surface pixel in screenspace, and adjusts the texel lookup based on camera angle to make it look like it has depth. When the view ray should cross to a differently-textured or -oriented surface, the lookup adjustment has no way to compensate so you'll get a visible seam, and more extreme parallax adjustments will show more significant seams. This is to say nothing of the pixel depth value, which creates another set of issues (either you change the depth value to its proper value and pre-shader depth-test optimizations are disabled, or you don't and the depth buffer still sees it as a flat surface).

Parallax mapping is okay enough for subtle adjustments, but if you want to really adjust the apparent depth of the geometry, you need to change the geometry. Geometry shaders were needed to properly implement displacement for a reason.
User avatar
Chris
 
Joined: 17 Jul 2003

Re: Doom 1 Parallax Mapping

Postby Darkcrafter » Fri Sep 28, 2018 5:11 pm

Yeah you're 100% correct here. I wanted to ask if there is anyway to overcome this problem? Maybe to use some linedef or point information from a map and then "blend" this seam out with a crossfade?
Darkcrafter
 
Joined: 23 Sep 2017
Location: Russia

Re: Doom 1 Parallax Mapping

Postby Glaice » Mon Oct 15, 2018 7:50 pm

These are great! I look forward to seeing Doom 2 added to the mix as well as fixing the step texture and inter-episode problems.
User avatar
Glaice
Maps of Chaos/RDND/DVV Overseer
 
Joined: 13 Mar 2009
Location: North Babylon, NY
Discord: Glaice#8512
Github ID: GlaiceOldSchoolRTS
Operating System: Windows Vista/7 64-bit
Graphics Processor: ATI/AMD with Vulkan Support

Re: Doom 1 Parallax Mapping

Postby Sinael » Sun Oct 21, 2018 2:03 pm

Is it possible to make separate filtering settings for base textures and parallax? Because for the base textures nearest looks the best, but it makes parallax look "stepped", while trilinear makes Parallax look neat, but the base texture looks smudged.
User avatar
Sinael
Russian Ripman
 
Joined: 18 Oct 2011

Re: Doom 1 Parallax Mapping

Postby Darkcrafter » Mon Oct 22, 2018 7:44 am

The developer already said no.
Darkcrafter
 
Joined: 23 Sep 2017
Location: Russia

Re: Doom 1 Parallax Mapping

Postby Darkcrafter » Fri Mar 01, 2019 5:54 pm

I can't believe I ported relief parallax mapping from here: https://habr.com/ru/post/416163/
This one greatly outperforms everything posted here in quality but it will make your graphics card working a bit harder.

Here is the shader: https://drive.google.com/open?id=16Sjq- ... t3sNnb_w63

:!: Relief mapping is ON by default :!:

Looks good even without texture filtering: https://drive.google.com/open?id=1uy6jD ... hQoopsspmw
Darkcrafter
 
Joined: 23 Sep 2017
Location: Russia

Re: Doom 1 Parallax Mapping

Postby Tormentor667 » Sat Mar 02, 2019 4:29 am

Wow! This looks indeed very good
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Doom 1 Parallax Mapping

Postby Enjay » Sat Mar 02, 2019 4:56 am

They do indeed look good but some could still do with a bit of hand-tweaking. e.g.



A quick edit



I don't really understand what the different colours and shades in the materials do - so it's not great. However, I did notice that the displacement and normal map for this texture don't take account of the switch panel in this texture at all. It's there on the specular, but not the other two.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Doom 1 Parallax Mapping

Postby Darkcrafter » Sat Mar 02, 2019 5:21 am

Hmm. I noticed the same behaviour with switches too. I tried to put my texture in there so as a result it had way much displacement ammount to it while still having the same contrast in the heigh map image. I suspect that having correct pbr maps is important. As far as I know this implementation relies on patches but not the textures, so it might be the reason why quadratic switches placed on the top of the plastic texture (which obviously uses its own height map) look that way.
Darkcrafter
 
Joined: 23 Sep 2017
Location: Russia

Re: Doom 1 Parallax Mapping

Postby Enjay » Sat Mar 02, 2019 6:12 am

It does depend on textures, but for what ever reason, the texture in the PK3 is fine, it's just that the displacement and normal map don't have any trace of it in their image.

Here's the texture, displacement, normal and specular images from the PK3.

Image
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Doom 1 Parallax Mapping

Postby dpJudas » Sat Mar 02, 2019 6:39 am

The original texture set was made using patches. Since GZD doesn't support that as input for normal/displacement maps, I wrote a small program that converted the patches into textures. The switches didn't come with a normal map to begin with and at the time I figured it made sense to then just not modify the existing normal map for the patch under it. Obviously that wasn't a very good solution.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Doom 1 Parallax Mapping

Postby Darkcrafter » Sat Mar 02, 2019 1:23 pm

We need the tools, convenience of use is 90% of success! When this parallax shader looks pretty decent by itself it sucks due to seams between linedefs I'm wondering if there is anything we can do to at least to make it not that obvious. Also I'm striving to get that parallax shader with silhouettes, just imagine how this would beef up the doom graphics. I just downloaded nerual enhance mod added my hi-res weapon animation pack + some of my hi-res textures and parallax in the end of it. Doom never looked that good so I dropped my jaw mouse.
Darkcrafter
 
Joined: 23 Sep 2017
Location: Russia

Re: Doom 1 Parallax Mapping

Postby zhadoom » Tue Mar 05, 2019 11:04 am

Wow, this looks great!

Question: What tools do you use to create normal and displacement maps?
zhadoom
 
Joined: 04 Feb 2019

Re: Doom 1 Parallax Mapping

Postby Darkcrafter » Wed Mar 06, 2019 7:10 am

For height maps you can go even with paint. I use Photoshop. For normals there was a photoshop plug-in called nVidia Normal Map Creation Toolkit, you basically drop your bump or height map image in there and it does the job. Ideally you would go with a 3d modeling package, make a 3d model of a texture and bake normals and heights, but this is out of scope for a majority of users due to lack of 3d modeling experience.
Darkcrafter
 
Joined: 23 Sep 2017
Location: Russia

PreviousNext

Return to Shaders

Who is online

Users browsing this forum: No registered users and 1 guest