[Paraview] GLSL shaders and Paraview

Thomas Félix Thomas.Felix at inrialpes.fr
Wed Dec 19 05:19:48 EST 2007


Thanks for the answer.

In fact I'm working directly with the c++ sources of Paraview, so I try 
to implement shaders using and creating new c++ classes/custom 
filters... I now understand the fact that a vtkProperty can't be 
directly accessed by a custom filter, but I'm pretty sure there's a way 
to access actors present in the scene, in order to set the shader I 
want... (I have already seen it working, but using a dirty trick in the 
paraview code, and I would like to implement it as part of a plugin or 
new functionality). Maybe creating a specific display panel with a 
"shader" property exposed to users...



Moreland, Kenneth a écrit :
> I'm not sure if you really mean a custom filter (which is simply a collection of filters that behaves like a single filter) or a programmable filter (which is a filter that executes a python script to manipulate the data), but either way you cannot access vtkProperty.  In ParaView, just as in VTK, a filter does not have direct access to vtkProperty or any other rendering parameters.
>
> A lookmark may be closer to what you want.  Lookmarks save a subset of the state relating to some section of the pipeline, including rendering parameters stored in vtkProperty.  However, this still doesn't get you to what you want to do, because ParaView 3 does not expose shader functionality.
>
> In the move from ParaView 2 to ParaView 3, we lost the ability to add shaders to objects because (1) this feature is a low priority for most users and (2) the implementation did not seem to cover many of the use cases interested users had.
>
> Unfortunately, I can think of no easy way to enable shaders in ParaView 3.  You would either have to add the functionality to the ParaView code or create a plugin that defined a new view that supported shaders.
>
> -Ken
>
>   
>> -----Original Message-----
>> From: paraview-bounces+kmorel=sandia.gov at paraview.org [mailto:paraview-
>> bounces+kmorel=sandia.gov at paraview.org] On Behalf Of Thomas Félix
>> Sent: Tuesday, December 18, 2007 9:06 AM
>> To: paraview at paraview.org
>> Subject: Re: [Paraview] GLSL shaders and Paraview
>>
>> Yes you're right Ken, I apologize for my lack of precision. In fact I'm
>> new with Paraview so I'm exploring different approches for the moment...
>> I want to access the vtkProperty (or vtkActor) as part of a custom
>> filter, because I need to compute things using a shader, but I also have
>> to integrate functions in the classic filter way... (as part of the
>> RequestData method for example). I think directly using the vtkProperty
>> is a good (easy?) way to use shaders in paraview but maybe I'm totally
>> wrong... So if someone can at least guide me in my futur investigations,
>> it should be great.
>>
>> Thanks.
>>
>> ----------------------------
>> Thomas Felix
>> Inria Rhone-Alpes
>> EVASION team
>> ----------------------------
>>
>> Moreland, Kenneth a écrit :
>>     
>>> So far you have been pretty vague about what mechanism you are trying to
>>>       
>> accomplish.  How are you trying to access the vtkProperty?  With python
>> scripting?  In a plugin?  In a custom client?  As part of the custom
>> filter?
>>     
>>> -Ken
>>>
>>>
>>>       
>>>> -----Original Message-----
>>>> From: paraview-bounces+kmorel=sandia.gov at paraview.org [mailto:paraview-
>>>> bounces+kmorel=sandia.gov at paraview.org] On Behalf Of Thomas Félix
>>>> Sent: Tuesday, December 18, 2007 7:54 AM
>>>> To: paraview at paraview.org
>>>> Subject: Re: [Paraview] GLSL shaders and Paraview
>>>>
>>>> As my questions are not very popular, I have at least one thing to ask
>>>> on this topic...
>>>> When I create a new custom filter and use it on an object, can I access
>>>> to the actor which depends on it ?
>>>>
>>>> every answers will be helpfull...
>>>>
>>>> /Thomas Felix
>>>> Inria Rhone-Alpes
>>>> EVASION team/
>>>>
>>>>
>>>> Thomas Félix a écrit :
>>>>
>>>>         
>>>>> Hello,
>>>>>
>>>>> To put it more clearly, I just want to know how to access to the
>>>>> properties (vtkProperty) of an object created in paraview...
>>>>>
>>>>> thanks
>>>>>
>>>>> Thomas Félix a écrit :
>>>>>
>>>>>           
>>>>>> Hello Everyone,
>>>>>>
>>>>>> I want to create custom filters for Paraview using GLSL shaders. I
>>>>>> have written vtk samples that work (thanks to the vtkProperty class
>>>>>> and its LoadMaterial method) but I really don't know how to plug this
>>>>>> in a paraview filter... How can I access to the property of an object
>>>>>> ?  Do I  really have to write a filter in such a situation ?
>>>>>>
>>>>>> Thanks for your answers...
>>>>>>
>>>>>> _______________________________________________
>>>>>> ParaView mailing list
>>>>>> ParaView at paraview.org
>>>>>> http://www.paraview.org/mailman/listinfo/paraview
>>>>>>
>>>>>>
>>>>>>             
>>>>> _______________________________________________
>>>>> ParaView mailing list
>>>>> ParaView at paraview.org
>>>>> http://www.paraview.org/mailman/listinfo/paraview
>>>>>
>>>>>
>>>>>           
>>>> _______________________________________________
>>>> ParaView mailing list
>>>> ParaView at paraview.org
>>>> http://www.paraview.org/mailman/listinfo/paraview
>>>>
>>>>         
>>>
>>>
>>>       
>> _______________________________________________
>> ParaView mailing list
>> ParaView at paraview.org
>> http://www.paraview.org/mailman/listinfo/paraview
>>     
>
>
>
>   



More information about the ParaView mailing list