<div dir="ltr">Hi Thomas,<br><br>I searched the code already before asking here..<br>what I follow is the Blender exporter &quot;all files under Blender\ like camera, shader, mesh, object, ...&quot;<br>I also searched the whole code for instances of these flags, only appeared in a few places.<br><br>for example, these flags are automatically set inside tag_update()<br><div><span class="" style="white-space:pre">        </span>has_surface = has_surface || output-&gt;input(&quot;Surface&quot;)-&gt;link;</div><div><span class="" style="white-space:pre">        </span>has_volume = has_volume || output-&gt;input(&quot;Volume&quot;)-&gt;link;</div><div><span class="" style="white-space:pre">        </span>has_displacement = has_displacement || output-&gt;input(&quot;Displacement&quot;)-&gt;link;<br><br>while all other flags are untouched &quot;and that&#39;s why I&#39;m asking as I see them useless, not set, not complete??&quot;<div><span class="" style="white-space:pre">        </span>bool has_surface_emission;</div><div><span class="" style="white-space:pre">        </span>bool has_surface_transparent;</div><div><span class="" style="white-space:pre">        </span>bool has_surface_bssrdf;</div><div><span class="" style="white-space:pre">        </span>bool has_bssrdf_bump;</div><div><span class="" style="white-space:pre">        </span>bool has_surface_spatial_varying;</div><div><span class="" style="white-space:pre">        </span>bool has_volume_spatial_varying;</div><div><span class="" style="white-space:pre">        </span>bool has_object_dependency;</div><div><span class="" style="white-space:pre">        </span>bool has_integrator_dependency;<br><br>they are not set in the blender exporter, not set anywhere else &quot;just used inside if statements, without setting?&quot;<br><br>cheers,<br>Mohamed Sakr</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 1, 2016 at 12:26 AM, Thomas Dinges <span dir="ltr">&lt;<a href="mailto:blender@dingto.org" target="_blank">blender@dingto.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi,<br>
    these flags all tell Cycles which kind of shaders are used (Do we
    have a Surface (or only volume), Emission or a Transparent BSDF)?<br>
    <br>
    They are set and checked for in various places in render/ e.g.
    shader.cpp, light.cpp ...<br>
    <br>
    Again, please just search the code yourself. You should really be
    able to search a codebase for a variable. That is not magic.<span class="HOEnZb"><font color="#888888"><br>
    <br>
    Thomas</font></span><div><div class="h5"><br>
    <br>
    <div>Am 01.04.2016 um 00:17 schrieb Mohamed
      Sakr:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hi Thomas,<br>
        <br>
        great!, but what I meant is:<br>
        where do you set them? I checked the blender exporter and didn&#39;t
        see any flag set.<br>
        are they set automatically? or they need a manual checks.<br>
        <br>
        cheers,<br>
        Mohamed Sakr</div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Mar 31, 2016 at 8:10 PM, Thomas
          Dinges <span dir="ltr">&lt;<a href="mailto:blender@dingto.org" target="_blank">blender@dingto.org</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi
            Mohamed,<br>
            <br>
            grep is a Linux terminal command, that can be used to search
            files, in<br>
            this case for a variable.<br>
            Alternatively you can use an IDE or another tool of your
            choice.<br>
            <br>
            The flags are used in various places inside the kernel, to
            determine if<br>
            we need certain things.<br>
            <br>
            Hope that helps.<br>
            <br>
            Best regards,<br>
            Thomas<br>
            <div>
              <div><br>
                Am 31.03.2016 um 18:36 schrieb Mohamed Sakr:<br>
                &gt; Hi Sergey,<br>
                &gt;<br>
                &gt; after testing, I see colors are matching in the 2
                branches, sorry this<br>
                &gt; was my fault.<br>
                &gt; but the unsolved question: do these flags do
                anything? I see they are<br>
                &gt; not touched anywhere.<br>
                &gt;<br>
                &gt; cheers,<br>
                &gt; Mohamed Sakr<br>
                &gt;<br>
                &gt; On 3/31/16, Mohamed Sakr &lt;<a href="mailto:3dsakr@gmail.com" target="_blank"></a><a href="mailto:3dsakr@gmail.com" target="_blank">3dsakr@gmail.com</a>&gt;
                wrote:<br>
                &gt;&gt; Hi Sergey,<br>
                &gt;&gt;<br>
                &gt;&gt; my branch is similar to yours, just some
                different stuff in the<br>
                &gt;&gt; standalone part &quot;exporter&quot;<br>
                &gt;&gt; I didn&#39;t understand what is grep?<br>
                &gt;&gt;<br>
                &gt;&gt; cheers,<br>
                &gt;&gt; Mohamed Sakr<br>
                &gt;&gt;<br>
                &gt;&gt; On 3/31/16, Sergey Sharybin &lt;<a href="mailto:sergey.vfx@gmail.com" target="_blank"></a><a href="mailto:sergey.vfx@gmail.com" target="_blank">sergey.vfx@gmail.com</a>&gt;
                wrote:<br>
                &gt;&gt;&gt; Hi,<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; I can&#39;t tell you what could be wrong in
                your branch because it&#39;s nowhere<br>
                &gt;&gt;&gt; published and i can&#39;t give cleaner answer
                where the variables are used<br>
                &gt;&gt;&gt; than<br>
                &gt;&gt;&gt; grep will do it:<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; grep -wR &quot;has_surface&quot; .<br>
                &gt;&gt;&gt; grep -wR &quot;has_surface_emission&quot; .<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; and so on.<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; On Thu, Mar 31, 2016 at 5:26 PM, Mohamed
                Sakr &lt;<a href="mailto:3dsakr@gmail.com" target="_blank">3dsakr@gmail.com</a>&gt;
                wrote:<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; Hi,<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; I wonder where are these flags used?
                Shader::has_surface,<br>
                &gt;&gt;&gt;&gt; has_surface_emission, ...etc..<br>
                &gt;&gt;&gt;&gt; the reason to ask:<br>
                &gt;&gt;&gt;&gt; I checked my branch against Blender,
                the scene is pretty simple.<br>
                &gt;&gt;&gt;&gt; 2 cubes which got only emission to
                surface, first cube is (255 50 0),<br>
                &gt;&gt;&gt;&gt; second is (153 255 0)<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; inside Blender results appear correctly
                &quot;same chosen color&quot;<br>
                &gt;&gt;&gt;&gt; inside my branch results appear wrong
                &quot;for example with increased<br>
                &gt;&gt;&gt;&gt; emission strength, values go toward 255
                255 0 ..&quot;<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; any idea if these flags are responsible
                for this? or anything else<br>
                &gt;&gt;&gt;&gt; that is missing in my Shader?<br>
                &gt;&gt;&gt;&gt; I debugged input values and they are
                correct.<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; cheers,<br>
                &gt;&gt;&gt;&gt; Mohamed Sakr<br>
                &gt;&gt;&gt;&gt;
                _______________________________________________<br>
                &gt;&gt;&gt;&gt; Bf-cycles mailing list<br>
                &gt;&gt;&gt;&gt; <a href="mailto:Bf-cycles@blender.org" target="_blank">Bf-cycles@blender.org</a><br>
                &gt;&gt;&gt;&gt; <a href="https://lists.blender.org/mailman/listinfo/bf-cycles" rel="noreferrer" target="_blank">https://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; --<br>
                &gt;&gt;&gt; With best regards, Sergey Sharybin<br>
                &gt;&gt;&gt;<br>
                &gt; _______________________________________________<br>
                &gt; Bf-cycles mailing list<br>
                &gt; <a href="mailto:Bf-cycles@blender.org" target="_blank">Bf-cycles@blender.org</a><br>
                &gt; <a href="https://lists.blender.org/mailman/listinfo/bf-cycles" rel="noreferrer" target="_blank">https://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
                <br>
                _______________________________________________<br>
                Bf-cycles mailing list<br>
                <a href="mailto:Bf-cycles@blender.org" target="_blank">Bf-cycles@blender.org</a><br>
                <a href="https://lists.blender.org/mailman/listinfo/bf-cycles" rel="noreferrer" target="_blank">https://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Bf-cycles mailing list
<a href="mailto:Bf-cycles@blender.org" target="_blank">Bf-cycles@blender.org</a>
<a href="https://lists.blender.org/mailman/listinfo/bf-cycles" target="_blank">https://lists.blender.org/mailman/listinfo/bf-cycles</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<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/mailman/listinfo/bf-cycles</a><br>
<br></blockquote></div><br></div>