Thoughts on making Cycles into a spectral renderer

So could I ask a silly question. What advantages does a spectral rendering mode have over an RGB only render pipeline?

1 Like

https://jo.dreggn.org/path-tracing-in-production/2017/talk-jo/

Use the left and right arrow keys

1 Like

Thanks. But it doesn’t appear that there’s a video on this page.

1 Like

it’s a slide deck from a talk, hit pg up/dn

1 Like

OH! Sorry, my bad. Thanks.

1 Like

I’m seeing that Path Guiding isn’t in this build, I’m guessing that’s something that will be integrated down the road as development continues?

1 Like

That’s right, additional work has to be done to make path guiding compatible with spectral rendering.

Try adding ccl_private before vfloat8 &a in file path-to-unpacked-blender\3.6\scripts\addons\cycles\source\util\math_float8.h on lines 118, 123, 128, 133, 138. The code should look like this after editing:

ccl_device_inline vfloat8 operator+=(ccl_private vfloat8 &a, const vfloat8 b)
{
  return a = a + b;
}

ccl_device_inline vfloat8 operator-=(ccl_private vfloat8 &a, const vfloat8 b)
{
  return a = a - b;
}

ccl_device_inline vfloat8 operator*=(ccl_private vfloat8 &a, const vfloat8 b)
{
  return a = a * b;
}

ccl_device_inline vfloat8 operator*=(ccl_private vfloat8 &a, float f)
{
  return a = a * f;
}

ccl_device_inline vfloat8 operator/=(ccl_private vfloat8 &a, float f)
{
  return a = a / f;
}

Then restart Blender and try rendering again.

2 Likes

Ok, I edited the source file to match, but get a different error. If I try and invoke a rendering it just crashes. Would it be of use to post the crash log?

1 Like

If it contains more compilation errors, yes.

1 Like

Here’s a crash that occurs as soon as I hit F12 to start the rendering when GPU is enabled.

I’ve downloaded the M1 version to test on my M1 Mini. It hangs also. The interactive viewport render doesn’t give an overlay error message, but the spinning beachball comes up and the samples just gets stuck at 0. I don’t know if it’s going through a compile or if it’s just hung.

https://drive.google.com/file/d/1KmfZFtcH3Kkbe9JduJiCT8vL9_SeQP9a/view?usp=sharing

2 Likes

I have the same GPU error. Also, turning on subsurface scattering crashes blender.

1 Like

Just wanted to mention that the Windows build seems to work fine (very quick test, nothing thorough)
In fact it appears to now work with OptiX which previously weren’t available.

It did crash when I tried to turn on all of the passes though, so maybe something’s broken there (or maybe it was just a random crash, unsure yet)

EDIT: This issue is still happening:

EDIT: It seems something doesn’t play well with the Ambient Occlusion pass.
I can turn on just Combined, Z, and Ambient Occlusion and it works, or I can turn all passes, except for Ambient Occlusion, and it also works. But somewhere between those, it breaks. I’m investigating.

EDIT: Ok, weird, I have now turned on all passes again (including AO), and it just works. There’s definitely something wonky there, but I’m not sure what exactly…

EDIT: AO pass crash happens again

EDIT: pretty sure regardless of whether AO works or not, that the passes are wrong.

Combined (note the broken stuff)

Diffuse Direct (there seems to be little correlation between this and the Combined pass - the top left room only features red or white objects and light sources, and yet the direct light there looks blue on the red walls? Etc.)

Diffuse Indirect (similarly little correlation - also it looks like the weird sampling nonsense is contained entirely in the indirect passes)

Diffuse Color (this one seems correct)

Glossy Direct (this one seems fine)

Glossy Indirect (weird sampling issues aside, also fine)

Glossy Col (seems fine)

5 Likes

Can you try the new build from here? It should fix SSS and AO crashes, maybe metal compilation.

Windows and Linux builds are not updated yet, I’m working on a fix.

4 Likes

system-info.txt (6.3 KB)

SS is working. didn’t check AO

With Metal backend, cycles GPU:

OpenGL backend, cycles GPU:
the solid viewport is doing some funny things, and the material preview doesn’t render shaders.
Same error as above for cycles rendered viewport. Same issue described here with PR there.

Not sure if this will help, or if 3.5 is automatically merged with 3.6.

1 Like

I tried on MacOS Monterey (Intel). Still get hangs and crashes.
Here’s a crash report when trying to render with GPU.

2 Likes

Can you find and upload a full Blender log? It should contain the full compilation output, what you’re seeing in the viewport is truncated. Or you can start Blender from a terminal and copy the output from there.

I’m keeping the spectral cycles branch up to date with the latest main.

1 Like

Couldn’t find a crash log, it doesn’t crash i think. Updated the original post with console log

That’s exactly what I needed! Thanks.

1 Like

Hi there. Are there have any test build for Windows users to test out Spectral render?

1 Like

There’s a build linked mere posts above

2 Likes