Hi all!
Perhaps this does not do what I thought it would do. Or perhaps I am using
it wrong.
1. I have defined a triangle strip array
2. I have two tex coord sets defined, mapped to tex units 0 and 1
3. I have a terrain mesh. As I am building the vertices I am specifying the
texture coordinates.
4. Based on certain criteria for each vertex I either set the texture set to
0 or 1, with an appropriate texture coordinate
5. I am creating the appearance with two texture units, one specified with a
"grass" texture, the other with a "sand" texture
6. All of the vertices are colored grey
7. Texture attributes on both texture units are set to modulate
8. I have directional lights and a ambient light
My terrain comes out very odd. First of all the "sand" area is coming out
green. Secondly I am not convinced it is applying the texture at all in
those areas. Also there is massive "warping" in the "sand" areas. The
grass areas look normal.
First question: Can I do what I am trying to do here? have the textures
change from grass to sand in a single mesh?
Second question: If I can the what am I doing wrong?
I am not creating the texcoordarrays and setting them in the geometry, I am
just setting them at the vertex level as I make the mesh. I am assuming the
contructor to the triangle strip array will make them for me of the proper
size.
This works fine if I only reference the first tex coord set.
Dave Yazel
===========================================================================
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".