[Imstk-developers] Copying Vega data

Alexis Girault alexis.girault at kitware.com
Tue Oct 25 10:15:20 EDT 2016


>
> We will want to avoid skinning on the CPU as much as possible (we can
> actually totally replace it with current techniques depending on the
> overhead). I've already done GPU skinning within VTK for non-physical
> objects, but there are also ways to get that data back from the GPU so that
> physical objects can interact with it.
>

Looking forward to learn more about this. As the rest, please make sure to
keep track of this to show why current solutions in VTK would limit us.


> From my understanding, transforming the PolyData vs transforming the Actor
> is the same thing because when you transform the Actor, you are actually
> transforming the PolyData. Except for a possible function call or two, this
> shouldn't help performance that much.
>

Well not really: the actor will apply the transforms on the polydata
vertices at each frame. If we have an initial transform that we do not want
to concatenate every frame, using the filter will allow us to update the
input polydata.

Also, have you had a look at the no-copy arrays from my previous emails?
Those will be a main feature of the VTK 7.1 release.


> ------------------------------
> *From:* Alexis Girault [alexis.girault at kitware.com]
> *Sent:* Monday, October 24, 2016 9:25 AM
> *To:* Sreekanth Arikatla
> *Cc:* Milef, Nicholas Boris; imstk-developers at imstk.org
>
> *Subject:* Re: [Imstk-developers] Copying Vega data
>
> Nich: a filter that could be used for skinning: http://www.vtk.org/
> doc/nightly/html/classvtkWeightedTransformFilter.html#details
> <http://redir.aspx?REF=Mj-ffhLpMmrqbB19yuVxiIUZaSQYNnAeowjMqwRFfwPh9xKKY_zTCAFodHRwOi8vd3d3LnZ0ay5vcmcvZG9jL25pZ2h0bHkvaHRtbC9jbGFzc3Z0a1dlaWdodGVkVHJhbnNmb3JtRmlsdGVyLmh0bWwjZGV0YWlscw..>
> Also, another way to apply transforms in vtk is to apply it to the data
> structures, and not to the actor: http://www.vtk.org/doc/nightly/html/
> classvtkTransformPolyDataFilter.html
> <http://redir.aspx?REF=jMlnmAMDaiDsGc62Hiq3VI49544X89FiZfCZMctUMprh9xKKY_zTCAFodHRwOi8vd3d3LnZ0ay5vcmcvZG9jL25pZ2h0bHkvaHRtbC9jbGFzc3Z0a1RyYW5zZm9ybVBvbHlEYXRhRmlsdGVyLmh0bWw.>
>
> Alexis Girault
> R&D Engineer in Medical Computing
> Kitware, Inc.
>
> http://www.kitware.com
> <http://redir.aspx?REF=V0ztJFgTjzT0RMivK0hRASUXAGFbv6DGN1pkRPNgLmvh9xKKY_zTCAFodHRwOi8vd3d3LmtpdHdhcmUuY29tLw..>
> (919) 969-6990 x325
>
> On Fri, Oct 21, 2016 at 11:03 AM, Alexis Girault <
> alexis.girault at kitware.com
> <http://redir.aspx?REF=yteyC3sJVkEO3f82Co_ESpq3Q1fkEX32iAjTeGolJwfh9xKKY_zTCAFtYWlsdG86YWxleGlzLmdpcmF1bHRAa2l0d2FyZS5jb20.>
> > wrote:
>
>> Here is how VTK offered to improve mapping volumetric meshes or just data
>> arrays: http://www.vtk.org/Wiki/VTK/InSituDataStructures
>> <http://redir.aspx?REF=W0QgZSv4Lil82rTfMMalcf4HRy-HC7lNK29bE_TZbvrh9xKKY_zTCAFodHRwOi8vd3d3LnZ0ay5vcmcvV2lraS9WVEsvSW5TaXR1RGF0YVN0cnVjdHVyZXM.>
>>
>> The MappedDataArray (that we tried to use and that Nich got rid of
>> because of huge overhead cost when calling getVoidPointer in the VBO
>> creation) is actually deprecated and will be removed in the future. The
>> next iteration of this functionality which focuses on performance
>> improvements is presented in this article https://blog.kitware.c
>> om/new-data-array-layouts-in-vtk-7-1/
>> <http://redir.aspx?REF=lC7VhF1pv4HQM2cWIl25dHZ1vCuA7Pl7ycm0S1QgcJnh9xKKY_zTCAFodHRwczovL2Jsb2cua2l0d2FyZS5jb20vbmV3LWRhdGEtYXJyYXktbGF5b3V0cy1pbi12dGstNy0xLw..>
>> and detailed on this wiki page: http://www.vtk.org/Wiki/
>> VTK/Tutorials/DataArrays
>> <http://redir.aspx?REF=od-dJGFb24F8O3ZPX3TIxKHF1Wdl_JfPWJrySkrXfizh9xKKY_zTCAFodHRwOi8vd3d3LnZ0ay5vcmcvV2lraS9WVEsvVHV0b3JpYWxzL0RhdGFBcnJheXM.>
>>
>> If we can improve the renderer and mapper to do what's needed, I believe
>> we'll be able to use this new data array layouts to reduce data structure
>> conversion overhead.
>>
>> Alexis Girault
>> R&D Engineer in Medical Computing
>> Kitware, Inc.
>>
>> http://www.kitware.com
>> <http://redir.aspx?REF=V0ztJFgTjzT0RMivK0hRASUXAGFbv6DGN1pkRPNgLmvh9xKKY_zTCAFodHRwOi8vd3d3LmtpdHdhcmUuY29tLw..>
>> (919) 969-6990 x325
>>
>> On Thu, Oct 20, 2016 at 6:01 PM, Sreekanth Arikatla <
>> sreekanth.arikatla at kitware.com
>> <http://redir.aspx?REF=_Owr_YQTfZKAWfqGaOOYZuWot-8vG6XQWZ7Br5h9jPDh9xKKY_zTCAFtYWlsdG86c3JlZWthbnRoLmFyaWthdGxhQGtpdHdhcmUuY29t>
>> > wrote:
>>
>>> Hi Nick,
>>>             Yes, that can be done (I was under the impression that even
>>> that operation was slow with vtk but haven't looked into that part myself).
>>> The copy could additionally be made conditional since rendering typically
>>> runs faster than the physics.
>>>
>>> The mesh needs to be updated though (at least in the case where visual
>>> and physics are the same) since the physics update of future time steps
>>> count on it.
>>>
>>> On Thu, Oct 20, 2016 at 4:04 PM, Milef, Nicholas Boris <milefn at rpi.edu
>>> <http://redir.aspx?REF=p5ifK7JY0Eepw5XG7soqYLo0f_dPp4RsAVinmxk9nZLh9xKKY_zTCAFtYWlsdG86bWlsZWZuQHJwaS5lZHU.>
>>> > wrote:
>>>
>>>> In that case, then copying data over shouldn't be a big deal. I thought
>>>> the copying was occurring on the rendering thread. If we need thread
>>>> synchronization here, then we can just use a buffered approach.
>>>> ------------------------------
>>>> *From:* Sreekanth Arikatla [sreekanth.arikatla at kitware.com
>>>> <http://redir.aspx?REF=_Owr_YQTfZKAWfqGaOOYZuWot-8vG6XQWZ7Br5h9jPDh9xKKY_zTCAFtYWlsdG86c3JlZWthbnRoLmFyaWthdGxhQGtpdHdhcmUuY29t>
>>>> ]
>>>> *Sent:* Thursday, October 20, 2016 3:53 PM
>>>> *To:* Milef, Nicholas Boris
>>>> *Cc:* imstk-developers at imstk.org
>>>> <http://redir.aspx?REF=bx23EM43AtmQgYvCbEjpnfXIcS_tQE5rNGeIqYymj6zh9xKKY_zTCAFtYWlsdG86aW1zdGstZGV2ZWxvcGVyc0BpbXN0ay5vcmc.>
>>>> *Subject:* Re: [Imstk-developers] Copying Vega data
>>>>
>>>> Hi Nick,
>>>>            It happens in a separate thread in the sceneManager module.
>>>>
>>>> On Thu, Oct 20, 2016 at 3:45 PM, Milef, Nicholas Boris <milefn at rpi.edu
>>>> <http://redir.aspx?REF=ocxGB5FkJv35wN8y-lTM3IZ4R1_pXNzwE78SMgHQgZ_h9xKKY_zTCAFodHRwOi8vcmVkaXIuYXNweD9SRUY9QnBKRkR6eWxKVXpteUgwSVMyb3VaUjU4VmZTbzRpak10WU40amN1MmNES3RJVjFDSlBuVENBRnRZV2xzZEc4NmJXbHNaV1p1UUhKd2FTNWxaSFUu>
>>>> > wrote:
>>>>
>>>>> Do Vega operations occur on the same thread as the render loop? If
>>>>> not, then it might be best to buffer and copy over the data instead of
>>>>> directly working on the mesh data.
>>>>>
>>>>> _______________________________________________
>>>>> Imstk-developers mailing list
>>>>> Imstk-developers at imstk.org
>>>>> <http://redir.aspx?REF=pu_u9CUZNHFCaXnghztPOxRIHbMr0l_TEQmVbssAXGjh9xKKY_zTCAFodHRwOi8vcmVkaXIuYXNweD9SRUY9YmlneDdVQ2JRazlTTlNwU0NZRG5qRmFrRTRpd2JBZ1dETUhiNHFFNFNwZXRJVjFDSlBuVENBRnRZV2xzZEc4NlNXMXpkR3N0WkdWMlpXeHZjR1Z5YzBCcGJYTjBheTV2Y21jLg..>
>>>>> http://public.kitware.com/mailman/listinfo/imstk-developers
>>>>> <http://redir.aspx?REF=fFMsZ7UGz2CLybSHL1J4CGNaD0s53E51-sCOb8Vj1Y7h9xKKY_zTCAFodHRwOi8vcmVkaXIuYXNweD9SRUY9akZvQnFka0gxeGw2cGVQWVhRMEZJcnZoQTg5dnM5MDJJM2Q0c0JqbU9VYXRJVjFDSlBuVENBRm9kSFJ3T2k4dmNIVmliR2xqTG10cGRIZGhjbVV1WTI5dEwyMWhhV3h0WVc0dmJHbHpkR2x1Wm04dmFXMXpkR3N0WkdWMlpXeHZjR1Z5Y3cuLg..>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Sreekanth Arikatla, Ph.D,
>>>> Senior R&D Engineer,
>>>> Kitware, Inc.
>>>> <http://redir.aspx?REF=u7i0bBhvPK_GCVYVlUovQfLaYQQs2PbAfCOuaaB20wHh9xKKY_zTCAFodHRwOi8vcmVkaXIuYXNweD9SRUY9M3F6Rm8zRk5ONFJkdEJVazBxT3M1Sm9kUEVBXy1qcEtEOHRzTUdFWW4yNnRJVjFDSlBuVENBRm9kSFJ3T2k4dmQzZDNMbXRwZEhkaGNtVXVZMjl0>,
>>>> Carrboro, NC.
>>>>
>>>>
>>>
>>>
>>> --
>>> Sreekanth Arikatla, Ph.D,
>>> Senior R&D Engineer,
>>> Kitware, Inc.
>>> <http://redir.aspx?REF=iPFOxu_xpn0F3aj5CbwyYmwxre4q-9mD__ejLG4gJq7h9xKKY_zTCAFodHRwOi8vd3d3LmtpdHdhcmUuY29t>,
>>> Carrboro, NC.
>>>
>>>
>>> _______________________________________________
>>> Imstk-developers mailing list
>>> Imstk-developers at imstk.org
>>> <http://redir.aspx?REF=Xn3p_umUXJuCWxKHh5TDSeCfT9CpdG-En5N9SOzOJafh9xKKY_zTCAFtYWlsdG86SW1zdGstZGV2ZWxvcGVyc0BpbXN0ay5vcmc.>
>>> http://public.kitware.com/mailman/listinfo/imstk-developers
>>> <http://redir.aspx?REF=s9Ve0F8F1WRAVWb_4wUjTq69kMytXHnHZuTRcmA-rh7h9xKKY_zTCAFodHRwOi8vcHVibGljLmtpdHdhcmUuY29tL21haWxtYW4vbGlzdGluZm8vaW1zdGstZGV2ZWxvcGVycw..>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/imstk-developers/attachments/20161025/06f9c0be/attachment-0001.html>


More information about the Imstk-developers mailing list