Ray depth setting

Project:YafaRay
Component:YafaRay Core
Category:feature request
Priority:normal
Assigned:David Bluecame
Status:closed
Description

If ray depth setting is per material rather than general settings [calculated for the every pixel of the image] render time can be improved a lot. This is specially important for scene with lots of overlaping glasses/reflections. Though this kind of scene can be rendered twice, first the whole scene with a low ray depth and after only the glass region with a high ray depth. Anyhow will make more sense for ray depth to be per material.

Regards,

Iosif

Comments

#1

Agree. It will be VERY useful.

#2

Status:active» postponed

#3

Version:»
Assigned to:Anonymous» David Bluecame
Status:postponed» ready to commit

Hello,

I agree this could be a very useful feature to speed up renders with glass on them, without having to sacrifice the correct render of the glass regions.

I've made some tests with a new per-material parameter "Additional Ray Depth". These are some preliminary results:

Direct light + caustics, default ray depth=2. Render time 1minute 10seconds. Glass, obviously, is rendered wrong:

directlight_depth_2.jpgdirectlight_depth_2.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Direct light + caustics, ray depth=10. Render time 2minutes 10seconds (almost doubles the original!). Glass render seems ok:

directlight_depth_10.jpgdirectlight_depth_10.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

And this would be using the new experimental feature to add per-material additional ray depth. The result is very interesting:

Direct light + caustics, default ray depth=2, glass material additional ray depth=8. Render time 1minutes 17seconds (only 7s more than the original!). Glass render seems ok.

Of course, this would be a "trick" in the scene to make it faster, but having different ray depths for the different materials can also introduce artifacts in the scene. For example, the reflections of the glass object in other materials could be weird (the glass object itself could be seen ok, while its reflections in other objects could be seen black or partially black, etc). However, if the user knows what he is doing this could be a very nice way of reducing render times.

directlight_depth_2_glass_additional_8.jpgdirectlight_depth_2_glass_additional_8.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Unless this causes any unexpected horrible problems during my next tests, etc, this will be included in the next YafaRay-E version.

#4

Hi guys !

This feature is a f***ing good idea !!! :) And it's a good trick to reduce really the time rendering :) For sure I will try on next version and make a tutorial about ;)

Olivier Boscournu __ riofranco design  Montpellier _ France   http://www.olivier-boscournu.com/

#5

Status:ready to commit» fixed

Fixed in v3.0.0-beta: http://www.yafaray.org/community/forum/viewtopic.php?f=15&t=5173

#6

Status:fixed» closed

Closing as it was marked as "fixed" for 4 weeks without any further comments from users.