Murat, I think the "shadows" are just proper operation of your light. You might try switching to just an ambient light to verify this. Could you explain more of what you mean by "appearance is very bad" (it looks fine to me). If by "transparent" you mean that some objects aren't showing that could be your front clipping plane eliminating some objects (try backing your view away a little bit or adjusting the front clip distance).
- John Wright Starfire Research "A. Murat Tanyer" wrote: > > 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. > > I have attached two views which is created exactly with the same code: > > View1.jpg has 4 elements. There is no problem in the appearance of > these elements. However, > View2.jpg has many elements. And the appearance is very bad. > > Is the problem related with: > > Normal generation: I have already used NormalGenerator class to > generate my normals. > Lighting: > Graphic card: > Vertex specification: I have created all of my geometry by specifying > each face in anti-clockwise direction. > Anything else? > > Thanks in advance > 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(data); > gi.setStripCounts(stripCount); > gi.setContourCounts(contourCount); > > Triangulator tr = new Triangulator(); > tr.triangulate(gi); > gi.recomputeIndices(); > > NormalGenerator ng = new NormalGenerator(); > ng.generateNormals(gi); > gi.recomputeIndices(); > > Stripifier st = new Stripifier(); > st.stripify(gi); > gi.recomputeIndices(); > > // Create the pole appearance > Material poleMaterial = new Material(); > poleMaterial.setLightingEnable(true); > Appearance app = new Appearance(); > app.setMaterial(poleMaterial); > > this.setAppearance(app); > this.setGeometry(gi.getGeometryArray()); > > >**************************************************************************************************** > > > > [Image] [Image] =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
