I have a 3D human model with 48060 faces and 24067 points. I want to work out which faces are visible for certain camera. The back faces culling has been done, but I have no idea about the occlusion faces. For example, most of one foot is occluded by another if viewing from side. The result need to be precise because I want to do texture mapping by using photograph for next step.
Any help would be appreciated!
Maybe some adaptation of depth shadow map can be used ? Replace the lightsource by the camera location from which the photograph was taken.
Ideally all texture mapping should be done outside the application in your nearest modeling application and photoshop.
However the trick for good projective texturing is not which faces are visible but what fragments are visible and by how much.
The first thing is as Zbuffer said, use depth shadow maps but also using the dotproduct of cameraviewvec and normal should help narrow it down a little.
Secondly, find a way to remove as much extra data as possible as that will most likely interfere with the texturing.
Thirdly, blend all the maps with a standard skin texture that is used for all those places your projective texturing won’t reach.
There is another way as well, build the texture using a standard template in 2D before uploading the texture, it’s way faster and more stable.