This does seem to indicate a bug in com.jme3.scene.shape.Dome
I took a quick look at the source and didn’t see anything obviously wrong, but as Phoenix noted, this class is mostly used to generate inward-facing domes, so i’s possible the code was never tested for outward-facing domes with lit material.
The constructors differ somewhat from com.jme3.scene.shape.Dome. To generate the dome for your test app, I used “new DomeMesh(16, 16, 0.5f, 0.5f, 0.44f, false);” If you use textures, you may need to adjust them because the texture coordinate system of DomeMesh is different from that of com.jme3.scene.shape.Dome
PSpeed once told me normal only affect the side from which it can be rendered not the light… Maybe I’ve misinterpreted… Whats wrong with the dome them? To me it seems like the light carries on and hits the same faces even though the normal of those faces is flipped. Then is it a problem with the light?
I’ve done some more experiements, and I’m now even more convinced this is evidence of a bug in com.jme3.scene.shape.Dome. To be precise, it writes normals with incorrect signs near lines 251-257 and 269.
For instance, if insideView is true, at line 269 it writes (0, 1, 0) into the normal buffer for the pole vertex. However that’s clearly an outward-facing vector. The sense of the “if” should be reversed so that (0, -1, 0) is written in this case.
Similarly, if insideView is true, at line 254 it writes the normalized offset from center to the normal buffer. However, that’s clearly an outward-facing vector. Again, the sense of the “if” is backward.
At least the vertex indices appear to be in the correct order.
I suspect the reason this bug has been missed in the past is that few people use domes with lit materials. With unshaded material the vertex normals do not affect the render.
PSpeed once told me normal only affect the side from which it can be rendered not the light... Maybe I've misinterpreted... Whats wrong with the dome them? To me it seems like the light carries on and hits the same faces even though the normal of those faces is flipped. Then is it a problem with the light?
You must have misunderstood as that’s exactly backwards. Vertex winding controls what is ‘front’ and ‘back’. Normals control how the triangle is lit by light.