[Solved] Alpha in bmp/jpg

Hello Guys, how i set alpha in bmp file ?
sample this:

I want to use as a brightness, alpha in black color and show only white, like a png transparent

and, how i set a color in white brightness ?

sorry for my english

thank :slight_smile:

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:faq#how_do_i_make_materials_transparent
Seeing your updated post, you cannot have alpha in BMP or JPG.

You can’t have an alpha channel in a BMP of JPG (bmp seriously?)
However, you can set the material blend mode to additive, but that will not produce the exact same effect as a png with an alpha channel, but the black area will be transparent and the white area will be added to the underlying color.

[java]
material.getAdditionalRenderState().setBlendMode(BlendMode.Additive);
[/java]
The link @normen posted is still relevant, read it, you’ll have important information about transparency.

Create the file as a png (which supports transparency at variable levels) then modify the image using something like Gimp or Photoshop…

sorry, but is bmp and jpg.
Nehon is really, i want this effect, see:
i have this images (in the sample is png):

then, the magic work:

with [java]material.getAdditionalRenderState().setBlendMode(BlendMode.Additive);[/java] work ?

thank you and sorry for my english :frowning:

Wow, work with

[java]material.getAdditionalRenderState().setBlendMode(BlendMode.Additive);[/java]

:slight_smile:

But case i have a image with background color pink, how i set the color pink (in the case) to transparence ?

thank very much :slight_smile:

You can’t with pink

ok, thank very much :slight_smile: