[Soc-2013-dev] Weekly Report #9 - Cycles Volume Texturing

Rafael Campos rafaelcdn at gmail.com
Sat Aug 17 20:56:21 CEST 2013


=== This Week ===
This week there was a lot of forced learning, mostly good learning, but
things you'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've made my share of avoidable mistakes these past
few weeks.

 In summary, this is where I currently stand:
 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 (link
here<http://wiki.blender.org/index.php/User:Jehuty/GSoC_2013/Discussions/Texture_Lookup#The_script>),
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.

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

Lookup returns the value at the evaluated point, and I have the lookup
output its result to the console. Good so far.

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't be, i.e.,
I'm definitely leaking memory. I've fixed a few occurrences, but not all of
them, and I'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.

This is where I currently stand.

=== Next Week ===
Given my lack of skill dealing with memory, I'm working the weekend trying
to fix this issue.
Additionally, the plan is to have a working Cycles node working for vdb
volumes instead of necessarily resorting to OSL scripts.

=== Questions ===
Questions at this time are mostly conceptual, so I'll bring them to IRC.

Regards,
Rafael.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/soc-2013-dev/attachments/20130817/41389ff2/attachment-0001.htm 


More information about the Soc-2013-dev mailing list