The 3D Studio Max plugin for simulation of the footprints on the ground surfaces J. Fedorova, А. Kryachko 1999 - NSTLab, Nizhny Novgorod, Russia
Motivation Implementation of the algorithm for visualization of the footprints, appearing on the ground surface after the interaction with the moving object (for creation of the more realistic 3D scenes) Implementation of the algorithm as the plugin for some 3D modeling program (3DStudioMax), using standard instrumental tools (AppWizard, class library) Provision of the comfortable work with the module and its high performance during the scene visualization (usage of the adaptive representation of the object)
Algorithm basics Model of ground material Z Y Algorithm stages Collision test for affecting object (object is not necessary in mesh representation) X Material displacement to the object periphery Erosion (downhill redistribution) Algorithm description: R.W.Summer, J.F.O Brien, J.K.Hodgins, Animating Sand, Mud and Snow, The Eurographics Assosiation, 1999.
Parameters Height field resolution = correct proportion between the feature size of affecting object and cell size: 4-5 cells per feature Compression ratio α (defines the amount of material, distributed from the affecting object to the periphery) Roughness (irregularity of the ground deformations) σ (the amount of material, moved from one cell to another during erosion)
Parameters (continuation) Inside and outside slopes toward the object Θ in, Θ out Affecting object Θ out Θ in Table of parameter values for the three ground materials Sand Mud Snow α 0.95 0.99 0.00 σ 0.2 0.2 0.2 Θ in 0.8 3.0 10.0 Θ out 0.436 2.0 10.0
Usage of the Adaptive Mesh for surface representation Without Adaptive Mesh usage 16641 points, 32768 triangles Using Adaptive Mesh 1668 points, 3318 triangles
Adaptive Mesh Mesh bases on the 2D uniform grid (the most detailed mesh level) In every grid node user defines a set of attributes Based on the attribute s values, continuous level of detail mesh is extracted
Structure of the Adaptive Mesh it bases on the sequence of the regular local updates 0 1 2 5 3 4 6 7 13 8 12 9 11 10 14 17 29 28 15 16 19 18 26 27 25 24 23 20 22 21 61 60 55 54 30 59 56 53 31 58 57 52 32 33 50 51 35 34 49 48 36 41 42 47 37 40 43 46 38 39 44 45 Local update = DAG node 2 6 13 7 Root 0 1 3 4 8 9 10 11 12 5 Directed Acyclic Graph - DAG 14 15 16 17 18 19 20 21 22 23 24 25 26 28 27 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 Drain
Adaptive Mesh: surface extraction Every cut in the Adaptive Mesh DAG defines certain surface approximation Cut (surface) is naturally represented as the triangulation Cut is built, basing on the error function, which is defined in DAG nodes Error calculation Error Non-affected level of ground surface Note: directed acyclic graph (DAG) is widely used structure in multiresolution modeling
Mesh features, provided for the update s regularity Compact data structures -> DAG creation and mesh extraction algorithms are more simply Significant reduction of memory usage (more than 4 times) Extracting triangulation can be represented as 1 strip
Time complexity of the mesh extraction algorithm Regular Mesh/ With Error Calculation 0.3 0.25 Extracting time, sec Regular Mesh/ No Error Calculation (Static error) 0.2 0.15 0.1 0.05 0 0 10000 20000 30000 40000 50000 60000 Number of extracted triangles Computer: Pentium II 400 MHz, 192 MB RAM OS: Windows NT
Usage of the Adaptive Mesh in plugin allows to speed ground surface displaying in the 3DStidioMax viewports (during the scene modeling) to reduce memory usage for mesh storage to reduce time of scene rendering: 70 60 50 40 Rendering time, min Without Adaptive Mesh Using Adaptive Mesh 30 20 10 0 0 10000 20000 30000 40000 50000 Number of cells in the surface mesh
Block diagram of the algorithm Input: current mesh state, affecting objects (not necessary in mesh representation) Height calculation for the modified height field s cells Entry of the cell heights in the adaptive mesh as the attribute values Calculation of the triangle errors, according to the attribute s values Extraction of the continuous level of detail triangulation Output: modified ground surface mesh (according to the objects position)
Demonstrations