Alpha problems

Hi i have this object

it has an alpha part to be invisible ( try to make cheap tree’s)
each time i try to get it on Jme (.obj , .blend(cant even load it as texture is png) , .ogre ) its getting totally invisible or allmoust , while in blender rendering is fine , soo i wanted to ask if there some ting i’m missing on a right way of doing it .
Or if there some thing alse thats wrong .
All i want is a tree to be visible and all arround it to be transparent , but i just cant finde a right configuration . only guide i found on youtube did not worked for me .

Thnx for any help guys :slight_smile:

Have you read “Transparency for Dummies”?

Just did , but unfortunatelly did not helped mutch . Is there any post that might explain how to make it right ?
I have an image of a tree with alpha chanel fixed Threshold , and i need to put it to a cube soo it looks like an actually tree .
I’v set blend mode alpha to geom , but may be i’m missing some thing alse ?

In addition to setting blend mode alpha to true, you may also need to raise/lower the AlphDiscardThreshold value to work properly with the alpha value in the transparent part of your texture, and in some cases you will also need to add the Spatial to the Transluscent or Transparent queue bucket.

But the problem is that my texture gets transparent where it should not , a not transparent part of texture gets transparent .
How could i change AlphDiscardThreshold ? is it in material ?

Yes you can find a place to change this value in the left side of the SDK’s material editor - or you can change the material’s text file, and add the param AlphaDiscardThreshold : 0.1 which tells the material to discard any pixel that has an alpha value lower than 0.1

damn i dont know why , but i get it totally transparent whole the time , or alloust totally transparent ,even a part should be visible

Well thnx any way for try to help me guys :slight_smile: , hope will finde a way one day

What format is the image your using for the albedo / diffuse texture, is it .png ?

It could also help if you post the whole material file for the material, so we can see if something may be wrong there.

Transparent objects need all of these:
-put in the transparent bucket
-set with alpha blend

They might ALSO need:
-set alpha discard threshold

I suspect you miss one of those.

like was said above.

im not on workstation now so cant check exactly, but same like you, i use transparent png for leafs and it work fine.

its getting totally invisible or allmoust

i think i know what you mean. When your Texture sampling discard more pixels than it should it happends. You should change mipmap setttings

texture.setMinificationFilter(MinificationFilter.BilinearNearestMipMap); // check other options

but i dont remember which setting was proper here, but try more and see.

You should also care to batch leafs into one geometry, or just merge them in blender before export. (leafs + bark = 2 geoms for tree) if you dont your FPS gonna be low.

I did in the start , but now did all 3 things and nothing changed :frowning: