Making the lite amp not suck
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Making the lite amp not suck
Part of me is curious as to how one might change the light-amplification goggles to enable one to see areas and monsters clearly - without sacrificing the good looks of a well-designed level. Lighting can be just about everything in how a map looks, so picking up the goggles and removing that aspect entirely invariably makes the visual aspect of a map worse - imho.
I wonder if there's a way with shaders or ZScript to drum up some new application for the goggles.
Some ideas:
- A powerup that simply boosts the light level of sectors by 32 or 64 units temporarily - enough of a boost to make things clearer, but not enough to totally sacrifice light level differentiation and keep the map looking good.
- A powerup that renders an outline around enemies in a certain range.
- A "thermal visor" shader that colors the enemies (and possibly hazards) in red/yellow and the rest of the terrain in blue/purple.
I wonder if there's a way with shaders or ZScript to drum up some new application for the goggles.
Some ideas:
- A powerup that simply boosts the light level of sectors by 32 or 64 units temporarily - enough of a boost to make things clearer, but not enough to totally sacrifice light level differentiation and keep the map looking good.
- A powerup that renders an outline around enemies in a certain range.
- A "thermal visor" shader that colors the enemies (and possibly hazards) in red/yellow and the rest of the terrain in blue/purple.
Re: Making the lite amp not suck
The best way to do it is a post-processing shader that multiplies the screen intensity, adds a bit of a fuzz effect, tints the screen, and then adding a dynamic light to the player him/herself that brightens the areas immediately around them.
Re: Making the lite amp not suck
Isn't that just a different color scheme for the existing 'enhanced Nightvision' mode?Jimmy wrote: - A "thermal visor" shader that colors the enemies (and possibly hazards) in red/yellow and the rest of the terrain in blue/purple.
- Caligari87
- Admin
- Posts: 6174
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Making the lite amp not suck
Here's a "nightvision" shader that looks like a good place to start for Rachael's suggestion. : https://www.shadertoy.com/view/Xsl3zf
The multiplication coefficients on line 21 would need to be bumped to actually brighten the input though. As is they just recolor it a bit.
The multiplication coefficients on line 21 would need to be bumped to actually brighten the input though. As is they just recolor it a bit.
- Pixel Eater
-
- Posts: 667
- Joined: Wed Aug 02, 2017 12:31 am
- Location: In between the Moon and you, between the buried and me.
Re: Making the lite amp not suck
I've asked about it before, but having a Lite-Amp'ed scene as a sample texture would be perfect for this
Last edited by Pixel Eater on Fri Apr 27, 2018 6:18 am, edited 1 time in total.
- Tormentor667
- Posts: 13530
- Joined: Wed Jul 16, 2003 3:52 am
- Contact:
Re: Making the lite amp not suck
That sounds like a good solution to meRachael wrote:The best way to do it is a post-processing shader that multiplies the screen intensity, adds a bit of a fuzz effect, tints the screen, and then adding a dynamic light to the player him/herself that brightens the areas immediately around them.
- Pixel Eater
-
- Posts: 667
- Joined: Wed Aug 02, 2017 12:31 am
- Location: In between the Moon and you, between the buried and me.
Re: Making the lite amp not suck
I wonder how that noise would look if replaced by the "random" number series the fuzz usesCaligari87 wrote:Here's a "nightvision" shader that looks like a good place to start for Rachael's suggestion. : https://www.shadertoy.com/view/Xsl3zf
- Pixel Eater
-
- Posts: 667
- Joined: Wed Aug 02, 2017 12:31 am
- Location: In between the Moon and you, between the buried and me.
Re: Making the lite amp not suck
Managed to port the software fuzz into a custom shader and I think it looks pretty cool as background noise. It's homogeneous with the DooM universe at the least
Edit: Think it might be better with the fuzz added instead of subtracted:
- Tormentor667
- Posts: 13530
- Joined: Wed Jul 16, 2003 3:52 am
- Contact:
Re: Making the lite amp not suck
Maybe some more work could be done to make it look like this:
https://i.ytimg.com/vi/Ec0J6zau7jY/maxresdefault.jpg
https://i.ytimg.com/vi/Ec0J6zau7jY/maxresdefault.jpg
- Pixel Eater
-
- Posts: 667
- Joined: Wed Aug 02, 2017 12:31 am
- Location: In between the Moon and you, between the buried and me.
Re: Making the lite amp not suck
That's surprisingly clear, no grain at all. And also pretty saturated until it suddenly goes full white. Cool picture.
Re: Making the lite amp not suck
If the project is single player-only, you *could* just bump every sectors' light levels a certain relative amount (be sure to save the existing values before-hand so that it can be restored later). Not sure how practical of a solution that would be though.
(ZScript obviously; requires sector array iteration)
EDIT: would [wiki]A_Light[/wiki] do the trick? This one is multiplayer friendly. So boost the player's local illumination with A_Light, then add a post processing shader on top if needed.
A_Light might not work when viewing through another camera except your own... which may or may not be what you want.
(ZScript obviously; requires sector array iteration)
EDIT: would [wiki]A_Light[/wiki] do the trick? This one is multiplayer friendly. So boost the player's local illumination with A_Light, then add a post processing shader on top if needed.
A_Light might not work when viewing through another camera except your own... which may or may not be what you want.
Re: Making the lite amp not suck
A minor instance of A_Light might work but I think a local dynamic light will really make the effect pop, if you know what I mean.
- Caligari87
- Admin
- Posts: 6174
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Making the lite amp not suck
Light amp tubes work by amplifying available light. As I understand, for science reasons the green wavelengths get amplified the most. After playing in GIMP I think I managed to build a rather convincing effect that could be applied in (almost) pure post-processing:
Original:
Filtered:
First, I reduced the saturation of the red and blue channels, green, so there's no fully-saturated reds or blues. Then, compress the strength of the green channel by a factor of 4 (pulling the highlight down on the levels dialog on just green). Then, add (or screen-multiply) that result to itself 8 times or so.
Of course, this won't work with completely black pixels or light level 0 sectors. You'd probably want some kind of pre-processing to make sure all the lightlevels on the map are at least 1. The benefit of this approach is that it preserves the existing contrasts and amplifies the "light" in a somewhat realistic manner instead of just putting a green filter over the scene. Of course, some blurring and grain wouldn't be out of place either.
Original:
Filtered:
First, I reduced the saturation of the red and blue channels, green, so there's no fully-saturated reds or blues. Then, compress the strength of the green channel by a factor of 4 (pulling the highlight down on the levels dialog on just green). Then, add (or screen-multiply) that result to itself 8 times or so.
Of course, this won't work with completely black pixels or light level 0 sectors. You'd probably want some kind of pre-processing to make sure all the lightlevels on the map are at least 1. The benefit of this approach is that it preserves the existing contrasts and amplifies the "light" in a somewhat realistic manner instead of just putting a green filter over the scene. Of course, some blurring and grain wouldn't be out of place either.
- Pixel Eater
-
- Posts: 667
- Joined: Wed Aug 02, 2017 12:31 am
- Location: In between the Moon and you, between the buried and me.
Re: Making the lite amp not suck
Caligari, if you want I can drum up a Tone-mapping shader so we can see your filtering in action?
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
Re: Making the lite amp not suck
I can't speak for him but I certainly want to see that!