Hi,
I am pretty much using the sample code to generate a marching cubes mesh, and disabled normal interpolation in my shader (using 'flat' vars).
I have attached three images (inline at the end of this post):
- the 'cubic' mesh generator,
- the 'marching cubes' generator with flat normal interpolation, and
- the 'marching cubes' generator with smooth normal interpolation (same as the samples)
The issue can be seen in pic 2 where the dark regions meet the light regions - the definition of the vertex normals at the edges become confused and lighting calculations seem to get very weird.
Is this a known issue? I dont think its caused by my code because it looks like the samples if I use smooth interpolation...
Thanks,
Attachment:
File comment: cubic mesh
Screen Shot 2014-05-11 at 9.33.41 AM.png [ 78.61 KiB | Viewed 7160 times ]
Attachment:
File comment: marching cubes mesh with 'flat' normal interpolation
Screen Shot 2014-05-11 at 9.34.32 AM.png [ 144.12 KiB | Viewed 7160 times ]
Attachment:
File comment: marching cubes with default normal interpolation
Screen Shot 2014-05-11 at 9.48.10 AM.png [ 242.45 KiB | Viewed 7160 times ]