<div class="gmail_quote">On Thu, Jan 26, 2012 at 10:56 AM, Bhanu Hariharan <span dir="ltr"><<a href="mailto:bhanu@petrotel.com">bhanu@petrotel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks David. I have a few more questions in this regard before I make changes to my approach.<br><br>1. How do I tell if my graphics card supports Depth peeling. Would Depth Peeling render it blueish green?<br><br></blockquote>
<div><br></div><div>I _think_ it spits out a warning if it can't find the extensions it needs. And yes depth peeling should render it correctly.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. I tried vtkDepthSortPolyData but it needs vtkPolyData as input. I was wondering if VtkUnstructuredGrid can be used for vtkDepthSortPolyData or is there any other equivalent of vtkDepthSortPolyData for VtkUnstructuredGrid that would render according to depth correctly.<br>
<br></blockquote><div><br></div><div>Nothing direct.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>3. If I replaced all my code and do Volume rendering, do I still need to use vtkDepthSortPolyData?<br>
<br></blockquote><div><br></div><div>No</div><div>. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">4. I found VtkUnstructuredGrid to be slow in rendering for large datasets thats why I was rendering only the outer surfaces.<br>
Is volume rendering better than VtkUnstructuredGrid for rendering in terms of speed.<br></blockquote><div><br></div><div>Yes.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Are there any C++ examples for Volume rendering that will help me get started.<br><br></blockquote><div><br></div><div>Most likely, try the vtk examples wiki.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I really appreciate you taking the time to answer my questions.<br>
<br>Thanks for your help.<div class="HOEnZb"><div class="h5"><br>Bhanu<br><br><br><br><br><br><div class="gmail_quote">On Wed, Jan 25, 2012 at 5:26 PM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><div class="gmail_quote"><div>On Wed, Jan 25, 2012 at 5:52 PM, Bhanu Hariharan <span dir="ltr"><<a href="mailto:bhanu@petrotel.com" target="_blank">bhanu@petrotel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
David, Thanks for replying.<br><br>When I flip, I see blue AGAIN. Is that what you expect with the external surface rendering logic you explained?<br><br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What is not clear is even if there are 2 surfaces, shouldnt I be seeing a blend of blue and green?<br>
And shouldnt it be same whether I see from top or flipped?<span><font color="#888888"><br><br></font></span></blockquote><div><br></div></div><div>That is what I was trying to figure out. I suspect you see only blue because those are the first polygons rendered in the object. Correctly rendering translucent geometry is order dependent and VTK doesn't do depth sorting automatically (since it takes time). Try enabling depth peeling. If your graphics card doesn't support depth peeling use vtkDepthSortPolyData. You should then see a blueish green object and that should be bluer or greener depending on what is nearer. However you still won't see anything on the inside.</div>
<div><div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><font color="#888888">Bhanu</font></span><div><div><br><br>
<br><div class="gmail_quote">On Wed, Jan 25, 2012 at 4:26 PM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When you flip the object around, do you see only green?<div><br></div><div>In any case, the typical mapper people use for surface rendering, vtkDataSetMapper, extracts the external surfaces. With that there is no possibility to see the inner cells even with opacity.</div>
<div><br></div><div>You could instead send the data through something like the shrink filter, to break up the object so that all cells are unconnected and thus external. Surface rendering with opacity then might to what you want.</div>
<div><br></div><div>However, it is much better to use volume rendering. That will be much faster and consume less memory.<span><font color="#888888"><br clear="all"><br></font></span></div><div><span><font color="#888888">David E DeMarle<br>
Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>Phone: <a href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909</a></font></span><div><div><br>
<br><br><div class="gmail_quote">On Wed, Jan 25, 2012 at 4:58 PM, bhanu <span dir="ltr"><<a href="mailto:bhanu@petrotel.com" target="_blank">bhanu@petrotel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I am using VtkUnstructuredGrid to render a simple volume wherein each grid<br>
cell in the 3dvolume has 8 world coordinates. Each grid cell has a color<br>
associated with it and I am using a vtkLookUpTable for this. When I use<br>
SetOpacity(1) and see the top view, I expect to see the top layer alone<br>
since I have set an opacity of 1.0. And that works fine.<br>
Now When the opacity is changed to anything less than 1 (even 0.99), it<br>
seems the top layer vanishes and all I see from the top is the bottom most<br>
layer.<br>
For example, if top most layer is green and the bottom most layer is blue<br>
(with inbetween layers shades of lighter green), with opacity less than 1, I<br>
see all blue from the top. I was expecting mixed colors( green and blue).<br>
What am I missing.<br>
<br>
How do you see a transparent grid using VtkUnstructuredGrid and Opacity<br>
property. Should I not be using Scalar Opacity for such a problem. Is this<br>
where one uses Gradient Opacity.<br>
Can anyone please paste some code to direct me here.<br>
<br>
Thanks,<br>
<span><font color="#888888">Bhanu<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/VtkUnstructuredGrid-SetOpacity-tp5431453p5431453.html" target="_blank">http://vtk.1045678.n5.nabble.com/VtkUnstructuredGrid-SetOpacity-tp5431453p5431453.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<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 <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: <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>
</font></span></blockquote></div><br></div></div></div>
</blockquote></div><br>
</div></div></blockquote></div></div></div><br>
</blockquote></div><br>
</div></div></blockquote></div><br>