Occlusion Culling 3D
1 개요
설정한 시점에서 표면 혹은 점에 의해 보이지 않는 점을 제거하는 알고리즘 입니다.
2 알고리즘 상세 설명
| Source Object | Result | Back-face(RED) |
|---|---|---|
![]() |
![]() |
![]() |
Fig. 알고리즘 결과
3 파라미터 설정
-
SetCullingMethod(ECullingMethod eMethod)- 후면 제거 방법을 설정합니다.
- Edge와 같이 곡률이 큰 부분의 표현이 중요하지 않은 경우 Spherical Flipping 방법을, 중요한 경우 Ray Casting 방법이 권장됩니다.
- eMethod
- SphericalFlipping : 구면 뒤집기 방법
- RayCasting_LowPrecision : 저정밀도 광선 추적 방법
- RayCasting_Normal : 일반적인 광선 추적 방법
- RayCasting_HighPrecision : 고정밀도 광선 추적 방법
-
SetHPRSphericalRadius(float f32Radius)- 은점 제거를 위한 구의 반지름을 설정합니다.
SetCullingMethod(ECullingMethod_SphericalFlipping)설정 시 사용됩니다.- Default Value : 20000
- Recommended Value : 100 ~ 1000000
-
SetViewPoint(TPoint3<float> tp3ViewPoint)- 시점을 설정합니다.
- 설정한 시점에서 보이지 않는 점들을 제거하는 동작에 사용됩니다.
- tp3ViewPoint : 시점 위치
4 예제 코드
COcclusionCulling3D occlusionCulling3D;
CFL3DObject floSource;
CFL3DObject floDestination;
TPoint3<float> tp3ViewPoint;
occlusionCulling3D.SetSourceObject(floSource);
occlusionCulling3D.SetDestinationObject(floDestination);
occlusionCulling3D.SetViewPoint(tp3ViewPoint);
occlusionCulling3D.SetCullingMethod(COcclusionCulling3D::ECullingMethod_RayCasting_LowPrecision);
occlusionCulling3D.Execute();


