my solutions

The Partridge Family were neither partridges nor a family. Discuss.
randomGuy
Posts: 32
Joined: May 31st, 2018, 11:45 am

Re: my solutions

Post by randomGuy » September 22nd, 2018, 2:30 pm

https://youtu.be/h_Aqol0oTs4?list=PLqCJ ... d8lA&t=476

Why does it not matter which point of the triangle we pick? The viewing vector will be slightly different and we will get different result of the dot product, will we not?
Shouldn't our viewing vector point to the middle of the triangle, instead of a point?

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: my solutions

Post by albinopapa » September 22nd, 2018, 6:25 pm

Because you only need to know if the result of the dot product is >0 or <0.

Since none of the vertices can have a negative normal direction and the rest have a positive normal direction, you can use just the one normal. If you needed to get the face normal for say a pyramid shape, then I could see needing the actual face normal if the vertices were shared. Most likely though, for that particular type of shape, you'd want the face normal to be all the same and not rounded, so the vertices wouldn't be shared so that when you interpolate between the three, you always get the same normal across the face.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: my solutions

Post by chili » September 24th, 2018, 2:58 pm

this is culling. if any part of the triangle is visible, the whole thing is visible (facing toward the viewing point, not talking about occlusion here ofc). So therefore it doesn't matter what point you choose.
Chili

Post Reply