How can I keep the correct alpha during rendering particles?
        Posted  
        
            by 
                April
            
        on Game Development
        
        See other posts from Game Development
        
            or by April
        
        
        
        Published on 2012-07-08T09:59:48Z
        Indexed on 
            2012/07/08
            15:23 UTC
        
        
        Read the original article
        Hit count: 272
        
Rencently,I was trying to save textures of 3D particles so that I can reuse the in 2D rendering.Now I had some problem with alpha channel.Some artist told me I that my textures should have unpremultiplied alpha channel.When I try to get the rgb value back,I got strange result.Some area went lighter and even totally white.
I mainly focus on additive and blend mode,that is:
ADDITIVE: srcAlpha  VS  1
BLEND:    srcAlpha  VS  1-srcAlpha
I tried a technique called premultiplied alpha.This technique just got you the right rgb value,its all you need on screen.As for alpha value,it worked well with BLEND mode,but not ADDITIVE mode.As you can see in parameters,BLEND mode always controlled its value within 1.While ADDITIVE mode cannot guarantee.
I want proper alpha,but it just got too big or too small consider to rgb.Now what can I do?Any help will be great thankful.
PS:If you don't understand what I am trying to do,there is a commercial software called "Particle Illusion".You can create various particles and then save the scene to texture,where you can choose to remove background of particles.
© Game Development or respective owner