JOURNAL OF NANJING FORESTRY UNIVERSITY ›› 2023, Vol. 47 ›› Issue (5): 19-27.doi: 10.12302/j.issn.1000-2006.202208020

Special Issue: 林草计算机应用研究专题

Previous Articles     Next Articles

Research on algorithm of collision detection and response to optimize forest simulation

WANG Linlong1,2,3(), ZHANG Huaiqing1,3,*(), YANG Tingdong1, ZHANG Jing1, LEI Kexin1, CHEN Chuansong4, ZHANG Huacong1, LIU Yang1, CUI Zeyu1, ZUO Yuanqing1   

  1. 1. Research Institute of Forest Resource Information Techniques, CAF, Beijing 100091, China
    2. Research Institute of Forestry Policy and Information, CAF, Beijing 100091, China
    3. Key Laboratory of Forestry Remote Sensing and Information Technology, National Forestry and Grassland Administration, CAF, Beijing 100091, China
    4. Experimental Center of Subtropical Forestry,CAF, Fenyi 336600, China
  • Received:2022-08-09 Revised:2022-10-04 Online:2023-09-30 Published:2023-10-10

Abstract:

【Objective】 Research into virtual forest collision is hampered by redundant detection objects and simple collision response modes. Our study addresses the technical bottlenecks of high time-cost collision-detection algorithms (aiming to achieve a rapid detection of collisions) and a lack of interaction between the response mode and environmental factors (in favor of real response in virtual forest scenes). 【Method】 We studied a pure-planted Chinese fir (Cunninghamia lanceolata) forest on Shanxia Farm, based at the Experimental Center of Subtropical Forestry in the Chinese Academy of Forestry. Our study compared the efficiency of three methods for the collision detection: an axis-aligned bounding box (AABB) algorithm;a mixed bounding volume hierarchy tree (MBVT) algorithm and a MBVT algorithm optimized using a ‘Finding-the-Four-Closest-Trees’ method, to understand the effect of population size and plant density on collision-detection efficiency and to explore the feasibility of collision response under the strategy proposed in our study.【Result】The total consumption time, t1 for our optimized ‘Finding the Four Closest Trees’ method was approximately 29% that of the MBVT algorithm: 13.75 ms shorter. Compared with the BVH, the cross-test time consumption, t2 was effectively reduced, as was the construction time consumption(t3) and updating time(t4). Both the MBVT and optimized MBVT algorithms reduced the total consumption time, t1 was approximately 73% and 81% that of a single BVH tree AABB by 124.93 and 138.68 ms, respectively. Population was positively correlated with t1, t2 and t3 of the BVH tree: total consumption time, intersection-test time, and construction time. There was a negative correlation between the density of different plants and the total consumption time(t1) and intersection-test time(t2) and no significant correlation with construction time(t3). Conversely, an increase in population and decrease in plant density saw an increase in the total consumption time(t1) and intersection-test time(t2), while there was no significant difference in construction time(t3). Compared with traditional collision response models, the proposed collision response algorithm took into account phototaxis and more realistically simulated a virtual scene of Chinese fir. The virtual scene had a frame rate of 8.6 frames per second and an accuracy of 100%. 【Conclusion】 Improving a MBVT algorithm using our ‘Finding the Four Closest Trees’ can optimize the number of collision detection objects in mixed bounding box hierarchy trees, reducing the consumption time of BVH cross tests and construction to improve collision detection efficiency in a virtual forest of Chinese fir. A collision response strategy for adjacent trees, which accounts for phototaxis, can solve the problem of collision response without interacting with environmental factors in virtual forest scenes, improving the realism of a Chinese fir virtual forest with the Lambert model and collision response function.

Key words: forest simulation, collision detection, collision response, mixed bounding volume hierarchy trees, Chinese fir (Cunninghamia lanceolata) forest

CLC Number: