Fuzz type closest to vanilla in GZDoom?

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Fuzz type closest to vanilla in GZDoom?

Post by Nevander »

I have been liking playing Doom more vanilla recently, and with that comes my desire to make all the settings resemble vanilla as best as possible but in higher res of course. Things are going well except I noticed that none of the fuzz types reproduce vanilla Doom's fuzz effect. The wiki page on [wiki]Fuzz[/wiki] says that:
An accurate implementation of the fuzz effect in an OpenGL renderer is difficult.
Why is that exactly? I don't know much about game engines but it seems like it would be possible to accurately reproduce a software effect effortlessly in hardware... but then again maybe that's why I don't know anything about engines.

If it can't be exact, then which fuzz type would you say is closest to the original style? I'm torn between pixel fuzz and noise personally.

Also makes me wonder how games like Crysis does its invisibility effects and make them look so good.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Fuzz type closest to vanilla in GZDoom?

Post by Gez »

The way the fuzz effect works in software is that it takes a pixel from behind the fuzzy thing (spectre or whatever else), make it darker, and moves it up or down a few places. That's this last step that's hard to do in OpenGL. Making pixels behind darker is easy -- all you need is to draw a translucent black shape in front, and that'll make whatever is behind darker. But moving the pixels up and down, that's more complicated because it means you need to read from the screen to get the values. The shaders, as implemented in GZDoom, can't do that. They can only read their own texture, not the rest of the rendered scene.

As for the closest to vanilla... Well. Personally I go with Noise. Its chunky pixely goodness is what looks the most like the fuzz effect looked like to me in 320x200. The software fuzz effect itself, in high-res, tends to look quite different from how it looked in low-res (since the resolution increases, the pixels are smaller, and since there are a lot more of them some patterns start to emerge clearly).
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Re: Fuzz type closest to vanilla in GZDoom?

Post by Nevander »

I also noticed the fuzz effect for pixel fuzz is different in 2.0.05 vs 2.2.0 and onwards:

Image

The one on the left looks a lot better IMO, but now it's changed to the right.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Fuzz type closest to vanilla in GZDoom?

Post by Gez »

Pixel fuzz now deserves its name. Before the algorithm assumed any image it had to fuzz was 128 pixels tall and 128 pixels wide. Now it uses the actual dimensions of the image to make its pixels sized the same as the real pixels.
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: Fuzz type closest to vanilla in GZDoom?

Post by InsanityBringer »

Gez wrote:The way the fuzz effect works in software is that it takes a pixel from behind the fuzzy thing (spectre or whatever else), make it darker, and moves it up or down a few places. That's this last step that's hard to do in OpenGL. Making pixels behind darker is easy -- all you need is to draw a translucent black shape in front, and that'll make whatever is behind darker. But moving the pixels up and down, that's more complicated because it means you need to read from the screen to get the values. The shaders, as implemented in GZDoom, can't do that. They can only read their own texture, not the rest of the rendered scene.
in addition to this, I think dpJudas once mentioned that getting the fuzz effect to work right on the gpu would be hampered lots due to the way the GPU spawns an insane amount of threads to do its thing while the fuzz effect, to look 100% right, is dependent on the status of the pixel right above it. The fuzz effect is actually different in qzdoom software for this reason, since qzdoom now has a multithreaded software renderer.
dpJudas
 
 
Posts: 3172
Joined: Sat May 28, 2016 1:01 pm

Re: Fuzz type closest to vanilla in GZDoom?

Post by dpJudas »

Yep, QZDoom got the same problem for basically the same reason. It tries to hide it a bit by reading from different pixels, further above or below, that are processed by the same thread, but that's enough to change the effect a bit. The softpoly renderer is in even bigger problems because it renders things in 8x8 blocks, as opposed to an interlaced strategy, and that makes it completely impossible to emulate the effect. As GPUs draw more like softpoly does, there's no way to do it this way with OpenGL.

You could maybe do the effect in post processing, like heat effects are done in some games, but this would only work for situations where no translucent things overlap the shadow.
dpJudas
 
 
Posts: 3172
Joined: Sat May 28, 2016 1:01 pm

Re: Fuzz type closest to vanilla in GZDoom?

Post by dpJudas »

Thinking a bit more about this thing, I think it might actually be not that hard to get the effect to look very close to the original. The effect basically does two things:

1) Shade pixels several times in a pattern
2) Offset neighbor pixels

The higher the resolution is, the harder it gets to even spot #2. Even at 320x200 I'm not 100% sure if you will even spot #2, because the effect is constantly changing with the shading being a far more dominant effect for the eyes. It is #2 that's a problem to do in OpenGL, not #1.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49231
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Fuzz type closest to vanilla in GZDoom?

Post by Graf Zahl »

I think the existing fuzz shaders already do a good job at emulating it. A perfect recreation is nearly impossible as it depends too much on stuff that no longer applies to modern screen sizes.
User avatar
Rachael
Posts: 13950
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Fuzz type closest to vanilla in GZDoom?

Post by Rachael »

Yeah I would be happy just to have the shading. The offsetting really is not needed, and imo, it can even be turned off for the multi-threaded renderer since it looks kind of messed up, there. :P

For the true "doom purists" though, having the offsetting turned on for single-threaded rendering might still be desirable, though.
dpJudas
 
 
Posts: 3172
Joined: Sat May 28, 2016 1:01 pm

Re: Fuzz type closest to vanilla in GZDoom?

Post by dpJudas »

My issue with the current fuzz shaders is that they are all based around using cos/sin/mod for the shading. This is very different from the original fuzzing that worked in 5 distinctive steps of shades in a pattern that seemed random at 320x200. The screenshot Nevander is showing reveals those cos/sin/mod parts all too clearly for my personal taste. For that reason I've always just settled for the plain translucent fill when running in OpenGL mode.

But my immediate concern is more the software renderer, where I'm not too happy about what I had to do to the fuzzing. Toying with this a bit just to see if I can spot if the offsetting is missing at all if I make the shading part exactly as in the original.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Fuzz type closest to vanilla in GZDoom?

Post by Gez »

dpJudas wrote:The screenshot Nevander is showing reveals those cos/sin/mod parts all too clearly for my personal taste.
It's why I go with "Noise".
User avatar
Nash
 
 
Posts: 17499
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Fuzz type closest to vanilla in GZDoom?

Post by Nash »

Yeah, I also go with Noise as it looks the closest to Vanilla.

You know what would be cool to see? If the spectres had the invisibility effect like The Predators from the old movies (I somehow have the feeling that was what id was going for and they did their best given the technology available at the time...)
dpJudas
 
 
Posts: 3172
Joined: Sat May 28, 2016 1:01 pm

Re: Fuzz type closest to vanilla in GZDoom?

Post by dpJudas »

The noise effect is not that bad, but it annoys me a little bit that its scaling is affected by the distance to the sprite. I think it would look better if it somehow used gl_FragCoord.xy as input rather than the UV coordinates of the texture.

In any case, I managed to get the software renderer back to looking very close to the original effect, even if it doesn't really look as id most likely intended at higher resolutions. Softpoly also does a fuzzing effect now.

@Nash: They probably did want it to look something like that, yeah. Not sure that effect works anywhere than in high speed with a jungle background, tho.
User avatar
DoomRater
Posts: 8270
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Re: Fuzz type closest to vanilla in GZDoom?

Post by DoomRater »

My poor confused mind came across this thread and immediately gave more weight to the person with the Sesame Street avatar. Graf Zahl, what have you done!

I'll be honest, I never took much note of the original effect or how it worked and it definitely seemed more like fuzz to me overall. In fact transparent critters make them harder to see than the original software effect, at least to me!
User avatar
Rachael
Posts: 13950
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Fuzz type closest to vanilla in GZDoom?

Post by Rachael »

DoomRater wrote:to the person with the Sesame Street avatar. Graf Zahl, what have you done!
We haven't already forgotten about the origins of Graf Zahl's name, have we? :P
Post Reply

Return to “General”