Page 6 of 6

Re: Doom 1 Parallax Mapping (2 versions available)

PostPosted: Mon Mar 16, 2020 3:19 pm
by r&r
would the concept Parallax works for doom's 2d sprite weapons?

Re: Doom 1 Parallax Mapping (2 versions available)

PostPosted: Tue Mar 17, 2020 11:41 am
by Tormentor667
Most propably not because the sprites are drawn flat directly as graphic to the hud.

Re: Doom 1 Parallax Mapping (2 versions available)

PostPosted: Tue Mar 17, 2020 12:36 pm
by talisa
wouldnd it be possible create voxel versions of doom's hud weapons instead? voxels would have the same look, since voxels are merely pixels arranged in a 3D space

perhaps with some good voxel work, it could be able to make voxel versions of doom's HUD weapons that looks just like the original 2D sprites,
but with the added benefit of being 3D and having real depth, while still looking just as chunky and pixel-tastic as the original sprites ?

just a random thought that sprung up in my head when thinking about 3D sprites... since voxels are litterally just 3D sprites in a way

Re: Doom 1 Parallax Mapping (2 versions available)

PostPosted: Tue Mar 17, 2020 6:19 pm
by TDRR
talisa wrote:wouldnd it be possible create voxel versions of doom's hud weapons instead?

Yes, it works in the hardware renderer. AFAIK, it does not work in software mode however, and this hasn't been fixed (yet?).

But this is probably far more trouble than what it's worth, since the voxels will look the exact same as sprites when put as a HUD weapon, and yes, this has been done before. The only time it could be actually useful is in VR.

Re: Doom 1 Parallax Mapping (2 versions available)

PostPosted: Tue Mar 17, 2020 7:36 pm
by talisa
hmm... well... a slight subtle sway could be added possible which occurs with the players movement
so that the player will actually be able to tell that the weapons are voxels instead of sprites?

it can be very subtle, just enough for the player to be able to tell the weapons are voxels instead of sprites

also, of course, any nearby lights like torches and such will also affect the hud weapons if they were voxels, which would look much nicer on voxel weapons.

perhaps the one same 'simulated sunlight' shader could be added to them like cherno recently added to his voxel hud weapons from his ''voxel chibi doom",
which add random lighting to the hud weapons to simulate random directional lighting on the hud weapons
viewtopic.php?f=46&t=58059

Re: Doom 1 Parallax Mapping (2 versions available)

PostPosted: Sat Mar 21, 2020 2:59 am
by Kazudra
talisa wrote:wouldnd it be possible create voxel versions of doom's hud weapons instead? voxels would have the same look, since voxels are merely pixels arranged in a 3D space

perhaps with some good voxel work, it could be able to make voxel versions of doom's HUD weapons that looks just like the original 2D sprites,
but with the added benefit of being 3D and having real depth, while still looking just as chunky and pixel-tastic as the original sprites ?

just a random thought that sprung up in my head when thinking about 3D sprites... since voxels are litterally just 3D sprites in a way


Good Voxel work is extremely hard to come by, the only game I've seen with Voxels that are impressive is Ion Fury.

Re: Doom 1 Parallax Mapping (2 versions available)

PostPosted: Sat Mar 21, 2020 7:42 am
by talisa
Kazudra wrote:
talisa wrote:wouldnd it be possible create voxel versions of doom's hud weapons instead? voxels would have the same look, since voxels are merely pixels arranged in a 3D space

perhaps with some good voxel work, it could be able to make voxel versions of doom's HUD weapons that looks just like the original 2D sprites,
but with the added benefit of being 3D and having real depth, while still looking just as chunky and pixel-tastic as the original sprites ?

just a random thought that sprung up in my head when thinking about 3D sprites... since voxels are litterally just 3D sprites in a way


Good Voxel work is extremely hard to come by, the only game I've seen with Voxels that are impressive is Ion Fury.


good impressive voxel work? ....ill just leave these threads right here

Reikall's Voxels.

Cherno's Voxel Chibi Doom

Voxelbro's Voxel addons

just a FEW of the many examples of great voxels :wink:

Re: Doom 1 Parallax Mapping (2 versions available)

PostPosted: Sun Mar 07, 2021 6:31 am
by Steve5563
i found an issue with this parallax shader,
the bright maps don't seem to work with it. is there anyone here or knows of someone that plays around with shaders and would be willing to look at the code and see what the problem is?
such a cool feature just held back by this small bug.

Re: Doom 1 Parallax Mapping (2 versions available)

PostPosted: Sun Mar 07, 2021 9:55 am
by AndrewMRX
This shader does not work with brightmaps on the new Gzdoom version, but it works on GZdoom 4.3.3
It would be nice to fix this for the new version.

Re: Doom 1 Parallax Mapping (2 versions available)

PostPosted: Sun Mar 07, 2021 8:12 pm
by Steve5563
thanks Andrew i did not know that.

Re: Doom 1 Parallax Mapping (2 versions available)

PostPosted: Sun Mar 07, 2021 11:02 pm
by Steve5563
so i found out that WolfenDOOM has a modified version of this shader that works with gzdoom 4.5 and that the bright maps do work with it.
so i compared both shaders side by side and copy / pasted and deactivated some lines of code for this parallax shader listed at the start of this thread.
and i have got it working out of sheer luck as i had no idea what i am doing with shader code.
these are the changes i made.

Code: Select allExpand view
#define RELIEF_PARALLAX
// #define NORMAL_PARALLAX

mat3 GetTBN();
vec3 GetBumpedNormal(mat3 tbn, vec2 texcoord);
vec2 ParallaxMap(mat3 tbn);

//Material ProcessMaterial()                            ---------------not needed anymore
void SetupMaterial(inout Material material)               //---------------line sourced from wolfendoom's modified parallax shader
{
    mat3 tbn = GetTBN();
    vec2 texCoord = ParallaxMap(tbn);

    //Material material;                            -----------not needed anymore
    material.Base = getTexel(texCoord);
    material.Normal = GetBumpedNormal(tbn, texCoord);
   material.Bright = texture(brighttexture, texCoord);    //----------- forced brightmap to load here
#if defined(SPECULAR)
    material.Specular = texture(speculartexture, texCoord).rgb;
    material.Glossiness = uSpecularMaterial.x;
    material.SpecularLevel = uSpecularMaterial.y;
#endif
#if defined(PBR)
    material.Metallic = texture(metallictexture, texCoord).r;
    material.Roughness = texture(roughnesstexture, texCoord).r;
    material.AO = texture(aotexture, texCoord).r;
//#endif                                                    -----------not needed anymore
//#if defined(BRIGHTMAP)                                    -----------not needed anymore
//    material.Bright = texture(brighttexture, texCoord);   -----------not needed anymore
#endif
    //return material;                                -----------not needed anymore
}