<div dir="ltr">=== This Week ===<div style>This week there was a lot of forced learning, mostly good learning, but things you&#39;d expect me to be comfortable with by now. Having come from  a C# background, I never fully appreciated the challenges of memory management in C++, and I&#39;ve made my share of avoidable mistakes these past few weeks.</div>

<div style><br></div><div style> In summary, this is where I currently stand:</div><div style> In Blender, I load up a blend file with a stack of planes, for example, all linked to a transparent material. Using a simple OSL script (<a href="http://wiki.blender.org/index.php/User:Jehuty/GSoC_2013/Discussions/Texture_Lookup#The_script">link here</a>), I explicitly call the texture3d callback, check for the VDB file, open it, store it in a map of open file handles, and perform the lookup. </div>

<div style><br></div><div style>In the script, I&#39;m casting the value to float, so only one channel is returned, which I believe to be appropriate here. For testing, I&#39;m using the smoke vdb volume (provided as an example file <a href="http://www.openvdb.org/download/">here</a>).  This volume is interesting because the background value is zero and the smoke has varying degrees for density.</div>

<div style><br></div><div style>Lookup returns the value at the evaluated point, and I have the lookup output its result to the console. Good so far.</div><div style><br></div><div style>Now, what I have struggled the most with this week is that I run out of memory in the first few samples when rendering, when I shouldn&#39;t be, i.e., I&#39;m definitely leaking memory. I&#39;ve fixed a few occurrences, but not all of them, and I&#39;m now using smart pointers to try to get garbage collection behavior for free, but still not working properly. The result is that before the image is done, the application (and XCode) crashes.</div>

<div><br></div><div style>This is where I currently stand.</div><div style><br></div><div style>=== Next Week ===</div><div style>Given my lack of skill dealing with memory, I&#39;m working the weekend trying to fix this issue.</div>

<div style>Additionally, the plan is to have a working Cycles node working for vdb volumes instead of necessarily resorting to OSL scripts.</div><div style><br></div><div style>=== Questions ===</div><div style>Questions at this time are mostly conceptual, so I&#39;ll bring them to IRC.</div>

<div style><br></div><div style>Regards,</div><div style>Rafael.</div></div>