Cycles Development Updates

2024-03-19 Render & Cycles Meeting

Attendees

  • Brecht Van Lommel (Blender)
  • Thomas Dinges (Blender)
  • Weizhen Huang (Blender)
  • Lukas Stockner (Blender)

Notes

  • Lukas was on vacation last week, and outside of that worked mainly on bugfixing, but will get back to the pull requests under development.
  • Weizhen work on light sampling bugs and optimizations for volume rendering. Bounding the volume segment by the light shape will help reduce noise, but took quite a bit of work to get working for every light type. Some work was done towards ReSTIR, starting with implementing RIS for BSDF and light samples.
  • Brecht mainly worked on high priority bugs. At some point for Blender 4.2 the plan is to implement rendering of more curve types as needed by USD and the new curves datablock.
  • Thomas mentioned doing bug sprints or more organized work looking into older bugs. Plan was already to have everyone look at bugs at least 1 day per week, regardless if there are any high priority ones.

Scheduling

The next meeting will be skipped as Brecht will be on holidays.

16 Likes

Nvidiaā€™s ReSTIR, Initial set-up by Weizhen Huang

35 Likes

Wow, that looks super cool already!

1 Like

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 :cupid:

6 Likes

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.
17 Likes

Oh wow, I had no idea Portals were gonna be added. That seems fun



25 Likes

Whoa, I thought this was just a refactoring of the portal area lights. This is very cool!

6 Likes

That might let Cryptomatte be used in mirrors. Cool.

2 Likes

Yes it does.

12 Likes

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.

2 Likes

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.

instantly really really interesting applications I didnā€™t expect for this

14 Likes

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.

13 Likes

Thin Film Interference would be so so much easier if Cycles were spectral but alas

Cool to see this either way

4 Likes

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. :sweat_smile:

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.

4 Likes

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:

1 Like

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.

13 Likes

Is there any plan for there be a separate thin film node for non-Principled shader users?

1 Like