[No] Assign Custom Textures To Dynamic Lights

Moderator: GZDoom Developers

Assign Custom Textures To Dynamic Lights

Postby Steve5563 » Sun May 15, 2022 10:21 am

Hi,
Just curious if it would be possible to have a feature that can allow users to assign a custom texture for a newly created dynamic light that you can define in the GLDEFS lump. https://zdoom.org/wiki/GLDEFS
if a custom texture is to be used with the newly created dynamic light, the user will need to define what texture is to be used for this particular light and the location of the texture, something similar to the material setup.
if no custom texture is to be defined then possibly just make the engine revert back to the gzdoom default textures that are located in the GLstuff folder.

the reason for the request is i have been working on liquid shaders (Liquid texture pack V6.7) and this idea could be useful for adding a custom texture to a dedicated dynamic light that you can place in a map.
which i would then also like to take it one step further and assign a custom shader to the newly defined dynamic light texture, which would be used to create the final water caustic animation that the new light will then project in the area.
Rather then using ANIMDEFS for the animation shaders are great for minimum gpu vram usage, but ANIMDEFS can still be useful in certain situations.
I am sure with a bit of creativity, users could find other uses for a feature like this from simple realistic looking flash lights (that use the gzdoom cone / dynamic spot lights) or for creative map decoration.
such as custom shadow projection effects through wire fences / movie theater projector etc.

this is just something i have just thought of today and im not sure if this feature has been requested before in the past. and if it's a viable feature for the engine.
here is an example on what i am thinking, just on a more bare bones level for gzdoom.


Example where just static textures can be used.
Code: Select allExpand view
pointlight WaterCaustic
{
    color 0.5 0.5 0.8
    size 256
    offset 0 0 0
    Use_texture  "Textures / Lights / WATERLT.png " // this tells gzdoom to overly like a hires texture  or just override the original texture, for this newly defined texture.

}

if you was to add a shader to the point light water caustic texture to create an animation effect. possibly something like this.

Code: Select allExpand view
material texture WATERLT
{
    shader "shaders/Watercausticr.fp"
    texture Diffuse "textures/Lights/Watercaustic.png"
    texture lightmask "textures/Lights/lightmask.png" // possibly used to lower brightness of the water caustic texture near the edges

}
User avatar
Steve5563
 
Joined: 27 Jan 2019
Location: Australia

Re: Assign Custom Textures To Dynamic Lights

Postby Graf Zahl » Sun May 15, 2022 11:04 am

Dynamic lights do not use textures. They did a long time ago when there were no shaders, but that code no longer exists because it was far too limiting.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Assign Custom Textures To Dynamic Lights

Postby Steve5563 » Mon May 16, 2022 1:59 am

Dynamic lights do not use textures. They did a long time ago when there were no shaders, but that code no longer exists because it was far too limiting.

Roger that, i remember altering the dynamic lights by adjusting the default textures (years ago) that's why i made the request as i did.

so you still dont think it's possible on allowing the dynamic lights to have the option to use a grey scale texture as information to alter the dynamic light shader pattern similar to what was shown in the video?

Also on a side note, if the dynamic light feature is not possible, do you think something as i have described above could be possible as a more simpler alternative option where this could be done for the gzdoom glow effect,
allow the user to have the option to use a mask (grey scale) texture to alter the brightness of the glow's RGB values in gldefs.
the mask (grey scale) texture would need to tile along the walls (maybe have a scale / tile value to adjust texture size along the walls) and the height value can be based on the height of the glow value so the mask texture would just stretch it's height based on that value
just a thought, i have no idea how this would need to be correctly setup in the engine.
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