Direct/Indirect Samples?

   8176   13   3
User Avatar
Member
210 posts
Joined: Jan. 2014
Offline
Since the new Houdini version came up with some improvements I again take another try to dig into it a little.
The new Houdini help makes a good attempt to explain the basics of optimizing renders in Mantra with the articles “Sampling and noise” and “Noise reduction”.
But still there are some questions left.
The articles often use terms as “direct samples” and “indirect samples”. As far as I understand it direct samples means lights and indirect samples the shaders properties, please correct me or add something that I missed out.
The problem is, I don't really know what to do with these informations.

As I understand it increasing “direct samples” means to increase the sampling of the individual lights, right? But what are the indirect samples, where do I increase/decrease those?

The help article also says:
“When attempting to optimize the number of indirect rays in your scene, the “Indirect Samples” image plane can be added. This plane will show you the number of indirect rays used throughout your image.”
Unfortunatelly once again I don't know what to do with this information.
I see a black/white plane representing the values of ray samples per pixel. And now? The help article unfortunatelly doesn't educate me what I can infer from these informations. Wheather I have to increase or decrease the samples and which samples…..and where. Questions over questions.

I'm grateful for every educating answer.
User Avatar
Staff
4170 posts
Joined: Sept. 2007
Online
I understand Direct Samples to be ray samples that go from Light –> Object –> Camera, and Indrect Samples are the samples which go between objects before being picked up by camera. Not sure how accurate that description is, but that's how I think of it.

A new toggle button exists on the Samples tab, called Enable Indirect Samples Limits. When you toggle that on, you get indirect versions of min/max samples and noise level.

Hope that helps!

Attachments:
screenshot-area-2015-02-02-090612.png (38.5 KB)

I'm o.d.d.
User Avatar
Member
210 posts
Joined: Jan. 2014
Offline
goldleaf
When you toggle that on, you get indirect versions of min/max samples and noise level.

Hope that helps!
First of all I thank you for your reply but honestly that doesn't help me much. What do you mean by that “you get indirect versions of min/max samples and noise level”?
User Avatar
Member
702 posts
Joined:
Offline
This is referring to the bounced light samples, reflections, refractions and volume bounces


direct samples refine first bounces from the lights onto the objects diffuse and specular components
User Avatar
Member
210 posts
Joined: Jan. 2014
Offline
Ah, sorry I was a bit confused and unconcentrated. I just realized that checking it gives me three additional sliders. I didn't see them before.

I've been playing with the values now for a while but I'm still not able to come up with a decent render that doesn't take forever (a pretty simple testscene).
Is there a trick?
User Avatar
Member
702 posts
Joined:
Offline
do you have any examples of what you are trying to render?
User Avatar
Member
210 posts
Joined: Jan. 2014
Offline
Just a little test scene.
- 3 x Mantra Surface Shader (1 reflective, 1 refractive, 1 anisotropic)
- 1 x Area Light
- 1 x simple background
- PBR
- reflect limit: 2
- refract limit: 2
- diffuse limit: 1
- 1280 x 720 resolution

This one took almost 1 hour to render and still is not finished, qualitywise.

Attachments:
mantraTest2.jpg (358.4 KB)
rendersettings.jpg (40.6 KB)

User Avatar
Member
702 posts
Joined:
Offline
can you post your hipfile as well?

what are your machine specs?
User Avatar
Member
210 posts
Joined: Jan. 2014
Offline
Sure

- Win 7 x64
- AMD FX-8320 (8 core) 3.5 Ghz
- 12 GB RAM
- NVidia GeForce GT 240

Attachments:
mantraTest.hipnc (3.4 MB)

User Avatar
Member
379 posts
Joined: Dec. 2006
Offline
Did not have time to look at scene, but no, do not set Min Ray more than 1. You can tweak Max Ray and Noise threshold. Also export samples image planes and see how any samples are used and if needed just tweak Noise threshold to use high value.

Way to much render time for that. I have this rendered in less than 1h on i7, full HD. Note that this was with GI light.



Settings were Min Ray 1, Max 16, Pixel samples 5-5 and noise 0.005 (from top of my head).

Do not have time now to check your scene but when I do I will post here.
User Avatar
Staff
107 posts
Joined: Feb. 2009
Offline
Hello,

I don't have much time to spend on this today, but here's a first pass at optimizing your test scene. It could probably be tweaked more to really nail down the render times, but this took approximateely 6.5 minutes to render.

So, it can be helpful to analyze the ‘direct samples’ and ‘indirect samples’ planes in order to see where your sampling is going. In your case, you were drastically oversampling the direct samples. Use these planes to tune the ‘noise levels’, its the best way to make sure you're sending samples where you need them to go.

In this case, your refractive cube required the most samples to get a clean image. In cases like this it can be helpful to set separate sampling rates for ‘problem’ objects rather than simply adding more samples to the whole image. To accomplish this, I applied the sampling parameters to your refractive shader. If you had the cube in its own geometry container, you could also apply these parameters ( Edit rendering parameters from the gear icon on the object or shader ) to just the object itself which would give you individual object control rather than shader level.

If you check out the new Mantra User guide in the documentation it should help explain this process of optimization.

I hope this helps!
-scott

Attachments:
TestRender.jpg (388.3 KB)
mantratest_changes.hipnc (3.4 MB)

—————-
Scott Keating
Product Designer
SideFX Software
—————-
User Avatar
Member
210 posts
Joined: Jan. 2014
Offline
sakeating
It could probably be tweaked more to really nail down the render times, but this took approximateely 6.5 minutes to render.
WHAT?!?!?!?! NO WAY!!!! 6.5 minutes and not even nailed down?!?!?!
What kind of renderfarm are you rendering on? I opened your scene and with no changes it still takes 29:01 minutes and it still is noisy (too noisy for me).
Could an AMD 8-core 3.5GHz processor be that bad?


sakeating
…analyze the ‘direct samples’ and ‘indirect samples’ planes in order to see where your sampling is going.
Yes, as I said in the opening of this thread, I don't know what to do with this information.
What do these planes tell me and what can I infer from that?
What should I look for?
How does an oversampled plane looks like and how do I notice that?
Is it my goal to reach the max sample limit as much as I can, ending with a nearly complete white image plane. Or is it my goal to reach the max sample limit as less as possible, ending with a nearly complete black image? Or should I aim for the happy medium and have it entirly somewhere in the grey range. I just don't know what these values tell me and how I can optimize my render with it.


SreckoM
Do not have time now to check your scene but when I do I will post here.
I would appreciate that. The cleanness of your render is what I'm after. I can't recognize much noticeable noise. Just a bit in the reflection of the curtain. On the carpet and the floor it's hard to tell if it's noise or the shader.
User Avatar
Staff
107 posts
Joined: Feb. 2009
Offline
Korny Klown2
sakeating
It could probably be tweaked more to really nail down the render times, but this took approximateely 6.5 minutes to render.
WHAT?!?!?!?! NO WAY!!!! 6.5 minutes and not even nailed down?!?!?!
What kind of renderfarm are you rendering on? I opened your scene and with no changes it still takes 29:01 minutes and it still is noisy (too noisy for me).
Could an AMD 8-core 3.5GHz processor be that bad?


sakeating
…analyze the ‘direct samples’ and ‘indirect samples’ planes in order to see where your sampling is going.
Yes, as I said in the opening of this thread, I don't know what to do with this information.
What do these planes tell me and what can I infer from that?
What should I look for?
How does an oversampled plane looks like and how do I notice that?
Is it my goal to reach the max sample limit as much as I can, ending with a nearly complete white image plane. Or is it my goal to reach the max sample limit as less as possible, ending with a nearly complete black image? Or should I aim for the happy medium and have it entirly somewhere in the grey range. I just don't know what these values tell me and how I can optimize my render with it.



I'm running on intel core i7-3960x CPU @ 3.30GHz with 32 GB of Ram, although the ram in this case should be irrelevant. So, nothing that special. I'm not sure why your scene is taking so much longer.

The Direct and Indirect Sample planes tell you the number of samples being done per pixel. You can press ‘i’ to get information about each pixel, moving your mouse will reveal the intensity amount.

Your goal is to get high samples ( brighter pixels ) in areas where there is noise and lower samples ( darker pixels ) in areas where there isn't noise. You control this via the ‘noise level’ parameter

If you look in the houdini documentation under ‘removing noise’ you'll find information about the different types of noise and which parameters can be used to clean them up as well as a step by step process for removing noise in your scene. For more information about how sampling works, look at the ‘sampling and noise’ section.

In more recent versions of H14 you'll also see updates to the limits tab documentation and the sampling tab.

I hope it helps!

-scott
—————-
Scott Keating
Product Designer
SideFX Software
—————-
User Avatar
Member
210 posts
Joined: Jan. 2014
Offline
sakeating
Your goal is to get high samples ( brighter pixels ) in areas where there is noise and lower samples ( darker pixels ) in areas where there isn't noise.
Ah, nice. That's a crucial information which I havn't found in the help so far.
I think that will help me a bit, at least it's a new aspect I can play with, hopefully it helps.
Thanks
  • Quick Links