Terrain Normals

Blitz3D Forums/Blitz3D Programming/Terrain Normals

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hmm, i think you can only calculate it from the surrounding 4 points if your tri setup is as below

A--B--C
| / | \ |
D--E--F
| \ | / |
G--H--I

Then you calculate the normal for BEF, BDE, DEH and EFH. add the four normals vectors together and normalize.

If its

A--B--C
| / | / |
D--E--F
| / | / |
G--H--I

You will have to get the normals for DBE, BCE, ECF, DEH, GEH and EFH. Add the 6 normals together and normalize. I think thats whats needed(Cant be sure its been a while)