[vtkusers] EDL on VTK7

Ken Martin ken.martin at kitware.com
Tue Feb 23 14:52:29 EST 2016


The TestEDLPass example renders all the passes with EDL. I think the
solution for you is to change up the render passes.  Specifically something
like

camerapass
   {
   - sequence pass
      {
      - EDLPass
         {
         - sequence pass
            {
            - camera pass
            - lights pass
            - opaque pass
            - translucent pass (if needed)
            }
         }
      - OverlayPass
      }
   }

Each indent is a delegate of the pass above it. That way the geometry is
still has EDL applied to it, but the 2D overlay would not.  We probably
could use a class to help put this all together as these types of
putting-passes-together can be a bit lengthy in code.

Ken






On Tue, Feb 23, 2016 at 2:18 PM, rich <richuitnl at gmail.com> wrote:

> Hi All,
> I have upgraded VTK 6.1 to VTK 7/OpengL2, my app draws a basic point cloud.
> Iam using a  vtkSliderWidget/ vtkSliderRepresentation2D* to change the
> point
> size interactively. This works ok, both on 6 and 7. Now I was playing with
> the vtkEDLShading and this works fine as long as I hide the Slider. As soon
> as I show the slider it crashes in vtkEDLShading.cxx around line 400.
>
>  double bb[6];
>   vtkMath::UninitializeBounds(bb);
>   for(int i=0; i<s.GetPropArrayCount(); i++)
>   {
>   double* bounds = s.GetPropArray()[i]->GetBounds();   <<<========= HERE
>   if(i==0)
>   {
> .....
>
>
> So what happens is that the SliderRepresentation shows up as a prop(? sorry
> for the noob language) here but this has no bounds, so it crashes on the
> nullptr. So I tried to call
> SetUseBounds(false) but this did not matter, still crashes.
>
> So then I recompiled the vtkEDLShading.cxx to:
>
>  // FIX for crash on Slider Widgets
>   int nBBCount = 0;
>   for (int i = 0; i < s.GetPropArrayCount(); i++)
>   {
>           if (s.GetPropArray()[i]->GetUseBounds())
>           {
>                   double* bounds = s.GetPropArray()[i]->GetBounds();
>
>                   if (bounds != 0)
>                   {
>                           if (nBBCount == 0)
>                           {
>                                   bb[0] = bounds[0];
>                                   bb[1] = bounds[1];
>                                   bb[2] = bounds[2];
>                                   bb[3] = bounds[3];
>                                   bb[4] = bounds[4];
>                                   bb[5] = bounds[5];
>                           }
>                           else
>                           {
>                                   bb[0] = (bb[0] < bounds[0] ? bb[0] :
> bounds[0]);
>                                   bb[1] = (bb[1] > bounds[1] ? bb[1] :
> bounds[1]);
>                                   bb[2] = (bb[2] < bounds[2] ? bb[2] :
> bounds[2]);
>                                   bb[3] = (bb[3] > bounds[3] ? bb[3] :
> bounds[3]);
>                                   bb[4] = (bb[4] < bounds[4] ? bb[4] :
> bounds[4]);
>                                   bb[5] = (bb[5] > bounds[5] ? bb[5] :
> bounds[5]);
>                           }
>
>                           nBBCount++;
>                   }
>           }
>   }
>
> And this fixed the crash but now the slider widget is also EDL shaded.
> Is there something I overlooked?
>
> thanks,
> RIch.
>
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/EDL-on-VTK7-tp5736766.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>



-- 
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160223/82f199f5/attachment.html>


More information about the vtkusers mailing list