HTrace: Ambient Occlusion V2 [RELEASED]

HTrace: Ambient Occlusion V2

Grab your copy on the Asset Store join our Discord and support us on Patreon to get more content and news about upcoming features and updates!

HDRP Version | URP version | Bundle (HDRP + URP)

HTrace: Ambient Occlusion combines three of the most popular ambient occlusion techniques into a single asset, offering a highly scalable and adaptive system for AO computation.

Useful Links:

Includes three AO modes:

:black_small_square: SSAO (Screen-Space Ambient Occlusion) – A lightweight and extremely fast method for occlusion gathering. It doesn’t require a denoiser and produces zero temporal lag.

:black_small_square: GTAO (Ground-Truth Ambient Occlusion) – Built on the latest advancements in ambient occlusion research, this technique is highly optimized and refined to deliver the best possible quality in screen-space.

:black_small_square: RTAO (Ray-Traced Ambient Occlusion) – The most accurate occlusion method, utilizing hardware ray tracing for uncompromised quality with scalable performance.

Main Features:

• Full Integration into the Rendering Pipeline: HTrace AO doesn’t simply overlay its result on top of the image - it fully replaces the native ambient occlusion effect. The integration happens automatically and doesn’t require package customization or manual setup. As a result, it correctly interacts with the rest of the lighting and other effects, and works with both Deferred and Forward rendering.

• Scalability: the asset offers three different AO modes, ranging from extremely fast SSAO to highly accurate RTAO, each with its own strength. Choose the one that best suits your performance target or hardware requirements. HTrace AO exposes many parameters for fine-tuning each mode through a clear, user-friendly UI.

• Cutting-Edge Screen Tracing: not just a standard GTAO - we carefully gathered all meaningful improvements and optimizations of the technique that emerged over the years since it was first released. It encompasses both big innovations like Visibility Bitmasks as well as a bunch of smaller enhancements to deliver the highest quality screen-space AO currently possible.

• Real-Time Ray-Tracing: RTAO mode is packed with all the tools we could come up with to make Ray-Traced AO a practical choice: fast Inline Ray-Tracing, RTAS culling and debugging, Screen-Space Pretracing to cover any mismatch with the rasterized scene, Contact Occlusion for an additional layer of detail, and many more. This mode is built to provide the highest accuracy, without sacrificing performance and usability.

• Advanced Denoising: high-end denoising pipeline tailored to each AO mode and built upon our extensive experience and research in this area. Includes 2.5D motion vectors, tracking of moving occlusion, sharp reprojection, anisotropic spatial filtering and other state-of-the-art denoising techniques. Comes with configurable temporal and spatial stages helping you find the right balance of noise reduction and temporal responsiveness for your project.

• Resolution Scaling: HTrace AO offers Full, Half and Quarter resolution modes, accompanied by a sharp and optimized upscaler. Designed to reduce the overall effect cost by a factor of 2 or even 4, making them a useful tool to balance quality and performance. RTAO also features a special Adaptive resolution mode: conceptually similar to VRS, it renders areas of the screen with high geometric complexity at full rate and reduces resolution for uniform pixels, automatically adapting to the content.

• Extensive Rendering Control: you can exclude objects from casting and/or receiving AO via render layer masks, choose the source of the normals (either from a native buffer or reconstructing them from depth on demand), decide at which point in the pipeline to render AO by selecting an injection point, or even output the result to ShaderGraph for custom material effects. The asset also provides convenient debugging overlays, so you can visually inspect the state of all buffers used by HTrace AO.

• Comprehensive Documentation: we provide a detailed description of all properties and settings of the asset, accompanied by visual examples. In our documentation you will find answers to frequently asked questions, in-depth setup guides, comparisons with Unity’s native AO solutions, and other useful information. If you have any questions - you can always reach out to us via Discord.

• VR Support [HDRP Only]: single-pass VR is supported for all three occlusion modes.






5 Likes

Any timeline for render graph support?

Nice to finally see some RT in URP assets tho!

For me RTAO and RT Reflections has always been the most incomparable in quality to screen space methods.

EDIT: Also doesn’t URP support specular occlusion at a shader level? I know like with HBAO it can be iffy to keep the shader variant tho.

EDIT2: Another question how is enabling this implemented?
Is it configured by volume or by render feature? Or is it a component on the camera?

This is important cause of how streamlined making builds can be when dealing with multiple platforms. If it’s volume or render feature it’s easy to have entirely different configurations per platform. Without having to adjust scene stuff every build.

EDIT3: I explain what i mean here

Already in progress, can’t give ETA, but soon!

Are you asking if URP applies specular occlusion from ambient occlusion in per-object shaders (like HDRP does) ?

This is a component (not on a camera, though) that controls render feature’s settings. So I don’t think it’s possible to create different presets or configurations the way you described it. But thank you for letting us know about this approach, we’ll think what we can do to make it possible!

1 Like

I’m saying I know it does, but I saw it’s not supported in URP. There’s a shader level indirectAO and directAO that is used to mask specular currently with the native SSAO.

Ah, sorry. Yes, I checked, and you’re right, our AO (all three modes) indeed apply specular occlusion, because they are passed through the native AO buffer, so everything that works for the native SSAO works for ours too. I’ll correct the docs then.

1 Like

Is there a possibility we could apply GTAO close, and SSAO in the distance for large-scale SSAO?

ssao

1 Like

Hi! No, it’s not possible to combine different AO modes like this. I’ll log it for future consideration though.

Your link leads to sky occlusion implementation in Skyrim. Sky Occlusion in relation to our AO has been discussed here: Discord and then here Discord. TLDR: not practical in screen-space, possible by extending RTAO radius.

1 Like

HTrace: Ambient Occlusion is updated to version 1.1.0 !

New Features:

  • Render Graph support added [URP]
  • RTAO Ray Bias parameter added [URP]

Changes / Fixes:

  • Unity 2022 installation fixed [HDRP / URP]
  • Motion Mask improvements [HDRP / URP]
  • Import / merge errors with WSGI fixed [HDRP]
  • RTHandleSystem.Initialize error fixed [HDRP]
  • VR fixes and improvements [HDRP]
  • Culling optimizations for motion vectors [URP]
  • Other minor fixes and improvements [ALL]

It’s recommended to delete the previous HTrace package to perform a clean installation of the new version and reload the Unity Editor afterwards. Especially if HTrace: WSGI is installed in the same project.

VR support only for HDRP? Any plans for URP? Still, excited to try it out!

looks good but in terms of speed and visible ‘quality’ how does it compare for SSAO to both built in and other asset store options?

Only for HDRP for now, yep. We will consider URP’s VR too if there’s enough interest in it. From our brief experimentation with it, URP doesn’t seem to be quite ready for VR + compute shaders, so we’re not sure how difficult it would be to implement it.

We have some comparisons here: Comparisons with Unity's AO | HTrace Ambient Occlusion

Yes I saw GTAO vs Unity’s SSAO comparison for URP, not SSAO. But GTAO might work if it can be used without motion vectors and Temporal Denoising. Also can GTAO work in Forward/Forward+ URP on all platforms (including webgl)?

SSAO is an umbrella term. URP’s SSAO is closer to our GTAO than to our SSAO, therefore we compare it against GTAO. Moreover, the overall quality comparison is done with roughly equal timings.

It can work with Forward / Forward+, but “all platforms” is a very wide and vague definition. I can’t answer this. Compatibility limits are outlined in the Technical Details section of the asset store page:

It doesn’t mean that it won’t work on other platforms, especially if they support compute shaders, but at the moment we can’t guarantee it. When we have more time and opportunities to test it on a wider range of platforms, we will add them to our description.

This is an amazing asset! I purchased it right away.

As mentioned in the known issues, it doesn’t work properly with “Dynamic Resolution” in hardware mode. I tested it with FSR2, DLSS, and TAA_Upscale in HDRP, but none of them worked. It failed not only in debug mode but also during actual gameplay and in the built version of the game.

I believe “Dynamic Resolution” will be an essential feature in future game development, so I look forward to its support in upcoming updates.

In addition, other assets like HBAO offer the ability to change shadow colors to something other than black, which is very convenient. For example, in cartoon-style games or photorealistic characters, extremely dark shadows can look unnatural, especially on skin with SSS. By setting the shadow color to gray (or a lighter tone), it helps reduce overly harsh shadows. Adjusting the intensity isn’t suitable, as it changes the shadow’s size as well.

I hope you will consider adding this feature.

Thank you! :blush:

We’ve already fixed it but haven’t yet uploaded the new version to the store. If you want to start using Hardware Dynamic Resolution now, you can DM me on Discord with your invoice :upside_down_face:

I assume it overlays occlusion onto a semi-final color buffer at a certain stage in the pipeline rather than injecting it directly into shaders. We do the latter to provide maximum compatibility. In practice, this means we override the native AO buffer, which has the R8_UNorm format (in other words, it’s monochromatic). So even if we sent color information to the pipeline, HDRP (and URP) would truncate it to a single channel.

Moreover, both HDRP and URP use a technique known as “Multibounce AO Approximation” (page 8) at the per-object shader level. This technique considers the diffuse color of a surface and modulates the final occlusion value accordingly. So in the end AO is not monochromatic, but it’s handled on HDRP’s (and URP’s) side in accordance with PBR rendering rather than artistic stylization. I think HDRP likely applies further tweaks to AO for SSS materials, so the intended approach may be to adjust certain parameters on a given material rather than changing the overall AO intensity. This is just my guess, but I can look into it further if you’d like.

This shouldn’t be the case, because the intensity has no affect on the radius of occlusion (or any other parameters). Here’s an example shown in the documentation.

This is exactly what the intensity parameter does… If it works otherwise in your case (e.g. changes occlusion radius) this may be a bug :eyes:

Any updates in this regard?

Additionally when i loaded the file for the first time I got this error. It seems to have a problem with not using the old input system.

EDIT:
I also get this error if the render feature does not exist on a camera in the editor view. My title screen scene is largely absent of any render features so that I can avoid a user enabling a setting that somehow breaks their game and them being unable to load the game.

This issue seems not to affect the game but the editor.

Besides that the asset looks great! My characters look amazing with RTAO! I don’t think I can use it for now since it would mess with my build process until I do some custom stuff. Hopefully my feedback about the render feature process will come into play at some point! It would allow me to seamlessly use this asset across platform builds.

Nope, sorry. It’s in our log, but there haven’t been any changes so far.

This has already been fixed but hasn’t landed in the store yet.

Hmm, could you give more details on it? :eyes:
What do you mean by ‘does not exist on a camera’?
By ‘editor view,’ do you mean the Scene tab or just working in the editor in general?
Is there only one camera in your scene? Having the Scene and Game tabs placed side by side also counts as multi-camera.


My title screen only has one camera, and yes i mean the scene view.

In this view i have a second renderer set to the camera specifically for the title screen.

This is dictated by the renderer list in the pipeline asset.

This renderer data asset is largely empty, it’s intended to avoid a scenario where even the title screen doesn’t load cause some effect is in the way.

This setup seems to cause an error in the scene view.

Hi! Sorry for the late response, we’re still investigating it. Once we have an answer / fix we’ll post it here!

This looks interesting, but one big issue I have is that it makes the grass and ground plants too dark, which I would like to avoid somehow :thinking: