Hi,
 
Art, thank you for such details.  I had studied the code and looked at the 
documentation on-line but I was still misunderstanding the basics of how to 
construct a pipe-line and how to inject scene camera data into that pipe-line.  
Your explanations have helped tremendously.


> 
> allensaucier wrote:  � Select � � Expand �
> 
> 1. what line of code actually performs the glow effect? 
> a. I am a novice with shaders and osgPPU 
> b. I found how to increase the intensity of the glow within the shader source 
> code; it is the * 2 effect on glowColor 
> c. I can not find the line of code that actually performs the glow 
> 
> There is no direct one line or function. It is just matter of the algorithm 
> used behind. For glow effect the object which has to glow is rendered 
> separatly in a buffer. This buffer is then blurred (shaders) and added to the 
> main view also in a shader. So you have to understand first how the algorithm 
> works and then you will find the lines of code you actually need. 
> 
> Quote:  � Select � � Expand �
> 
> 2. Within the shader source code, the variables view and glow confuse me. 
> Nothing within glow.cpp refers directly to either of these variables and so I 
> do not know 
> 1) how the glow effect actually happens. 
> 2) how the different input to shaderSrc is actually differentiated between 
> view and glow. 
> Would someone please tell me?  
> 
> I have noticed that the resultShader receives input from unitCam1 and from 
> blury which gives the "view" and "glow" outputs, though I do not fully 
> understand how. 
> 
> See previously. View is the main view, glow is the glowed view. 
> 


I believe the glow method is the actual combining of the Main Camera's output 
with the slaveCamera's output.  This feat is still a mystery to me but it is 
really kool.  I have two reasons for wishing to understand it: 1) I want to 
blur an entire scene as viewed by my main camera; 2) I wish to glow a 
dynamically instantiated and added node to my scene where the entire scene is 
blurred and that new node is glowing.

I understood that the "view" and "glow" within the shader code were for two 
different camera inputs.  Could you tell me how the shader knows which input is 
from which camera?  This fact still completely eludes me.


> 
> UniCameraAttachmentBypass do bypass camera's attachments (i.e. render 
> textures) into the osgPPU pipeline. As I said before, every unit is a node 
> computing outputs by using inputs. Inputs are always textures. So in order to 
> bring it to the pipeline from OpenSceneGraph's cameras, we place this unit 
> either directly under Processor or under UnitCamera. UnitCamera do bypass the 
> osg's camera to the pipeline. It has no direct output and hence 
> UnitCameraAttachmentBypass is required to get camera attachments and put it 
> into the pipeline. Units placed under AttachmentBypass will use camera's 
> texture as input. 
> 


Question: when you say, "UniCameraAttachmentBypass do bypass camera's 
attachments," do you mean that UniCameraAttachmentBypass sends a camera's 
output into the pipeline without modification?  The word bypass means to 
completely go around an object and not deal with it at all and LEAVE IT behind 
you so that it has NO FURTHER EFFECT in the path you have chosen to go.  

However, "to pass" a camera's attachments into the pipeline means to take a 
camera's output and simply send it forward into the pipeline without 
modification within that unit.

One more question:
It appears that the main camera or any camera for that matter must have a 
"texture" attachment added to it so that that camera's output may be sent into 
a pipeline as a texture.  Is this correct?

Thank you very much Art, I really do appreciate your time and I appreciate you 
answering my questions.  After I have completed my tasks, I would really like 
to send you the example code that I am building and see what you think and 
perhaps even publish my example with your approval. :)


Cheers,
Allen

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=26358#26358





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to