d.kupavcev Posted June 30, 2015 Posted June 30, 2015 Do I understand correctly that the objects are not culling by the near and far clipping planes.In methodsint WorldBoundFrustum :: inside_planes_fast (const Vec3 & point, Scalar radius) const{if (dot (planes [0], point) <-radius) return 0;if (dot (planes [1], point) <-radius) return 0;if (dot (planes [2], point) <-radius) return 0;if (dot (planes [3], point) <-radius) return 0;return 1;}int WorldBoundFrustum :: inside_planes_fast (const Vec3 & min, const Vec3 & max) const{if (inside_plane (planes [0], min, max) == 0) return 0;if (inside_plane (planes [1], min, max) == 0) return 0;if (inside_plane (planes [2], min, max) == 0) return 0;if (inside_plane (planes [3], min, max) == 0) return 0;return 1;}There are no checks boundSphere boundBox on the near and far planes: if (dot (planes [4], point) <-radius) return 0; if (dot (planes [5], point) <-radius) return 0;and if (inside_plane (planes [4], min, max) == 0) return 0; if (inside_plane (planes [5], min, max) == 0) return 0;What is the reason?P.S. Unigine doesn't have technologies for solving issues concerning depth buffer presicion. (eg to draw cosmic space).For example: "3D Engine Design for Virtual Globes" - Patrick Cozzi, Kevin Ring - paper "Rendering with Multiple Frustums".
ulf.schroeter Posted June 30, 2015 Posted June 30, 2015 d.kupavcev, on 30 Jun 2015 - 08:52 AM, said: P.S. Unigine doesn't have technologies for solving issues concerning depth buffer presicion. (eg to draw cosmic space). For example: "3D Engine Design for Virtual Globes" - Patrick Cozzi, Kevin Ring - paper "Rendering with Multiple Frustums". Depth buffer precision has been a long time discussion issue :) (though cosmic space range capability is only seldomly required...) https://developer.unigine.com/forum/topic/138-solved-near-clipping-plane-and-z-fighting/?p=671
binstream Posted June 30, 2015 Posted June 30, 2015 Since we are now working on space-related project, that issue will be resolved for sure.
d.kupavcev Posted July 2, 2015 Author Posted July 2, 2015 Great! But there are no checks for boundSphere and boundBox in relation to near and far planes. What is the reason?
unclebob Posted July 2, 2015 Posted July 2, 2015 Hi there! There's another version of such method which checks all 6 planes called BoundFrustum::inside_planes. For performance purposes we also wrote faster version that skips far and near clipping planes so don't worry.
Recommended Posts