question

Jautodesk Hsu avatar image
Jautodesk Hsu asked ·

How does the total ray depth setting work?

In the help files it says "Diffuse + Transmission + Specular <= Total"

https://docs.arnoldrenderer.com/display/A5AFMUG/Ray+Depth

For example if I have ray depths set to Diffuse: 4, Transmission: 4, Specular: 4, Total: 10

4 + 4 + 4 = 12

I'm assuming that means 2 ray bounces get cut somewhere so that the total will equal 10? How is that determined? Will the scene be rendered at a diff:trans:spec ratio of 3:3:4 or 4:3:3 or 3:4:3 or something like that?

sampling
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Jautodesk Hsu avatar image
Jautodesk Hsu answered ·

After doing some experimenting, I realize the description in the documentation is misleading. It makes it sound like each individual channel is added together to determine the Total, but from what I have found the Total is more like a Max Threshold per channel.

Here are some test renders:

At a Total of 2 you would expect there to be no bounces left over for Specular and Transmission because Diffuse would have already taken 2 bounces, rather it appears Arnold is giving 2 bounce per channel.

In the comparison above, the Total Ray Depth is the same (Total-Diffuse-Specular-Transmission) but you would expect when the Diffuse and Transmission are set to 1, that would allow more bounces in the Specular, but as you can see in the reflections the bounces remain at 4 for both renders.

As far as I understand everyones' explanation was wrong and Total Ray Depth is actually a per channel max, not a sum total of the channels.

Which makes sense if you want to globally dial the max per channel down during preview rendering as a threshold, and then remove the threshold during final renders.

What Arnold is NOT doing, is counting ray bounces between channels, therefore it doesn't have to prioritize between Specular and Diffuse for example when it "runs out of bounces" as the description "Diffuse + Transmission + Specular <= Total" would suggest.

Ultimately I think the word "Total", and the description in the documentation are misleading. I would suggest using the word "Max" instead, and describe it as a threshold that limits each channel to the Max number of bounces.

If anybody thinks I have it wrong please let me know.


Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Max Tarpini avatar image
Max Tarpini answered ·

There isn’t too much to explain. There isn’t any algorithm or heuristic o whatever .. it depends on your scene (and also how generally things are traced). If you’re tracing a ray that goes through 4 layers of glass and hit a reflective surface where it can bounce further and let’s say you have a total trace depth of 5 you sure in any case already consumed 4 ray interactions and only 1 is left for reflections. If from the same camera a different ray hits first another reflective surface where it needs 2 bounces before hitting the gllass then you have left only 3 interactions and you won’t make it through the 4 layers of glass.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Stephen Blair avatar image
Stephen Blair answered ·

ray_depth is per ray, so it will depend on the path of the ray through the scene.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Ben Fischler avatar image
Ben Fischler answered ·

@Jautodesk Hsu, regarding explanations of sampling in the Arnold documentation, I think this is a good place to start, hopefully it is helpful to you: https://docs.arnoldrenderer.com/pages/viewpage.action?pageId=40111301

1 comment Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

@Ben Fischler Thanks for the input, I actually did read through it already. I was asking about ray depth and trying to understand exactly what the ray depth total does.

If you look at the manual for ray depth

https://docs.arnoldrenderer.com/display/A5AFMUG/Ray+Depth

It only provides this one sentence for the 'Total' setting:

"Specifies the total maximum recursion depth of any ray in the scene (Diffuse + Transmission + Specular <= Total)."

Which wasn't very clear to me.

0 Likes 0 · ·
Jautodesk Hsu avatar image
Jautodesk Hsu answered ·

@Max Tarpini Okay this is a much better explanation, if I understand you correctly you are saying that the way the process works is dependent on the order in which any given ray hits a material. So if a single ray hits a diffuse surface first, it subtracts 1 from diffuse and 1 from the total, then if it hits a specular it subtracts 1 from specular and 1 from the total.

I appreciate greatly your explanation, but I would also like to point out what you are describing is in fact an order of operation, which is basically an algorithm.

I also respectfully disagree with the statement that there isn't too much to explain, because I didn't understand it until you explained it.

One more detail, if the number of bounces is subtracted from the total by order of what component the ray comes into contact first, if there is a material that has some transmission, some diffuse and some specular, and there is only 1 ray bounce left in the total, what uses up that last bounce?

I think they should take the time to explain it in the manual.

Thanks!

2 comments Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

I was going to add exactly that question .. and it's the one for you ! Meaning it's implementation defined .. you can only test it yourself and see how it behaves.

0 Likes 0 · ·

Working on it, will post back when I have results!

0 Likes 0 · ·
Jautodesk Hsu avatar image
Jautodesk Hsu answered ·

@Stephen Blair This is not really helpful and doesn't explain anything. You basically just said it depends.

Do I understand correctly that setting the total ray depth determines some kind of overall threshold? How is it implemented? What's the algorithm? What's the process, the method, the idea behind how it limits ray depth?

Maybe try another example, if I set Diffuse: 4, Transmission: 4, Specular: 4, Total: 2, what happens there? Will there be 1 diffuse bounce and 1 transmission bounce and then no specular? Or 2 specular bounces and no diffuse or transmission rays?

If it depends, what does it depend on? Is there some kind of priority value given to those parameters? If there is a priority what is it? Do diffuse rays have higher priority than transmission? Or is there some other priority system for how ray bounces are evaluated?

Maybe this whole model I'm describing is incorrect and there is some way to evenly distribute ray bounces in fractions. Is it possible the render engine does something like evaluate 2/3 depth to diffuse, specular and transmission equally? I have no clue and the documentation doesn't explain it at all.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.