Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About NewbZach

  • Rank

Personal Information


  • Github

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Ah assuming point p is coplanar clears things up a lot! I think I got it now, it's just that the book did not explain the situations to how the algorithm is used and it's limitations, or maybe I'm just too dense to catch it. Hence the confusion. Thanks for taking the time to reply all my persistently confused questions 😆 I haven't reached the GJK part yet but I see it coming up! Hopefully I'll be able to get through the remaining chapter in one piece! Thanks again 😊
  2. Let me rephrase the last question since I can no longer edit it, sorry. So in order to use this function, the pre condition has to be such that point P is coplanar to the plane generated by ABC? If not it won't return an accurate result? I was under the impression that point P could be any point in space, hence the confusion. Is my understanding correct?
  3. What do you mean by closest point between 2 shapes? Are the shapes planes defined by 3 points in 3d space? Maybe I'll Google it. I'm not trying to solve any problem, just trying to understand how this algorithm works, from it's input to output and what it means. Edit: ohh do you mean that in order to use this function, point p has to be coplanar with the plane generated by abc?
  4. From the code image linked below, it shows how this function is used by the author. So I would assume the function aims to find if point p is within the triangle defined by point a, b, and c by checking if the returned u and v values match up. This is the main misunderstanding I have with this algorithm. Is it not projecting the triangle defined by a b c onto a 2d plane by removing the largest dimension, as you have said, to get the largest area to reduce degeneracy. However, I am clearly misunderstanding how the u and v values calculated by the projection can translate over to determining if a point falls within the triangle in 3 dimensions. Hopefully my drawing is clear enough though the scale is a little off. Thank you for taking the time to help me! I think I replied to your question after you replied to mine haha sorry but I do not really know what I'm doing. Can you elaborate on what you think I'm doing? Haha sorry i'm such a noob. I understand that they are relative to the triangle vertices in 3 dimensions, but by projecting isnt it removing one dimension?
  5. Thats why the book says that barycentric coordinates are invariant between planes of projection. As the magnitude of the normal represents twice the surface area of the triangle formed by the 2 vectors, by projecting the triangle onto a plane, we can get the magnitude of the normal without any calculation as the other two values will be 0. (I think) essentially saying that although the areas of the sub-triangles (u and v before dividing by total area) on different planes (xy, xz, yz) are different, because the total area (represented by the normal resulting from the cross product) is also different, the ratio between sub-triangle areas and total area is maintained. What I don't really understand is how these projected u and v values are represented in the original un-projected triangle. If the values are calculated in 2 dimensions, which means having less information then in 3 dimensions, how does it get represented in 3 dimensions? I tried to draw it to better explain what i'm asking, sorry if its not to scale. So if the u and v values are calculated by the projected triangle and coordinates, p will be considered inside the projected triangle. However, it is not on the actual triangle as the y coordinate is higher up. I'm clearly misunderstanding something here, so I was wondering what it was. Thanks for the link though! I will be sure to check it out!
  6. Hi, i'm currently reading the book on real time collision by Christer Ericson and i'm kind of stuck understanding this concept. In the book, it says that under the property of barycentric coordinates remaining invariant under projection, which is reflected in the code below. However, while trying to visualize it, I don't understand why. For example if the u and v was calculated from the projection onto the xz plane, meaning it represents whether x z of point p is within the triangle projected on the xz plane. But how does it remain invariant across other planes? Like if the y coordinate is not within the plane generated by triangle ABC. This ties into my second question on whether the code below applies to a triangle in 3d space or is it limited to 2d? If it is limited to 2d why is there a need to project onto a 2d plane. And if its 3d, what do the u v coordinates reflect? Does it reflect if the point lies within the plane defined by triangle ABC in 3d space? Sorry if this is a weird question, it's just that the book doesn't really go into super detail about the math and skips a few steps, as it's just supposed to be a primer. Any help is appreciated, a point to a good resource that explains it in depth would also suffice, thank you!
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!