How to know if a triangle is facing the camera?

Blitz3D Forums/Blitz3D Programming/How to know if a triangle is facing the camera?

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.

hello, basically Im a using poly which isn't unwelded, so there are a lot of shared verts. I was hoping to try and find out which verts were visible to the camera (for a hidden line routine).

Im still new to this cross product / dot product stuff and still getting my head around it. Anyway when I use a dot product to check visibility with the shared verts, it doesnt always work i.e. I can physically see the vert on the screen before dot product is <=0. Maybe Im doing something wrong here?

So my next idea was to use the normals of each of triangle to check their dot products. If they were in view then I could assume that all the verts that go to make up that triangle are also visible (and therefore I wouldnt need to unweld my model).

HHmm I hope its clear? Thanks for you help on this Stevie G :)