Hello,

First, thanks to the people who helped me out with the Normals calculations.

I have now got my class to generate a surface from an array of hieght
values, using a TriangleStripArray. It was Much Fun :)

I have a problem though....

The surface renders, and its shape is correct. It is illuminated by a
pointlight a little way away.

But, instead of appearing as a nice, smooth undulating surface it appears to
be stripey!  Each strip from the tristriparray is rendered shaded from
light->dark across its short edge, giving a stripey appearance.

IE; (L=Light, D=Dark!)
(I hope this is understandable..  I forgot a screenshot)
____________________
|LLDD|LLDD|LLDD|LLDD|
|LLDD|LLDD|LLDD|LLDD|
|LLDD|LLDD|LLDD|LLDD|
|LLDD|LLDD|LLDD|LLDD|
|LLDD|LLDD|LLDD|LLDD|
|LLDD|LLDD|LLDD|LLDD|
|LLDD|LLDD|LLDD|LLDD|
|LLDD|LLDD|LLDD|LLDD|
|LLDD|LLDD|LLDD|LLDD|
---------------------

I assume this is something to do with how I am computing the normals? I have
found it would be ideal to calculate the normals on a per-triangle basis
rather than per-vertex as triangles are sharing vertices in a tristriparray,
is this related to my problem??

Also, something I have noticed that may help. If I negate my normals, the
light->dark shading becomes dark->light rather than not rendering at all,
which I thought should happen..

Another not-quite-related question, TriStripArray does a good job of
re-using vertices in each strip, is it possible to get it to re-use vertices
in adjacent strips when the strips form a grid? (Ok, this makes the normals
problem horrible (Which plane should the normal be perpendicular to) but
saves memory.... Hmm, maybe I could write a class for it..

Thanks,

Matthew.

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

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