<div dir="ltr"><div dir="ltr">You could probably do what you want by drawing points using a custom shader to create different shapes. <div>Something like this: <a href="https://stackoverflow.com/questions/27098315/render-large-circular-points-in-modern-opengl">https://stackoverflow.com/questions/27098315/render-large-circular-points-in-modern-opengl</a><br><div>I'm not sure how to do this in VTK, however.</div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 14, 2018 at 12:08 PM Andrey Ivanov <<a href="mailto:andrei.ivanov@phystech.edu">andrei.ivanov@phystech.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>I forgot to mention that I am already working with orthogonal projection. The problem is not with preserving shapes and avoiding perspective deformations. I would like to fix screen size of objects, so when I increase height and width of camera frustum they will occupy the same number of pixels.</div><div><br></div><div><div><div dir="ltr" class="gmail-m_-4132038516475526261gmail_signature"><div dir="ltr"><div>Best regards,</div><div>Andrey Ivanov</div></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, 14 Dec 2018 at 19:41, David E DeMarle <<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Will turning off perspective do what you want?<div><a href="https://www.vtk.org/doc/nightly/html/classvtkCamera.html#a5b0e647798e7f45d358d8039ff41b378" target="_blank">https://www.vtk.org/doc/nightly/html/classvtkCamera.html#a5b0e647798e7f45d358d8039ff41b378</a><br></div><div>void vtkCamera::SetParallelProjection(<a class="gmail-m_-4132038516475526261gmail-m_6536220136712806764el" href="https://www.vtk.org/doc/nightly/html/vtkABI_8h.html#a663dee2c85b2a185fb34cb877d5208da" style="color:rgb(70,101,162);font-weight:bold" target="_blank">vtkTypeBool</a> flag)</div><div><br clear="all"><div><div dir="ltr" class="gmail-m_-4132038516475526261gmail-m_6536220136712806764gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>David E DeMarle<br>Kitware, Inc.<br>Principal Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909</div></div></div></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 14, 2018 at 10:55 AM Andrey Ivanov <<a href="mailto:andrei.ivanov@phystech.edu" target="_blank">andrei.ivanov@phystech.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hello!<br></div><div><br></div><div>I am trying to draw a lot of objects with the same shape for CAD system. Let it be stars or circles for example.<br>The number of such circles can be about 1000-10000.<br>I would like to *preserve their size* when moving the camera, scaling frustrum and changing distance to objects.<br><br>For now I found two approaches:<br><br>1. Use vtkDistanceToCamera<br>An example from <a href="https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/DistanceToCamera/" target="_blank">https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/DistanceToCamera/</a> is great <br>for low number of objects, however when their numer grows, the interface starts to freeze due to<br>rescaling of shapes on each interaction with camera.<br><br>2. Use points (squares with width equal to 4 pixels).<br>It works fast and points size is fixed, but I would like to have more complex shapes, like triangles and circles.<br><br><br>Is there another approach to solve this problem? It seems that with pure OpenGL this can be implemented rather efficiently,<br>so I am looking for a way to do it in VTK.<br></div><div><br></div><div><div dir="ltr" class="gmail-m_-4132038516475526261gmail-m_6536220136712806764gmail-m_-3993874957324511460gmail_signature"><div dir="ltr"><div>Best regards,</div><div>Andrey Ivanov</div></div></div></div></div></div>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div>
</blockquote></div>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div>