rendering orders

Blitz3D Forums/Blitz3D Beginners Area/rendering orders

El Neil(Posted 2006) [#1]
i dont understand.

ive got a rough mesh of a hillside with some trees in front of it. i gradually fade the whole scene out using entityalpha. when i fade it back in again, the trees are still in front of the hill but they are transparent in the places where there is hillside behind them and opaque elsewhere. whats going on?

neil


b32(Posted 2006) [#2]
Is it the z-order ? I believe, when you use EntityAlpha, the object doesn't use the z-buffer anymore.


El Neil(Posted 2006) [#3]
okay, that makes sense. how do i go about changing the z-order??


thank you,

neil


El Neil(Posted 2006) [#4]
hmmm.

ive been looking up about z-orders. the trees and hills are all one mesh, rather than two objects being drawn in the wrong order. imagine what would happen if the mesh had a negative alpha value. its like its been turned inside out! i cant work it out...


El Neil(Posted 2006) [#5]
yep. seems like its a z-buffer problem.


jfk EO-11110(Posted 2006) [#6]
if you seperate the trees from the hill then it should work. Other than that, there's a z-order sorting source somewhere in the archives, by beaker IIRC.


puki(Posted 2006) [#7]
For alpha Z-sorting look here.

http://www.blitzbasic.com/codearcs/codearcs.php?code=949

There is a modified include file of "Beaker's".

Personally, I have never used it.

Here is "Beaker's" - look at that too:
http://www.blitzbasic.com/codearcs/codearcs.php?code=850


El Neil(Posted 2006) [#8]
cool, thanks guys

neil


Ross C(Posted 2006) [#9]
Problem is, i think you have to Z-sort all the time. It would be alot easier to seperate them :o)


Subirenihil(Posted 2006) [#10]
What?! I can't believe it! Something helpful from Puki! It's a miracle!

...Ok, ok, I guess Puki has helped in other places, too...


AJirenius(Posted 2006) [#11]
Sub: Puki probably got a hold of his source code and at least would like to contribute :D


Subirenihil(Posted 2006) [#12]
Don't listen to Puki! If he helps you, beware! Don't give him ANY sourcecode, he'll turn right around and claim it was his idea first.

What are we EVER going to do with Puki?...


jfk EO-11110(Posted 2006) [#13]
So if he ever is trying to help we should not do jokes about it. Well done puki thank you, here's a cookie... No, not the whole pack!