<div dir="ltr"><div>&quot;So basic answer is that for CPU it could be done quite quickly, if the<br>
GPU is involved it gets messy.&quot;<br><br></div>Seems to be the prevailing case unfortunately. Hopefully a workaround can be found. If not, it wouldn&#39;t be the first feature to be CPU-only.<br><br><br><br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Sat, Jul 6, 2013 at 7:44 PM, Brecht Van Lommel <span dir="ltr">&lt;<a href="mailto:brechtvanlommel@pandora.be" target="_blank">brechtvanlommel@pandora.be</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It&#39;s certainly possible, just complicates things somewhat. At the<br>
moment the logic is quite simply but with more advanced pixel<br>
filtering or adaptive sampling having multiple threads cooperate on a<br>
single tile is trickier. We can worry about that later though.<br>
<br>
For CPU rendering it can be done in the CPU device by making tasks<br>
more granular than tiles. There is probably some nice balanced tasks<br>
size that doesn&#39;t add too much thread overhead based on number of<br>
pixels x samples. Not too hard and nicely localized.<br>
<br>
For multi-GPU or GPU+CPU rendering it needs to be at a higher level<br>
however because the tile buffer is not allocated in the same memory.<br>
I&#39;m not sure exactly where that fits yet, it would complicate the code<br>
quite a bit. For tiles we&#39;re also constrained by OpenEXR buffer<br>
saving, which expects nice regular tiles, so if the tile is split it<br>
still needs to delivered as a single tile buffer.<br>
<br>
So basic answer is that for CPU it could be done quite quickly, if the<br>
GPU is involved it gets messy.<br>
<div class="HOEnZb"><div class="h5"><br>
On Sat, Jul 6, 2013 at 8:31 PM, Matthew Heimlich<br>
&lt;<a href="mailto:matt.heimlich@gmail.com">matt.heimlich@gmail.com</a>&gt; wrote:<br>
&gt; Hey all,<br>
&gt;<br>
&gt; First off, I&#39;d like to say that I&#39;m trilled to be part of the Cycles artist<br>
&gt; module. I&#39;m honored to have been chosen.<br>
&gt;<br>
&gt; I&#39;ve been pretty slammed this week, but I&#39;ve been letting some ideas roll<br>
&gt; around in my head for ways I&#39;d like to contribute in the long run. In the<br>
&gt; coming week I have a bit of downtime and I plan on working up some mockups<br>
&gt; that I think would be beneficial to Cycles development.<br>
&gt;<br>
&gt; For now the one idea I wanted to throw out is a method for alleviating the<br>
&gt; dreaded &quot;final bucket&quot; syndrome. Anyone who has rendered a very complicated<br>
&gt; scene on a tight deadline will know what I&#39;m talking about. For those<br>
&gt; unfamiliar, when rendering with buckets it is common for the render to reach<br>
&gt; its final bucket and hit a bit of a standstill as all other processing<br>
&gt; threads finish their jobs and remain idle. This means that for that final<br>
&gt; bucket on a modern processor, you&#39;re only utilizing ~12.5% of your<br>
&gt; processor. Over the course of an animation this time can add up to a<br>
&gt; substantial amount of wasted CPU time.<br>
&gt;<br>
&gt; My proposal is a method that detects the final tile and separates it into<br>
&gt; tiles of its own equal to the user-defined maximum threads. This will allow<br>
&gt; for maximum CPU usage throughout the entire render process. In the coming<br>
&gt; week I hope to familiarize myself with the code base of Cycles itself (it&#39;s<br>
&gt; been a long time coming, honestly) to be able to give more well-informed<br>
&gt; explanations for things like this (and possibly even some of my own code<br>
&gt; contributions), but as it stands now I&#39;m not sure how easy/difficult it<br>
&gt; would be to implement a system like this given the current design philosophy<br>
&gt; of Cycles as a whole.<br>
&gt;<br>
&gt; Brecht, is this feasible? After coming to grips with the code base (I may<br>
&gt; poke you on IRC a few times if I run into GPU-related code I&#39;m unfamiliar<br>
&gt; with) this may even be something I could take a stab at myself. I&#39;d love to<br>
&gt; hear your input.<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; Matt Heimlich<br>
&gt;<br>
</div></div><div class="HOEnZb"><div class="h5">&gt; _______________________________________________<br>
&gt; Bf-cycles mailing list<br>
&gt; <a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
&gt; <a href="http://lists.blender.org/mailman/listinfo/bf-cycles" target="_blank">http://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
&gt;<br>
_______________________________________________<br>
Bf-cycles mailing list<br>
<a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-cycles" target="_blank">http://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
</div></div></blockquote></div><br></div>