Problems with alpha blending and particles

Started by
2 comments, last by C0lumbo 8 years, 8 months ago

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?

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.

That fixed it. Thanks a lot man!

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.

This topic is closed to new replies.

Advertisement