Hello everyone,
I’m working on a simple simulation for activities of daily living. One part of this simulation is the generation of depth maps which we use for deep learning evaluations a.s.o… A problem is that we use the fisheye projection approach from Bourke et al. (http://paulbourke.net/dome/unity3d/) and a limit is that we can’t use the depth maps created for each camera. Long story short, I’ve written a simple shader that seems to work except the case if some character is laying in the bed. For an unknown reason, the person in the bed is closer to the ground than the surface of the bed in the depth map. See screenshot below:
# Shader Code
float4x4 _fisheyeView;
inline float CustomDepth(float3 vertex) {
float4x4 mat = mul(_fisheyeView, UNITY_MATRIX_M);
float3 v = mul(mat, vertex);
return 1 - (v.z / _fisheyeView._m13);
}
Has someone an explanation for this?