infront of

How can I get the leaf to show up infront of the grass… When I’m playing the “game” one leaf goes behind the grass, and it looks weird…

Everytinh is made with simple planes with textures on and Alpha clicked for the transperancy…

http://img159.imageshack.us/img159/4402/front3qg.jpg

Hi.This is a bug with alpha faces in blender.You can get rid of this bug but sometimes its tricky.You should join the leaves and the grass together as one object and then separate them again(if they are already joined,just separate them :slight_smile: ).That should do the trick.The tricky part is if you have this bug with many objects youl have to do this thing with each of them and everything(that SUCKS really much :x ).I would recomend to use as less alpha faces as possible.Bye.

When I encountered this bug, I was told that you can fix it by giving the objects with alpha the same material and in that materials settings, turn on Z-Transp. It didn’t work for me though…

Check this link, it’s a Blender 2.37 build… with game engine goodies and corrections… it has the alpha sorting correction. I just don’t recall if you had to activate ZTranps on the object’s material or not. Anways, enjoy this build!

http://kaiowa.incubadora.fapesp.br/portal/down/blender_mod

it was part of the release build, you don’t need a special one for it

first try making them seperate objects, then use the ztransp button in the material buttons. Blender sorts by objects now, but will only sort faces if you tell it to [by pressing ztransp in the material buttons], I’d advise you not to tell it to if possible because the performance change is very significant

Would you guys suggest shaping a leaf instead of using alpha? It will be like 8-10 more Vertix. %|

Edit: Ok, here’s the Blend file… Could someone please help me with that Z material thing…? :slight_smile:

http://www.ante-designs.com/grasstest.blend

Id also suggest using tga format for alpha textures(i heard people saying that with png its much more anoying getting rid of this bug and in your case it is harder)Change those textures to .tga and it will be easyer to remove the bug.

The zsorting in your file is working in fact that is why you have the problem you are having, the thing is zsorting uses the objects centre to calculate what is in front of what so in this case the grass’s centre is first before your 2nd leave’s centre, i would sugest you move your grass’s centre closer to the actual centre of the grass or adjust it and the leave’s positons. The way it works does however cuase further problems since for example it is imposible for the grass to surround the leaves and have them all appear in the correct order from every angle. Anyway your problem luckily can easily be solved. :smiley:

Just want to make sure everyone is aware of what i explained about alpha zsorting above cause i know alot of people dont realize this.

Ahh, Now it works, Thanks a lot. 8)

there is no difference between .tga and .png as far as complications involved in sorting and fixing such errors - the problem occurs that certain systems crash when using .png textures through blender - not to mention that .png, although it supports alpha, doesn’t always do a very good job of providing completely transparent alpha with full 32bit color - also .tga are the standard for game engine alpha textures - they require more file size but when packed or included in a zip folder along with the .blend they compress well (usuallly!) :wink:

Ahh, Thanks… Time to resave 20 textures to TGA, lol :slight_smile:

Edit: Btw, Do you suggest TGA for all textures, even though some is not used with Alpha? Or is Png/ Jpg better then?

Edit2: I can’t get alpha to work with TGA (targa)… Can you tell me exactly how to do in photoshop?

I always use PNG for alpha maps and they work perfectly fine.

For non-alpha textures, if they are natural or undetailed, I would recommend using jpg. For precise or complex textures, use png. :slight_smile:

Okey, two different opinions lol… Well I don’t see any problem with PNG, and as I can’t get akpha to work with TGA, I guess I’m gonna use Png :o