Jump to content
  • Advertisement
Sign in to follow this  
Epaenetus

Problems with alpha blending and particles

This topic is 1062 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to implement particles in my 3D engine, but I'm having a problem with alpha blending.  

 

Here is a picture of the artifact: http://imgur.com/PCbhN4p

 

The particles are orbit a point.

 

Currently, the particles are billboarded towards the camera and they are sorted based upon depth. I thought that sorting the particles would fix alpha blending problems, but I guess it only fixed some of them. Has anyone else come across this problem?

 

Share this post


Link to post
Share on other sites
Advertisement


Currently, the particles are billboarded towards the camera and they are sorted based upon depth. I thought that sorting the particles would fix alpha blending problems, but I guess it only fixed some of them. Has anyone else come across this problem?

Turn of z-write when rendering alpha blended particles.

Share this post


Link to post
Share on other sites

Glad your problem is fixed, but if the particles were sorted and billboarded correctly, then it really shouldn't have made a difference.

Some possible reasons:

1. Maybe you sorted front-to-back instead of back-to-front.
2. Maybe you're sorting based on straight-line distance from centre of particle to camera position. It might be better to sort based on viewspace Z position.

3. Maybe you're calculating your billboarding vectors based on a curve around the camera instead of just using the camera's up and right vectors.

 

If you're doing 1 then you can expect some quite obvious blending artifacts. 2 and 3 would probably produce only subtle artifacts that you'll probably not notice.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!