[Not needed] Multi Layer textures for map geometry.

Moderator: GZDoom Developers

Multi Layer textures for map geometry.

Postby Steve5563 » Tue Apr 06, 2021 5:13 am

is it possible to have some sort of multi layer texture workflow like in gimp / Photoshop on a maps geometry?
for example in gimp you can have a base texture ( layer 1) and then have another texture on top of the base texture ( layer 2 ), this layer 2 texture will need the texture artist to use an alpha channel / transparency to be applied to certain areas of the texture where you want the base texture ( layer 1 ) to be visible.

the reason for the request is i have played around with the "Composite textures" feature to create this multi layer texture effect in doom.
the problem i have tested is for each Composite texture created, this texture is cached to the gpu's vram as one rendered texture.
the problem i have found is the bigger the dimensions / resolution of the Composite texture canvas size is, the more vram you will use while still using the same low resolution textures to create the Composite texture.

with a multi layer texture workflow on the maps geometry, having the ability to add and scale textures on top of the diffuse textures when using gzdoom builder can help break up the tiling effect of textures over large and small areas and really dress up the levels nicely.
if used correctly you can save a ton on vram as you can virtually create lots of variations / combination / size ratios of textures using only a handful of textures.

for example:
- a road tar texture placed in layer 1(bottom) combined with a road line + road cracks + water puddles placed in layer 2 (top)
- a grass texture placed in layer 1 (bottom) combined with a mud / dirt texture in layer 2 (top)
- a animated lava texture placed in layer 1 (bottom) combined with a cracked rock texture in layer 2 (above) with some human / monster bones placed in layer 3 (top)
- a floor texture placed in layer 1 (bottom) combined with a blood pools texture in layer 2 (above) with a scatted shell casing texture placed in layer 3 (top)
- a ceiling texture placed in layer 1 (bottom) combined with a led light texture in layer 2 (above) with a cable tray texture placed in layer 3 (top)
- a brick wall texture placed in layer 1 (bottom) combined with a graffiti texture in layer 2 (above) with a window texture placed in layer 3 (top) (this is really handy for creating different variations of buildings for city levels while only needing to use a handful of textures to keep vram usage down but creativity up )

if this is possible to do in OpenGL, can this feature be designed for future upgrades to have the ability to add extra channels designed for pre rendered lightmaps for people like me willing to go the extra mile and "manually" apply pre rendered low res textures created from ( blender/3ds max ) and apply to the maps geometry as a lightmap texture which can be scaled / rotated / offset changed in gzdoom builder.

this can be somewhat done using a Composite texture with a low resolution brightmap texture assigned to it, once again tho the problem i am facing is the vram usage from large Composite textures (4096 X 4096) scaled down to a map floor area of (1024 X 1024) to cover the maps geometry

if the lightmap channels i have just mentioned cant be added to this feature request,
can this still be possible for just having a 2nd or even 3rd (channels / layers) which can be used to overlay the diffuse texture placed on ( layer 1 / channel 1)
cheers.
User avatar
Steve5563
 
Joined: 27 Jan 2019
Location: Australia

Re: Multi Layer textures for map geometry.

Postby Graf Zahl » Tue Apr 06, 2021 5:41 am

This is what exists and really the only feasible approach: https://zdoom.org/wiki/Classes:Decal
The Build engine uses a similar method to define overlay textures on walls by placing a sprite on top of it.

Making this a property of the walls would very efficiently kill the renderer, especially the software renderer.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Multi Layer textures for map geometry.

Postby Nash » Tue Apr 06, 2021 6:11 am

I'd love to see actual floor/ceiling decals some day, even if it's only for the hardware renderer (I understand it's not easy with software rendering because of the flood fill algorithm)... one can dream. :P

As for one of the use cases mentioned in the OP (lightmaps), a decal system is the totally wrong solution. What you want is a real lightmap baking workflow. It technically has already been done before (albeit in an unfinished GZDoom branch) so the possibility definitely exists, provided a programmer would like to put the work into it.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Multi Layer textures for map geometry.

Postby Redneckerz » Tue Apr 06, 2021 6:32 am

Nash wrote:As for one of the use cases mentioned in the OP (lightmaps), a decal system is the totally wrong solution. What you want is a real lightmap baking workflow. It technically has already been done before (albeit in an unfinished GZDoom branch) so the possibility definitely exists, provided a programmer would like to put the work into it.

Ill just link to that baking tool for the OP - includes a custom GZDoom build. - ZDRay
User avatar
Redneckerz
To it's ports i may have seen
Spotlight Team
 
Joined: 25 Nov 2019
Discord: Redneckerz#8399
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Legacy GZDoom)

Re: Multi Layer textures for map geometry.

Postby Steve5563 » Tue Apr 06, 2021 7:48 am

yea i wasn't interested in using decals, as they are to cpu intensive when using lots of them,

i think GTA 4 uses this multi layer texture effect for it's road surfaces
- layer 1 (base / bottom) would be an asphalt texture
- layer 2 (placed / projected on top of layer 1) would be road lines
- layer 3 (placed /projected on top of layer 2) would be the transparent tyre marks, because the texture is transparent the roads lines and asphalt texture can still be visible by the player.

so i was more thinking with how a current surface handles textures in doom atm on how they tile across a surface,
the same could be done with this layer / channel setup for a map surface, when you add a texture to layer 2 / channel 2 on that surface to the maps geometry, that layer will be projected on top of the texture that is in assigned to layer 1/ channel 1 for that surface.
layer 2 texture tiles on top of layer 1 so visually you cant see layer 1,
but if the texture artist adds some transparency areas to that texture which is placed in layer 2 / channel 2 ,
layer 1 will now become visible in those spots to the player.

these textures assigned to the layers on that surface of the map will tile the same as they do currently in doom, over and over again forever.
if you still don't really understand what i am saying here, i can make some visual examples for you later on.
cheers.
User avatar
Steve5563
 
Joined: 27 Jan 2019
Location: Australia


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest