Problems with Java 3D basics
I'm trying to use some very basic Java 3D features to generate views on 3D models. My aim is to test some model generation algorithms and all I really need is to make them visible to see what I got. I have no needs for good performance or other such fine tuning. But while I thought Java 3D would have been the easy way to get a model on the screen, I've ran into a couple of puzzling problems and have not been successful in finding answers for them.
I'm using SimpleUniverse with one directional light source. Currently I'm only testing with a simple Shape3D that I have generated using a QuadArray. It is an octagonal cylinder.
1) The first issue is the depth of my field of view. It seems that I'm not able to see any objects farther than ~43.0 unit away from the camera. I understand this is a basic perfomance tweak in 3D, but have not found where to configure it. Since I don't have any world full of objects, but only a lone model in the origin, I'd prefer to not have any restrictions on when I see it. I could propably get a workaround by shrinking my object instead of moving the camera away from, but I'd prefer a proper solution.
2) Another issue is more weird and relates to shading. I have defined an appearance consisting of material with a diffuse color setting for my Shape3D. The QuadArray has been constructed with the COORDINATES and NORMALS flags on and proper normals have been set to it. According to tutorials I have found this should be enough to get basic shading, but it doesn't work. It seems that the diffuse color of my material is assigned exactly on the first vertice of my QuadArray and all other vertices are black. This results in that one of my quads has a blue color fading to black and all the others are completely black. I've not found any clues on what's going on with this one.
Any help would be appreciated, especially with the second problem, since I have no workaround for it and it prevents me from seeing my model properly in 3D.