<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt'>
<p>Hi Geraldine,</p>
<p><br /></p>
<p>A few notes from me. First of all, better integration of OpenVDB is indeed a goal in Blender, at least for interoperability with other software. But ain't nobody got time fo' dat.</p>
<p><br /></p>
<p>The way I see OpenVDB implemented in Cycles is something like what jehuty did. My attempt was a bit complicated, as it required implementing OpenVDB's ray tracing utilities in Cycles' kernel. However, we recently did an optimisation of volume rendering that somewhat mimics the OpenVDB data structure to skip empty space in the volume, so I would stay away from using OpenVDB's ray tracing utilities in Cycles like I tried to do.</p>
<p><br /></p>
<p>Jehuty's work was creating a texture system, like OIIO's, where OpenVDB files would be opened and read on demand based on ray intersection and shader evaluation. I think this should be persued as it doesn't require messing with BVH traversal code or ray marching (like my attempt). His implementation would only work in OSL and implementation in SVM would be necessary, and appears to be the trickiest part.</p>
<p><br /></p>
<p>For an SVM implementation of Jehuty's work, we would need to pass the filenames of the VDB files as well as the grid names used to the kernel for each shader, so special attention needs to be taken here. I guess we can pass the hash of the filenames to the kernel, instead of a string, and maybe this can be put in the attribute node somehow. This would be CPU only though. For GPU, the only solution would be to copy the OpenVDB grid data to a Cycles 3D texture.</p>
<p><br /></p>
<p>The particle mesher modifier is not to be finished as long as the current modifier system is in place, so I would drop the idea of working on that. Also, I wouldn't bother implementing other OpenVDB features without a volume object in place first.</p>
<p><br /></p>
<p>Finishing (or rewriting) my implementation of the volume object primitive in Blender and working on implementing OpenVDB in Cycles at the same time might be too much for a GSOC. But then it depends on how we approach the Cycles part: texture system vs reading as 3D texture, where the latter is the easiest and would allow more time to work on the volume primitive.</p>
<p><br /></p>
<p>That's it from me at the moment,</p>
<p><br />Regards,<br />Kévin.</p>
<p><br /></p>
<p>Le 2018-03-22 15:05, Gg Cc a écrit :</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div dir="ltr">Hello everyone!<br /><br />I am Geraldine Chua, a prospective GSoC candidate, and although I am a little late to the game, I would really love to be able to help work on Cycles over the course of this summer :).<br /><br />In regards to my project, I would like to enquire about the feasibility of fully integrating OpenVDB into Cycles. One of the tasks mentioned under the Volume Rendering potential ideas list is the "Direct reading of OpenVDB files as a Cycles 3D image, to render volumes generated by other software."<br /><br />Right now, it seems like Blender can already read and write (but not edit?) smoke volumes (but not other volumes?) as OpenVDB files (<a href="https://wiki.blender.org/index.php/User:Kevindietrich/OpenVDBSmokeExport">https://wiki.blender.org/index.php/User:Kevindietrich/OpenVDBSmokeExport</a>). There are also various other integrations done over the years such as one attempted back in GSoC 2013 (although I cannot tell how far Jehuty managed to finish) and the rest of Kevin Dietrich's work.<br /><br />However, from this forum post (<a href="https://blenderartists.org/forum/showthread.php?433900">https://blenderartists.org/forum/showthread.php?433900</a>), as well as a few others, it seems like a quite a few people want much greater support for OpenVDB. Perhaps instead of doing these 3 unrelated (although all interesting!) tasks for Volume Rendering, I could focus on extending or even finishing the OpenVDB integration started by Kevin Dietrich. This would be a much more focused project, and I think one fully-fledged project, as opposed to a few spread out tasks, might be better for the community who will get a fully-fledged new tool.<br /><br />Some ideas of tasks that can be done:<br /><br /> - Revisit and complete Kevin Dietrich's unfinished projects such as the implementation of a Volume Object Primitive or the Particle Mesher Modifier (<a href="https://wiki.blender.org/index.php/User:Kevindietrich">https://wiki.blender.org/index.php/User:Kevindietrich</a>)<br /><br /> - Integration of other features of OpenVDB such as conversion tools, transforms, etc. (<a href="http://www.openvdb.org/about/">http://www.openvdb.org/about/</a>)<br /><br /> - Refactoring of current Volumes functions in Cycles to work with the OpenVDB format<br /><br />I would like to ask from those who are much more experienced than me in volumes development:<br /><br />1. Does this project contradict any current plans or goals set for the Blender architecture? Is OpenVDB integration a goal of Blender's?<br /><br />2. Is this a project that is of actual benefit to the Blender community? Or is the original requirement of only OpenVDB import/export what is actually needed and  would you rather I focus on trying to also accomplish the other 2 volume rendering tasks?<br /><br />3. Would you estimate that this project is feasible, i.e. the most useful features can be implemented in 12 weeks?<br /><br />Thank you for taking the time to read my questions and I hope you can provide some of your insights and feedback on this proposal :). I know that the Blender development community is a quite busy right now with the upcoming Code Quest, so thank you for taking the time to help me on this.<br /><br />Best regards,<br />Geraldine Chua<br /><br /></div>
<br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<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">https://lists.blender.org/mailman/listinfo/bf-cycles</a></div>
</blockquote>
<p><br /></p>

</body></html>