LW Ray Recursion Limit and how does affect Kray

Post your tutorials and help questions in this forum
Locked
S0nny
Posts: 75
Joined: Thu Mar 15, 2012 12:03 am

LW Ray Recursion Limit and how does affect Kray

Post by S0nny »

So, I was struggling against some light leaks and I wasn't able to find the problem: geometry, lights and materials were perfect... but eventually I found an unexpected solution!

I don't know if this is documented or not, I don't remember read anything about that, but here's what I found out:
If you, like me, use both LW render engine and Kray, be sure to not use Ray Recursion Limit (under render globals) above 6. In LW you need 10 or 12 because dielectrics and transparency works better, but in Kray this can cause severe light leaks.

I don't know why this parameter can affects Kray, but as you can see from the images, the one with 16 Ray Recursion Limit looks like as there is a lamp inside the geometry :shock:

So, if you have some light leaks and you are using an old LW scene, better check this setting out!
Attachments
The incriminated setting
The incriminated setting
Ray Recursion Limit 6
Ray Recursion Limit 6
Ray Recursion Limit 16
Ray Recursion Limit 16
User avatar
Janusz Biela
Posts: 3265
Joined: Mon Mar 13, 2006 10:39 am
Location: Finland
Contact:

Re: LW Ray Recursion Limit and how does affect Kray

Post by Janusz Biela »

Post this scene here please.
Your problem probably comes from no Path Passes option in Kray. it should be minimum Path Passes 1.0 and distance 50% (Final gathering TAB). This is common error in Photon Mapping when some interpolated photon cells get information about light from "outside" of room - it is similar to Light leak error but of course this is no error. To prevent this in Kray you have extra Path Tracing Photons (Path Passes+distance) where in all corners are shooting Path Tracing photons to "cover" photon map errors. Of course render with this option is longer but photon map has more accuracy.
It can be also problem from Node (not supported in Kray or just buggy in Lightwave)

About recursion:
Minimum for Kray is 10 (Personally I use 14 to prevent problems with glass)
so command is:

Code: Select all

recurse 14;
this option override Lightwave recurse limit (if you put nothing in command line you have setting from Lightwave as default) but...recurse 14 is quite big amount (but really necessary) and it can make some troubles in scenes where is a lot of glass/metal surfaces - long render. Why I use Nodes for limits this reflection calculations up to maximum 3. In V-ray they use very often "recurse 5.0" but I think 3.0 is enough not to see differences and speed up render.

So using in Kray this command from above we save errors from glass (dark glass) and by Node we limit amount of recurse reflection.
This works perfect and is common everywhere (v-ray, Maxwell, etc)

If still you have problem please upload this basic scene and I will setup this in Node.
S0nny
Posts: 75
Joined: Thu Mar 15, 2012 12:03 am

Re: LW Ray Recursion Limit and how does affect Kray

Post by S0nny »

Ok Janusz, here's the scene, it's super basic, just a white backdrop and a light (disabled). Setting in Kray are basic too, but besides the Ray Recursion Limits >6 I can't find nothing wrong. It really strange, but you are the expert 8)
Attachments
EXPRT.rar
(44.63 KiB) Downloaded 205 times
User avatar
Janusz Biela
Posts: 3265
Joined: Mon Mar 13, 2006 10:39 am
Location: Finland
Contact:

Re: LW Ray Recursion Limit and how does affect Kray

Post by Janusz Biela »

So here information:
- you mixed tone mapping (forbidden :wink: ) When use blending in Kray, all tone maps from Lightwave and Kray MUST be LINEAR:
capture088.png
capture089.png
- do not use exposure in tone map, here the best (standard Reinhard blending):
capture090.png
capture090.png (21.43 KiB) Viewed 6788 times
- do not use (if possible) 3th part Nodes. In ceramic surface is Lightwave standard Fresnel Node - I added there. Some of 3th part Nodes has bugs or compatibility issues so better is avoid them. I use only LW Nodes: no problems at all, no problems in network rendering,just smooth and fast :)

- in Kray you have command

Code: Select all

recurse 14
so now is doesn`t matter what is in Lightwave. Do not worry about recurse problems. This error came from wrong setup of tone mapping - in scene you have correct one.
I do not know about LW native render why there are some problems.
Here correct render:
test.jpg
In ceramic Node you have recurse limit up to 2.0. it means reflection calculate is twice: "mirror inside mirror" and if you will setup 1.0 still will be good effect because surface has low level reflection and this second reflection is very weak. You can use pure metal to see differences:
test_metal_recurse_1.0.jpg
test_metal_recurse_2.0.jpg
test_metal_recurse_5.0.jpg
Personally I use recurse 3.0 always. But for glass you can use a bit more, 5-6 or more. Of course more recurse - more longer time render. This recurse Node control can increase speed render drastically. For example bathroom scene with many tiles on the wall in normal situation will render quite long but with recurse 1 (is enough for low reflection surfaces) - very fast.


Scene for testing:
EXPRT_Johny.7z
(42.85 KiB) Downloaded 194 times
User avatar
Janusz Biela
Posts: 3265
Joined: Mon Mar 13, 2006 10:39 am
Location: Finland
Contact:

Re: LW Ray Recursion Limit and how does affect Kray

Post by Janusz Biela »

btw one more test:

glass which have only recurse 2.0 (sic!) in Node, but in Kray or LW you have recurse 6.0:
glass_recurse_6.jpg


and correct setting where general recurse is 14 in command line (this what I suggest) but Node stil have recurse 2.0:
glass_recurse_14.jpg

So recurse from Nodes are calculate separately only for reflection but transparency is general matter. Why Nodes are powerful :wink:
S0nny
Posts: 75
Joined: Thu Mar 15, 2012 12:03 am

Re: LW Ray Recursion Limit and how does affect Kray

Post by S0nny »

Ok, I checked everything on my scene and I didn't seen the Tonemap->Gamma under General, probably because I never change that settings, I know that should be linear. I think that I forgot to reset to linear, probably a distraction.

Anyway I checked your scene and I think I found the problem, the light leaks appears - even with your settings - when I enable the QLWF plugin and I use 0.7: is that a setting that I should not use?

Here a picture:

EDIT: btw, good tips about materials, as always!
Attachments
QLWF.jpg
User avatar
Janusz Biela
Posts: 3265
Joined: Mon Mar 13, 2006 10:39 am
Location: Finland
Contact:

Re: LW Ray Recursion Limit and how does affect Kray

Post by Janusz Biela »

Do not change exposure in tone mapping. It should be 1.0. Also do not use LWF, is just difficult to deal with this.
S0nny
Posts: 75
Joined: Thu Mar 15, 2012 12:03 am

Re: LW Ray Recursion Limit and how does affect Kray

Post by S0nny »

Ok, QLWF disabled, it was it. Sometimes it helps me to keep color accurate, but I think I can find another tonemap or cc in post.
User avatar
Janusz Biela
Posts: 3265
Joined: Mon Mar 13, 2006 10:39 am
Location: Finland
Contact:

Re: LW Ray Recursion Limit and how does affect Kray

Post by Janusz Biela »

S0nny wrote:Ok, QLWF disabled, it was it. Sometimes it helps me to keep color accurate, but I think I can find another tonemap or cc in post.
I gave you the best tone map in this moment.Do not waste time. Colours are not problem. Important is to get accurate and quality render because in post process you will improve rest of details (contrast, colour, etc.)
Here my RAW and Post + settings from above:
RAW_Post.jpg
btw
this render has quite high contrast but generally but I suggest use higher gamma parameter in tone mapping. Normally is 1.8 but for less contrast you can use 2.2. Render of course has washed feeling quality but is good for post process.
S0nny
Posts: 75
Joined: Thu Mar 15, 2012 12:03 am

Re: LW Ray Recursion Limit and how does affect Kray

Post by S0nny »

I didn't try exterior recently, but for interiors I use something between 1.8, 6.0, 50%, but it depends on the situations.
My preferred setting was, in tone mapping, everything at 2.2, but Exposure both at 0.7, and QLWF gamma 2.2 and exposure at 0.7, but with the problem in QLWF I reverse to the standard tone map now.

Basically my problem is inside the workflow: the client evaluate the previews, because he make decisions about the project. So when I show him the previews, even if he knows this are just previews, he is always like 'Yeah, I know it's a preview, but let me see some right light and colors'... it means I need to pp every previews to show him that the underexposed and dull image it will be much better. This is really slow to do every time, so when I found the right tonemap it was much faster for me, just render and send out. Unfortunately it creates more problems...
User avatar
Janusz Biela
Posts: 3265
Joined: Mon Mar 13, 2006 10:39 am
Location: Finland
Contact:

Re: LW Ray Recursion Limit and how does affect Kray

Post by Janusz Biela »

...why I suggest to create "yours pipeline" , there is no golden solution for that. I just keep my renders with standard balance (a bit gamma feeling, no high contrast) because in After Effects I have whole system of post processing. Is matter a few seconds to do post process - and also is reason why I do not stick with Photoshop.
I am not interesting with painting in PS to get high quality renders.
People make mistake thinking: V-ray or another engine render ultra realistic. Is not true...everything is Photoshop with many, many layers. It gives boost but make impossible animation. I stick with Alex Roman system: ultra surfacing and light and after that After Effects post processing.

This Bugatti above you can consider as frame from animation (for me is no differences) I can track lights, special effects, blooms, dynamically change DoF, etc., also background I control in After Effect as 3D sphere.
Here is my pipe line between LW and AE:

[youtube]SPyGY0mV1Ho[/youtube]

Test is very simple: Nulls and camera exported from Lightwave to AE, lights effect tracked from Nulls (lights are 3D in AE so it means: then farther the less visible), obscure alpha channel done by ID map from Kray (because lamps must hide behind walls and I am not willing do it manually) Everything has control and takes a few seconds.
Only what I want from Kray or another render engine: clean render with perfect surfacing, perfect AA, perfect reflection blur.

btw, render pure raytracing from Kray, 3 sec/frame.
S0nny
Posts: 75
Joined: Thu Mar 15, 2012 12:03 am

Re: LW Ray Recursion Limit and how does affect Kray

Post by S0nny »

Maybe I should give AE more attention, my knowledge of the program is very limited to basic stuff now.
Can you suggest some in depth tutorial?
User avatar
Janusz Biela
Posts: 3265
Joined: Mon Mar 13, 2006 10:39 am
Location: Finland
Contact:

Re: LW Ray Recursion Limit and how does affect Kray

Post by Janusz Biela »

Here the best sources:
http://www.videocopilot.net/tutorials/ After Effect master Andrew Kramer
https://vimeo.com/8217700 Alex Roman post process

+ I want start soon tutorials on forum about post process in After Effects but in very practical system.
S0nny
Posts: 75
Joined: Thu Mar 15, 2012 12:03 am

Re: LW Ray Recursion Limit and how does affect Kray

Post by S0nny »

Good, I never thought to use Looks for pp stills images: it works stand alone outside AE also and has simple tools to do that and probably creating my own templates is really fast.
Thanks!
Locked