<div dir="ltr">ForceOpaqueOff is an odd call to make in that spot. If you want to force the actor to be opaque use ForceOpaqueOn() if you want to force it to be Transparent use ForceTransparentOn() Maybe you want to be using ForceTransparentOn() ?</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 5, 2017 at 9:08 PM, eclipse <span dir="ltr"><<a href="mailto:irocks0922@gmail.com" target="_blank">irocks0922@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><h2 class="m_8281226490640212820gmail-title" style="box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";line-height:1.1;color:rgb(46,46,46);margin:0px 0px 16px;font-size:2em;padding:0px;border-bottom:none"><br></h2><div>Sorry for cross posting.</div><div><br></div><div>I uploaded same post StackOverflow, vtk user mailing lis, vtk git issues but nobody made an answer for this.</div><div><br></div><div>please forgive me.</div><div><br></div><div><br></div><div class="m_8281226490640212820gmail-description" style="box-sizing:border-box;margin-top:6px;color:rgb(46,46,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px"><div class="m_8281226490640212820gmail-wiki m_8281226490640212820gmail-issue-realtime-trigger-pulse" style="box-sizing:border-box;word-wrap:break-word;opacity:1"><p dir="auto" style="box-sizing:border-box;margin:0px 0px 16px;text-align:initial">I am trying to add vtkfollower to vtkrenderer for indicating the chosen point.</p><p dir="auto" style="box-sizing:border-box;margin:0px 0px 16px;text-align:initial">textured vtkfollower is represented correctly, but in the renderer, if I look closer (camera comes closer to polydata) it's getting really slow(frame drop) and the boundary of image turned into black. I did not set the edge line or something might be related.</p><p dir="auto" style="box-sizing:border-box;margin:0px 0px 16px;text-align:initial">then, if I move camera far from model its rendering performance is going back to normal.</p><p dir="auto" style="box-sizing:border-box;margin:0px 0px 16px;text-align:initial">here is the code.</p><p dir="auto" style="box-sizing:border-box;margin:0px 0px 16px;text-align:initial">why is this situation happening? Did I something in a wrong way?</p><p dir="auto" style="box-sizing:border-box;margin:0px 0px 16px;text-align:initial">`m_SourceFromQrc = vtkSmartPointer::New();</p><pre class="m_8281226490640212820gmail-code m_8281226490640212820gmail-highlight m_8281226490640212820gmail-js-syntax-highlight m_8281226490640212820gmail-plaintext m_8281226490640212820gmail-white" lang="plaintext" style="box-sizing:border-box;overflow:auto;font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:13px;padding:9.5px;margin-top:0px;margin-bottom:16px;line-height:1.6em;word-break:break-all;word-wrap:break-word;border:1px solid rgb(229,229,229);border-radius:2px"><code style="box-sizing:border-box;font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:inherit;padding:0px;color:inherit;background-color:transparent;border-radius:0px;word-wrap:normal;margin-top:0px"><span id="m_8281226490640212820gmail-LC1" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box;margin-top:0px">        m_SourceFromQrc->SetQImage(&m_<wbr>qimageFromQrc);</span>
<span id="m_8281226490640212820gmail-LC2" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_SourceFromQrc->Update();</span>
<span id="m_8281226490640212820gmail-LC3" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box"></span>
<span id="m_8281226490640212820gmail-LC4" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_spVTKTexture = vtkSmartPointer<vtkTexture>::<wbr>New();</span>
<span id="m_8281226490640212820gmail-LC5" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box"></span>
<span id="m_8281226490640212820gmail-LC6" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_spVTKTexture-><wbr>SetInputConnection(m_<wbr>SourceFromQrc->GetOutputPort()<wbr>);</span>
<span id="m_8281226490640212820gmail-LC7" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_spVTKTexture->Update();</span>
<span id="m_8281226490640212820gmail-LC8" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box"></span>
<span id="m_8281226490640212820gmail-LC9" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_spVTKPlane = vtkSmartPointer<<wbr>vtkPlaneSource>::New();</span>
<span id="m_8281226490640212820gmail-LC10" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box"></span>
<span id="m_8281226490640212820gmail-LC11" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_spVTKPlane->SetNormal(0.0, 0.0, 1.0);</span>
<span id="m_8281226490640212820gmail-LC12" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box"></span>
<span id="m_8281226490640212820gmail-LC13" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box"></span>
<span id="m_8281226490640212820gmail-LC14" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_spVTKTextureMappedPlane = vtkSmartPointer<<wbr>vtkTextureMapToPlane>::New();</span>
<span id="m_8281226490640212820gmail-LC15" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box"></span>
<span id="m_8281226490640212820gmail-LC16" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_spVTKTextureMappedPlane-><wbr>SetInputConnection(m_<wbr>spVTKPlane->GetOutputPort());</span>
<span id="m_8281226490640212820gmail-LC17" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box"></span>
<span id="m_8281226490640212820gmail-LC18" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_planeDataMapper = vtkSmartPointer<<wbr>vtkOpenGLPolyDataMapper>::New(<wbr>);</span>
<span id="m_8281226490640212820gmail-LC19" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box"></span>
<span id="m_8281226490640212820gmail-LC20" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_planeDataMapper-><wbr>SetInputConnection(m_<wbr>spVTKTextureMappedPlane-><wbr>GetOutputPort());</span>
<span id="m_8281226490640212820gmail-LC21" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box"></span>
<span id="m_8281226490640212820gmail-LC22" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box"></span>
<span id="m_8281226490640212820gmail-LC23" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        double followerOriginPoint[3] = { 0.0 };</span>
<span id="m_8281226490640212820gmail-LC24" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        followerOriginPoint[1] = -1 / 2.0;</span>
<span id="m_8281226490640212820gmail-LC25" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box"></span>
<span id="m_8281226490640212820gmail-LC26" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_follower = vtkSmartPointer< vtkFollower>::New();</span>
<span id="m_8281226490640212820gmail-LC27" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_follower->SetOrigin(<wbr>followerOriginPoint); </span>
<span id="m_8281226490640212820gmail-LC28" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box"></span>
<span id="m_8281226490640212820gmail-LC29" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_follower->SetPosition(</span>
<span id="m_8281226490640212820gmail-LC30" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">            pos[0] - followerOriginPoint[0],</span>
<span id="m_8281226490640212820gmail-LC31" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">            pos[1] - followerOriginPoint[1],</span>
<span id="m_8281226490640212820gmail-LC32" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">            pos[2] - followerOriginPoint[2]);</span>
<span id="m_8281226490640212820gmail-LC33" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_follower->SetScale(6);</span>
<span id="m_8281226490640212820gmail-LC34" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_follower->SetMapper(m_<wbr>planeDataMapper);</span>
<span id="m_8281226490640212820gmail-LC35" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_follower->SetTexture(m_<wbr>spVTKTexture);</span>
<span id="m_8281226490640212820gmail-LC36" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box"></span>
<span id="m_8281226490640212820gmail-LC37" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_follower->SetCamera(<wbr>getRenderer(m_rendererType)-><wbr>GetActiveCamera());</span>
<span id="m_8281226490640212820gmail-LC38" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_follower->VisibilityOn();</span>
<span id="m_8281226490640212820gmail-LC39" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        m_follower->ForceOpaqueOff();</span>
<span id="m_8281226490640212820gmail-LC40" class="m_8281226490640212820gmail-line" lang="plaintext" style="box-sizing:border-box">        getRenderer(m_rendererType)-><wbr>AddActor(m_follower);`</span></code></pre><p dir="auto" style="box-sizing:border-box;margin:0px 0px 16px;text-align:initial">If I change this code <code style="box-sizing:border-box;font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:12.6px;padding:2px 4px;color:rgb(192,52,29);background-color:rgb(252,237,234);border-radius:3px;white-space:pre-wrap;word-wrap:normal;font-weight:inherit;margin-top:0px">m_follower->SetTexture(m_<wbr>spVTKTexture);</code></p><p dir="auto" style="box-sizing:border-box;margin:0px 0px 16px;text-align:initial">into <code style="box-sizing:border-box;font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:12.6px;padding:2px 4px;color:rgb(192,52,29);background-color:rgb(252,237,234);border-radius:3px;white-space:pre-wrap;word-wrap:normal;font-weight:inherit;margin-top:0px">m_follower->GetProperty()<wbr>->SetTexture(m_spVTKTexture);</code>,</p><p dir="auto" style="box-sizing:border-box;margin:0px 0px 16px;text-align:initial">Then, follower rendered properly without performance loss. but <code style="box-sizing:border-box;font-family:Menlo,"DejaVu Sans Mono","Liberation Mono",Consolas,"Ubuntu Mono","Courier New","andale mono","lucida console",monospace;font-size:12.6px;padding:2px 4px;color:rgb(192,52,29);background-color:rgb(252,237,234);border-radius:3px;white-space:pre-wrap;word-wrap:normal;font-weight:inherit;margin-top:0px">ForceOpaqueOff()</code>does not work.</p><p dir="auto" style="box-sizing:border-box;margin:0px 0px 16px;text-align:initial">I am using VTK 7.0.</p><p dir="auto" style="box-sizing:border-box;margin:0px;text-align:initial">And the renderer is vtkrenderer.</p></div></div></div>
<br>______________________________<wbr>_________________<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/<wbr>opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtk-<wbr>developers</a><br>
<br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Ken Martin PhD<div>Distinguished Engineer<br><span style="font-size:12.8px">Kitware Inc.</span><br></div><div>28 Corporate Drive<br>Clifton Park NY 12065<br><div><br></div><div><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication,
including all attachments, contains confidential and legally privileged
information, and it is intended only for the use of the addressee.  Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken in reliance on it is prohibited and may be
unlawful. If you received this communication in error please notify us
immediately and destroy the original message. 
Thank you.</span></div></div></div></div></div>
</div>