After reading that thread, I think I can came up also with my own observations, because I had that problem too and I didn't want to disable the shininess and specular colors.
In one of the mails, Monica stated: "All of the cylinders share the same geometry and appearance, and each are scaled down using a transform group to the wanted size." That was *my* problem. The scaling was non-uniform, meaning that different scales were applied in different directions. Since the shared geometry contained also the computed normals, the later ones were affected by the non-uniform scaling, resulting in a strage effect, opposite to the one described by Monica, some of the surfaces were always dark, regardless of the position of the light, just if like the specular colour was reduced to 10% of the intensity. So I think that Monica may be running into similar problems. Kind Regards, Florin -----Urspr�ngliche Nachricht----- Von: Mark Hood [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 18. M�rz 2003 03:41 An: [EMAIL PROTECTED] Betreff: Re: [JAVA3D] Problem with Specular Color > Date: Mon, 17 Mar 2003 18:04:33 -0800 > From: Monica Sleumer <[EMAIL PROTECTED]> > > Thanks for your help. > > The combination of setting the shininess to 1 and the specular color to > something near black has solved the problem. Just doing one of the two > doesn't work. You're welcome, glad things are working for you now. > I also used GeometryInfo to recalculate the normals, and now the > cylinders look round instead of faceted, so that's an added bonus. That > must be an indication of the "small diffuse shading errors" you > mentioned. It turns out that GeometryInfo has an extra constructor that > takes a GeometryArray which was not mentioned in the JavaDoc API, so it > was easier to use than I expected. More likely the vrml models just used duplicate normals for each facet. I thought the facetted effect was intentional so I didn't mention that. GeometryInfo should give you unit-length normals, so you shouldn't need to set the specular color to black after using it. Unless you want absolutely no specular lighting effects. > I've also added a PolygonAttributes component to cull the back-facing > polygons, but that doesn't seem to make any difference. It should improve your rendering speed since you'll be rendering half the polygons on average. You can use the stripication feature of GeometryInfo to reduce your vertex count as well for increased performance. > >Your video driver should have a setting for gamma correction, which > >adjusts the relative brightness of the dark areas with respect to the > >light areas. You should set all your monitors to the same gamma if want > >to compare colors between them. Standard "linear" gamma is 2.2 (with > >respect to the dynamic range of the human visual system) but most > >monitors tend to set at 1.0 because that seems to be what most GUI and > >game developers design for. > > > > > I still have to look into this. It may explain why our application looks > so different between different operating systems and video cards. If you were indeed using non-unit-length normals, then the effect that would have on rendering is probably device-dependent, so that may explain your inconsistent results as well. -- Mark Hood =========================================================================== 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". ==========================================================================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".
