<div dir="ltr">Hi Nick,<br><br>My first thought is that we should really not be creating new things here and there unless absolutely necessary, and I'm surprised that file formats available right now won't work for us. However if there are clear bottlenecks that could be handled by your suggestion, we would surely need to talk about it. Maybe you can tell us more about it next Thursday with some details?<div><br></div><div>Thank you,</div><div><br><div><br></div><div><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span style="color:rgb(136,136,136);font-size:12.8000001907349px">Alexis Girault</span><br style="color:rgb(136,136,136);font-size:12.8000001907349px"><span style="color:rgb(136,136,136);font-size:12.8000001907349px">R&D Engineer in Medical Computing</span><br style="color:rgb(136,136,136);font-size:12.8000001907349px"><span style="color:rgb(136,136,136);font-size:12.8000001907349px">Kitware, Inc.</span><br style="color:rgb(136,136,136);font-size:12.8000001907349px"><br style="color:rgb(136,136,136);font-size:12.8000001907349px"><a href="http://www.kitware.com/" rel="noreferrer" style="color:rgb(17,85,204);font-size:12.8000001907349px" target="_blank">http://www.kitware.com</a><br style="color:rgb(136,136,136);font-size:12.8000001907349px"><font color="#999999"><a href="tel:(919)+969-6990+x325" target="_blank"><span style="font-size:12.8000001907349px">(919) 969-6990 x3</span>25</a></font><br></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Jan 3, 2017 at 2:48 PM, Milef, Nicholas Boris <span dir="ltr"><<a href="mailto:milefn@rpi.edu" target="_blank">milefn@rpi.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">
<div>The plan would work like this: File (.3ds, .dae, .obj, etc.)->Assimp loader/converter->.imstk->VTK/<wbr>Vulkan</div>
<div><br>
</div>
I came up with a file format that should work:
<div><br>
</div>
<div>uint: version_num</div>
<div>uint: num_meshes</div>
<div>for each mesh:</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>uint: num_vertices</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>uint: num_triangles</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>uint: num_attributes</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>uint: num_bones</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>uint: num_textures</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>uint: parent_mesh_id</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>uint x num_attributes: code_for_attribute_type (e.g., 1 for position, 2 for normal, etc.)</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>for each attribute:</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>data</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>for each triangle:</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>index array</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>for each bone:</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>uint: parent_id</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>vec3: offset_matrix_from_parent</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>mat4: inverse_matrix</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>for each textures:</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>uint: type</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>uint: path_length</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span>char[]: locations</div>
<div><span class="m_-6710951410870518965Apple-tab-span" style="white-space:pre-wrap"></span></div>
<div>This gives us the advantage to do things such as limit/normalize the number of weights per vertex beforehand or any of the other Assimp postprocessing commands. Also, there's no concept of texture type in file formats, but we can define a specific naming
convention. Technically, diffuse textures need to be handled differently in OpenGL than the other texture types (such as normal maps) for accuracy in lighting. The data can be loaded directly into the VBO/poly data without any sort of interpretation (plus
it's cache friendly).</div>
<div><br>
</div>
<div>What do you all think about this?</div>
<div>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div id="m_-6710951410870518965divRpF162256" style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Imstk-developers [<a href="mailto:imstk-developers-bounces@imstk.org" target="_blank">imstk-developers-bounces@<wbr>imstk.org</a>] on behalf of Milef, Nicholas Boris [<a href="mailto:milefn@rpi.edu" target="_blank">milefn@rpi.edu</a>]<br>
<b>Sent:</b> Monday, January 02, 2017 1:35 PM<br>
<b>To:</b> Alexis Girault; <a href="mailto:imstk-developers@imstk.org" target="_blank">imstk-developers@imstk.org</a><span class=""><br>
<b>Subject:</b> Re: [Imstk-developers] Assimp integration<br>
</span></font><br>
</div><span class="">
<div></div>
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">I was doing some research, and apparently game engines usually don't load common formats because it takes too long. I think that we should create our own file format and have Assimp
save to that format. The other benefit is that we can format it similarly to the VBO so populating the vertex data will be quick. Any thoughts on this?
<div><br>
</div>
<div>Sorry, I forgot to reply to the other message. I think I used point data for the bone indices and the bone weights, but I had to bypass much of the VBO class, so technically it would only work with the right data. I'm not sure how this could be done without
that file becoming very large. Is there any way we can get rid of all those function calls?<br>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div id="m_-6710951410870518965divRpF630451" style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Alexis Girault [<a href="mailto:alexis.girault@kitware.com" target="_blank">alexis.girault@kitware.com</a>]<br>
<b>Sent:</b> Thursday, December 15, 2016 10:06 PM<br>
<b>To:</b> Milef, Nicholas Boris; <a href="mailto:imstk-developers@imstk.org" target="_blank">imstk-developers@imstk.org</a><br>
<b>Subject:</b> Re: [Imstk-developers] Assimp integration<br>
</font><br>
</div>
<div></div>
<div>
<p dir="ltr">Maybe you could send a message again on the vtk developers thread to ask if a project gatekeeper could tell you how to add a third party dependency to VTK and if Assimp license works with them. If there is any issue they'll let us know and we may
move on. </p>
<br>
<div class="gmail_quote">
<div dir="ltr">On Thu, Dec 15, 2016, 21:54 Alexis Girault <<a href="mailto:alexis.girault@kitware.com" target="_blank">alexis.girault@kitware.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" class="m_-6710951410870518965gmail_msg">Do you think you could do it efficiently in VTK? If yes I'd do so, and store the vertex weights in the PointData that we could then map it to our structures.</div>
<div dir="ltr" class="m_-6710951410870518965gmail_msg"><br class="m_-6710951410870518965gmail_msg">
</div>
<div dir="ltr" class="m_-6710951410870518965gmail_msg">How did you implement vertex weight in VTK in your previous work? </div>
<div dir="ltr" class="m_-6710951410870518965gmail_msg"><br class="m_-6710951410870518965gmail_msg">
</div>
<div dir="ltr" class="m_-6710951410870518965gmail_msg">Alexis</div>
<span class="m_-6710951410870518965gmail_msg"></span><br class="m_-6710951410870518965gmail_msg">
<div class="gmail_quote m_-6710951410870518965gmail_msg">
<div dir="ltr" class="m_-6710951410870518965gmail_msg">On Thu, Dec 15, 2016, 21:44 Milef, Nicholas Boris <<a href="mailto:milefn@rpi.edu" class="m_-6710951410870518965gmail_msg" target="_blank">milefn@rpi.edu</a>> wrote:<br class="m_-6710951410870518965gmail_msg">
</div>
<blockquote class="gmail_quote m_-6710951410870518965gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
How should we proceed with this? It seems that there's someone interested in the VTK version. I'll need it for the Vulkan renderer to test out various things. And we'll need models that support vertex weights for both renderers.<br class="m_-6710951410870518965gmail_msg">
______________________________<wbr>_________________<br class="m_-6710951410870518965gmail_msg">
Imstk-developers mailing list<br class="m_-6710951410870518965gmail_msg">
<a href="mailto:Imstk-developers@imstk.org" class="m_-6710951410870518965gmail_msg" target="_blank">Imstk-developers@imstk.org</a><br class="m_-6710951410870518965gmail_msg">
<a href="http://public.kitware.com/mailman/listinfo/imstk-developers" rel="noreferrer" class="m_-6710951410870518965gmail_msg" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/imstk-<wbr>developers</a><br class="m_-6710951410870518965gmail_msg">
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</span></div>
</div>
</div>
</div>
</blockquote></div><br></div>