Hey everyone,
The first question is about the normals computation for StripBox. See the comments in the method below
[java]
protected void duUpdateGeometryNormals() {
if (getBuffer(Type.Normal) == null){
float[] normals = new float[8 * 3];
Vector3f[] vert = computeVertices();
Vector3f norm = new Vector3f();
for (int i = 0; i < 8; i++) {
norm.set(vert[i]).normalizeLocal();
normals[i * 3 + 0] = norm.x;
normals[i * 3 + 1] = norm.x;//<---------------------- Y ?????
normals[i * 3 + 2] = norm.x;//<---------------------- Z ?????
}
setBuffer(Type.Normal, 3, BufferUtils.createFloatBuffer(normals));
}
}
[/java]
The second question is about textures. I created s StripBox and applied a material with texture. But the texture only appears on the back faces never on the front ones.
The object looks sunken which is definitely not good
I tried changing some material properties
[java]
material.getAdditionalRenderState().setFaceCullMode(FaceCullMode.FrontAndBack);
[/java]
but none of the available options work.
Any other suggestions ???