05-29-2004, 05:39 AM
i am having trouble understanding this fucntion: glBlendFunc, i know what it does, but i don't what parameters should i pass into this fucntions when i want to draw something like glass, blood and so on. I have read the official OpenGL documentation and it didn't helped. Can you post me a link to some kind of tutorial or such ?
05-29-2004, 06:53 AM
For quick blend tests I use ParticleBlend you can find at http://www.int03.co.uk/crema/software/index.html , not the best way (no textures) but not too bad.
The most useful modes are :
- additive transparency : order independant, mostly useful for fire particules, lightnings, lensflares, etc. Some games use it for particles systems of dust or clouds, because there is no sorting necessary, it is not physically correct, but may be visually acceptable.
- normal transparency : order DEPENDANT, should be drawn from far to near. For all the normal overlaying stuff (blood splatting, etc). In practice, for drawing cars for ex, you can forget the ordering, as each car glasses are convex, and it is rare that you see a glass car trough another glass car. You can sometimes spot such simplifications in Quake3 or many other games if you are very careful.
- more or less interesting effects :
substractive effect, maybe for painted glass ?
a negative effect, quite nice against a white background :
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.