Oriented Bounding Box generation

Similar documents
Topics. Ray Tracing II. Intersecting transformed objects. Transforming objects

Topics. Ray Tracing II. Transforming objects. Intersecting transformed objects

Manipulating the Boundary Mesh

Ray Tracing Acceleration. CS 4620 Lecture 20

Lesson 05. Mid Phase. Collision Detection

Holger Dammertz August 10, The Edge Volume Heuristic Robust Triangle Subdivision for Improved BVH Performance Holger Dammertz, Alexander Keller

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

ADOBE ILLUSTRATOR CS3

STUDIO 12 MANUAL PROCESSING GUIDE

Mosaics. Today s Readings

Computational Geometry. Algorithm Design (10) Computational Geometry. Convex Hull. Areas in Computational Geometry

Triangle Rasterization

Collision Detection. Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering

Ray Tracing Acceleration. CS 4620 Lecture 22

Or select Reset button under the application button (3ds Max symbol top left of screen)

Workshop 1: Basic Skills

Voronoi Diagram. Xiao-Ming Fu

Recall: Inside Triangle Test

Elementary Planar Geometry

3 Polygonal Modeling. Getting Started with Maya 103

Krita Vector Tools

Introduction to ANSYS FLUENT Meshing

Processing 3D Surface Data

Introduction to ANSYS ICEM CFD

Ray Tracing. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

Mesh Repairing and Simplification. Gianpaolo Palma

Applications. Oversampled 3D scan data. ~150k triangles ~80k triangles

Acceleration Data Structures

Flair Geometry Editor Part II. FLUKA Beginner s Course

Section 8.3: Examining and Repairing the Input Geometry. Section 8.5: Examining the Cartesian Grid for Leakages

Overview. Efficient Simplification of Point-sampled Surfaces. Introduction. Introduction. Neighborhood. Local Surface Analysis

CPSC / Sonny Chan - University of Calgary. Collision Detection II

Universiteit Leiden Computer Science

Mesh Simplification. Mesh Simplification. Mesh Simplification Goals. Mesh Simplification Motivation. Vertex Clustering. Mesh Simplification Overview

Digital Geometry Processing

SAMPLING AND THE MOMENT TECHNIQUE. By Sveta Oksen

Supplementary Materials for

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

CS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL:

Image Stitching. Slides from Rick Szeliski, Steve Seitz, Derek Hoiem, Ira Kemelmacher, Ali Farhadi

Flair Geometry Editor Part II. FLUKA Beginner s Course

CS 465 Program 5: Ray II

Efficiently Approximating the Minimum-Volume Bounding Box of a Point Set in Three Dimensions

Input. Output. Problem Definition. Rectified stereo image pair All correspondences lie in same scan lines

Using the Boundary Wrapper

XSI TO SINS: COMMANDS & SHORTCUTS

Topic 6 Representation and Description

Overview. Spectral Processing of Point- Sampled Geometry. Introduction. Introduction. Fourier Transform. Fourier Transform

Working with the BCC 2D Particles Filter

Advanced 3D-Data Structures

Exploiting Local Orientation Similarity for Efficient Ray Traversal of Hair and Fur

Bounding Volume Hierarchies

Image representation. 1. Introduction

Collision Detection with Bounding Volume Hierarchies

Processing 3D Surface Data

How to generate a surface in mefisto

Using Bounding Volume Hierarchies Efficient Collision Detection for Several Hundreds of Objects

Homographies and RANSAC

Geometric Modeling. Mesh Decimation. Mesh Decimation. Applications. Copyright 2010 Gotsman, Pauly Page 1. Oversampled 3D scan data

Computer Graphics. - Spatial Index Structures - Philipp Slusallek

S206E Lecture 17, 5/1/2018, Rhino & Grasshopper, Tower modeling

Spectral Classification

CS535 Fall Department of Computer Science Purdue University

Repeating Fractal Patterns with 4-Fold Symmetry

Cga-LoD Developer Documentation

Correspondence. CS 468 Geometry Processing Algorithms. Maks Ovsjanikov

JMM 2017, Atlanta, Georgia. Creating Wallpaper Patterns that are Locally Random Fractals

Assignment 5: Shape Deformation

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Fast oriented bounding box optimization on the rotation group SO(3, R)

INFO0948 Fitting and Shape Matching

improving raytracing speed

Working with the BCC 3D Image Shatter Filter

Spatial Data Structures

10.1 Overview. Section 10.1: Overview. Section 10.2: Procedure for Generating Prisms. Section 10.3: Prism Meshing Options

Render-To-Texture Caching. D. Sim Dietrich Jr.

ACT Math and Science - Problem Drill 11: Plane Geometry

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday

Quickstart for Desktop Version

CS 4649/7649 Robot Intelligence: Planning

Simulations of the quadrilateral-based localization

Spatial Data Structures

Chapter 3 Image Registration. Chapter 3 Image Registration

CGAL. Mesh Simplification. (Slides from Tom Funkhouser, Adam Finkelstein)

Scientific Visualization Final Report

Tutorial 3 Comparing Biological Shapes Patrice Koehl and Joel Hass

Box Modeling a Character Model Maya 2013

CSE 252B: Computer Vision II

Microsoft Access 5: Reports & Other Useful Functions

Simple Silhouettes for Complex Surfaces

EECS490: Digital Image Processing. Lecture #23

Computational Geometry

Plane Based Free Stationing for Building Models

Geometric Computation: Introduction. Piotr Indyk

CS 4620 Program 4: Ray II

(Sparse) Linear Solvers

Quickstart for Web and Tablet App

Assignment 3: Edge Detection

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

BCC 3D Extruded Image Shatter Filter

Transcription:

Oriented Bounding Box generation Overview The ObbUtils library contains all Oriented Bounding Box algorithms. All Oriented Bounding Box Algorithms implement the IObbAlgorithm interface. Additionally the ObbUtils library contains an Obb- Tree implementation. The ObbTree class and ObbTreeNode classes are part of this implementation. The ObbUtils library also contains a range of useful extension methods for Obb s. Obb Algorithms The IObbAlgorithm interface contains the methods: ObbContainer ComputeObbContainer(Vector3[] positions); OrientedBoundingBox ComputeBoundingBox(Vector3[] positions); When this method is executed, it returns a class named ObbContainer which contains the eigenvalues and bounding box computed by the implementation of the specific subclass of the interface. (The DITO- Algorithm Subclass currently doesn t implement eigenvalue computation and therefore it can t be used with the Hierarchy generation algorithm) Obb Tree An Obb-Tree is created by using its constructor: public ObbTree(Geometry3D geometry, IObbAlgorithm algorithm) The constructor needs two parameters: The geometry for the Obb tree and the algorithm that is used for Obb generation. The Obb Tree is an implementation of the classical Obb-Tree algorithm. The leaves of the ObbTree contain geometry at triangle level (multiple triangles possible). The nodes of the Obb Tree are represented by the ObbTreeNode classes. *Class diagrams. Etc.

UI Overview The default options are shown in the image above. The drop box allows to select one of the following algorithms: 1. Alglib (default): Use the Alglib library for eigenvalue computation and compute obbs with PCA 2. Matlab: Use Matlab for Obb computation. Requires an installed Version of Matlab. Requires installed Matlab Server. Can be problematic with larger models. 3. Ilnumerics PCA: Use the Ilnumerics library for eigenvalue computation and compute obbs with PCA. 4. DITO: Use the DITO Algorithm for Obb Computation. (Not compatible with hierarchy generation, no eigenvalue computation) The other 2 options concern the rendering of the Obbs in the main viewport. I. Render Obbs: Render the obbs as transformable Box models that move and rotate with the model. II. Render Obb Wires. Render the obbs as non-transformable wires.

Symmetry detection Overview The Hierarchy Analysis library contains methods for detecting reflective, rotational and translational symmetries. The HierarchyAnalysis.SymmetryDetection namespace contains all Classes and methods necessary for symmetry analysis. The static SymmetryDetector class contains different methods for symmetry detection. Symmetry detection works with a RANSAC approach for a number of trials.: In each trial a symmetry candidate is generated. A reflective, translational or rotational transform between two or three parts (for rotations) is computed to this end. This transformation is then applied to each part. If the transformation maps this part to another part with similar eigenvalues the support counter is increased. If the support counter is above a certain hit percentage the symmetry is accepted. The best symmetry (with the biggest support count) is then returned. The Symmetry detector is configured by a SymmetryDetectorSettings class that comprises several parameters: The thresholds for eigenvalues and centers in the symmetry detection process. The minimum support percentage for the parts defines how many part-pairs must support the symmetry for it to be accepted. The number of trials defines the number of RANSAC trials. The SymmetryDetector class implements 3 methods for symmetry detection. public static SymmetryStructure DetectDominantSymmetryTransform(List<ModelPart> parts ) public static SymmetryStructure DetectSymmetryWithMaxSupport(List<ModelPart> parts) public static List<SymmetryStructure> DetectAllSymmetryTransforms(List<ModelPart> par ts) public static List<SymmetryStructure> DetectSymmetryTransforms(List<ModelPart> parts) All methods accept a List of ModelParts (with already computed obb-trees) as parameters. This is the list on which the SymmetryDetector performs its analysis. The methods return either a single symmetry structure describing the symmetry or a list of symmetry structures. A symmetry structure contains a Transformation that describes the symmetry (Transformation from each parts center to its symmetric counterpart), a SupportCount variable that contains the number of part-pairs that supported the Transformation in the RANSAC Step, a symmetry plane and the type of symmetry as an enum. The first method (DetectDominantSymmetryTransform) scans the List of Parts for the most dominant transform. This method first uses the approach described above to find a reflective symmetry, if none is

found (to low hit percentage) it continues by searching for a translational symmetry if no translational symmetry is found it finds the best rotational symmetry. The method DetectSymmetryWithMaxSupport computes reflective, rotational and translational symmetries. It returns the symmetry that is supported best by all parts. The method DetectAllSymmetryTransforms detects reflective rotational and translational symmetries of a model and returns them in an array. The last method (DetectSymmetryTransforms) returns all Symmetries that exist within a model (and are supported by at least one part pair). This method is used to display all symmetries within the UI. UI Overview The symmetry analysis algorithm uses the settings from the obb panel for selection of the obb algorithm. The image above shows the controls for the symmetry detection algorithm within the user interface. The first slider is used to set the percentage of parts that must support the symmetry to be accepted. The value is shown below in the Hit % field. The second slider adjusts the number of trials for the RANSAC algorithm. The last two sliders are used to define the values for the eigenvalue threshold and center thresholds respectively. The checkbox is used to enable and disable the rendering of the symmetry model within the UI.

Contact Detection Overview The Hierarchy analysis library contains a namespace called HierarchyAnalysis.ContactAnalysis which comprises all classes and methods for contact detection. The ContactAnalyzer class is the main class that performs contact detection. The ContactDetectionSettings class contains all settings for the contact detection algorithm. Contact detection is performed by following method: public static List<ModelPart> AnalyzeContacts(List<Geometry3D> geometries) This method accepts a list of Geometry3D Objects (the model parts) for which contacts are detected. It returns a list of ModelParts with computed contacts and adjacent parts. Contacts are computed with the following algorithm: First, each obb of each model part is tested with each other s model parts obb. If they overlap, the algorithm continues by traversing the obb trees of both parts to find all overlapping triangles of both parts. If two parts overlap on triangle level the algorithm refines each triangle by projecting additional points on each triangle. The way the points are projected depends on the selected Refinement algorithm (see UI Overview below). After the triangle positions are refined. The algorithm continues by measuring the distance of all triangle points from the first part to all refined points of the second part. If the distance is below a threshold (0.001% of the Model Obb diameter) each point is added to the list of contacts of both parts.

UI Overview The contact detection algorithm uses the settings of the obb panel for selecting the obb algorithm. The image above shows the UI Settings for the contact detection algorithm. The combobox selects the algorithm that is used for contact detection: 1. Grid: Projects a grid (aligned with the longest side of the triangle) onto all triangles of each model part and removes all points that don t lie inside the triangle. If this leads to less than 5 triangles per point, the algorithm generates a number of random points within the triangle. The number of points that are randomly generated in this case as well as the grid spacing can be set as parameters. 2. Lloyds algorithm: Uses Lloyds algorithm for triangle relaxation to generate the points within the triangles. The algorithm uses the Triangle.NET library for Voronoi diagram computation. Parameters that the algorithm accepts are: The number of random points that are generated in the initial phase, the maximum iterations for the Lloyd algorithm and the maximum of points per triangle that the Triangle.NET library is allowed to generate (Some triangle configurations force the Triangle.NET library to generate many points which can be slow.) The checkbox is experimental and tries to incorporate triangle size for the amount of random points that are generated initially. 3. Triangle.NET Smoothing: Uses the smoothing function of Triangle.NET to create a point distribution (similar to Lloyd). Parameters are the initial number of points as well as the maximum amount of iterations for the algorithm. The option Detect Single stops the algorithm after detecting a single contact between two parts. If this option is deselected it will detect all contacts of the refined triangles. Show Contacts disables or enables the visibility of the contacts (shown as red dots). The diameter-scaling option allows to increase

the diameter for detection (the diameter of models bounding box is multiplied by this value, see above for details) Hierarchy Generation Overview The hierarchy generation algorithm computes a part hierarchy that is based on the models symmetry and its part contacts. The implementation follows the Paper 3D-Model Recombination (INSERT REFERENCE) with several deviations: No segmentation step is done in the beginning. The resampling step (sementation paragraph in the paper) is replaced by the contact refinement step decribed above. The amount of points generated is not equal to the amount of points of each individual part. (it is set per triangle) The algorithm uses an OBB Tree instead of an AABB Tree for contact-detection The support Threshold is used but set to 0% per default in the UI. Summarized, the algorithm executes following steps: 1. Compute the Contacts of the models individual parts. (Contact-Refinement is included in this step) 2. Construct the tree by splitting each node-set by the current symmetry or if no symmetry is present ( < Support threshold) use x, y od z = 0 planes (the longest side is preferred).

3. At each level merge parts again that share contacts (to ensure only connected parts within the hierarchy) UI Overview The image above shows the Hierarchy of a Chair model as well as the settings for the hierarchy generation algorithm within the hierarchy panel. The Load Hierarchy button starts the hierarchy generation process (The parameters for contact analysis, OBB generation and Symmetry detection within the hierarchy detection algorithm are taken from the respective panels). The Button Render Symmetry enables or disables rendering of the current selected symmetry node within the viewport. The three Pos fields define the coordinates where the symmetry node should be rendered within the viewport. The option Enforce disconnected enables or disables the node merge step of the algorithm. If it is disabled tree nodes can contain disconnected parts. The option Use Symmetry Threshold enables or disables the symmetry threshold from the symmetry panel. If this option is enabled and no dominant (> symmetry threshold) symmetry is found, the x,y and z = 0 planes are used for splitting, if possible. After hierarchy generation is finished, the generated tree is shown in the panel. By clicking a tree node the respective part of the tree is rendered within the viewport. Nodes can be expanded by clicking the small arrow at the left of each node. Nodes are labeled differently: Merged Nodes that were merged by the algorithm in the merge step Connected Nodes that were initially connected and have not been merged

Connected ~* The smallest connected node Connected ~ The node was not merged because it had a similar size as the smallest connected node. Disconnected The node was and is disconnected from all other parts on this level.

Still missing Tasks: - Refactor Main UI variables - Refactor Load/Save - Code doc - Documentation pdf Remaining Questions, Problems: - Obb Tree Should implement Triangle Level Test. - Improve initial Segmentation of Parts (remove bad groups etc.) -Obb Tree needs to implement special cases (See RTR 3 rd Edition) - What happens with Nodes that are still disconnected on a level? - Bad segmentation of model parts/groups leads to improper hierarchy - Mode obb part size is used instead of part triangles size - Model with clear symmetries work best - Sharpdx Plane Buggy - Models with long thin triangles -> Triangle.NET Problems (Many Points/Much Time needed) -Generally: Models w. difficult triangles -> Problems for contact detection -Contact detection tweaking (many random points, many iterations for good results) - Triangle.NET undocumented, buggy - Use different voronoi alg -> Test libs (simple Delaunay lib available and downloaded, use voronoi dual graph algorithm from wiki) -Parameter Diameter Scale is important for Contact detection algorithm..