Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0

having real trouble with height maps


I have been banging my head against a wall here, I can't get normal maps working.

The best example i found was this topic: 

when i try to edit the demo map, for example i increased the light in the room.... when the light in increased you don't see any bumps on the textures

i don't get this? i was after normal mapping, ie parallax mapping? so the height data should create a 3d effect even without lighting

so all i can find is these random forum posts

all i want is "bump mapping", i've seen pictures all around... could anyone link me to a solid working example, preferably one that replaces some of the default textures? sorry to waste anyones time but i really have been trying the google technique now for a few days.

Share this post

Link to post

11 answers to this question

Recommended Posts

  • 1

You should post a screenshot maybe.

There is no easy way to get depth in flat walls, but the lighting reflection does work in gzdoom (3.5.1 here).



Share this post

Link to post
  • 0

just to confirm, the "normal" is the z axis off the wall... it's supposed to actually effect how the texture itself is rendered (the z offset, the offset off the way, not just how the texture is shaded (a trick i've seen/used in the "lightworld" library for love 2d)

so it's possible that it really doesn't support bump maps? yet? or is planned? please if anyone could confirm... i will keep scouring the forums as some of the images i swear looked like propper bump mapping

Share this post

Link to post
  • 0

sorry i didn't notice Teder's reply

wtf then, yes that link shows real parallax occlusion.... the demo i downloaded that i linked to had the effect as i'd described (just changing lighting)... many of the videos on youtube showed again this same trick, they had flashlights on the player actually and very dark games (i dunno about 99% of people, but they've sure got tired of dark games with flashlights)

your reply is a goodsend as it clearly works, i will figure out what issue i have and post a pk3 if i still have trouble

admittedly i checked my version i was at 3.4.1 (sorry about that), i am also running mac, yeah i can sort it out now when i get to that, seeing it working, no problem.... even if maybe mac gets it behind i still know it's there and expected to be working

yeah i can't tell you how much of a relief that is... i have a real desire for experimenting with textures looks again (it's a professional skill that you can use in all of your game development) and i don't want to go off to Unity or Unreal when i'm having so much more fun with doom

Share this post

Link to post
  • 0

i have posted a picture showing what i get from using this thread:

i still can't get this working....

perhaps we could whittle this down... so the first example that opened the thread, this loads for me and i posted a screenshot, something looks different but i don't think it's working (for some reason i had to build my own map to test it, i just love examples that don't include a map)

other example files there have custom shaders attached, they say they are not compile when running on mac 10.13.6, gzdoom 3.5.1

my graphics card is pretty lame sure, some Intel 4000... however it's still actually way into the generation of having some sort of normal mapping... i don't know if we support tessellation here sure (although it's direct x 11 certified)... but no-one here has mentioned tesselation

ANYWAY, next i was gonna try doom slayer chronicles, from the screenshots it seems to look like it supports some texture depth.

I'd really appreciate it if someone technically minded could perhaps structure some logical things i should check and we could at least eliminate where the bug might be, if certain cards are just incompatible with gzdoom on this etc (perhaps it is because you're using desktops or expensive laptops with newer graphics hardware).
Doomslayer chronicals screenshots:
really do look like they have that feature, but not on everyones screenshots of this (i just saw some on facebook i was gonna check with him to)

please help as this is just a massive timewasting bug... i'd rather just be painting stuff!

Screen Shot 2018-09-05 at 15.10.14.png

Share this post

Link to post
  • 0

I'm no expert, but a "normal map" has nothing to do with parallax mapping, that's a height map. You're getting mixed up.


There are two separate features you're looking at. The top thread was created when GZDoom introduced support for Materials: specifically a normal map (which adds pixel specific shadows to a texture) and a specular map (which adds pixel specific reflections to a texture), as well as a pretty basic implementation of PBR (roughness, metalicness etc.). These are purely for handling how light interacts with the texture.


These features only fully work with attenuated dynamic lights.  If you crank up the sector lighting then yes they will dissapear, because they require contrast in lighting to work. 


Then, totally separately, a couple of weeks ago someone (I can't recall who, but dpJudas improved it) wrote a shader (i.e. a separate graphical effect, not native to GZDoom) that creates a parallax mapping look. This requires a height map to work. It works completely independently from the materials stuff and works with basic Doom sector lighting too, because it's not a lighting based effect. 


Edit: just FYI Doomslayer Chronicles does not feature any parallax mapping, as that came out before it became widely known.

Share this post

Link to post
  • 0

Have you already loaded the lights.pk3 and tried shooting while standing near your normalmapped texture? also you need both a normal map and a specular map in the case of "classic" materials, or a normal map, a metalness map, a roughness map, and an ambient occlusion map in the case of PBR materials, missing an element in either of these cases will just be ignored by GZDoom / they won't be loaded, I also struggled with this last time I tried doing it, then Arl mentioned this to me in the other thread.

Share this post

Link to post
  • 0

okay i was mistaken here thanks (i edited the title now)... but i was still actually by accident on the right track:



dpJudas updated how shaders work with materials now. So I took a snippet of his parallax example code and used that. Its just getting the height just right aswell and the heightmap generated correctly.


Here is a link to a quick testmap just to show off some off the textures. just type into the console "map para"



Edited Saturday at 01:42 AM by furyweb

so this should have been the example i could work from, however i just get the loading error:


Execution could not continue.

Unable to load shader parallax:

Init Shader 'parallax':

Fragment shader:

ERROR: 0:72: Initializer not allowed

ERROR: 0:92: Use of undeclared identifier 'layerDepth'

ERROR: 0:100: Use of undeclared identifier 'layerDepth'

ERROR: 0:103: Use of undeclared identifier 'beforeDepth'

ERROR: 0:104: Use of undeclared identifier 'weight'

ERROR: 0:104: Use of undeclared identifier 'weight'

ERROR: 0:106: Use of undeclared identifier 'finalTexCoords'


ERROR: One or more attached shaders not successfully compiled

GZDoom doesn't load.

So it was back to me asking then, is it because i used a mac or something?

It'd be nice if someone could test that pk3 file and just confirm if it works for them or not.

Share this post

Link to post
  • 0


i changed line 72 of the shader to remove "const"



OH YEAH... success screenshot....beautiful texture work from them guys, it's like GzDoom3 huh

Any github for this stuff?? we need everyone to be compatible with this so it can make it a standard gzdoom feature right? Epic... i've never ever thought i'd solve a shader bug by editing the first line i was bloody told to... i thought this was gonna take some hours from my life this

Screen Shot 2018-09-06 at 14.23.35.png

Share this post

Link to post
  • 0

It is a standard GZDoom feature in a way. GZDoom, by standard, supports per-texture-shaders, and this is a shader that GZDoom supports. 

Share this post

Link to post
  • 0
6 hours ago, Bauul said:

It is a standard GZDoom feature in a way. GZDoom, by standard, supports per-texture-shaders, and this is a shader that GZDoom supports. 


as far as i'm aware gzdoom supports shaders, but this one i got from a forum post (it has no version number of comment strings)... where is this shader from then as it needs one of the lines fixed?... it appeared when compiled the const didn't support assignment using an operator, so i had to put it as a normal variable

it may be the case it compiles some places with this, but there is not reason for performance to assign as a constant... this shader could therefore be incompatible with some platforms

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now