<div dir="ltr"><font face="arial, sans-serif"><span style="font-size:14px">Thank you very much!</span></font><div><font face="arial, sans-serif"><span style="font-size:14px"><br></span></font></div><div><font face="arial, sans-serif"><span style="font-size:14px">Is there similar function like computing normals for contour in piston?</span></font></div>
<div><font face="arial, sans-serif"><span style="font-size:14px"><br></span></font></div><div><font face="arial, sans-serif"><span style="font-size:14px">Thanks again!</span></font></div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">2013/12/4 Biddiscombe, John A. <span dir="ltr"><<a href="mailto:biddisco@cscs.ch" target="_blank">biddisco@cscs.ch</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Just noticed a mistake in my text after clicking send ...<br>
<br>
Erratum : "Decided on Depth Sorting" - instead of depth peeling.<br>
<div class="im HOEnZb"><br>
> -----Original Message-----<br>
> From: Biddiscombe, John A.<br>
> Sent: 04 December 2013 13:35<br>
> To: Biddiscombe, John A.; David E DeMarle; Enya Shen<br>
> Cc: vtkdev; <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
</div><div class="HOEnZb"><div class="h5">> Subject: RE: [vtkusers] [vtk-developers] How to use color mapping for<br>
> vtkPistonMapper?<br>
><br>
> <a href="https://hpcforge.org/scm/browser.php?group_id=117" target="_blank">https://hpcforge.org/scm/browser.php?group_id=117</a><br>
> is a project called pv-zoltan<br>
><br>
> I needed to do transparent rendering of neuron circuits which are very large<br>
> and complex, depth peeling is one option, but for some of these circuits I had<br>
> to use a machine with no graphics capabilities, so I wanted a software render<br>
> option and decided on depth peeling. see<br>
> <a href="ftp://ftp.cscs.ch/out/biddisco/bbp/videos/5k-voltage-differentials.avi" target="_blank">ftp://ftp.cscs.ch/out/biddisco/bbp/videos/5k-voltage-differentials.avi</a> skip to<br>
> about 45 seconds in for an example of the data that is interesting - it's just<br>
> under 1 billion triangles, rendered in parallel. Some of the scenes are very<br>
> complex, so for depth peeling, you really need hundreds of layers to be sure<br>
> it's perfect (though nobody would be able to tell the difference).<br>
><br>
> What is pv-zoltan : it's a set of classes to allow parallel mesh redistribution<br>
> using the zoltan library from trilinos. Once the mesh is partitioned, I then<br>
> depth sort the triangles and render in parallel with sort last compositing.<br>
> 1) There is a custom depth sort class in the code which generates a depth<br>
> sorted ID list and attaches it to the dataset, then a custom<br>
> vtkPolyDataMapper/Painter which renders using the sorted order (this<br>
> differs from the vtkDepthSortPolyData in vtk which actually sorts the<br>
> polygons (and all cell/point arrays) and effectively doubles the memory use,<br>
> then renders with the normal polydatamapper/painter). By generating an Id<br>
> ordering and then painting in that order, we only add 1 int per cell.<br>
> 2) mesh partitioning with zoltan - and some enhancements to the rendering<br>
> front end to bypass the default compositing in paraview and use the KdTree<br>
> from zoltan to do the ordered compositing.<br>
> 3) Once that was working, I wanted to try to do the depth sort on the GPU,<br>
> so I looked at piston and found it to be very easy to modify to suit my needs.<br>
> I have changed the vtkDataSetToPiston class and the vtkPistonMapper<br>
> slightly (and the code will only work with triangle based geometry unless you<br>
> uncomment the triangulation routine somewhere). When the PISTON code<br>
> is enabled, the CPU depth sort is disabled (point 1 above) and instead push<br>
> the dataset to GPU, do depth sort on the fly (some thrust code thrown in<br>
> using thrust::sort_by_key<> and a distance functor) and render in one pass<br>
> effectively. (two loops, but only one render pass).<br>
> 4) There is some code in the colorGPU branch which activates the colour<br>
> table lookup and generation on the GPU as well, but I didn't get time to look<br>
> at it this morning to remind myself of what happens where and when. I seem<br>
> to recall I have a small bug in there which makes the table get regenerated<br>
> more often than it needs to. And possibly more CPU-GPU traffic than strictly<br>
> necessary, but nothing serious.<br>
> 5) Because the transparent rendering uses per vertex opacity - instead of<br>
> using a scalars to colours, we use a new two scalars to colours (originally<br>
> written for the point sprite renderer), this takes one array for scalars and one<br>
> for opacity, so the lookup stuff is a bit more versatile than the standard.<br>
> 6) Everything is handled (rather smoothly I think, even if I do say so myself)<br>
> by the DepthSortRepreseantation which connects everything together. It<br>
> just needs a couple of small fixes for paraview to get working, but most of it<br>
> should compile ok and work - except for the ordered compositing which<br>
> requires some extra info passed via the vtkBoundsExtentTranslator in the<br>
> plugin which holds the region assignments generated by Zoltan and is used to<br>
> send the KdTree to the compositing code in the front end.<br>
><br>
> .... currently my depth sort branch is out of date/order, so I won't paste a<br>
> paraview patch. You'd need to just comment out a couple of lines of the<br>
> plugin code. I'd suggest looking at the piston stuff and having a play with it. I<br>
> can't remember if I added an option to disable the depth sort and only do the<br>
> render on the GPU, the interesting part is where the cuda array handles are<br>
> passed from the dataset after sorting etc and given to OpenGL for rendering,<br>
> most of the piston code itself is irrelevant and it's only the push to gpu and<br>
> pass of handles to GL that is interesting. Many thanks to the original Piston<br>
> developers for showing how to do it.<br>
><br>
> NB. running on a single process ought to work, but there may be a gotcha I've<br>
> forgotten about. when I have a few hours spare I'll apply my patches to my<br>
> current paraview tree and see if everything is still working ok and post an<br>
> update.<br>
><br>
> JB<br>
><br>
><br>
> > -----Original Message-----<br>
> > From: <a href="mailto:vtkusers-bounces@vtk.org">vtkusers-bounces@vtk.org</a> [mailto:<a href="mailto:vtkusers-bounces@vtk.org">vtkusers-bounces@vtk.org</a>] On<br>
> > Behalf Of Biddiscombe, John A.<br>
> > Sent: 03 December 2013 15:44<br>
> > To: David E DeMarle; Enya Shen<br>
> > Cc: vtkdev; <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
> > Subject: Re: [vtkusers] [vtk-developers] How to use color mapping for<br>
> > vtkPistonMapper?<br>
> ><br>
> > Yes. I've enhanced the piston mapper and done the lookuptable on the<br>
> GPU.<br>
> > I'm stuck in a terminally dull meeting right now, but once I escape,<br>
> > I'll brush off the code and post a link.<br>
> ><br>
> > JB<br>
> ><br>
> > From: David DeMarle<br>
> > <<a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a><mailto:<a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a>>><br>
> > Date: Tuesday 3 December 2013 14:47<br>
> > To: Enya Shen<br>
> > <<a href="mailto:enya.shen2010@gmail.com">enya.shen2010@gmail.com</a><mailto:<a href="mailto:enya.shen2010@gmail.com">enya.shen2010@gmail.com</a>>><br>
> > Cc: VTK Developers <<a href="mailto:vtk-developers@vtk.org">vtk-developers@vtk.org</a><mailto:<a href="mailto:vtk-">vtk-</a><br>
> > <a href="mailto:developers@vtk.org">developers@vtk.org</a>>>, "<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><mailto:<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>>"<br>
> > <<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><mailto:<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>>><br>
> > Subject: Re: [vtk-developers] How to use color mapping for<br>
> > vtkPistonMapper?<br>
> ><br>
> > Unfortunately I ran out of time and didn't get around to moving VTK's<br>
> > lookup table over when I originally implemented that class. So, the<br>
> > randow color map you see now is the only option when doing direct GPU<br>
> > to GPU rendering. Unless you hack the class yourself to make the<br>
> > transfer function configurable of course.<br>
> ><br>
> > If anyone out there has an updated implementation (ahem John B.)<br>
> > please direct us to it and we can see about folding your improvements in.<br>
> ><br>
> > thanks<br>
> ><br>
> ><br>
> > David E DeMarle<br>
> > Kitware, Inc.<br>
> > R&D Engineer<br>
> > 21 Corporate Drive<br>
> > Clifton Park, NY 12065-8662<br>
> > Phone: 518-881-4909<br>
> ><br>
> ><br>
> > On Tue, Dec 3, 2013 at 12:24 AM, Enya Shen<br>
> > <<a href="mailto:enya.shen2010@gmail.com">enya.shen2010@gmail.com</a><mailto:<a href="mailto:enya.shen2010@gmail.com">enya.shen2010@gmail.com</a>>> wrote:<br>
> > Dear all,<br>
> ><br>
> > I try to use vtkPistonMapper, but when I set the color with<br>
> > setColor(double[3]), I got nothing changed.<br>
> ><br>
> > Thanks for any example or advice!<br>
> ><br>
> > Regards,<br>
> > Enya<br>
> ><br>
> > _______________________________________________<br>
> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a>><br>
> ><br>
> > Visit other Kitware open-source projects at<br>
> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
> ><br>
> > Follow this link to subscribe/unsubscribe:<br>
> > <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
> ><br>
> > Visit other Kitware open-source projects at<br>
> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
> ><br>
> > Please keep messages on-topic and check the VTK FAQ at:<br>
> > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
> ><br>
> > Follow this link to subscribe/unsubscribe:<br>
> > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div>