Flat shading

Hi, All :slight_smile:

I made a sphere using TriangleStrip Array and I tried to implement flat shading by using ColoringAttributes.
I cant find a change in my 3d model.it is rendered in gouraud shaded mode. ???

I tried this code:

Appearance app = new Appearance ();
ColoringAttributes col = new ColoringAttributes();
col.setShadeModel(3);
col.setColor(0.5f,0.5f,0.5f);
app.setColoringAttributes(col);

I m new to xith, i will try to contribute soon in the forum.

Regards
Rose

Well, double-check your appearance is applied to your shape (Shape3D.setAppearance(app)), and tell us which renderer you’re using (JOGL JSR-231 probably ?)

i dont know but others members can point out … is this because of not setting the normals properly for the Geometry ?
How important are setting of normals while creating the geometry and what purpose they serve ?

Maybe i am totally off topic and this has nothing to do with Normals.

Maybe I’m wrong, but I don’t think it has anything to do with normals. Normals are responsible for lighting and things like it.
Did you check, what Amos pointed out? If you haven’t attached the Appearence with your Shape3D, this will certainly solve your problem.

btw. Could you please write your postings without this indentation. :wink:

Yes, it’s somewhat irriting.