"JME does not support alpha map on unshaded material"


For a game I write, I need unshaded alpha maps
but I had to set a material to my imported asset becos JME dont accept it although “unshaded” material shader can do it
Is there a reason for this ?


anyone ?

did I ask the wrong question ? is it going to rip space-time continuum or something ?

To be honest I don’t understand the question.

Maybe you could try to describe in details, what you need, what you do in JME, what you expect it to do, what it actually does.

actualy it’s super easy :slight_smile:

I can import shaded material with alpha
but I cant import unshaded material with alpha

although JME can handle these, the importer throws the exeption mentioned in the title :slight_smile:

Still don’t get it.
Import from what?
Unshaded material doesn’t have an alpha map support, it only support alpha in the alpha channel of the colorMap. Lighting supports an additional alphaMap, but don’t get used to it as it’s gonna be removed.
Also if you have an exception, posting the entire stack trace can help a lot to understand what’s wrong and where it’s wrong.

I import a “shadeless” material from blender and that material has a texture that has “use alpha” toggled on
I get that error unless I turn off the shadeless property in blender

so what I did is crate a material like this

     MaterialParameters {
        ColorMap : Textures/leaves2.png
        AlphaDiscardThreshold : 0.5
    AdditionalRenderState {
      Blend Alpha
      FaceCull Off
      DepthTest On
      AlphaTestFalloff 0.5

it works fine, so I was wondering why was teh importer not accepting my blender file wich should do the same

it is not an exception, more like an error displayed when trying to import such blend file
I found the very line is writen in MaterialContext.java or something
just though people new what this wwas programmed that way

@Kaelthas should know better about this as he’s the one maintaining the blender loader

@nehon said: @Kaelthas should know better about this as he's the one maintaining the blender loader

ok thx mate