Doom 1 Parallax Mapping (2 versions available)

Doom 1 Parallax Mapping (2 versions available)

Postby Rachael » Sun Sep 23, 2018 4:42 pm

Posted by dpJudas on Discord:
Code: Select allExpand view
Parallax mapping for GZDoom
===========================

This pk3 contains a small sample set of textures along with a parallax shader.
It gives a small taste of how Doom might look like if it had a more complete set of textures.

Special thanks to Michael Obersnel for creating the patch textures this set was based on.


The original author was apparently willing to share this with dpJudas and so it is as thus posted, with his permission.

Screenshots:
Spoiler:


Download:
https://mega.nz/#!YJ1EQSpb!KY1Um5v6Zsfy ... V0PFdapHKQ

Alternate version (created by Darkcrafter - more details here - thanks!):
https://drive.google.com/file/d/1gPNltV ... 1EIkT/view
You do not have the required permissions to view the files attached to this post.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Doom 1 Parallax Mapping

Postby Enjay » Sun Sep 23, 2018 4:52 pm

Looks neat. Not too over the top in most cases. Nice and subtle, but definitely there.

A minor "health warning" it replaces standard textures and flats with lumps in the textures folder. This causes a problem with the name clash textures/flats STEP1 and STEP2 and even breaks MAP07 where the final sector raises by the height of its lower texture.

Image

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 » Sun Sep 23, 2018 4:55 pm

The set is made for Doom 1 as far as I can tell. Hence the problems with Doom 2. They are mostly a proof of concept anyway as the set is incomplete.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Doom 1 Parallax Mapping

Postby Enjay » Sun Sep 23, 2018 5:03 pm

It'll cause similar problems in Doom as well as Doom2. The "problem" is that Doom has textures named STEP1 and STEP2 and also flats with those names. If you load a mod with lumps in a textures folder with those names, it will use the loaded lumps in place of both.

[edit]
Image
[/edit]
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 » Sun Sep 23, 2018 5:05 pm

Oh I see - my patch to texture conversion program didn't take that into account. Oops. :)
dpJudas
 
 
 
Joined: 28 May 2016

Re: Doom 1 Parallax Mapping

Postby Rachael » Sun Sep 23, 2018 5:08 pm

Wow - I playtested that before posting it and I wonder how I missed that. >_> Good find, Enjay.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Doom 1 Parallax Mapping

Postby Pompous Seed » Sun Sep 23, 2018 8:29 pm

This is awesome! If this was a full set, it'd prolly go right in the autoload folder.
Pompous Seed
 
Joined: 05 Aug 2016

Re: Doom 1 Parallax Mapping

Postby Darkcrafter » Mon Sep 24, 2018 11:09 am

Nice! Some critique:
1) Steep PM sometimes not enough imho :oops:
2) Why patches is still a thing? As far as I know patches are there to save some space in 90's. Why not just use textures? :mrgreen:
3) Parallax mapping looks choppy if nearest neighbor (that pixel look) interpolation is used on textures, is there any way to use nearest neighbor while having shader processing in bilinear?
User avatar
Darkcrafter
 
Joined: 23 Sep 2017
Location: South Russia
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Doom 1 Parallax Mapping

Postby dpJudas » Mon Sep 24, 2018 1:08 pm

Darkcrafter wrote:1) Steep PM sometimes not enough imho

Steep PM is not enabled in the shader in the pk3 (change the define in there to enable it). Mostly for performance reasons.

2) Why patches is still a thing? As far as I know patches are there to save some space in 90's. Why not just use textures?

I'm not sure why Michael chose this approach. Maybe he felt it was easier as there are fewer patches than textures. I'm not sure id software did it this way to save space - it might have been motivated by an easier workflow for creating the textures.

3) Parallax mapping looks choppy if nearest neighbor (that pixel look) interpolation is used on textures, is there any way to use nearest neighbor while having shader processing in bilinear?

Unfortunately not. This requires some changes to the texture manager or the way shader sampler inputs are bound.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Doom 1 Parallax Mapping

Postby Tormentor667 » Mon Sep 24, 2018 1:28 pm

I don't get it... what's the difference between normal/specular maps and this?
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Doom 1 Parallax Mapping

Postby Darkcrafter » Mon Sep 24, 2018 3:08 pm

Tormentor667 wrote:I don't get it... what's the difference between normal/specular maps and this?


normal map adds some texture effect depending on light information present into a map (dyn lights). Despite best efforts one can't get a surface that doesn't look flat with this.
Specular maps are there to allow for shinnes to display according to a specular map (white color means more light in an area of a texture).

Parallax mapping simulates Displacement mapping at lower resource consumption cost (you don't need millions of polygons to get a displacement effect to work). So the surface virtually becomes 3D without getting even a polygon! So you can add a really good 3d effect to a surface.

Here you can see the difference between normal mapping and parallax mapping:
http://encelo.netsons.org/blog/wp-conte ... rallax.jpg

Left is normal, right is parallax.
User avatar
Darkcrafter
 
Joined: 23 Sep 2017
Location: South Russia
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Doom 1 Parallax Mapping

Postby Darkcrafter » Mon Sep 24, 2018 3:16 pm

dpJudas wrote:Steep PM is not enabled in the shader in the pk3 (change the define in there to enable it). Mostly for performance reasons.

Thanks, gottal look into it later :)
User avatar
Darkcrafter
 
Joined: 23 Sep 2017
Location: South Russia
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Doom 1 Parallax Mapping

Postby Darkcrafter » Tue Sep 25, 2018 3:07 pm

Tried to put POM in there today and failed :mrgreen: so the cause was that I entered 0.75 as a parallax coefficient to get more effect and found steep pm to distort the textures a lot. Still complies Doom well, especially nice on GSTVINE and waves floor texture at E3M1.
User avatar
Darkcrafter
 
Joined: 23 Sep 2017
Location: South Russia
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Doom 1 Parallax Mapping

Postby Enjay » Tue Sep 25, 2018 3:36 pm

I played quite a bit of Doom with this last night. I think that textures where the mapping is relatively simple and subtle work very nicely. e.g. the various textures that are meant to look like big stone blocks (e.g. GSTONE1, STONE2) work really well; the mapping just giving them a bit of 3D-ness so that the lines between the blocks look slightly recessed is nice.

Textures that work less well are ones with "deeper" or more irregular features. e.g. if you go right up to a BIGDOOR2, look upwards and strafe left and right you can easily see the texture distorting and generally looking odd as you move. COMPWERD also looked WERD... er weird. ;)

I assume that part of this is due to the low-res nature of the textures and hi-res textures would cope much better with this type of mapping.


Also, perhaps another unintended consequence, if a flat has a map and the flat is used behind some end text, the flat won't show up behind the text on the endtext screen.

Image
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 Darkcrafter » Thu Sep 27, 2018 6:35 pm

Updated my drivers for the old video card and magically it now supports gl shading 3.3 :) so I've got this thing working on my older computer as well.
Surprisingly I had to invert the parallax scale otherwise the effect was inverted (ATI Radeon HD 2400 PRO).

Must admit I was stupid enough to admit there was no occlusion mapping (it IS actually there) :oops:
Still, there are some artifacts, I saw on the web that their methods (absolutely the same in code that is used here) looks better. It kind of goes out of the texture border, so the illusion doesn't get broken as it reachs a polygon border.

Got some screenshots here: https://drive.google.com/open?id=1566iW ... ImpTf3UWml
User avatar
Darkcrafter
 
Joined: 23 Sep 2017
Location: South Russia
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Next

Return to Shaders

Who is online

Users browsing this forum: No registered users and 0 guests