<div dir="ltr">Hi Thomas,<br><br>I searched the code already before asking here..<br>what I follow is the Blender exporter "all files under Blender\ like camera, shader, mesh, object, ..."<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->input("Surface")->link;</div><div><span class="" style="white-space:pre">        </span>has_volume = has_volume || output->input("Volume")->link;</div><div><span class="" style="white-space:pre">        </span>has_displacement = has_displacement || output->input("Displacement")->link;<br><br>while all other flags are untouched "and that's why I'm asking as I see them useless, not set, not complete??"<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 "just used inside if statements, without setting?"<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"><<a href="mailto:blender@dingto.org" target="_blank">blender@dingto.org</a>></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'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"><<a href="mailto:blender@dingto.org" target="_blank">blender@dingto.org</a>></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>
> Hi Sergey,<br>
><br>
> after testing, I see colors are matching in the 2
branches, sorry this<br>
> was my fault.<br>
> but the unsolved question: do these flags do
anything? I see they are<br>
> not touched anywhere.<br>
><br>
> cheers,<br>
> Mohamed Sakr<br>
><br>
> On 3/31/16, Mohamed Sakr <<a href="mailto:3dsakr@gmail.com" target="_blank"></a><a href="mailto:3dsakr@gmail.com" target="_blank">3dsakr@gmail.com</a>>
wrote:<br>
>> Hi Sergey,<br>
>><br>
>> my branch is similar to yours, just some
different stuff in the<br>
>> standalone part "exporter"<br>
>> I didn't understand what is grep?<br>
>><br>
>> cheers,<br>
>> Mohamed Sakr<br>
>><br>
>> On 3/31/16, Sergey Sharybin <<a href="mailto:sergey.vfx@gmail.com" target="_blank"></a><a href="mailto:sergey.vfx@gmail.com" target="_blank">sergey.vfx@gmail.com</a>>
wrote:<br>
>>> Hi,<br>
>>><br>
>>> I can't tell you what could be wrong in
your branch because it's nowhere<br>
>>> published and i can't give cleaner answer
where the variables are used<br>
>>> than<br>
>>> grep will do it:<br>
>>><br>
>>> grep -wR "has_surface" .<br>
>>> grep -wR "has_surface_emission" .<br>
>>><br>
>>> and so on.<br>
>>><br>
>>><br>
>>> On Thu, Mar 31, 2016 at 5:26 PM, Mohamed
Sakr <<a href="mailto:3dsakr@gmail.com" target="_blank">3dsakr@gmail.com</a>>
wrote:<br>
>>><br>
>>>> Hi,<br>
>>>><br>
>>>> I wonder where are these flags used?
Shader::has_surface,<br>
>>>> has_surface_emission, ...etc..<br>
>>>> the reason to ask:<br>
>>>> I checked my branch against Blender,
the scene is pretty simple.<br>
>>>> 2 cubes which got only emission to
surface, first cube is (255 50 0),<br>
>>>> second is (153 255 0)<br>
>>>><br>
>>>> inside Blender results appear correctly
"same chosen color"<br>
>>>> inside my branch results appear wrong
"for example with increased<br>
>>>> emission strength, values go toward 255
255 0 .."<br>
>>>><br>
>>>> any idea if these flags are responsible
for this? or anything else<br>
>>>> that is missing in my Shader?<br>
>>>> I debugged input values and they are
correct.<br>
>>>><br>
>>>> cheers,<br>
>>>> Mohamed Sakr<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>
>>>><br>
>>><br>
>>><br>
>>> --<br>
>>> With best regards, Sergey Sharybin<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>
<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>