<p dir="ltr">Hi,</p>
<p dir="ltr">On Mar 13, 2014 11:29 PM, &quot;Naman Gupta&quot; &lt;<a href="mailto:naman22forever@gmail.com">naman22forever@gmail.com</a>&gt; wrote:<br>
&gt; 1). metadata:- A possible way to do it would be to define our own keyword say  &quot;meta&quot;. that works like this  <br>
&gt;   <br>
&gt;    int value =  4  meta range 0 10 tip &quot;value betwwe 0-10&quot;,<br>
&gt;<br>
&gt;  something of that sort. but i&#39;m not sure if acceptable since it would violate OSL coding standard. </p>
<p dir="ltr">This is already a metadata feature in OSL with [[ ... ]] syntax, see the OSL specification. But we don&#39;t use the data at the moment.</p>
<p dir="ltr">&gt; 2). as for the texture. I think OSL already supports it without having to define another node altho that can also workout. <br>
&gt;      <a href="https://www.youtube.com/watch?v=V5N2rnFtSlw">https://www.youtube.com/watch?v=V5N2rnFtSlw</a><br>
&gt;   can&#39;t really figure out what is exactly needed in this. </p>
<p dir="ltr">This is about attributes being available. Like UV coordinates or vertex colors. In your example you didn&#39;t use those so you didn&#39;t see the problem. The attributes are currently only available if another node requests them.</p>

<p dir="ltr">&gt; 3). Performance improvement:- I think that&#39;s the thing we should be focusing on. A possible way to do that would be to allow OSL to use GPU along with CPU. it could be achieved using CUDA/OpenCL/OpenGL calls.</p>

<p dir="ltr">GPU support for OSL would be great but I don&#39;t think it&#39;s possible as a summer of code project. It&#39;s too much work.</p>
<p dir="ltr">What I was thinking of is simpler: faster handling of ShaderData end closures copying, faster image texture lookup, faster attribute lookup, and just generally comparing performance with the other shading system and finding solutions for differences in performance.</p>

<p dir="ltr">&gt; Apart from these issues I can&#39;t really find any other feature that needs to be added to OSL. If there is please do let me know. <br>
&gt; Would like to know if i&#39;m heading right.</p>
<p dir="ltr">A few other things would be support for enums, better support for strings / file paths, support for image datablocks, support for curve mappings and color ramps. Better reporting of error messages and print statements in scripts, an option to print OSL and OpenImageIO statistics, or viewport auto update as you type. Support for shading in trace() function.</p>

<p dir="ltr">A big feature would be the ability to implement own closures in OSL, but this is probably too complex and is more work in OSL than in Cycles.</p>
<p dir="ltr">&gt; Oh and one thing. I was able to build Blender with OSL under Release mode. Debug mode somehow crashes everytime. <br>
&gt;<br>
&gt; --Naman<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Mar 7, 2014 at 11:50 PM, Brecht Van Lommel &lt;<a href="mailto:brechtvanlommel@pandora.be">brechtvanlommel@pandora.be</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Mar 7, 2014 at 9:23 AM, Naman Gupta &lt;<a href="mailto:naman22forever@gmail.com">naman22forever@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; I&#39;m Naman, final year undergrad majoring in Computer Science studying at<br>
&gt;&gt; &gt; MIET, Meerut, India.<br>
&gt;&gt; &gt; I&#39;m interested in working for blender this summer. I&#39;d like to work on OSL<br>
&gt;&gt; &gt; support . What I can makeout from the idea page is that, blender doesn&#39;t<br>
&gt;&gt; &gt; have all the features of OSL. like metadata, a proper way to load tex coord?<br>
&gt;&gt; &gt; and improved performance?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; These are the links I have read so far<br>
&gt;&gt; &gt; <a href="http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/OSL">http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/OSL</a><br>
&gt;&gt; &gt; <a href="https://raw.github.com/imageworks/OpenShadingLanguage/master/src/doc/osl-languagespec.pdf">https://raw.github.com/imageworks/OpenShadingLanguage/master/src/doc/osl-languagespec.pdf</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;   I have successfully compiled the source code with OSL (win7, vs2008). :D<br>
&gt;&gt; &gt;   I&#39;d like to know who be the right guy(IRC handle?) to discuss it.<br>
&gt;&gt; &gt;   Also, are there any other material that I have to go through?<br>
&gt;&gt;<br>
&gt;&gt; There&#39;s a few people on IRC that know about OSL integration, me<br>
&gt;&gt; (brecht), DingTo, lukas_t and dfelinto. You can ask here on the<br>
&gt;&gt; mailing list as well if you can find the right people online.<br>
&gt;&gt;<br>
&gt;&gt; I think you found the most important links. The other relevant things are:<br>
&gt;&gt; * Cycles developer docs:<br>
&gt;&gt; <a href="http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles">http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles</a><br>
&gt;&gt; * Rest of the Cycles manual.<br>
&gt;&gt; * To see what people are doing with OSL now you can read the OSL forum<br>
&gt;&gt; on <a href="http://blenderartists.org/">http://blenderartists.org/</a><br>
&gt;&gt; * <a href="http://www.openshading.com/">http://www.openshading.com/</a><br>
&gt;&gt;<br>
&gt;&gt; In general it helps if you are familiar with rendering algorithms as<br>
&gt;&gt; you can find in e.g. the PBRT book, though it&#39;s not that much needed<br>
&gt;&gt; for OSL.<br>
&gt;&gt;<br>
&gt;&gt; As for the contents of the project, the general goal would be to<br>
&gt;&gt; improve OSL integration to be more useful.<br>
&gt;&gt;<br>
&gt;&gt; * The metadata support would to make it possible to define<br>
&gt;&gt; input/output socket entirely from the metadata in the OSL shader<br>
&gt;&gt; (min/max, tooltips, strings as filepaths, etc.).<br>
&gt;&gt; * The texture loading problem is that Cycles will only load e.g. UV<br>
&gt;&gt; maps if they are needed by the nodes. However OSL shaders have no way<br>
&gt;&gt; to specify in advance that they will use such an attribute, so they<br>
&gt;&gt; can only use it if some other builtin node already asked for it to be<br>
&gt;&gt; loaded. I&#39;m not sure what the best solution would be, but this should<br>
&gt;&gt; be solved somehow.<br>
&gt;&gt; * When using OSL performance is currently slower than when it&#39;s off,<br>
&gt;&gt; ideally it would become roughly equal. Getting it equal may be aiming<br>
&gt;&gt; a too high, but we can probably do better than we do now.<br>
&gt;&gt;<br>
&gt;&gt; Maybe other people reading this can suggest things, or you can read<br>
&gt;&gt; the blenderartists forum to find issues that users are running into<br>
&gt;&gt; and think of solutions for them. The 3 things mentioned are not<br>
&gt;&gt; necessarily the most important ones, just some things that I could<br>
&gt;&gt; think of off the top of my head.<br>
&gt;&gt;<br>
&gt;&gt; Brecht.<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Bf-cycles mailing list<br>
&gt;&gt; <a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
&gt;&gt; <a href="http://lists.blender.org/mailman/listinfo/bf-cycles">http://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&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">http://lists.blender.org/mailman/listinfo/bf-cycles</a></p>