Author Topic: Calculate visibility of an Object3D  (Read 783 times)

Offline AeroShark333

  • long
  • ***
  • Posts: 225
    • View Profile
Calculate visibility of an Object3D
« on: December 20, 2017, 08:00:22 pm »

My problem is the following.
Let's say I have 2 Object3D's and one camera.
Object1 is drawn first using FOV setting 1.
Object2 is drawn after using FOV setting 2.
Both objects are sphere's (if that's helpful information)
A part of Object1 is 'blocked' by Object2 (which is fine since Object2 is closer to the camera anyway).

How can I calculate if Object1 is blocked or if it is visible?
And if Object1 is a complex Object3D how can I calculate what percentage of the total of Object1 is visible?

In the past I was able to calculate if Object1 was visible or not using sine, but in that case FOV1 = FOV2. (see sketch)
Now that the FOV's are different, it doesn't work.


Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12066
    • View Profile
Re: Calculate visibility of an Object3D
« Reply #1 on: December 29, 2017, 11:27:40 pm »
Wouldn't two fovs in one image look strange anyway?