CH 4 Hierarchical Scene Representations 4 1 Treebased
CH. 4 Hierarchical Scene Representations 4. 1 Tree-based Representation 4. 2 Updating a Scene Graph 병렬처리연구실 류소현
Tree-based Representation Hierarchical representation n 다수의 객체중 렌더링해야할 객체의 선별 필요 w 무의미한 객체 렌더링에의한 성능저하 방지 w 객체의 그룹에 의미 부여 필요 n Scene Graph w 공간적, 의미적으로 연결된 data set n n Tree structure Directed acyclic graph
Tree-based Representation Tree 구조가 유지하는 정보 n n Transforms Bounding volumes Render state Animation state
Transforms Notation n SRT transform (Scaling-Rotation-Translation) M T 0 T 1 : = 1 0 0 0 0 1 0 Tx Ty Tz 1 Local transform n 각 node 의 parents를 기점으로 한 transformation 표현 World transform n 해당 node의 모든 predecessor 의 local transform 의곱
Bounding volume 필요성 n n View frustum 외의 객체 culling Collision detection Bounding volume 계산 n n n Parents는 child의 bounding volume을 포함 Child bounding volume을 merge하여 parents로 전 달 Leaf로 부터 upward propagation
Updating a Scene Graph Merging two sphere C 0 r 0 C 1 r= C 0 C 1 C 0 L r 1 L+r 1+r 0 r 1 – r 0 >= L r 1>=r 0 (r 1 -r 0)2 >=L 2 C 0 C 1 2 C = C 0 + L+r 1 -r 0 (C 1 - C 0) 2 L r 0>=r 1 (r 0 -r 1)2 >=L 2
Updating a Scene Graph Merging two oriented boxes n n 중점 C는 C 0, C 1의 중간점 Local axes 는 각 box의 axes의 interpolation을 이 용 w w w 각 box의 axes를 rotation matrix Ri로 저장 Ri로 부터 unit quaternion qi를 계산 q = (q 0 +q 1)/|q 0+q 1| q로 부터 merged box axes를 역산 원 data point를 모두 포함하는 크기로 box 확장
Updating a Scene Graph Merging two capsules n n n 두 capsule의 중앙점 Ci의 중간점을 merged capsule의 기본점 C로한다 Unit direction vector Ui를 합성하여 direction vector U를 구한다. C 0 두 end circle을 포함하는 최소의 end circle을 구해 새로운 capsule 을 구한다. P 0 U 1 U 0 C C 1 P 1
Updating a Scene Graph Merging two lozenges n n n Lozenges의 center point Ci = Pi+(E 0 i+E 1 i)/2를 구 한다. C 0, C 1의 중점을 C로 정한다. 각각의 normal vector Ni = U 0 i X U 1 i를 구하고 rotation matrix [U 0 i U 1 i Ni]를 이용하여 quaternion qi를 구한다. q=(q 0+q 1)/|q 0+q 1|을 구하여 merged lozenges의 rotation matrix를 역산한다. Original dataset의 extreme point를 통해 radius r을 구한다.
Updating a Scene Graph Merging two cylinders n n Capsule의 경우와 같다. Merged cylinder의 height는 중앙선에 사영된 data point를 모두 포함하는 최소값이 된다. Merging two ellipsoids n n Box의 경우와 같다. Quaternion의 interpolation에 의해 구해진 새로운 axes에 사영된 original ellipsoids로 부터 전체를 포 함하는 최소 폭을 구한다.
Algorithm for Scene Graph Updating Implementation class n Spatial w Link to parents, local and world transform n Geometry w Geometric data 관리 n Node w Internal node
Algorithm for Scene Graph Updating Spatial Node Geometry Node Update. World. Data(float time) Update. World. Bound() Update. Render. State(Render. State current. State) Update. GS( float time, bool initiator) Update. World. Data(float time) propagate. Bound. To. Root() Update. RS(Render. State parent. State) Propagate. State. From. Root(Render. State parent. State) Geometry Update. World. Bound() Update. Render. State(Render. State current. State)
Algorithm for Scene Graph Updating update geometric state Node Update. World. Bound() Propagate. Bound. To. Root() Node merge Geometry Spatial Get. World. Bound() Spatial Update. GS() Get. World. Bound() Update. World. Data() Propagate. Bound. To. Root()
Algorithm for Scene Graph Updating Update renderer state Node Geometry Propagate. State. From. Rood() Node Spatial Propagate. State. From. Rood() Spatial Node Spatial Update. RS() Propagate. State. From. Rood() Update. Render. State() Spatial Update. RS()
- Slides: 16