Dear members; I am creating my objects (all of which are rectangular boxes) by using GeometryInfo class. However, in my scene the objects appear very strange: There are very bad shadows and the objects seem to be transparent. What is the reason of this? Is because of generating normals or because of the lights? I have already generated the normals by using the NormalGenerator class. As attached you can find my appearance.
Thanks Murat Tanyer PS: The light is near to the viewPlatform (a little bit at the right) pointing to the center of the scene. Here are my code about GeometryInfo and appearance: ******************************************************************************************* //CODE ABOUT GEOMETRYINFO GeometryInfo gi = new GeometryInfo(GeometryInfo.POLYGON_ARRAY); gi.setCoordinates(coordinateData); gi.setStripCounts(stripCount); gi.setContourCounts(contourCount); Triangulator tr = new Triangulator(); System.out.println("begin triangulation"); tr.triangulate(gi); System.out.println(" END triangulation"); gi.recomputeIndices(); NormalGenerator ng = new NormalGenerator(); ng.generateNormals(gi); gi.recomputeIndices(); Stripifier st = new Stripifier(); st.stripify(gi); gi.recomputeIndices(); **************************************************************************************************** //CODE ABOUT THE APPEARANCE: Color3f white = new Color3f(1.0f, 1.0f, 1.0f); Color3f black = new Color3f(0.0f, 0.0f, 0.0f); Color3f red = new Color3f(0.80f, 0.20f, 0.2f); Color3f ambient = new Color3f(0.25f, 0.25f, 0.25f); Color3f diffuse = new Color3f(0.7f, 0.7f, 0.7f); Color3f specular = new Color3f(0.9f, 0.9f, 0.9f); Color3f ambientRed = new Color3f(0.2f, 0.05f, 0.0f); Color3f bgColor = new Color3f(0.05f, 0.05f, 0.2f); // Create the appearance Material Material = new Material(red, black, diffuse, specular, 110.f); Material.setLightingEnable(true); Appearance app = new Appearance(); app.setMaterial(poleMaterial);
<<inline: Image1.jpg>>