Probably getting realistic "metals" is going to be difficult, since it
will heavily depend on lighting, surroundings, reflections [ray tracing?]
etc.

Here are some "recipes" transliterated from some old VRML code. I was
disappointed with the results but didn't try it with point lights (which
might have made them more "metallic" looking through specular highlights).

    // Gold
        material.setAmbientColor ( new Color3f( 0.57f, 0.40f, 0.00f ) );
        material.setDiffuseColor ( new Color3f( 0.22f, 0.15f, 0.00f ) );
        material.setSpecularColor( new Color3f( 0.71f, 0.70f, 0.56f ) );
        material.setShininess( 0.16f );
    // Aluminium
        material.setAmbientColor ( new Color3f( 0.30f, 0.30f, 0.35f ) );
        material.setDiffuseColor ( new Color3f( 0.30f, 0.30f, 0.50f ) );
        material.setSpecularColor( new Color3f( 0.70f, 0.70f, 0.80f ) );
        material.setShininess( 0.09f );
    // Copper
        material.setAmbientColor ( new Color3f( 0.33f, 0.26f, 0.23f ) );
        material.setDiffuseColor ( new Color3f( 0.50f, 0.11f, 0.00f ) );
        material.setSpecularColor( new Color3f( 0.95f, 0.73f, 0.00f ) );
        material.setShininess( 0.93f );
    // Metallic purple
        material.setAmbientColor ( new Color3f( 0.25f, 0.17f, 0.19f ) );
        material.setDiffuseColor ( new Color3f( 0.10f, 0.03f, 0.22f ) );
        material.setSpecularColor( new Color3f( 0.64f, 0.00f, 0.98f ) );
        material.setShininess( 0.08f );
    // Metallic red
        material.setAmbientColor ( new Color3f( 0.25f, 0.15f, 0.15f ) );
        material.setDiffuseColor ( new Color3f( 0.27f, 0.00f, 0.00f ) );
        material.setSpecularColor( new Color3f( 0.61f, 0.13f, 0.18f ) );
        material.setShininess( 0.12f );

Another source of ideas could be Povray's metals.inc file. Its model would
need to be adapted [seems to have a few more parameters]:
..
//  P_Brass3: Used by Steve Anger's Polished_Brass. Slightly coppery.
#declare P_Brass3    = color rgb <0.58, 0.42, 0.20>;
// F_MetalD  :  Highly hard and polished. High reflectivity.
#declare F_MetalD  =
finish {
    ambient 0.15
    brilliance 5
    diffuse 0.6
    metallic
    specular 0.80
    roughness 1/100
    reflection 0.65
}
#declare T_Brass_3D = texture { pigment { P_Brass3 } finish { F_MetalD  } }

===========================================================================
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".

Reply via email to