Page 1 of 1

MLT freezes and Bidir lightleaks

Posted: Tue Sep 18, 2012 10:37 pm
by ENSLAVER
Starting some scenes indigo sits on 0k samples/s and continues to use 80-99% CPU when you press stop and I have to end the task to close Indigo. It mostly happens in scenes with specular materials. Also I'm getting some lightleaks using Bidir.

The scene was basically trying to create a laser. The laser is a 65cm black tube with an inner diameter of 5mm. The tube has a planar circlular emitter at the sealed end. The emitter is slightly smaller than the inner diameter of the tube.

Image

You can experience the 0k samples/s problem by changing the cube that the 'laser' is aimed into a specular material, even a phong material with specular reflection.

If you change to bidir rendering you will be able to see the emitter shining through the sealed end of the tube.

Image

Some notes: Some rendering modes output no light from the end of the tube, I found out this is related to the length of the tube. A short tube ~10cm will work with all render modes, but as the length increases only MLT modes will work, and when the tube is ~1m long no light exits the open end (perhaps I need to wait a lot longer).

The 0k Samples/s problem is resolved by using a much shorter tube which results in more light spread, and is less laser-like.

Is the some kind of scale setting or under the hood (mncr/ray depth) that I could alter to improve the issues? Does someone have an IES file for a laser? I found one on the luxrender forums but the format wasn't compatible with max nor indigo.

Re: MLT freezes and Bidir lightleaks

Posted: Wed Sep 19, 2012 6:25 am
by CTZn

Re: MLT freezes and Bidir lightleaks

Posted: Thu Sep 20, 2012 4:28 am
by lycium
The 0 sps is basically a small number, so small that it will (as you suspected) just take a loooong time to get enough valid samples to finish the warmup. This is because Indigo only counts valid samples (eg. in Luxrender you get all samples and an efficiency % to work it out), and if most of the samples don't reach the camera it just takes a long time.

I'd also like to quickly mention that this is to a degree unavoidable, the loss of efficiency, because if you could efficiently "predict" which way light goes in a maze of specular reflections etc, then you could efficiently run a virtual optical computer and solve the Halting Problem :)

Re: MLT freezes and Bidir lightleaks

Posted: Thu Sep 20, 2012 5:52 am
by CTZn
If prediction is irrelevant, what could you tell us about the role of importance sampling in this context ?

I'd bump that request for "coherent" emission (emission in the normal direction only).

Re: MLT freezes and Bidir lightleaks

Posted: Fri Sep 21, 2012 1:18 am
by lycium
I'm not sure what you're asking sorry.

IES allows you to emit in a pretty narrow beam, but not in a perfectly specular way.

Re: MLT freezes and Bidir lightleaks

Posted: Fri Sep 21, 2012 3:16 pm
by CTZn
Still I was hoping that you would risk an answer :lol:

First off I take it importance sampling is the result of observation, as opposed to prediction.

Then, I am assuming that importance can be displayed somehow in 3d, much like particles summing their opacity in games and demos but with rays instead. Can it ?

If these two assumptions are somehow correct I can then imagine a biased tool allowing the user to prune "clumps" of paths, saying "no rays won't go that way" (coz it's a light leak etc), or emphase them.

Could such tool be ?

Re: MLT freezes and Bidir lightleaks

Posted: Sat Sep 22, 2012 1:07 am
by lycium
Importance sampling is where you have an integral to be approximated statistically, and you place those statistical samples where the function is large according to a PDF which should be close to the function being integrated.

Example: if you're statistically integrating x^10 over [0,1] you want to put most of the samples very near x=1. This example is a bit silly because the integral is trivially 1/11 from basic calculus, but illustrates the point.

Re: MLT freezes and Bidir lightleaks

Posted: Sat Sep 22, 2012 2:00 am
by CTZn
Thanks I guess, but you didn't answer the third question. Formalism does not help me btw :/

Re: MLT freezes and Bidir lightleaks

Posted: Sat Sep 22, 2012 2:06 am
by lycium
If you're asking about the manual "guidance", saying "no rays go this way": that's really cumbersome for the user, exit portals are already too much manual guidance and work well to rather say "lots of rays go this way". This is much easier to get right (make robust) than trying to fully exclude certain regions from consideration.

Re: MLT freezes and Bidir lightleaks

Posted: Sat Sep 22, 2012 3:23 am
by CTZn
Point taken, thank you lycium.

FYI the gap between the way I formulated my questions and the way you answered them at first is the very place of pedagogy ;)