Hi,
I was wondering if it s normal that all the alpha from my model seem to not work properly anymore.
It seem the useAlpha setting inside the lighting material was remove and I can’t find a way to make my tree leaves show properly.
I did some test, and this is the material that show the best result. But not something I would show to public,
you can see through the trees if there is an alpha model in front depending on the distance from the object.
Even the leaves from the tree it self would do the same render bug and hide some part of the model.
this is the material configuration, if you see a mistake let me know.
Material My Material : Common/MatDefs/Light/Lighting.j3md {
MaterialParameters {
DiffuseMap : Repeat Models/Environment/Trees/PineTree2/MegaTextureMapA.png
UseInstancing : false
VertexLighting : true
AlphaDiscardThreshold : 0.4
Shininess : 0.1
}
AdditionalRenderState {
Blend Alpha
DepthWrite On
DepthTest On
AlphaTestFalloff 1.0
}
}
I wanted to merge the whole model together so it would use less memory and cpu time to travel the tree node and also use a single material to draw.
So I supose it has to be made with 2 nodes and 2 material?
And I was wondering why did boolean(useAlpha, true); removed?
Because it didn’t do anything. Set it true. Nothing happened. Set it to false. Nothing happened. It was not used for one single thing.
What did you think it would do?
To use alpha… have alpha in the texture or have alpha in the diffuse colors or have alpha in the vertex colors… or all three… then make sure it’s in the transparent bucket and blend mode is alpha. For those last two, no amount of material parameter is going to set those for you. For the first, you’d have needed that anyway.
…but the bottom line is that useAlpha was removed because it didn’t do anything.
I didnt test anything on 3.1 yet, but if this functionality was removed just with this talk “what do you think it do” ( that I already seen before in my posts), then its an important functionality that dont work anymore :
if(lamp) newcolor.a=1; else newcolor.a=0;
And yes, for lighting materials, its doing a lot in 3.0, and I am using it a lot in my games…
Sad to know it was removed for apparently no reason, first reason not to go to 3.1.
This is the equivalent of no blend mode and alphaDiscardThreshold of 1 I guess? I don’t know what “lamp” is here. Of did you actually want to render the 0 alpha pixels and fill the z-buffer?
In this particular case I was using glow, and when we put 0 on alpha (glow color) it disable completely the glow, with 1 it enables it. It may be an special function of my video card, we already discuss this in another thread, and you guys told me that it suppose to do nothing, but its doing, and it gets nice effects…
When using glow this way, you get different effects when using blend additive, alpha, etc.
But, I didnt use the 3.1 yet, I just hope I misunderstood what was removed…
I did plenty of test in the last hours and the Alpha bug is still there, Something as change and i can tell, all the alpha model overlaps and hide part of other model, I didn’t had this problem on jmonkey 3.0.
Even if it is deprecated, why did it got removed? it s still working fine by me! I had better result then using the alphaDiscardThreshold which show my sky arround the leaves and you can see through other leaves.
If you get a different result then the values are not comparable. You must have had a different alphaFalloff set than whatever alphaDiscardThreshold you are using.