-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vulkan: Glow emission does not show up if the highlight is too small #56452
Comments
It works if you resize the window to be larger (specifically on the Y axis, as camera FOV is vertical by default): simplescreenrecorder-2022-01-03_01.19.37.mp4This issue likely occurs in
I can't reproduce this here. It's expected for glow to disappear if the emissive surface occupies a surface that's too small or if it points away from the camera. This is a limitation of glow working on a screen-space basis 🙂 In your particular use case, instead of relying on glow, I recommend using a billboarded unshaded Sprite3D with a flare texture on it. This performs better and it will give you more artistic control over the effect. You can still have glow enabled at the same time, although it will cause the effect to become even stronger. There's a nice collection of flare textures you can use here: https://github.com/RPicster/Godot-particle-and-vfx-textures |
@Calinou |
Did you compare a scene with the exact same mesh and camera coordinates? The screenshot of the |
So they seems fairly similar, but i don't know, i just feel it's something different, tossed unity in the mix aswell :P
|
My guess is that UE4 and Unity have enabled smaller glow levels by default, while Godot doesn't. I have a pull request that enables smaller (more local) glow levels by default: #52227 |
This is because the objects on the edges are closer to the camera in your example. Also, when using a widescreen aspect ratio, objects on the edges will appear noticeably larger on screen, even if they remain at the same distance. This is the nature of standard camera projections – this occurs in every engine. |
I investigated this a bit, and it seems we can capture small objects better using a lower sigma gaussian (i.e. a gaussian that puts more emphasis on the center pixel), however, it makes objects flicker more in motion so it isn't a great tradeoff right now. More discussion here #57693 I have a feeling that UE and Unity do what most AAA game engines do which is downsample all mipmaps with a blur, and then upsample with a different blur. Doing so is roughly 2X as expensive as the blur we do, but gets much nicer results. I am just speculating though, I don't know exactly what UE and Unity use internally. |
Having bloom react consistently even with pixel size emissive surfaces (instead of vanishing) makes the communication of luminosity to the eye much more grounded, rather than feeling like a post process effect. Practical examples of this are things like lasers or sparks or tracer rounds, which with the current bloom behavior look more like random white lines on the screen (with ACES tonemapping) rather than glowing sources of light. I'd also like to add that, depending on the scene or intent, sometimes flickering fireflies in bloom is desirable. Examples of this are when moving fast across an ocean scene looking down at the water - the way bloom flickers in that scenario closely mimics what your eyes or a camera would see. Ditto for moving over wet sand. The current behavior is high quality and desirable in some cases (archvis scenes will fare much better with current bloom behavior) so I think the approach discussed in #57693 regarding giving the user a choice between flickering and temporal stability would be best. |
While I'm sure this is already known, I just wanted to confirm that this issue still persists in the latest 2D-HDR implementation introduced in v4.2.dev3. It is currently not possible to achieve glow on small/thin 2D elements (things like bullets / streaks / projectiles, particles, various VFX, etc...) without cranking up the WorldEnvironment node settings to the point where everything else is totally blown out. Hopefully a solution can be worked out to improve or resolve this issue, as well as the related #57693 issue (either by exposing the sigma parameter somewhere in project settings or the WorldEnvironment node, or by some other means). #52227 may also need to be revisited with the recent rendering changes. |
@RPicster and I have been discussing some options to fix this. We have come close to something that appears like a good tradeoff. Hopefully we have some results to share soon |
I have the same problem, so I did some investigation. As @Novark said, the problem is present in the 2D-HDR implementation: small and thin objects don't glow properly, and this is a big problem especially for pixel art projects. Below is a comparison of the glow in Godot 3 and in Godot 4.2 dev 5 with 4 lines: 1x16, 2x16, 3x16, 4x16: I tested many different settings:
Lastly, according to @RPicster who discussed a similar problem in #57693: using a sigma of 1.5 for the kernel values only fixes the "blockiness" of the glow, but not the lack of glow for smaller objects. You can see screenshots proving that in #57693. However, the Bloom parameter of the Glow in WorldEnvironment is the only one that works well regardless of the zoom/size of the objects, here's an example (Godot 4.2 dev 5): I also did a video to show that the glow appears only if we are really close to the objects: glow.zoom.godot4.mp4Stretch Mode was set to canvas_item so that the glow changes when resizing the window. |
I have been talking with @clayjohn a bit and we found several things - and we have addressed most of it. I still need to open a PR for the changes. |
Godot version
v4.0.dev.custom_build [bc2445d]
System information
Windows 10, GTX 1080 Ti, Vulkan
Issue description
Glow in the editor works but as soon as i try to preview or run the game the gamera does not pick up the silly ammount of glow i enabled.
Another question, the glow fade out really close to the editor view, is that related to this?
Steps to reproduce
Add emissive mesh, add camera, test run
Minimal reproduction project
glowbug.zip
The text was updated successfully, but these errors were encountered: