Lars Paukert wrote: > Hi, > > i am new to this mailing-list, so tell me if i violate the protocol. > Welcome. You're doing fine. :) > I am using OpenSG to create an VR-based Graffiti and one of my biggest > problems is the colored mist of the sprayed paint. > > I am using Particles with Sprites to achieve a nice looking fog. > This is how i create my Sprite. > [snip] > I want to adjust the transparency of the entire sprite, with the > alpha-blending i can only infuence which alpha-values of the texture > are considered.. am i right, i am not really sure about this > mechanism, as it produces different results depending on my > graphic-hardware. > Your are using alpha testing (by setting alphafunc). Avoid that and use only src & dst-factor.
The final alpha value used for blending should be computed the same way on all gl-implementations. It could be a hw-bug or something. Then again, raw points is not a oft-used feature, so I'm not that surprised. (Hw-specific questions are better asked on www.opengl.org, even though we might be able to help. Can you post some screenshots?) To influence the alpha value, try to set the diffuse color to something with alpha, or set up a color array with per-vertex colors, varying the alpha. (See ColorMaterial below too) > Also the pointChunk->setsize() is not really clear to me, i am using > it to change the size of the sprite, but it is limited to 1000. Why? > You are rendering points. Points in OpenGL have a hardware limited size. 1000 on your card. Something much less on older cards. (32 or so) You could try the Particles class (instead of Geometry) and use ViewDirQuads. You set positions, colors & size, and it takes care of the rest. It will cost you some performance but the size can be anything you like. Plus, it will also allow you to depth-sort your sprites, which is necessary if you want to use the src_alpha/one_minus_src_alpha blending and have it look good. :) > My last Problem is the color, do i need a material attached to the > particle holding the sprite to get color? everytime i used material > and texture together, the material-properties didn't seem to influence > the appearance anymore. > There are different texture modes for blending texture color and vertex color. Look at glTexEnv documentation, then set the EnvMode value in the appropriate TextureChunk or SimpleTexturedMaterial. (Or write a fragment shader, but I don't think you're ready for that yet.. ;-) Also, if you want per-sprite transparency, set a color and use glColorMaterial. This is also available in either the MaterialChunk or in the SimpleMaterial. > Okay, i will be happy about any kind of feedback, maybe you can > recommend some urls, since there is not much of documentation and > examples about opensg. > Think OpenGL first, that will help a lot to explain things. OpenSG is, IMHO, a pretty good low-level abstraction of OpenGL, so if you can't find OpenSG documentation, look for something in an OpenGL-tutorial or documentation, figure out what needs to be done and then look in OpenSG if there isn't a way to do just that. (And ask here if you can't find how to set a specific OpenGL-value in OpenSG) Mostly, you just set a value in a StateChunk, and add the chunk to your material. Cheers, /Marcus ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
