Sprites And EntityAlpha Problem

Blitz3D Forums/Blitz3D Programming/Sprites And EntityAlpha Problem

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

That is a completely correct explanation of why it is happening but your vague "be careful with transparent objects" advice isn't too helpful. To finish his explanation, the draw order of alpha blended polygons is determined by entity position. Unfortunately, since an entity's position is a single point the polygons are inevitably offset from the position (and for large objects like your sea the polygons are offset a LOT.) Because of this offset the polygons aren't always drawn in the correct order. The polygons of your sea are further away than those of the smoke, but since the entity position of the sea is closer the sea is drawn over the smoke.

To get around this you will have to find a way to break up your water into multiple objects. Thus the entity position of the distant water will be a truer approximation of the polygon positions.

Or make the water opaque. This is less than ideal but then in your screenshot the water doesn't look very transparent anyway. Plus there is some realistic basis for this; water actually looks pretty opaque at an oblique angle (such as the viewpoint in those screenshots) due to reflection. Water only really looks transparent when you are looking at it straight down.