post-processing effect to single object
Hi,
I need to access the currently displayed pixels on screen within a fragment shader. For which i found the access through vizard's post-processing at http://docs.worldviz.com/vizard/postprocess_basics.htm using vizpp_InputTex. However it only refers to shader which are applied on whole screen. How can I apply the the shader using postprocess to only specific objects? Something like this : effect = RedEffect() object.apply(effect) In which case only the object should have redeffect applied to it and rest of objects should have no effect. |
|
Thanks Jeff. The Effects might solve what I am looking for.
|
Hi Jeff,
The custom effect work on pre-existing models like 'logo.osgb' But effects do not work on on-the fly object. Do i need to set some flag for on-the fly object for enabling effects on them as well? |
Yes, you will need to use the generateEffects command on that model. Here's an example:
Code:
import viz |
Thanks Jeff.
It worked with on-the-fly object. With models creating using external application like :http://www.openscenegraph.org/index....planet-builder . Do I need to run any other command to enable effects on such models? |
Additional Info :
If I create a separate copy of root node and apply effects only on it then the effects work. However if I apply the effects on the entire directory structure where root node load the child nodes itself then the effects do not work. I tried using different argument values for flags and op in generateEffects but still no success |
Can you provide a sample file and code that reproduces the issue?
|
1 Attachment(s)
Jeff,
I am using the following code to test the effect on my model. A subset of model with the code file is in attachment. Execute the shader_test.py to see that no effect is applied on the model. However if I remove "Earth/main_root_L0_X0_Y0" folder then the effect start working. Code:
import viz,vizfx |
Quote:
Because all the examples work specifically with pixel in question and not include any effect using neighboring pixel value which would be needed for implementing functions like blur. |
All times are GMT -7. The time now is 02:05 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC