1 / 24

Constructive Solid Geometry Ray Tracing CSG Models

Constructive Solid Geometry Ray Tracing CSG Models. CSG. Form object as booleans of primitive objects Primitives: sphere, cube, cylinder, cone Boolean operators: union, intersection, difference Tree structure used to manage operations Leaf nodes are primitive objects

oki
Download Presentation

Constructive Solid Geometry Ray Tracing CSG Models

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Constructive Solid Geometry Ray Tracing CSG Models CSE 681

  2. CSG • Form object as booleans of primitive objects • Primitives: sphere, cube, cylinder, cone • Boolean operators: union, intersection, difference • Tree structure used to manage operations • Leaf nodes are primitive objects • Intermediate nodes specify combination operator CSE 681

  3. Union B C + B C Ray intersects union: at first intersection Min (tCmin, tBmin ) CSE 681

  4. Possible ways for 2 spans to overlap CSE 681

  5. Intersection B C ++ B C First time in B and in C If ((tCmin< tBmin ) and (tCmax> tBmin ) ): tBmin Else If ((tBmin< tCmin ) and (tBmax> tCmin ) ): tCmin Else: none CSE 681

  6. Difference B C -+ B C If ((tBmin< tCmin ): tBmin Else if (tCmax< tBmax ): tCmax Else: none First time in B not in C CSE 681

  7. Difference B +- C B C First time in C not in B If ((tCmin< tBmin): tCmin Else if (tBmax< tCmax ): tBmax Else: none CSE 681

  8. Primitives Anything that can be intersected (easily) with a ray Conics: solve analytically using R(t) Convex polyhedra A plane (a cutting plane is useful) can be used as a modeling tool (boolean operations) surface model (e.g., polyhedron) computed from CGS or Can be used as a model representation keep tree structure and ray trace directly CSE 681

  9. Controlling the Combinations + - + ? CSE 681

  10. + - + Tree Structure T2 T1 T3 T5 + + T4 - + T3 T2 T1 rectangle rectangle circle CSE 681

  11. Tree Structure #1 CSE 681

  12. + - + Tree Structure T2 T1 T3 T5 + + T4 + - T3 T2 T1 rectangle rectangle circle CSE 681

  13. Tree Structure #2 CSE 681

  14. Tree Structure • Intersect ray with leaf nodes (primitive objects) • Combine intersection spans according to intermediate nodes • union • intersection • difference • Might create multiple spans CSE 681

  15. Union of Spans CSE 681

  16. Intersection of Spans CSE 681

  17. Difference of Spans CSE 681

  18. Normals of CSG intersections Normal of some surface (or its negation) Union or intersection: positive normal of intersected surface CSE 681

  19. Difference normals • Intersection is one of: • tmin of positive object – normal of surface • tmax of negative object – negated normal CSE 681

  20. Add transformations to tree http://www.cs.mtu.edu/~shene/COURSES/cs3621/NOTES/model/csg.html CSE 681

  21. T5 + + T4 - + T3 T2 T1 rectangle rectangle circle • Construction • Use bounding volumes at leaf nodes • Union bounding volumes at interior nodes Bounding Volumes • Traversal • Top-down • Test bounding volume at interior CSE 681

  22. Examples CSE 681

  23. Examples CSE 681

  24. Examples CSE 681

More Related