<div dir="ltr">Hi,<div><br></div><div>Didn't have chance to check exact meaning in details to verify your change, but i agree background/progressive/progressive_refine are confusing. There is also headless flag..</div><div><br></div><div>Would propose moving towards easy-to-follow meaning here, merge progressive and progressive_refine. Those are same thing, just one for the interactive render and other is for final render. Background is probably cleanest is to rename to interactive (so it doesn't conflict with Blender's background meaning). headless i think is clear enough already.</div><div><br></div><div>This will cause some potential merge conflicts when integration guys will update Cycles so because of that i don't want to do it "silently".</div><div><br></div><div>Would such a change help or will only cause extra pain for you guys?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 8, 2017 at 5:16 PM, Stefan Werner <span dir="ltr"><<a href="mailto:stewreo@gmail.com" target="_blank">stewreo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I’m integrating Cycles into a headless standalone application and am trying to get progressive updates from a CUDA render. As it looks like right now, I don’t think I can pull that off without modifying Cycles itself.<br>
<br>
(the following text is ignoring the OpenCL backend, that one I haven’t looked at yet)<br>
<br>
First, there are three flags to play with, and it doesn’t seem that all possible combinations are supported:<br>
SessionParams.background, SessionParams.progressive_<wbr>refine and SessionParams.progressive. The name “background” was initially a bit confusing to me, but I found out that it’s intended to distinguish between a “fire and forget” render task and an interactive rendering session that keeps the session alive for updates (= viewport rendering in Blender).<br>
<br>
For a headless application, currently the background=false mode is not available with CUDA rendering. Attempting to use that combination without a valid current OpenGL context crashes the application on my Linux machine. Eventually, I’d like to be able to use background=false (interactive session) without OpenGL, and this could probably be of interest to other developers too (to integrate Cycles into applications using Vulkan, Metal or DirectX, for example).<br>
<br>
In the case of background=true and progressive=true, a combination which I believe Blender is not using, things look slightly better. It doesn’t crash, it works fine with CPU and returns black frames for CUDA. I have a simple change to get it to return frames with CUDA, but I’d like to get other opinions if it is valid:<br>
<br>
In session.cpp, line 567, replace<br>
<br>
if(!params.background)<br>
need_tonemap = true;<br>
<br>
with<br>
if(!params.background || params.progressive)<br>
need_tonemap = true;<br>
<br>
Does anyone have any thoughts? Am I misunderstanding the flags? Has anyone else who is plugging Cycles into a 3rd party application come across this or even solved the problem of progressive CUDA renders without OpenGL?<br>
<br>
Thanks,<br>
Stefan<br>
______________________________<wbr>_________________<br>
Bf-cycles mailing list<br>
<a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
<a href="https://lists.blender.org/mailman/listinfo/bf-cycles" rel="noreferrer" target="_blank">https://lists.blender.org/<wbr>mailman/listinfo/bf-cycles</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div><span style="color:rgb(102,102,102)">With best regards, Sergey Sharybin</span></div></div>
</div>