A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Separate names with a comma.
Discussion in 'HDRP Ray Tracing' started by SebLagarde, Apr 4, 2019.
Is there plans for RT Caustics and RT HDRI sampling?
I doubt that caustic will be in real time...this is incredible complex effect even for CPU rendering. I know, that you saw this effect in Unreal but, this is fake effect, nothing to do with physics and DXR. Probably caustic in Unity will be implemented only in Path Tracing system but there is no even sign about that if we talk about developing schedule.
HDRi sampling (importance) I think is on the way.
That's Is what I know so far....
Have you seen this? (1:18:00)
And this is example of RT caustics in realtime scene https://www.artstation.com/artwork/klDWKy
the good stuff start at around 1H18min for those that want to skip ahead.....
Yep that's the "Fake". It is not pure Caustic and you can forget to use it in games.
Actually this is approximately Final Gathering Photon Mapping (or very poor amount of Path Tracing Photons) mixed with some sort of code to interpolate received very little information (Caustic need enormous amount of photons).
This has nothing to do with real caustic which you can use in games or rendering. It looks on video great but you must understand that using it with many light sources and more bounce lights + complex object will give you "Power Point" slide speed.
Here you have example of real caustics done by our Kray Render Engine....and to get this effect we needed develop new Core (v3) for over 7 years. Amount of shooting photons:
- GI (Photon Mapping + QMC sampling) 2.000.000
- Caustic photons 20.000.000
- 40 real bounce lights
Times render Dual Xeon 40HT - around 1 min.
To do something that on GPU should be much, much faster....but find me that GENIUS who will do it by GPU
Anyway this video above you can consider as curiosity in my opinion has no value for offline render at all , maybe for sort of games....
Not real time, but pretty fast GPU Photon Tracing:
Yes very strong Interpolated. probably in interiors with Global Illumination (like 10-20 bounce lights) will be impossible to get clear in 5-20 min....For that situation is needed VCM:
We do not have yet this in Kraytracing.
Using path tracing, only two of my meshes are showing up (there's around 7 or so).
They're all using the same exact material, and all are cubes extended to create a room.
Also just started using raytraced GI and honestly my experience wasn't good --
there was a lot of noise in the corners when moving the player, and I thought it would handle sky lighting but it didn't -- not really sure how to deal with sky light when creating a scene that has an interior and exterior. The sky light gets all in the interior rooms, I thought it would be occluded and have a falloff based on it's entrance.
PutridEx please find information (few topics above) what I wrote about Interiors and background light sources.
Here I answer my self:
After hundreds of hours I am almost sure that Unity again has problem with creating UV map Light.
Tested old version 2020 Unity and works like charm but up to 2021.2.5f1 minus few versions back looks for me like bug in Unity....
Maybe this is caused by this bug/feature. As discussed there you can remove fog to get rid of lighting in reflections.
For diffuse surfaces that unexpected lighting comes from default skybox reflection probe being reflected on diffuse materials where smoothness of material is lower than covered by ray traced reflections - so dirty solution is to set realtime reflections params "Minimum smoothness"/"Smoothness fade start" both to to zero, good for ArchViz but this is bit too costly for gaming. Before Unity 2022.1a16 I was able to use old hack with pure black reflection probe that affects whole level (and "Visual Environment" param "Ambient mode" set to "Static") - it will suppress bright default skybox refleciton probe. In Unity 2022.1a16 this hack is not working anymore...
Lex4art I use now this (works perfect and very accurate - first time I get proper level of GI and reflection)
But of course this is not perfect solution.
Needs a bit work: basic Bake + reflection probes....everything in very low quality, few sec baking.
You get proper reflected surfaces in other reflected surfaces.
My problem is that I can't bake any light/reflection probes because of purely dynamic & editable environment / lighting in Buildmark so those new ray termination modes are not covering my purely dynamic needs. Fog that appears in reflections and starts glowing in darkness can be fixed with little coding, presumably - grab current auto-exposure value and adjust fog accordingly, so when darker the environment than more exposure and less fog there will be to mess things up in the dark; will try to do this soon. But i can't fix diffuse surfaces receiving bright default reflection probe or something - hope somebody in Unity will have a look on that aspect of mentioned bugreport -_-'.
Upd: in 2022.1b1 black reflection probe works again on diffuse, phew ).
...ah yes only static rendering....
I still think most of this could be solved with proper raytraced reflection probes.
Are there plans for this?
Bro that's looking amazing
m0nsky good looking carpaint!
Trying to create dynamic snow with VFX Graph and while it has a lot of problems to be solved I've noticed that it can look very nice with "Mixed" mode for RTGI/RTR, when VFX particles included into ray tracing:
Finally we got update of Sunfall SSAA (definitely I prefer SSAA):
We've added the possibility to have culling for the ray tracing acceleration structure in this PR:
More options for the culling will come that will allow to gain additional perf in large scenes!
Looking good @auzaiffe
Something I've wanted to ask, do you think it could be worth it to port the sky importance sampling functionality to ray traced reflections?
I was playing with it in path tracing, and it really did some magic @ low samples per pixel there.
I've tried porting it to ray traced reflections (quality mode) for the past two days, but I'm having a hard time getting the weights/pdfs right since there is no existing light sampling.
m0nsky for me personally raytraced reflection is less important, it has low impact right now (personally I do not use it because it very bad now)
What I would like to have:
- blurred raytraced reflection
- transparency issues fixed (multi layers transparency surfaces)
- I am not fan of HDRi at all. Itself HDRI is very bad idea (a lot problems with them)
- More focus on Physical Sky + Sun with better sampling
- even better: LightPortals developing or at least something close to LP.
Those are major issues in Unity (actually everywhere when is in use GPU system)
I know those things are very difficult to solve but if I lose 20%-40% of render speed, still is winner solution.
If you're using path tracing, yes, but this doesn't apply to pc gaming/console/realtime visualizations/vr.
What do you mean by blurred ray traced reflection? If you simply want them blurred, you can make the denoiser affect smooth surfaces and turn up the denoiser radius.
Sorry: Raytraced Reflection blur not supported by the smoothness.
Hmmm I do not follow....there is way to blur reflection in Raytracing Mode?
This is new SunFall SSAA plugin update. Looks like DLSS right now is completely unprofitable to use.
Also using SSAA I can reduce quality of Physical Lights (less samples and less denoiser power) and by this I can get more performance than DLSS, also more quality (no artefacts). I will do more tests, this was only check up.
We must be looking at different things then because to me, from your screenshots, the DLSS version looks better. Look at the AA on the curtains in SSAA vs the DLSS version
newguy123 differences are barely noticeable for me.
Real test I will do later, because with SSAA I can reduce strongly Quality of Physical Lights (denoise lvl and samples)
and instead Performance DXR I want use Quality Performance (right now is Performance which is awkward for me).
Also Quality in low resolution screen like Half HD and FullHD is better with SSAA - that's normal...DLSS is not magic tool because with lower resolution is much less information to process in rescaling algorithm.
I spent a while using importance sampling for the environment sky (hdri). However, since the fallback layer can use both sky and reflection probes, I thought it would be better to importance sample the whole fallback layer, so we can reduce variance indoors, too.
The main goal is to reduce variance, less variance (bright spots) means less noise. We can either direct more rays towards those bright areas and calculate the correct probability distribution, or blur our sky/reflection probes to get rid of the bright spots, but we will lose details and sharp reflections. We can clamp all bright areas, but that's a lot of lost energy, especially when working with multiple bounces.
I decided to use the surface roughness for adaptive sampling the fallback layer mip level (both sky and probes), so we can have both sharp and and noise-free rough reflections without extra traversal cost. Mip level is selected by specifying a "roughness step size", for example 0.20 roughness per mip level. It samples the previous and the next level and will blend these based on it's distance between them. Roughness steps are calibrated to the path tracer by default, and there's an option for mip offset since I don't need mip 0 for RTGI.
Roughness based fallback mip sampling disabled, 1 sample per pixel
Roughness based fallback mip sampling enabled, 1 sample per pixel
Here are some examples of metal materials. Because my game is ray traced in VR, I'm pretty much limited to 1 sample per pixel. Metals are always hard to get right at 1spp.
Roughness based fallback mip sampling disabled, 1 sample per pixel
Roughness based fallback mip sampling enabled, 1 sample per pixel
Found a little rounding error, updated the screenshots
I'll be improving the Ray Tracing effects integration with APV as it can significantly improve the visual quality if you have APV set up on your scene
The still Experimental / In Progress Adaptive Probe Volume
Does anybody now if Unity will support Decals for DXR in the Future? Couldnt find any info for that.
Decal support for DXR requires major design changes in HDRP, i'd say in the short future no, but eventually yes. The only way to get decals for now is through the Mixed Tracing mide.
Hi @auzaiffe any progress on DXR 1.1 and RayQueries from Compute Shaders support in Unity? The 2022.1 is already in late beta.
A little follow up to my previous post. Did a few sampling changes to improve the result, one of them is support for multiple bounces in the adaptive mip code.
Here's some 1 sample per pixel fun, 3 bounces, no denoising:
m0nsky I would like to test it soon
This is only for ray tracing unfortunately. It's also a bit difficult to get the code over to you, since my local HDRP fork contains all kinds of (potentially unwanted) changes, and you'd need to be able to work with custom packages.
I noticed on github that the official HDRP team has completed work on path tracing sky sampling + path tracing denoising (NVIDIA Optix / Intel Open Image Denoiser), so the next release (I guess 2022.2?) will be great for your use case, way better than ray tracing with approximations.
For a while now I've been thinking of ways to make ray traced reflections match my ray traced environment better. It's not possible to do a full global illumination pass inside the reflections because it is too heavy. Even though ambient occlusion is kind of the enemy of a physically correct renderer, I still use it in my real time ray tracing projects to mask certain limitations. So I thought to myself, why not just trace a very cheap (skip closest hit shader, etc) ambient occlusion ray inside the ray traced reflections for rays that are reflecting geometry, to reflect what is happening in the scene?
I'm very happy with the results, especially for single bounce ray traced reflections (see screenshots below)
Ray traced reflection occlusion disabled (1600px)
Ray traced reflection occlusion enabled (1600px)
Because I still wasn't satisfied, and because I wanted to see how slow it would really be, I decided to add support for ray traced global illumination inside the ray traced reflections. The diffuse correctly goes through the LightLoop and I've added two modes, performance and quality. Performance mode uses all the tricks I've learned in the past few days. The quality mode is the real deal, the "end game" so to speak, no tricks. It is painfully slow and not suitable for real time use. The video below is running the performance mode, with both ambient occlusion and reflection occlusion disabled, they are no longer needed.
Removed other videos because they are a little outdated now.
Ray traced reflection occlusion enabled Looks very promised!
Denoiser for PT can be jackpot for still images!
For animation of course best is interpolated system.
Hi. Great Work. How stabil ist your methode for a fast moving dragon or fast driven car exterior and interior? Cannot really wrap my head around this.
I did a HDRP DXR fork of the great P424 Project here.
When you hit Q you geht an automated high Speed drive and exterior and interior Kameras on Keys 1 to 4.
Would be great to understand your method on this use case. RT AO, RT reflections, RT shadows and RT GI are already enabled.
In special on the glossy and diffuse spheres i placed in the interior.
Characters/vehicles are complex. My effects are built on top of RTR, but if you're running into issues with noise/ghosting, always imagine the following. You can only pick two.
- Don't use the RTGI denoiser if your scene contains characters/vehicles. RTGI can only do motion rejection for the receiver. (so it can only reject pixels on the car, not under/behind the car!)
- If you really have to use the RTGI denoiser, you will also lose small details like shadows under the tires (even at the smallest radius), you can gain some back by using some very short ray length RTAO (but then don't use the RTAO denoiser, because you will again lose details and introduce ghosting)
- Don't use the RTR denoiser, it does not play well with DLSS (even at 0 radius), and usually is more noisy than the raw input signal.
- Experiment with different DLSS versions, here is a comparison video:
Here is the RTGI denoiser on a moving object. The object writes motion vectors and motion rejection is enabled in the RTGI denoiser.
Thanks for info!
In near future like 4-8 years, those problems will disappear by itself (faster GPU cards more features from GPU units)
Thanks. I will try all these next days.
The DLSS variants look great and stabil.
Also thanks for the DXRTriangleOfPain.
Unser the car i plan to use high res baked tex in decal projektor who blends out when car looses ground. But decals seem to be a problem too.
For me It has to disappear in 2 to 4 months.)
This guide should help you solve all the leaking/lighting setup issues you get with ray tracing effects in HDRP.
auzaiffe thanks! That great technical injection for us! For me as Interior designer you clarify a lot from this topic
has anyone managed to get this working in the alpha?
I can't seem to find the denoising package anywhere to activate (and click "fix" seems to do nothing)
That's sort of a placeholder. Its not actually in the alpha yet. Coming soon though...