[vtkusers] Shadows with VTK 8.0

Yeshwanth, Chandan chandan.yeshwanth at siemens.com
Fri Nov 17 00:47:19 EST 2017


Sorry, I was looking for the examples in the wrong directory (OpenGL). I tried out the example in the OpenGL2 directory and most of the API works in Python, except line 94 (https://github.com/Kitware/VTK/blob/master/Rendering/OpenGL2/Testing/Cxx/TestShadowMapBakerPass.cxx) –

·        vtkTextureObject *to = (*bakerPass->GetShadowMaps())[2];
The error in Python is “AttributeError: 'vtkRenderingOpenGL2Python.vtkShadowMapBakerPass' object has no attribute 'GetShadowMaps'”. I couldn’t find an alternative to this yet.

If comment out this code and run it, the second renderWindow.Render() call causes a segmentation fault with this error –

·        Warning: In /home/user1/VTK-8.0.1/Common/ExecutionModel/vtkAlgorithm.cxx, line 1422

·        vtkOpenGLTexture (0x5555ba473d10): Attempt to get connection index 0 for input port 0, which has 0 connections.

·        Segmentation fault (core dumped)

Please let me know if you have any advice for this. Meanwhile I will try out the other example - TestShadowMapPass.cxx.

Regards,
Chandan

From: Yeshwanth, Chandan (CT RDA BAM ADM-IN)
Sent: Friday, November 17, 2017 9:45 AM
To: 'Ken Martin'; Chiranjib Sur
Cc: vtkusers at vtk.org; Chennamsetty, Sai Saketh (CT RDA BAM ADM-IN)
Subject: RE: [vtkusers] Shadows with VTK 8.0

Thanks Ken, Chiranjib. I tried out the example you mentioned in Rendering/OpenGL2/Testing/Cxx.

It looks like the API has changed in a few places –

·       vtkShadowMapBakerPass.SetOpaquePass is now SetOpaqueSequence

I couldn’t resolve these API errors, which seem to be essential to rendering shadows -

·       vtkShadowMapBakerPass has no member named SetPolygonOffsetFactor

·       vtkShadowMapBakerPass has no member named SetPolygonOffsetUnits

·       ‘OCCLUDER’ is not a member of ‘vtkShadowMapBakerPass’

·       ‘RECEIVER’ is not a member of ‘vtkShadowMapBakerPass’

I searched for the new API in the “API Changes” sections that Chiranjib mentioned as well as in the VTK source code itself, but I couldn’t find the new function calls to be used.
Can you please help me out with this?

Regards,
Chandan

From: Ken Martin [mailto:ken.martin at kitware.com]
Sent: Thursday, November 16, 2017 7:24 PM
To: Chiranjib Sur
Cc: Yeshwanth, Chandan (CT RDA BAM ADM-IN); vtkusers at vtk.org<mailto:vtkusers at vtk.org>; Chennamsetty, Sai Saketh (CT RDA BAM ADM-IN)
Subject: Re: [vtkusers] Shadows with VTK 8.0

There is also a test of shadows in Rendering/OpenGL2/Testing/Cxx that you can look at - Ken

On Thu, Nov 16, 2017 at 4:40 AM, Chiranjib Sur <sur.chiranjib at gmail.com<mailto:sur.chiranjib at gmail.com>> wrote:
This wiki link gives you the details of the API changes in VTK development : https://www.vtk.org/Wiki/VTK/Roadmap

Hope that helps


Thanks and regards,
Chiranjib

On Thu, Nov 16, 2017 at 3:00 PM, Yeshwanth, Chandan <chandan.yeshwanth at siemens.com<mailto:chandan.yeshwanth at siemens.com>> wrote:
Hi,

Can anyone help me implement shadow mapping with VTK 8.0?
The existing example here - https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/Shadows/ gives this error –
AttributeError: 'vtkRenderingOpenGL2Python.vtkShadowMapBakerPass' object has no attribute 'SetOpaquePass'

Has the API changed from 5.10 to 8? A minimum working example of shadows in VTK 8 or a summary of the API changes will be great!

Thanks,
Chandan

_______________________________________________
Powered by www.kitware.com<http://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


_______________________________________________
Powered by www.kitware.com<http://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
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

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/20171117/227fdddc/attachment.html>


More information about the vtkusers mailing list