#Can you show some screenshots of the

1 messages · Page 1 of 1 (latest)

round thorn
#

This is the effect I achieved with the fog. The posterization, outlines, and crt effect are all made by me (with some help)

#

(I created a thread because I dont want this seen as a devlog)

calm canyon
#

Do you mainly need it for the street lights, like this screenshot? If so, and if you don't require volumetric shadow support, which should not be required to achieve the effect in the screenshot, then I would recommend an analytical fog approach. It is much, much faster compared to the raymarched, volumetric fog in HDRP or equivalent in URP. It's only limited by not supporting casting shadows within the volume.

I've used this asset with URP in this game jam project, specifically to achieve the street light fog effect.
https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/analytical-volumetric-lighting-urp-performant-raytraced-volumetr-266586
https://peturdarri.itch.io/finding-home
Not free, but cheaper than the $70 dollar asset you were looking for.

Add depth to your project with Analytical Volumetric Lighting [URP] - Performant Raytraced Volumetric Lights asset from Akidevcat. Find this & more VFX options on the Unity Asset Store.

#

This package is not analytical, which means it's heavier on performance and can be visibly low resolution depending on your settings, compared to the analytical fog, which is not limited by voxel resolution.

#

But if you're intentionally rendering at low resolution and crunching the fidelity with post processing, that might not matter to you as much.

round thorn
#

I guess that makes sense, since constant rendering of a 3d texture would use more vram than raytracing

round thorn
calm canyon
#

HDRP and most volumetric lighting solutions use raymarching.

#

The asset I linked adds some additional culling optimizations to make multiple lights cheaper to render.

calm canyon
#

The paid one

round thorn
#

hmm, alright

#

I'm gonna try out the foss one and if it doesnt work I'll see if I can get the paid asset.

hollow mason
#

I feel like you can obtain that effect with just quads honestly

calm canyon
#

From afar, maybe. Harder to maintain that illusion if the camera goes into the volume.

hollow mason
#

I need to kinda get an idea to how it's supposed to look inside of the street lamp

#

cause you can also do something like an inward sphere, and maybe some masking

round thorn
hollow mason
#

Hmm, potentionally able to do that with the depth buffer

#

and the similar idea of an inward sphere

round thorn
#

looking at it in runtime, it seems its just noise

calm canyon
#

Could be because that face of the box is almost exactly parallel to the light direction, so it's right on the edge of casting a shadow.

round thorn
calm canyon
#

Mm okay. There's almost always noise added to raymarched volumetrics, because it has to be done at lower resolution for performance and upscaled. Noise helps hide the low resolution.

round thorn
#

I just messed with some settings, and turning down the attenuation distance does this

#

turning it up does the opposite, but also increases the brightness of unlit areas of fog

round thorn
calm canyon
#

But yeah, transparent materials are trickier. These assets usually implement these as post processing effects, which is very convenient and can be applied to any scene easily, but doesn't work correctly with transparency. The fix would be to calculate the fog in the object's shaders directly, but that means every shader on every object needs to be custom, with support for the volumetric lighting asset.

#

HDRP's fog likely works by applying the effect as a post processing step immediately after rendering opaque objects and then apply the fog in each transparent object's shader directly in the transparent pass. Which means every HDRP shader likely has special consideration for volumetric fog.

round thorn
#

now transparents, like UI and TMP World Space are rendered on top of fog

calm canyon
#

The result might look a bit better, but still won't be correct.

round thorn
#

What do you mean?

calm canyon
#

That is, if you have a transparent material far away, it will render on top of the fog, so you'll be able to see it through the fog, when everything opaque near it will be obscured.

#

If you have heavy fog that is

round thorn
calm canyon
#

Also depends on how transparent the material is. If it's very transparent glass, it will mostly show the fog behind it as well, but still cut through a little.

round thorn
calm canyon
#

Well, that's good. But if you ever add particle effects, those will also cut through unless you use alpha clip.

#

Did you modify the FOSS asset? I figured the analytical asset is harder to reorder since it's implemented as a post processing effect, but maybe that's easy to change.