Single Surface Particles and Z-Order Problems...

Blitz3D Forums/Blitz3D Programming/Single Surface Particles and Z-Order Problems...

t3K|Mac(Posted 2007) [#1]
Hi!

Anyone figured it out, how to z-order alpha'ed particles in a gameworld? i have several alpha objects (windows, fences) and when i start using alpha particles, z order is messed up.
i am using beakers z-order code for the (static) alpha objects in my game. this works fine. but i totally fail in z-ordering alpha particles (single surface system) with static alpha objects. anyone can help?


Naughty Alien(Posted 2007) [#2]
mask alphaed objects (not particles) and it will work just fine...use DX3 explicit alpha (if you are going for DDS) and just load it with mask flag and it will kick ass...


Pinete(Posted 2007) [#3]
Yes, agree with Naughty Alien.

I have invested a lot of time making thousands of trials till big10p point me in the right direction.
With alpha sprites you get always the best results, but at other side, you have z-order and performance problems too.

I've tried with standard masked sprites, but the results were very poor in comparison with alpha.

I asked the same question (or similar ;) some months ago and as I said previously, big10p told about DDS.
DDS DXT3 is the only technique will give you good results, avoiding the "outline" that photoshop make for antialias.

If you save a DDS with DXT3 and in example, 3 levels of mipmaps, you will achieve very good results. Be sure.
Of course, is very important to make good textures, I say "technical good" textures. In the case you want to use this tecnique for grass, the way you make your grass texture (color, size and shape) will be mandatory for obtaining good results, beyond the own DDS format that will put the things easier.

I hope this help!


All the best!


t3K|Mac(Posted 2007) [#4]
i 'll try. i always tried to get z-ordering done with this nasty single surface stuff. i never thought to mask the static objects witth dds and its tricks (cause it worked beatiful with beakers code). thanks for pointing me in the right direction.


jfk EO-11110(Posted 2007) [#5]
I have to say, for some stuff masks simply don't work. They are great for a lot of things. But eg. for Grass you HAVE to use alpha.

THe quintessence is: don't use singlesurface. Using DXT3 or 5 alpha! textures on CopyEntity-ed entities does however work very nicely. Note rendering of dds alpha was 200% as fast as the same with a bmp-alpha texture.