I'm doing this using the IndexedQuadArray (and the IndexedTriangleArray) and
the per-vertex coloring is working just fine. However, setting up the
Material really doesn't figure into it - using the SetColors method (or
equivalent) once the appropriate vertex format is set (COLOR_3 or COLOR_4)
should do the trick. A couple of possible trouble spots: 1) lighting must
be enabled and on (I know, this one is obvious) 2) if you try to 'SetColors'
on a QuadArray (or TriangleArray) that is part of a live scene graph, you
must 'reset' the geometry once you do a 'SetColors' (i.e., a SetGeometry).
Why you have to do this is a mystery to me, but it won't work without it.
Hope this helps,
Burns
-----Original Message-----
From: Casteel, Don [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 29, 1999 5:56 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Shading QuadArray with per-vertex colors?
I've posted this question before, and have seen it asked by others, but I've
never seen an answer:
If I've got a QuadArray (and I assume TriangleArray as well) with
per-vertex-colors, how do I set up the Material so I get shading with the
colors I've put in?
Seems a simple question, but I get the feeling it can't be done which would
be a huge drawback to Java3d.
Don Casteel
Manufacturing Engineer
TEXTRON Automotive Company -- Athens Operations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Voice: (423)744-1109
Fax: (423)744-1112
Pager: (423)744-1129 -- 109
Internet: [EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
===========================================================================
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".