[Imstk-developers] Copying Vega data
Milef, Nicholas Boris
milefn at rpi.edu
Mon Oct 24 19:22:53 EDT 2016
Sorry, kind of late replying to all this stuff.
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.
>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.
________________________________
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<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<redir.aspx?REF=jMlnmAMDaiDsGc62Hiq3VI49544X89FiZfCZMctUMprh9xKKY_zTCAFodHRwOi8vd3d3LnZ0ay5vcmcvZG9jL25pZ2h0bHkvaHRtbC9jbGFzc3Z0a1RyYW5zZm9ybVBvbHlEYXRhRmlsdGVyLmh0bWw.>
Alexis Girault
R&D Engineer in Medical Computing
Kitware, Inc.
http://www.kitware.com<redir.aspx?REF=V0ztJFgTjzT0RMivK0hRASUXAGFbv6DGN1pkRPNgLmvh9xKKY_zTCAFodHRwOi8vd3d3LmtpdHdhcmUuY29tLw..>
(919) 969-6990 x325<tel:(919)+969-6990+x325>
On Fri, Oct 21, 2016 at 11:03 AM, Alexis Girault <alexis.girault at kitware.com<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<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.com/new-data-array-layouts-in-vtk-7-1/<redir.aspx?REF=lC7VhF1pv4HQM2cWIl25dHZ1vCuA7Pl7ycm0S1QgcJnh9xKKY_zTCAFodHRwczovL2Jsb2cua2l0d2FyZS5jb20vbmV3LWRhdGEtYXJyYXktbGF5b3V0cy1pbi12dGstNy0xLw..> and detailed on this wiki page: http://www.vtk.org/Wiki/VTK/Tutorials/DataArrays<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<redir.aspx?REF=V0ztJFgTjzT0RMivK0hRASUXAGFbv6DGN1pkRPNgLmvh9xKKY_zTCAFodHRwOi8vd3d3LmtpdHdhcmUuY29tLw..>
(919) 969-6990 x325<tel:(919)+969-6990+x325>
On Thu, Oct 20, 2016 at 6:01 PM, Sreekanth Arikatla <sreekanth.arikatla at kitware.com<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<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<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<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<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<redir.aspx?REF=pu_u9CUZNHFCaXnghztPOxRIHbMr0l_TEQmVbssAXGjh9xKKY_zTCAFodHRwOi8vcmVkaXIuYXNweD9SRUY9YmlneDdVQ2JRazlTTlNwU0NZRG5qRmFrRTRpd2JBZ1dETUhiNHFFNFNwZXRJVjFDSlBuVENBRnRZV2xzZEc4NlNXMXpkR3N0WkdWMlpXeHZjR1Z5YzBCcGJYTjBheTV2Y21jLg..>
http://public.kitware.com/mailman/listinfo/imstk-developers<redir.aspx?REF=fFMsZ7UGz2CLybSHL1J4CGNaD0s53E51-sCOb8Vj1Y7h9xKKY_zTCAFodHRwOi8vcmVkaXIuYXNweD9SRUY9akZvQnFka0gxeGw2cGVQWVhRMEZJcnZoQTg5dnM5MDJJM2Q0c0JqbU9VYXRJVjFDSlBuVENBRm9kSFJ3T2k4dmNIVmliR2xqTG10cGRIZGhjbVV1WTI5dEwyMWhhV3h0WVc0dmJHbHpkR2x1Wm04dmFXMXpkR3N0WkdWMlpXeHZjR1Z5Y3cuLg..>
--
Sreekanth Arikatla, Ph.D,
Senior R&D Engineer,
Kitware, Inc.<redir.aspx?REF=u7i0bBhvPK_GCVYVlUovQfLaYQQs2PbAfCOuaaB20wHh9xKKY_zTCAFodHRwOi8vcmVkaXIuYXNweD9SRUY9M3F6Rm8zRk5ONFJkdEJVazBxT3M1Sm9kUEVBXy1qcEtEOHRzTUdFWW4yNnRJVjFDSlBuVENBRm9kSFJ3T2k4dmQzZDNMbXRwZEhkaGNtVXVZMjl0>, Carrboro, NC.
--
Sreekanth Arikatla, Ph.D,
Senior R&D Engineer,
Kitware, Inc.<redir.aspx?REF=iPFOxu_xpn0F3aj5CbwyYmwxre4q-9mD__ejLG4gJq7h9xKKY_zTCAFodHRwOi8vd3d3LmtpdHdhcmUuY29t>, Carrboro, NC.
_______________________________________________
Imstk-developers mailing list
Imstk-developers at imstk.org<redir.aspx?REF=Xn3p_umUXJuCWxKHh5TDSeCfT9CpdG-En5N9SOzOJafh9xKKY_zTCAFtYWlsdG86SW1zdGstZGV2ZWxvcGVyc0BpbXN0ay5vcmc.>
http://public.kitware.com/mailman/listinfo/imstk-developers<redir.aspx?REF=s9Ve0F8F1WRAVWb_4wUjTq69kMytXHnHZuTRcmA-rh7h9xKKY_zTCAFodHRwOi8vcHVibGljLmtpdHdhcmUuY29tL21haWxtYW4vbGlzdGluZm8vaW1zdGstZGV2ZWxvcGVycw..>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/imstk-developers/attachments/20161024/1e9db157/attachment-0001.html>
More information about the Imstk-developers
mailing list