Z-Order Question !!

Blitz3D Forums/Blitz3D Programming/Z-Order Question !!

L_Draven(Posted 2005) [#1]
Hi all. I have a doubt about ZOrder with Alpha channel textures.


I have seen some codes from grass system that solves the zorder problem by programming, ordering the plants, etc... but my problem is if i want export the planes with alpha from 3d modeler and not make it programming.

My problem is:

I have modeled a character and the hair are planes one behind of other with a PNG or TGA texture with alpha channel. I export the model to a b3d file and when i load into blit3d the zorder dont work, the last plane of hair appears over the first...... I tried turn on/off Wbuffer but the problem continues. I have a ATI 9550 256 mg graphics card.

I dont know how solve this problem because i dont want make the hair programming because are a lot of planes with different rotation,position,scale and will be a hell make it coding :-).

Any idea???

Thanks guys.

(Sorry my english);-)


Mustang(Posted 2005) [#2]
Alpha is not sorted, and it's not Blitz3D problem... rather hardware/DX. So basically you HAVE to sort them (alpha polygons) using code - or use blend modes other than alpha... but they might not be appropriate for what you want to achieve. If you could use only one alpha layer per hair I think it would work allright... use many and you got problems.


L_Draven(Posted 2005) [#3]
thanks mustang.

I think that i will use MASKED flag :-). (less realistic ;-))

Thanks again.


D4NM4N(Posted 2005) [#4]
ive found ways of overcomming this for terrains and water / grass. The way i did it was to make sure the entities axses are in the right order. (it seems to sort more reliably than with the verts).
With hair, you could try making sure the axis of each hair is sorted in an outward patern from the head.