J3m material bug


#1

Hello everyone, I tien specify that I am french and I use google translation helped me apologize in advance for any errors.
Here is a picture of my xml fully loaded model .

And here is the same model xml , but this time if I charge a J3M material with unshaded texture.
{
Material mat = asset.loadMaterial(“Materials/slimic.j3m”);
((Geometry)this.getNode().getChild(0)).setMaterial(mat);
}

I do not understand from where the problem may be , if someone has an idea let me know!
Thank you!


#2

What’s the code of the j3m?
Looks like you disabled depth test or depth write.


#3

Here is a picture of the bug on a diferent angle and code J3m file.

file name: slimic.j3m;

Material Mat : Common/MatDefs/Misc/ColoredTextured.j3md {

MaterialParameters {
ColorMap : Models/Player/slimLayout.png
}
AdditionalRenderState {
Wireframe Off
DepthWrite Off
PointSprite Off
ColorWrite On
DepthTest Off
FaceCull Off
}

}

and i tried flip normal in blender just for test, this not work :frowning:


#4

Actually you disabled both…
Put these at “On”


#5

It works! Tank you :smile:


#6

For more information about what depth write and depth test do, you can lookup stuff about the zbuffer.

This article also might give you some visuals though it’s topic is different: