My understanding is that lighting is that each type of light source effects
a different part of the material. The vertex color components are
multiplied with the light source and appropriate material.. Sorry I don't
have my notes with me...
red = vertex_red * (ambient_red * material_diffuse_red) * (direct_red *
material_specular_red)
so if your vertex is color is white, and ambient is 0.70, direct light is
0.70 then for shade (from direct light) you get 0.5 and for bright exposure
you get 1.0.
Now thats for each componant. and if you apply textures you will also
modulate the texels in with the colors.
The OpenGL Bible has a real nice explanation of how this all works. I just
don't have it with me.
There are also some attributes "ignore vertex colors" and a few other ones
that can effect how this works. But I often turn texturing off on my
terrain and just look at the shaded terrain and it is definitely using the
vertex colors and the materials.
Dave Yazel
> ----------
> From: Casteel, Don[SMTP:[EMAIL PROTECTED]]
> Reply To: Discussion list for Java 3D API
> Sent: Tuesday, January 30, 2001 2:56 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D] HELP! Shading Geometry with color by vertex?
>
> I would assume your correct, but if I change the colors in the Material
> object, I definitely get a different appearance at runtime, and it's very
> obvious that it's trying to render the Material color as well as the
> geometry colors.
>
> Thanks
> Don
>
> -----Original Message-----
> From: Axel Groß [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 30, 2001 2:35 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D] HELP! Shading Geometry with color by vertex?
>
>
> -------------------
> > I guess I've had this trouble for a long time, it's just now getting
> > annoying enough to force me to ask about it.
> >
>
> :) sounds familiar
>
> > When I create IndexedGeometryArray's with per-vertex coloring and
> try to use
> > a Material in the Appearance node, the lighting/coloring gets all
> screwed
> > up. The coloring is fine if I don't use a Material, but there is no
> shading.
> > ---snip,snip---
> >
>
> Hi,
>
> as far as I remember Java3D doesn't use the given Colors if you use a
> material and have some Lights on. This means Colors XOR Shading.
>
> ciao,
> Axel Gross
>
> ==========================================================================
> =
> 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".
>
===========================================================================
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".