[vtkusers] volume rendering of unstructured points
Lubos Brieda
lbrieda at yahoo.com
Sat Mar 26 10:56:53 EDT 2011
Heh,
I was able to figure it out in the meant time. All that was needed is to use
SetOpacity under the actors Property. Results look really neat!
VTK_CREATE(vtkUnstructuredGridReader,reader);
reader->SetFileName("part_ele.vtk");
VTK_CREATE(vtkVertexGlyphFilter, filter);
filter->SetInputConnection(reader->GetOutputPort());
filter->Update();
//Create a mapper and actor
VTK_CREATE(vtkPolyDataMapper, mapper);
mapper->SetInputConnection(filter->GetOutputPort());
actor = vtkActor::New();
actor->SetMapper(mapper);
actor->GetProperty()->SetPointSize(3);
actor->GetProperty()->SetOpacity(0.3);
-- Lubos Brieda --
Slovak recipes: www.slovakcooking.com
________________________________
From: Lubos Brieda <lbrieda at yahoo.com>
To: vtkusers at vtk.org
Sent: Sat, March 26, 2011 9:50:40 AM
Subject: [vtkusers] volume rendering of unstructured points
Hi everyone,
I would like to visualize a large number of particles in a manner similar to the
"CUDA Smoke Particles" demo (http://www.youtube.com/watch?v=4uoVRs_zLn8). First
I thought this will be quite straightforward using the volume render (similar to
the ironProt.vtk example). However, it appears than in order to use a volume
renderer, my data needs to be an image map - which implies structured grid. My
data is a large number of (x,y,z) coordinates.
Question for you, what is the best approach? I can use VertexGlyphFilter
(http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/vtkVertexGlyphFilter) to
plot the individual points, but what I really need is for each point to be a
semi-translucent filter so that in regions with many points the cloud appears
darker.
Thanks for all your help!
-- Lubos Brieda --
Slovak recipes: www.slovakcooking.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110326/b9f4d2d1/attachment.htm>
More information about the vtkusers
mailing list