Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Determine visibility of mesh triangle from a given a point of view

Discussion in 'General Graphics' started by metigel94, Apr 15, 2021.

  1. metigel94

    metigel94

    Joined:
    Oct 11, 2019
    Posts:
    12
    Hi.

    I hope this is the right place to post to but I figured it is related to graphics programming.

    I'm working on a project for which I need to determine whether a triangle (3x Vector3 vertices in world space) is occluded (both partially and fully) by another triangle when given the view matrix of a camera. Currently, I'm only able to conclude whether a triangle is within the camera's view frustrum but not whether it is ACTUALLY visible or if another triangle is placed in front of it. I don't need to perform any calculations afterwards, I'm simply interested in knowing whether triangles collide when viewed from a certain camera position.

    I know all the mesh data in world coordinates (triangles, vertices, etc.) as well as camera intrinsics and its view and projection matrix. Now, is there some way for me to determine actual visibility and occlusion of triangles?

    Any help is appreciated.
    Thanks.