Nvidia’s ReSTIR, Initial set-up by Weizhen Huang
Wow, that looks super cool already!
Wheeeeeehhhwww came here to post the link. I had no idea she was working on this. So exciting. Anything that saves us humans time. Gets us closer to an image. Yes ! thanks ![]()
Attendees
- Brecht Van Lommel (Blender)
- Weizhen Huang (Blender)
- Lukas Stockner (Blender)
- Patrick Mours (NVIDIA)
Notes
- The Ray Portal BSDF was merged for 4.2.
- Thin Film support in Principled BSDF is planned to go into 4.2 as well. There are only a few small comments to be addressed. One thing to check is if it still matches OpenPBR, since there were recent changes in the spec.
- ReSTIR is making progress. In the branch there are now render settings to control its behavior and various correctness issues were fixed. Current performance bottlenecks appear to be light sampling and visibility tracing. The plan is to figure out issues with fireflies due to the geometry term, and then try ReSTIR PT to handle indirect light in addition to direct light.
- AMD is working on integrating the open source version of HIP-RT, which should add Linux support and other improvements on Windows. The long standing RDNA2 stability issue of HIP on Linux also appears to have been fixed with recent Linux kernel versions and ROCm 6.1.
Whoa, I thought this was just a refactoring of the portal area lights. This is very cool!
That might let Cryptomatte be used in mirrors. Cool.
Initially thought the same but I’m pretty sure that wouldn’t have required a BSDF as such (light portals are a checkmark in area lights, not a shader node) so I was curious. At first I thought it’d be some fancy new sampling technique for BSDFs but nope, literally portals, as in Portal, but with real full fledged path tracing. It’s such a cool idea.
You can do all sorts of projector shenanigans with this.
Oh wow, I’ve been wanting this for ages! Mainly to be able to make periodic boundary conditions without having to rely on so many instances that the viewport chokes. For example, below is something for which I was able to get periodicity in X and Y before (using mirrors,) but Z didn’t have the requisite symmetry.
The number of portal passages is controlled by the “transparent” parameter in “light paths → max bounces,” and capped at 1024, I think.
Thin Film Interference is in.
Cycles: Add thin film iridescence to Principled BSDF · 17f2cdd104 - blender - Blender Projects
The accurate simulation of oily grime on metal can’t be done yet though because of flaws in the code for the new Principled Shader (which Lukas would rather not hack around), but this is a good start.
Thin Film Interference would be so so much easier if Cycles were spectral but alas
Cool to see this either way
Has the spectral Cycles project been put in the freezer, or cancelled, or is it maybe still being developed?
Apologies if this has been discussed before in this thread. I might even have read that, but forgot it. ![]()
LuxCoreRender includes spectral calculations only for specific cases, such as dispersion / diffraction. Couldn’t Cycles approach it in the same way, instead of being completely spectral?
Weizhen was working on Spectral Cycles, but it looks like the ReStir project is higher priority because of its potentially massive benefits to performance.
I’m not sure how much Weizhen still worked on it. She said she’d get to it eventually. But yeah, ReStir is definitely shinier at the moment and, like, fair enough. I definitely am still hoping for Spectral tho.
Unrelated, I now tried the portals myself. It seems to be rendering surprisingly slowly (maybe I’m missing something or maybe this setup just is more difficult than I imagine it to be) but
In this render, there are two planes that are identical except for their colors. They are 100m apart. One of them also has a stronger light source than the other. But the sphere in the center of one plane “looks like” it’s sitting on the other, and vice-versa!
I wonder how hard it would be to just do this in general?
Like, give literally all BSDF nodes the outgoing and position inputs?
I think that’d mean you could also do this for, say, glossy reflections and such.
EDIT: I think part of the reason it went so slow is because, effectively, of some sort of Z-fighting? Basically, what I did involved two spheres with mostly identical materials, except 100 BU apart, and both of them had a glossy layer with Fresnel on top, reflecting back the world. And it looks like, the position/direction lined up exactly with the spheres’ surface, they sorta infini-loop-saw their own reflection in themselves. I set to 1024 transparency bounces, so the spheres were just crazy expensive to render.
If you don’t do that, it’s more reasonable.
In this setup, the direction is set to Reflection, so the two spheres reflect each other’s surroundings.
The red and blue plane is enclosed in a completely black cube (you can see it reflected on the left) and there is no light source inside, except for the sphere itself.
It seems like sampling goes a bit weird though. This was with 4096 samples but certain points got really strangely undersampled, which causes artefacts in this denoised version
EDIT2:
It’s probably not really easy to tell but in this setup I attempted to do something like this:
It’s not the exact same, but the way it works is, the dome looks at the position of the sphere at its center, and the sphere looks at someplace else. So I’m using two portals together for this.
Due to the dome’s geometry, that someplace else ends up looking distorted (see Suzanne’s shape)
You can also see the dome’s own image in the distance, projected inside itself.
Also, I wanted a full view so this is a mirror ball perspective camera
EDIT3: Perhaps a slightly better realization:
I tried a simpler droste effect over here – 21.58 seconds with the Ray Portal as shown, 18.78 seconds after I deleted it.
One nice improvement I’ve seen already with 4.2 is overall performance. I raised this issue when 4.0 came in slower in general. However 4.2 is better than ever. Not sure what has changed but it’s nice to see.
The main scene I was using to test on 3.6.6 was about 36sec / frame, on 4.0 and 4.1 it was 46sec / frame and now with 4.2 it’s 32sec / frame for me.
Is there any plan for there be a separate thin film node for non-Principled shader users?
She’s a girl









