www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: AeroShark333 on December 20, 2017, 08:00:22 pm

Title: Calculate visibility of an Object3D
Post by: AeroShark333 on December 20, 2017, 08:00:22 pm
Hello,

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.

Cheers,
Abiram
Title: Re: Calculate visibility of an Object3D
Post by: EgonOlsen on December 29, 2017, 11:27:40 pm
Wouldn't two fovs in one image look strange anyway?