Weird lighting problems

Hello,
I have an object and a PointLight. An object has material, Appearance set all right and bounding regions are fine as well.

However, when I do lighting I get a very weird results. When I just start the application the object is not lit at all. In order to lit it, I need to rotate the object (the transform group where it’s attached) and only then it’s lit. However if I continue rotating it, the light intensity increases, then decreases and finally disappears again. It looks as there is a spot light, not point light.
In order to investigate the problem I attached OrbitBehavior, the interesting thing is that at the beginning the object is not lit at all, I tried looking from all of the sides: nothing, as if the light source doesn’t exist at all. I don’t understand why this is happening.
The structure I have is like the following:
SimpleUniverse:
BrancGroup (light and rotation behavior attached)
TransformGroup
TransformGroup(object attached, is being affected by rotation behavior from BranchGroup above).
I’ve been working with this problem for 4 hours now, checked everything thousand times and don’t understand the reason.

Any help/suggestions are appreciated.

Kostya.

This sounds like it could be a problem with vertex normals. What approach are you taking to create the normals?

Mike

I just import everything from Blender. I’ll play around with a test sphere as well to see how it behaves, but thank you for giving a hint! I’ll post the solution here, once I find it…

Update:
The sphere behaves just OK, lit as it’s supposed to be. It seems like the guess about normals is correct.

OK, solved the problem.
The problems was:
I was using IndexedTriangleArray and forgot to set Normals’ Indices with


IndexGeometryArray.setNormalIndices(int index, int[] normalIndices)

It’s working all right now. Thank you for help!

Kostya