From bram@sara.nl Mon Jul 11 05:31:58 2005 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Mon, 11 Jul 2005 05:32:03 -0700 (PDT) Received: from orwell.sara.nl (orwell.sara.nl [145.100.16.26]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j6BCVvH9002199 for ; Mon, 11 Jul 2005 05:31:58 -0700 Received: from [145.100.25.200] (pistache.sara.nl [145.100.25.200]) by orwell.sara.nl (8.12.10+Sun/8.12.10) with ESMTP id j6BCUFVU013403 for ; Mon, 11 Jul 2005 14:30:15 +0200 (MEST) Message-ID: <42D26657.6020009@sara.nl> Date: Mon, 11 Jul 2005 14:30:15 +0200 From: Bram Stolk User-Agent: Debian Thunderbird 1.0.2 (X11/20050331) X-Accept-Language: en-us, en MIME-Version: 1.0 To: info-inventor-dev@oss.sgi.com Subject: SoMaterial is fundamentally flawed Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.51 on 145.100.16.26 X-archive-position: 141 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: bram@sara.nl Precedence: bulk X-list: info-inventor-dev Hello, I think that there is a fundamental flaw in Inventor's materials. In particular: the default ambientColor makes no sense. From the OpenGL red-book, chapter 6: "Ambient and diffuse reflectances define the color of the material and are typically similar if not identical." This statement makes perfect sense: 99.9% of all object in the real world will have a fixed colour, regardless of the direction of the incoming light. If the light is ambient, instead of directed, why on earth would the perceived colour of the object change? This is a rare occasion, and happens e.g. with the surface of a CD. In Inventor, (And just about any OpenGL based system), the colour of objects change dramatically if the light is not directed, but ambient, and a default ambientColor is used. This is caused by the fact that the ambient colour of materials is by default 0.2 0.2 0.2, which is dark grey. This is wrong: A red sphere in ambient light should be red, not grey. The bulk of all the Inventor models out on the net suffer from using default ambient colours. (just try viewing /usr/share/inventor/data/chair.iv in ambient light, and you'll see what I mean). A better default would be to use the diffuseColor, if ambientColor is not set. Of course a dynamic default for ambientColor based on diffuseColor is a tricky thing, programming-wise. So maybe a 0,0,0 default ambientColor is better.... This forces the programmers/designers to think about ambientColours if they want to use ambient light in their scenes. The nonsense-default value is ofcourse a result of the same illogical use of this default in the OpenGL spec for glMaterial() I think GL_AMBIENT should never be used with glMaterial, only GL_AMBIENT_AND_DIFFUSE makes sense. Bram