Cycles Spectral Rendering

Hi Yafu, the bubble example in the earlier part of this topic were created with an old technique I used to create spectral images, and the node group was based on the math regarding thin-film interference, but I think I had not accounted for all aspects of the equation accurately.

The spectral branch of Blender does not yet have a thin-film node, though I do hope to add one some day. I don’t know whether I still have the files in order to show the way the thin film effect was done earlier.

1 Like

I noticed that the Windows build on Graphic All is updated, so I tried it, but Spectral version of Nishita is not right:


This is ordinary Nishita:

This is the file:
Spectral Nishita Bug.blend (817.5 KB)

Update:

Update Again:


Problem fixed

1 Like

Here a dielectric nk,water absorption build.


dielectricspectral4c.blend (3.2 MB)

2 Likes

I recently found this Blender branch and I wonder if it even makes sense using textures like that MacBeth chart? Does that really work? Doesn’t look correct to me compared to the images. Maybe you need to create each tile with a proper tile and material?

The diver in the example pics,using something similar like a xrite chart who knows.We dont know the exact water absorption in this examples,further the water can have more salt or common particles what makes the water scatter or absorb slightly more.
However,As you can see even at 15m depth the Fotos haveing roughley the same light condition.especially 10m foto looks like it has some camera lighting.These factors can make different apperence of the Fotos taken.
The macbeth chart i have used is a well known chart i have placed on a sphere inside a sphere with the water material.
In the nodesetup you can see that i used a absorption amount similar to 5m (of clear water, without any additional scatterings what can further occur in nature).

The absorption equation (i have compared and checked with a excel calc) seems right,and the result added on a transparent shader looks quite close to a volume absorption.

What do you mean with each tile?

As sayed,if the camera was useing a light,then the fotos taken are bad for comparison,because the camera light bring back the whole spectrum from blue to red,even if the absorption in the water occurs.

Here are better real world examples,from a paper.

edit,i made another spectral testrender,with the same colorchart in as the reference pic on the left.at 10m absorption depth.you can see the absorption fits very nice although the reference foto was taken at a reef which has ofc some additional scattering from microparticles etc.you can see the amount of backscattering at the black parts at the ref pic.Since the rendering has only the absorption without the scatter,these are missing.

edit,i have found a scattercoefficent of pureseawater.here the same render as before but with the back scattering.


next testrender with ground texture at 10 m depth with absorption and scattering

2 Likes

Spectral Rendering is submitting the patch to extend color data to be more than 3 channels, and the new data type will be called Spectrum!
https://developer.blender.org/D15535

21 Likes

Finally! After 2 or maybe 3 years of development we are finally seeing Cycles spectral branch merging steps. This will surely move Cycles closer to other production renderers. Good news!

12 Likes

It’s more than that. The whole project started at about 2017 to 2018, it’s been 4 to 5 years now.

4 Likes

With multi-light sampling and path guiding on the way, Cycles should now be more than fast enough to handle the slight increase in render time that will occur when spectral rendering goes in.

In addition, the reason why it has taken as long as it has is because the devs. were working on this in their spare time, I would think progress will go faster once all of it is in master and we have Brecht and Lukas looking at it.

8 Likes

Anybody knows if spectral rendering will be an optional mode that can be turned on/off?
I personally don’t care but I think people who do NPR have no usage for it and everything that slows down the renderer is something that maybe should be optional…

3 Likes

yes I believe that will be the case as stated ‘‘In future patches, the number of channels and data type will depend on the CMake configuration where spectral rendering will be enabled or disabled’’.

4 Likes

To me, this sounds like a compile-time option rather than a runtime one. But I guess we’ll have to wait and see.
If it were a compiler option, people could of course build their own Blender with non-spectral Cycles anytime.

greetings, Kologe

1 Like

Yes it does. The spectral Cycles X branch that you can download now has the switch to turn on and off.

Though they did it by duplicating the kernels to have RGB and Spectral kernels side by side instead of having one single Cycles kernel. There is a possibility that they might go a different way this time. Personally I am fine with having two kernels, let’s see how it goes.

2 Likes

Is that available only for windows? I’m not finding the download.

Just asked Pembem:

The only difference is that you need two compiled kernels, instead of one, with spectral rendering enabled or disabled, which should be straightforward to implement with this patch. So it’s not a problem to add it in the future. The only concern I have is increasing by almost 30% the size of Blender installation.

Yeah so the switch will be there if people are fine with some increase in installation size.

It was on Graphic All, note the Cycles X version was very buggy, and it does not have the spectral nodes support.
This is the Cycles X version:

Here is the 2.93 version with less bugs (note it’s also buggy though, just not as buggy) and the spectral nodes support:

3 Likes

This a Windows only release, right?

Yes it’s windows

Brecht just said this:

The current build times and size of kernels are already problematic, we’re not likely to double that for one feature

The installation size might be the problem to prevent the runtime switch.

I don’t see why. My current Blender install is around 1GB. We now have multi TB drives, we install games that are like 50GB+, render out animations and create video files that are GB’s in size.

Just the download for DaVinci Resolve is 2.5GB, so a Blender install of 1.5GB is really no big deal.

3 Likes

The biggest issue is not on disk space, it’s on downloading and hosting.

The bigger it is, the more it cost the blender foundation on hosting, and the more difficult it becomes for people with limited bandwidth to download … and of course the bigger the carbon footprint as will

1 Like