999精品在线视频,手机成人午夜在线视频,久久不卡国产精品无码,中日无码在线观看,成人av手机在线观看,日韩精品亚洲一区中文字幕,亚洲av无码人妻,四虎国产在线观看 ?

Multi-threaded Fast Distance Field Computation Using Spatial Partition

2015-11-11 13:14:18MINDehengJIAShiyuZHANGXiaoyun
科技視界 2015年8期

MIN De-heng JIA Shi-yu ZHANG Xiao-yun

(Qingdao University,Qingdao Shandong 266071,China)

0 Introduction

Distance field is a basic model representation of computer graphics,initially drawn to the body surface and establishment the offset in computer graphics.Distance field is a scalar field,represents a region of the inner surface of a certain minimum distance of all points of the object are similar[1].If the surface is closed,then the distance can bring sign which represents the external or internal objects.Many researchers have proposed a variety of different data structures to represent the distance field.For example,a uniform 3D mesh,octrees,BSP-tree,and so on[2].In recent years,the graphical representation of the object distance field has been widely used in the field of computer graphics.such as threedimensional object deformation,texture mapping,estimated extraction,collision detection.Comprehensive comparison of domestic and international distance field is generated and stored in the structure calculation methods used in the algorithm.In this paper,proposed a a new distance field generation algorithm,this algorithm ensuring operational efficiency and significantly reducing storage space.

1 The basic definition of distance field

Definition 1 Any of a set of three-dimensional space∑,at any point within the space p∈R3to the collection∑ of the nearest point in the unsigned distance field is expressed as.

Definiton 2 Suppose S is a closed surface collections,the functiondefine any point p∈R3about the nearest point to the closed surface S of the signed distance field,among them

2 Unsigned distance field Calculation

A fast and efficient algorithm for generating the distance field requires two conditions:First,the rapid calculation of the distance field function;Second is the right distance field storage mechanism.When reading an existing OBJ model file,read out the information related to the model and the surface vertex information and stored prior to a good set data structure[3].In order to facilitate OpenGL processing and display the relevant data,all the faces of the OBJ model are decomposed into triangles for storage,that is,sequential storage the three vertices of the triangle.

2.1 Brute force algorithm about calculate the distance field

This article uses the lattice method,first draw a cube around the model bounding box,when reading OBJ model file can obtain the maximum value of the coordinates of all the points,bounding box coordinates of the boundary can just take a slightly larger than the maximum,and then divide the bounding box into several cube lattice,then calculate the distance field of sample points[4].Bounding box can be subdivided lattice and adjust the fineness of the crystal lattice by custom width,we can also calculate the amount of indirect control.Brute force computing is loop through all distance field sampling points in the traverse space,and then calculate all points’ minimum distance to the model.Because all of the faces in the model are decomposed into triangles,therefore,a sample point P to the inner space,the minimum distance calculation point P to OBJ model is to calculate the minimum distance of the point to all the triangles in the model.

2.2 Spatial Partition

The basic idea to spatial partition is:The entire space scene along the x,y,z-axis is divided into a series of rows of cells.And only a cell asked questions are related to the calculation.The selection of a data structure shows the 3D space is important,this data structure on the computation time and storage must be flexible and efficient.In this paper,equidistant network segmentation,divide the space into equalsized cubes.After the object model spatial partition,use the array to store the information ofthe cubeswhich triangle intersectwith with tetrahedron.For all the triangles in the model and not intersecting small cubes without storage,in order to save storage space and computing time.Get sample point position in world space then calculate minimum and maximum distances from sample point to filled spatial partition cells and mark the cell with smallest maximum distance,which assumed as the minimum distance from the point P to the model named d1.Then compare all the minimum distance from the point P to the small cubes with the minimum distance d1.If d1 is greater than the minimum distance of a point P to the cube,calculate the distance from the point P to all the triangles intersect with the cube and take all the minimum of the minimum distance alternative d1 as the minimum distance between the point P to the model.If d1 is less than the minimum distance between the point P to a cube,then the distance from the point P to all the triangles intersect with the cube will be larger than d1,ignore the cell because its minimum distance to sample points is larger than current distance field value.Loop through all the cells and set minimum distance as distance field value.

3 Distance Field Sign Compution

After the completion of the unsigned distance field computation,then need to further determine the sign of the distance field,which can characterize the point is outside or inside the body of the object.Generally,when the point outside the object the field is positive,when the point is located inside the model the distance is negative.A value of zero field located at the surface.This article uses the scan line filling algorithm to calculate the intersection about the boundary with the rays,the rays’initial position in the external model,the initial sign of the distance field as positive.If the ray intersects with the boundary,then change the distance field symbol as negative,until the completion of the scan,then determine the ultimate sign of the distance field in the ray direction.We transmitted light through 26 in different directions(3D model),ray directions are(1,0,0),(-1,0,0),(0,1,0),(0,-1,0),(0,0,1),(0,0,-1),(0,1,1),(0,1,-1),(0,-1,1),(0,-1,-1),(1,0,1),(1,0,-1),(-1,0,1),(-1,0,-1),(1,1,0),(1,-1,0),(-1,1,0),(-1,-1,0),(1,1,1),(1,1,-1),(1,-1,1),(1,-1,-1),(-1,1,1),(-1,1,-1),(-1,-1,1),(-1,-1,-1).After judge the 26 direction of ray intersection,analyzing 26 direction can be obtained for each point on how many times the determination is negative.We set the threshold of the number of symbols judge 13,this means that if there are 26 judges in the 13th judge sign is negative then this point distance field is negative.

4 Calculating Distance Field Using Spatial Partition of single-threaded and multi-threaded

Relative to the brute-force calculation,distance field generation algorithm based on spatial partition effectively improve the computing speed of distance field,in order to better compare,specially selected single-threaded calculation method based on the spatial partition.Because for calculating the distance between the field at any point in the space is independently of each other,therefore,this paper uses multiple threads to all points in the space of distance field calculations.After the program runs,read the computer processor cores,choose no more than the number of parallel threads of computer processor cores,multithreaded computing the minimum distance from all points to the model.

5 Implementation and results

To make it easier to generate the distance field observation,in this paper,the use of red,blue and green color rendering distance field value.When the distance field with a red sign is positive,the distance field is negative symbol blue,when the point at the surface of the model rendered in green.According to the model of the information read to set the vertical slice in X,Y,Z axis,slice size slightly larger than the model on the slice plane X,Y,Z axis length.Control slices moving direction,to observe the changes in each slice layer on the object distance field according to the color change.Run results are shown as in Table 1.

6 Conclusion

By analyzing the results of the calculation of the distance field,known for the same model,in the same grid distance,calculated based on the space division of the single-threaded distance field generation algorithm computing time is much less than brute force.Computing time than the single-threaded multi-threaded space-based segmentationalgorithm to generate the distance field has also been greatly improved.Especially in a larger number of models under the number of vertices and faces situations,space-based segmentation of multi-threaded distance field generation algorithm to calculate the distance to the brute force field generation algorithm has been greatly improved in the computing speed.

Tab.1 The results of three algorithms for distance field generation

[1]Wang Yanlin.Deformable body collision detection algorithm to generate the distance field[D].Central China Normal University,2008.

[2]Zhao Sen.Research and Application of collision detection distance field algorithm[D].Jilin University,2008.

[3]Li Jun.Point to the triangle mesh body signed distance calculation[D].Jiangnan University,2007.

[4]B?rentzen JA,Aan?s H.Generating signed distance fieldsfrom triangle meshes[J].Informatics and Mathematical Modeling,Technical University of Denmark,DTU,2002,20.

主站蜘蛛池模板: 狂欢视频在线观看不卡| 久久综合色视频| 国产午夜福利在线小视频| 亚洲一级毛片免费看| 国产麻豆91网在线看| 丝袜无码一区二区三区| 国产在线无码一区二区三区| 美女内射视频WWW网站午夜| 99久久精品无码专区免费| 人妻精品久久无码区| 女人18毛片一级毛片在线| 视频二区亚洲精品| 丰满人妻被猛烈进入无码| 2022国产91精品久久久久久| 亚洲手机在线| 丁香婷婷激情网| 中美日韩在线网免费毛片视频 | 色综合中文综合网| 国产网站一区二区三区| 夜夜拍夜夜爽| 欧洲一区二区三区无码| 国模在线视频一区二区三区| 波多野结衣一区二区三区AV| 国产精品视频猛进猛出| 亚洲三级电影在线播放| 在线网站18禁| 免费在线视频a| 色综合久久无码网| 亚洲免费福利视频| 亚洲视频黄| 色偷偷一区二区三区| 91无码人妻精品一区| 黄色免费在线网址| 亚洲无线视频| 91国内在线视频| 亚洲美女一区二区三区| 无码视频国产精品一区二区| 国产91精品久久| 久热这里只有精品6| 午夜视频www| 日本国产精品| a国产精品| 久久久久国产精品免费免费不卡| 欧美h在线观看| 欧美天天干| 亚洲欧美综合精品久久成人网| 在线观看国产黄色| 国产小视频在线高清播放| 欧美人在线一区二区三区| www.精品视频| 四虎影视无码永久免费观看| 亚洲天堂网2014| 2020国产在线视精品在| 自拍偷拍欧美| www.亚洲国产| 亚洲伊人久久精品影院| 国产老女人精品免费视频| 四虎在线高清无码| 久久美女精品| 2019年国产精品自拍不卡| 国产呦视频免费视频在线观看| 992tv国产人成在线观看| 亚洲经典在线中文字幕| 国产噜噜在线视频观看| 玖玖精品在线| 国产迷奸在线看| 国产精品尤物在线| 成人午夜免费观看| 国产成人喷潮在线观看| 她的性爱视频| 日韩在线第三页| 欧美人与牲动交a欧美精品| 国产乱视频网站| 国产成人亚洲欧美激情| 97国产一区二区精品久久呦| 久久国产V一级毛多内射| 亚洲色欲色欲www网| 精品一區二區久久久久久久網站 | 国产性爱网站| 亚洲无线观看| 亚洲中文无码av永久伊人| 亚洲美女视频一区|