Crystal Space
Welcome, Guest. Please login or register.
July 22, 2014, 04:52:52 pm

Login with username, password and session length
Search:     Advanced search
9005 Posts in 2043 Topics by 8210 Members
Latest Member: Pakowanie1989
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  Alpha blending, or "the box effect."
« previous next »
Pages: [1] Print
Author Topic: Alpha blending, or "the box effect."  (Read 1740 times)
ApostropheST
Newbie
*
Posts: 2


View Profile
« on: June 12, 2006, 02:54:39 am »

I have been a casual CS user for at least a year and a half.  In putting together a particle system demo to figure out how to implement one in my main project, I gave up on trying to use one of CS's particle systems because the documentation for setting one up in code (rather than the loader) essentially does not exist, plus there is no indication of how any of the pieces work together.  This led me to throw together a rudimentary particle system, even though ideally I'd like to use one of CS's systems.

So I get something like this.  Very simple.


The only issue is that you can see some problems where one particle overlaps another from the camera's perspective.  Instead of blending the pixels of one genmesh (particle) through to another, all transparency on one genmesh shows the thing mesh of the wall instead.  This means you can basically see an outline around a quad where there are particles behind it.

I know this is not a problem unique to myself or my implementation, because in the vast majority of particle demos in CS you get the same effect.  I have seen a small number of exceptions where this effect does not pop up and alpha blending is handled perfectly.  I have tested several image types and approaches to transparency, as well as several mixmodes, and have not been able to achieve what I'm looking for.

My question is, how do I achieve the type of blending I am looking for?  I know it's possible in CS, but I also know that some examples of effects suffer from the same issue.

Thanks for reading.
Logged
ApostropheST
Newbie
*
Posts: 2


View Profile
« Reply #1 on: June 12, 2006, 03:19:02 am »

One of my group members solved the issue by simply enabling the Z buffer on the particle mesh factory.  This seems obvious to me now.  It also means that for some particle effects used in the demos that come with CS, the Z buffer needs to be enabled on them because they are displaying at suboptimal quality.

Here is what it looks like now with the simple change.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.221 seconds with 15 queries.