[vtkusers] Projected shadow rendering in a vtkRenderWindow

Remi Charrier remi.charrier at gmail.com
Tue Jun 28 10:53:52 EDT 2016


Thanks, the test with the dragon works well. I will investigate more in
details my code and the reasons why I have strange shadows before coming
back with other questions.
Thanks for the support!

2016-06-28 16:41 GMT+02:00 Ken Martin <ken.martin at kitware.com>:

> Replace the dragon with whatever you want to render or download it and
> change the code to point to where you put it.
>
> http://www.cc.gatech.edu/projects/large_models/dragon.html
>
> You can remove the RegressionTest code, it is just there to support our
> regression tests.
>
>
>
> On Tue, Jun 28, 2016 at 10:28 AM, Remi Charrier <remi.charrier at gmail.com>
> wrote:
>
>> Thanks for the information,
>>
>> As you probably guessed I was not looking in the proper folder for the
>> OpenGL2 backend that I configured.
>>
>> I managed to get something, almost working (I have strange shadows in
>> addition to the normal shadow) by changing this example. As I would like to
>> understand what is wrong, I then started to try to get the
>> TestShadowMapPass.cxx  working as it is.
>>
>> I have 2 problems:
>>  -  #include "vtkRegressionTestImage.h"
>> "Cannot open include file: 'vtkRegressionTestImage.h' "
>> I believe I did not include or generate the vtk module that contains it
>> (but I do not manage to know which one it could be). It seems it is not
>> useful for the core of this feature, but I would like to get everything
>> working before going further...
>>
>> - the code is mentioning a 3D object: dragon.ply . On my computer I only
>> have the dragon.ply.md5 . What should I do? Use another software to
>> transform the .md5 into a .ply, or something else?
>>
>> Finally, as you mentioned, this shadow rendering seems to not be
>> compatible with the stereo technique implemented in the vtkRenderWindow or
>> at least no directly...
>>
>> Thanks!
>> Rémi
>>
>>
>>
>>
>>
>>
>>
>> 2016-06-27 21:43 GMT+02:00 Ken Martin <ken.martin at kitware.com>:
>>
>>> For both the old and new OpenGL backends there are tests built into VTK
>>> using shadows. See
>>>
>>> VTK/Rendering/OpenGL2/Testing/Cxx/TestShadowMapPass.cxx or if building
>>> the old backend
>>> VTK/Rendering/OpenGL/Testing/Cxx/TestShadowMapPass.cxx.  I have do not
>>> know if those will work in conjunction with the stereo technique you are
>>> using but those examples should give you some ideas.
>>>
>>> Thanks
>>> Ken
>>>
>>>
>>>
>>> On Mon, Jun 27, 2016 at 3:22 AM, Remi Charrier <remi.charrier at gmail.com>
>>> wrote:
>>>
>>>> Dear vtk users community,
>>>>
>>>> I started 3 weeks ago a new project with vtk, I just register to this
>>>> mailing list to get answers to some of my questions. Let me know if I am
>>>> doing anything wrong in the use of this mailing list.
>>>>
>>>> My development environment is :
>>>> - Visual Studio 2013
>>>> - vtk7.0
>>>> - qt5.7
>>>> My computer has a NVidia TITAN X graphic card.
>>>>
>>>> Here is my problem:
>>>> - I managed to create a vtkRenderWindow that allows me to display
>>>> different 3D meshes
>>>> - I am using Stereo Rendering (Anaglyph mode)
>>>> - I would like to project the shadows of my different elements on the
>>>> others elements.
>>>>
>>>> To do so I tried many different things, but did not manage to find
>>>> anything that seems to work.
>>>> Here are what I tried:
>>>> - vtkEDLshading - I got it running but it does not do what I expected
>>>> and no projected shadows appear
>>>> - vtkShadowMapBakerPass (as described in
>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Shadows) but I
>>>> have compilation errors on vtkShadowMapBakerPass::OCCLUDER(), it seems
>>>> this class has change or I missed something: "error C2039: 'OCCLUDER'
>>>> : is not a member of 'vtkShadowMapBakerPass'"
>>>> - Then I tried to only use basic functions associated to the renderer
>>>> or the actors: m_Renderer->UseShadowsOn();
>>>> m_cylTipActor->GetProperty()->ShadingOn(); But once again no visible
>>>> result...
>>>>
>>>> If someone can tell me where the correct information to display
>>>> projected shadows with VTK 7.0 can be found, I can then investigate and
>>>> come back to you with my code if I am still having problems.
>>>>
>>>> Thanks in advance,
>>>> Rémi (glad to come back to vtk after an 8 years break)
>>>>
>>>>
>>>>
>>>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Garanti
>>>> sans virus. www.avast.com
>>>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
>>>> <#m_-2091360125698783353_m_-3067287779711849497_m_2849201775683376845_m_8386774261481987078_DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>>>
>>>> _______________________________________________
>>>> 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.
>>>
>>
>>
>
>
> --
> 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/20160628/9d54763f/attachment-0001.html>


More information about the vtkusers mailing list