CN113094546B - Simulation animation model loading method and device and simulation equipment - Google Patents

Simulation animation model loading method and device and simulation equipment Download PDF

Info

Publication number
CN113094546B
CN113094546B CN202110454025.9A CN202110454025A CN113094546B CN 113094546 B CN113094546 B CN 113094546B CN 202110454025 A CN202110454025 A CN 202110454025A CN 113094546 B CN113094546 B CN 113094546B
Authority
CN
China
Prior art keywords
file
bounding box
model
index
index value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110454025.9A
Other languages
Chinese (zh)
Other versions
CN113094546A (en
Inventor
谭亮
吴钊
张大鹏
王舜琰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingwei Hirain Tech Co Ltd
Original Assignee
Beijing Jingwei Hirain Tech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingwei Hirain Tech Co Ltd filed Critical Beijing Jingwei Hirain Tech Co Ltd
Priority to CN202110454025.9A priority Critical patent/CN113094546B/en
Publication of CN113094546A publication Critical patent/CN113094546A/en
Application granted granted Critical
Publication of CN113094546B publication Critical patent/CN113094546B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/71Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/787Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using geographical or spatial information, e.g. location
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Library & Information Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides a simulation animation model loading method, a simulation animation model loading device and simulation equipment. Therefore, after the current bounding box index value of the current position is determined according to the index calculation formula and the current position of the observation target, the surrounding bounding box index value of the current bounding box index value can be determined by utilizing the pre-established index file; and finally, loading the sub-model files corresponding to the current bounding box index value and the surrounding bounding box index value in the simulation animation file. The method comprises the steps of converting a simulation animation file externally constructed by a user into an index file, and loading sub-model files in the simulation animation file through the index file, namely, external loading of the simulation animation model is realized.

Description

Simulation animation model loading method and device and simulation equipment
Technical Field
The invention relates to the technical field of intelligent simulation, in particular to a simulation animation model loading method, a simulation animation model loading device and simulation equipment.
Background
In the intelligent driving simulation test process, relevant technicians need to carry out repeated simulation test on the vehicle-mounted sensor, at present, the simulation test is mainly carried out on the vehicle-mounted sensor based on a simulation animation model in a simulation animation file, and the animation loading speed of the simulation animation model is also an evaluation index of the simulation test.
In order to improve the animation loading speed of the simulation animation model, the method adopted at present is to build in a simulation animation file, namely to build in the simulation animation model in simulation software, and all simulation tests are executed according to the built-in simulation animation file, however, the built-in simulation animation model at present cannot meet the test requirements of different sensors or different control algorithms in the sensors, so that the requirements for external loading of the simulation animation model are gradually raised.
Disclosure of Invention
In view of the above, the invention provides a method and a device for loading a simulation animation model and simulation equipment, which can realize external loading of a simulation animation file.
The invention provides the following technical scheme:
a simulated animation model loading method, the method comprising:
determining a current bounding box index value to which the current position belongs according to an index calculation formula and the current position of an observation target;
Determining peripheral bounding box index values of the current bounding box index values by utilizing a pre-established index file; the surrounding bounding box index value is a bounding box index value in a preset range taking the current bounding box index value as a center in the index file;
loading sub-model files corresponding to the current bounding box index value and the surrounding bounding box index value in the simulation animation file; the adjacent relation of each bounding box index value in the index file is consistent with the physical adjacent relation in the simulation animation file, the simulation animation file comprises simulation animation model files, and each simulation animation model file comprises sub-model files.
Optionally, the generating process of the index file includes:
obtaining each simulation animation model file in the simulation animation files;
analyzing each simulation animation model file to obtain the position coordinates of each sub-model file in the simulation animation files;
calculating to obtain a bounding box index value corresponding to each sub-model file by using the index calculation formula and the position coordinates of each sub-model file;
and establishing an index relation between each sub-model file and the corresponding bounding box index value to obtain the index file.
Optionally, the analyzing the simulated animation model files to obtain the position coordinates of each sub-model file in the simulated animation files includes:
analyzing each simulation animation model file to obtain model elements under each sub-model file in the simulation animation file;
and determining the position coordinates of each sub-model file according to the model elements under each sub-model file.
Optionally, determining, according to an index calculation formula and a current position of an observation target, a current bounding box index value to which the current position belongs includes:
determining a current bounding box index value to which the current position belongs according to an index calculation formula, the current position of an observation target and the index file; the index file includes a first index relationship between each submodel index value and each submodel file, and a second index relationship between each submodel index value and each bounding box index value.
Optionally, the generating process of the index file includes:
obtaining each simulation animation model file in the simulation animation files;
analyzing each simulation animation file to obtain the position coordinates of each sub-model file in the simulation animation file;
Calculating to obtain a sub-model index value corresponding to each sub-model file by using the index calculation formula and the position coordinates of each sub-model file, and establishing a first index relation between each sub-model index value and each sub-model file;
determining a bounding box to which the position coordinates of each sub-model file belong;
and establishing a second index relation between each submodel index value and each bounding box index value according to the bounding box to which the position coordinate of each submodel file belongs and the first index relation, and generating the index file.
Optionally, loading a sub-model file corresponding to the current bounding box index value and the surrounding bounding box index value in the simulation animation file, including:
comparing the current bounding box index value and the peripheral bounding box index value with the history bounding box index values corresponding to all the sub-model files loaded by the history respectively, and screening out index values different from the history bounding box index values from the current bounding box index value and the peripheral bounding box index value as target bounding box index values;
and loading the sub-model file corresponding to the target bounding box index value.
A simulated animation model loading device, the device comprising:
The current bounding box index value determining unit is used for determining a current bounding box index value to which the current position belongs according to an index calculation formula and the current position of the observation target;
a surrounding bounding box index value determining unit, configured to determine a surrounding bounding box index value of the current bounding box index value by using a pre-established index file; the surrounding bounding box index value is a bounding box index value in a preset range taking the current bounding box index value as a center in the index file;
the loading unit is used for loading sub-model files corresponding to the current bounding box index value and the surrounding bounding box index value in the simulation animation file; the adjacent relation of each bounding box index value in the index file is consistent with the physical adjacent relation in the simulation animation file, the simulation animation file comprises simulation animation model files, and each simulation animation model file comprises sub-model files.
Optionally, the method further comprises: a first index file generation unit;
the first index file generation unit includes:
the model file acquisition unit is used for acquiring each simulation animation model file in the simulation animation files;
The model file analysis unit is used for analyzing each simulation animation model file to obtain the position coordinates of each sub-model file in the simulation animation file;
the bounding box index value calculation unit is used for calculating a bounding box index value corresponding to each sub-model file by utilizing the index calculation formula and the position coordinates of each sub-model file;
and the index relation establishing unit is used for establishing an index relation between each sub-model file and the corresponding bounding box index value to obtain the index file.
Optionally, the model file parsing unit includes:
the model element analysis unit is used for analyzing each simulation animation model file to obtain model elements under each sub-model file in the simulation animation file;
and the position coordinate determining unit is used for determining the position coordinate of each sub-model file according to the model element under each sub-model file.
An emulation apparatus, the emulation apparatus comprising:
a processor and a memory;
the processor is used for calling and executing the program stored in the memory;
the memory is used for storing the program, and the program is at least used for:
The simulated animation model loading method as described above is performed.
Compared with the prior art, the invention provides a simulation animation model loading method, a simulation animation model loading device and simulation equipment, wherein in the simulation animation model loading method, the index files are built according to the simulation animation files built outside the user in advance, the simulation animation files comprise simulation animation model files, each simulation animation model file comprises a sub-model file, and the adjacent relation of the index values of all bounding boxes in the index files is consistent with the physical adjacent relation in the simulation animation files. Therefore, after the current bounding box index value of the current position is determined according to the index calculation formula and the current position of the observation target, the surrounding bounding box index value of the current bounding box index value can be determined by utilizing the pre-established index file; and the surrounding bounding box index value is a bounding box index value in a preset range taking the current bounding box index value as a center in the index file, and finally, the sub-model files corresponding to the current bounding box index value and the surrounding bounding box index value in the simulation animation file are loaded. According to the invention, the sub-model files in the simulation animation file are loaded through the index file in a mode of converting the simulation animation file externally constructed by the user into the index file, namely, the external loading of the simulation animation model is realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for loading a simulated animation model according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for generating an index file according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a two-dimensional coordinate plane of a bounding box according to an embodiment of the present invention;
FIG. 4 is a flowchart of another method for generating an index file according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of loading a simulated animation model according to an embodiment of the present invention;
fig. 6 is a block diagram of a simulation animation model loading device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the intelligent driving simulation test process, relevant technicians need to carry out repeated simulation tests on the vehicle-mounted sensor to finally determine relevant operation algorithms or performances of the vehicle-mounted sensor, such as simulation tests on a vehicle-mounted camera or a vehicle-mounted laser radar, and the like, the vehicle-mounted sensor is mainly subjected to simulation tests based on a simulation animation model (such as a three-dimensional simulation animation model) in a simulation animation file at present, and the loading speed and the animation effect of the simulation animation model in the current intelligent simulation driving simulation field are main evaluation indexes. The animation effect is mainly related to the simulation animation model, and the simulation animation model can be realized by modeling software; in order to improve the loading speed of the simulation animation model, the method adopted at present is to build the simulation animation model, namely to build the simulation animation model in simulation software, all simulation tests are executed according to the built-in simulation animation model, and the flexibility is poor, however, the built-in simulation animation model at present cannot meet the test requirements of different sensors or different control algorithms in the sensors, and cannot meet the personalized customization requirements of users.
In order to solve the problem, the current simulation software needs to continuously and iteratively expand the scale of the built-in simulation animation model, the cost is huge software and scene scale, and the software and hardware aspects of the current simulation software cannot meet the requirement of continuously and iteratively updating the built-in simulation animation model. Thus, there is a growing need for external loading of simulated animation models.
At present, an external importing method of a simulation animation model exists, namely after a user builds a simulation animation file, the simulation animation model in the simulation animation file is imported into a certain specific software in a classified mode, then the special-format simulation animation model is manufactured under the specific software, and finally the special-format simulation animation model is generated. The method requires the user to create a large number of simulation animation models in the conventional three-dimensional modeling software, then edit and manufacture the secondary models in the specific software, and has complicated user operation, thereby greatly reducing the efficiency of generating and using the simulation animation models and improving the development threshold of the models.
In order to further solve the technical problems, the invention provides a simulation animation model loading method, a simulation animation model loading device and simulation equipment. Therefore, after the current bounding box index value of the current position is determined according to the index calculation formula and the current position of the observation target, the surrounding bounding box index value of the current bounding box index value can be determined by utilizing the pre-established index file; and the surrounding bounding box index value is a bounding box index value in a preset range taking the current bounding box index value as a center in the index file, and finally, the sub-model files corresponding to the current bounding box index value and the surrounding bounding box index value in the simulation animation file are loaded. According to the invention, the sub-model files in the simulation animation file are loaded through the index file in a mode of converting the simulation animation file externally constructed by the user into the index file, namely, the external loading of the simulation animation model is realized.
In addition, the simulation software in the method disclosed by the invention can receive the simulation animation file constructed by the user and automatically convert the simulation animation file constructed by the user into the form of an index file, and the loading of the simulation animation model file in the simulation animation file, namely the loading of the simulation animation model constructed by the user outside is realized by the method. The user does not need to execute the classified storage of the model, does not need to carry out the secondary building process of the special-format simulation animation model under specific software, and the user only needs to build the expected model in the common three-dimensional model modeling software and then export the model with the preset format, so that the user operation is simplified, the efficiency of generating and using the simulation animation model is improved, and the development threshold of the model is reduced. Meanwhile, the model customized by the user can be loaded quickly, and the visual effect is not affected.
The following describes the technical scheme of the present invention in detail by using specific embodiments:
fig. 1 is a flowchart of a method for loading a simulated animation model according to an embodiment of the present invention, and referring to fig. 1, the method may include:
And step S100, determining a current bounding box index value to which the current position belongs according to an index calculation formula and the current position of the observation target.
It should be noted that the observation target may be an object in a simulation scene, such as an automobile, a pedestrian, or the like, and may specifically be an automobile carrying an onboard camera or an onboard lidar. The observation target may also be part of an object in the simulated scene. For example, the observation target may be a tire on an automobile, an automobile body, various sensors in an automobile, and the like, and the embodiment of the present invention is not particularly limited.
The current position of the observation target is the current real geographic position of the observation target. In some embodiments, the current bounding box index value refers to a bounding box index value involved in the AABB (Axis-aligned bounding box ) method. In practical applications, the size of each bounding box may be equal or unequal. To facilitate division of bounding boxes, the size of each bounding box is typically made equal.
Step S110, determining the surrounding bounding box index value of the current bounding box index value by utilizing a pre-established index file.
It should be noted that, the surrounding bounding box index value is a bounding box index value in a preset range with the current bounding box index value as a center in the index file.
Along with the movement of the observation target, the invention needs to load objects around the observation target besides the observation target, namely, the invention loads not only the simulation animation model file or the sub-model file corresponding to the observation target, but also the simulation animation model file and/or the sub-model file in the peripheral position range of the observation target. Therefore, the present invention is to determine a surrounding bounding box index value of a current bounding box index value, which is used to indicate positional information within a corresponding range around the observation target. Generally, the bounding box index value is a bounding box index value in the index file that is centered around and adjacent to the current bounding box index value. It is understood that in other embodiments, the surrounding bounding box index values may include bounding box index values adjacent to the bounding box index value adjacent to the current bounding box index value in addition to bounding box index values in the index file centered around and adjacent to the current bounding box index value.
Alternatively, bounding box index values may be represented in the form of index coordinates.
Step S120, loading sub-model files corresponding to the current bounding box index value and the surrounding bounding box index value in the simulation animation file; the adjacent relation of each bounding box index value in the index file is consistent with the physical adjacent relation in the simulation animation file, the simulation animation file comprises simulation animation model files, and each simulation animation model file comprises sub-model files.
It should be noted that, the simulation animation file simulates a scene, the simulation animation model file simulates objects in the scene, such as automobiles, pedestrians, and the like, the number and the simulation content of the simulation animation model files are determined according to the scene simulated by the simulation animation file, each simulation animation model file includes a sub-model file, and the sub-model files are components in the simulation animation model file.
It should be noted that, according to the present bounding box index value and the surrounding bounding box index value, the present invention may find the sub-model files corresponding to the present bounding box index value and the surrounding bounding box index value in the index files, and load the sub-model files.
It should be noted that, the intelligent driving simulation software mainly loads the sub-model files in a streaming manner, and the streaming loading is executed after the intelligent driving simulation animation software is started.
Optionally, the present invention further provides a specific loading process, specifically, loading a sub-model file corresponding to the current bounding box index value and the surrounding bounding box index value in the simulated animation file includes:
Comparing the current bounding box index value and the peripheral bounding box index value with the history bounding box index values corresponding to all the sub-model files loaded by the history respectively, and screening out index values different from the history bounding box index values from the current bounding box index value and the peripheral bounding box index value as target bounding box index values; and loading the sub-model file corresponding to the target bounding box index value.
According to the method, the sub-model files which are not loaded in the history are screened out; only the sub-model files which are not loaded in the history are loaded, and the sub-model files which are loaded in the history are not loaded any more, so that the loading speed of the model can be further improved.
It should be noted that, in the loading process, if the sub-model file is larger, the main thread loads the katon, and the loading speed can be improved by adopting a time-delay loading mode or adopting other threads to load.
The invention provides a simulation animation model loading method, in the method, because the invention constructs an index file according to a simulation animation file constructed outside a user in advance, the simulation animation file comprises simulation animation model files, each simulation animation model file comprises a sub-model file, and the adjacent relation of index values of surrounding boxes in the index file is consistent with the physical adjacent relation in the simulation animation file. Therefore, after the current bounding box index value of the current position is determined according to the index calculation formula and the current position of the observation target, the surrounding bounding box index value of the current bounding box index value can be determined by utilizing the pre-established index file; and the surrounding bounding box index value is a bounding box index value in a preset range taking the current bounding box index value as a center in the index file, and finally, the sub-model files corresponding to the current bounding box index value and the surrounding bounding box index value in the simulation animation file are loaded. According to the invention, the sub-model files in the simulation animation file are loaded through the index file in a mode of converting the simulation animation file externally constructed by the user into the index file, namely, the external loading of the simulation animation model is realized.
The sub-model files to be loaded in the invention are changed along with the change of the position of the observation target, and only the sub-model files within the preset range of the current position and the distance between the current position and the current position of the observation target are loaded each time, and after the position of the observation target is changed, the sub-model files within the preset range of the position and the distance between the current position and the observation target are loaded, thereby realizing the rapid dynamic streaming loading of the simulation animation model and improving the loading speed of the simulation animation model.
The simulation software in the invention can receive the simulation animation file constructed by the user, automatically convert the simulation animation file constructed by the user into the form of an index file, and realize the loading of the simulation animation model file in the simulation animation file, namely realize the loading of the simulation animation model constructed by the user. The method has the advantages that the classified storage of the user execution model is not needed, the secondary building process of the special-format simulation animation model is not needed by the user under specific software, the user operation is simplified, the generation and use efficiency of the simulation animation model is improved, and the development threshold of the model is reduced.
It should be noted that, in the case that the index file in the present invention includes the index relationship between the sub-model file and the corresponding bounding box index value, the generation process of the index file provided in the present invention is described below, a method for generating the index file is provided below, fig. 2 is a flowchart of the method for generating the index file provided in the embodiment of the present invention, and referring to fig. 2, the method may include:
step 200, obtaining each simulation animation model file in the simulation animation files.
It should be noted that, a user may build a simulated animation model through commonly used three-dimensional modeling software, and export the built simulated animation model into a file with a preset format to obtain a simulated animation model file. Files with preset formats, such as FBX, OBJ, etc., the present invention is not particularly limited.
Each simulation animation file comprises at least one simulation animation model file.
And S210, analyzing the simulation animation model files to obtain the position coordinates of each sub-model file in the simulation animation files.
It should be noted that each simulated animation model file includes at least one sub-model file. Since the sub-model files are the respective components in the simulated animation model file, the contents included in each sub-model file are the related information of the respective components in the simulated animation model file, for example: mesh, material, texture, vertex, triangle, normal, map data, and the like, embodiments of the present invention are not particularly limited.
Optionally, the invention mainly adopts SDK (Software Development Kit ) of FBX to analyze the simulation animation model file.
Analyzing the simulation animation model files to obtain the position coordinates of each sub-model file in the simulation animation files, wherein the method comprises the following steps:
analyzing each simulation animation model file to obtain model elements under each sub-model file in the simulation animation file; and determining the position coordinates of each sub-model file according to the model elements under each sub-model file.
Optionally, since the sub-model file is each component in the simulated animation model file, the model elements under the sub-model file are elements of each component in the simulated animation model file, for example, in the case that the simulated animation model file is an automobile, the sub-model file simulates tires on the automobile, automobile bodies, various sensors in the automobile, and the like, and the model elements are each component of the tires, each component of the automobile sensors, and the like, and the embodiment of the invention is not particularly limited.
The invention takes the central position coordinates of all model elements under one sub-model file as the position coordinates of the sub-model file.
And step S220, calculating to obtain a bounding box index value corresponding to each sub-model file by using the index calculation formula and the position coordinates of each sub-model file.
The invention converts the position coordinates of each sub-model file into bounding box index values by using an index calculation formula. The bounding box index value corresponding to the sub-model file is the index value of the bounding box where the sub-model is located.
The following provides a calculation formula for calculating the bounding box index value corresponding to each sub-model file by using the index calculation formula and the position coordinates of each sub-model file:
wherein the bounding box index value includes: a bounding box index abscissa value and a bounding box index ordinate value; (idx, idy) is a bounding box index value, idx is a bounding box index abscissa value corresponding to the sub-model file, idy is a bounding box index ordinate value corresponding to the sub-model file; x and y are the position coordinates of the submodel file in the x direction and the y direction respectively, w is the preset virtual bounding box width, ceil () represents the minimum integer operation of taking a value greater than the value in brackets.
Referring to the schematic diagram of a bounding box two-dimensional coordinate plane shown in fig. 3, the smallest area in the bounding box two-dimensional coordinate plane is a virtual bounding box size, and each polygon displayed in the bounding box two-dimensional coordinate plane is a sub-model file.
And step S230, establishing an index relation between each sub-model file and the corresponding bounding box index value to obtain the index file.
According to the method, the index relation between each sub-model file and the corresponding bounding box index value is established in the mode, and the index file is obtained, so that the simulation animation file constructed outside a user is converted into the index file, the sub-model files in the simulation animation file are loaded through the index file, and the external loading of the simulation animation model is realized.
In addition, in other implementations, the index file in the present invention may also include a first index relationship between each submodel index value and each submodel file, and a second index relationship between each submodel index value and each bounding box index value, where the determining, according to the index calculation formula and the current location of the observation target, the current bounding box index value to which the current location belongs in the present invention may further include: and determining a current bounding box index value to which the current position belongs according to an index calculation formula, the current position of the observation target and the index file. Based on this, in the following, another method for generating an index file is provided in the present invention, and fig. 4 is a flowchart of a method for generating an index file provided in an embodiment of the present invention, and referring to fig. 4, the method may include:
And step S300, obtaining each simulation animation model file in the simulation animation files.
It should be noted that, a user may build a simulated animation model through commonly used three-dimensional modeling software, and export the built simulated animation model into a file with a preset format to obtain a simulated animation model file. Files with preset formats, such as FBX, OBJ, etc., the present invention is not particularly limited.
Step S310, analyzing each simulation animation file to obtain the position coordinates of each sub-model file in the simulation animation file;
optionally, the invention mainly adopts SDK (Software Development Kit ) of FBX to analyze the simulation animation model file.
Analyzing the simulation animation model files to obtain the position coordinates of each sub-model file in the simulation animation files, wherein the method comprises the following steps:
analyzing each simulation animation model file to obtain model elements under each sub-model file in the simulation animation file; and determining the position coordinates of each sub-model file according to the model elements under each sub-model file.
Step S320, calculating to obtain a sub-model index value corresponding to each sub-model file by using the index calculation formula and the position coordinates of each sub-model file, and establishing a first index relation between each sub-model index value and each sub-model file.
The invention can convert the position coordinates of each sub-model file into sub-model index values by using an index calculation formula.
The following provides a calculation formula for calculating the sub-model index value corresponding to each sub-model file by using the index calculation formula and the position coordinates of each sub-model file:
the submodel index value includes: a submodel index abscissa value and a submodel index ordinate value; (jdx, jdy) is a submodel index value, jdx is a submodel index abscissa value corresponding to a submodel file, jdy is a submodel index ordinate value corresponding to a submodel file; x and y are the position coordinates of the submodel file in the x direction and the y direction, respectively, w is a preset width (the width of the virtual bounding box is an integer multiple of the width), and ceil () represents a minimum integer operation taking a value greater than the value in brackets.
Referring to the schematic diagram of a bounding box two-dimensional coordinate plane shown in fig. 3, the smallest area in the bounding box two-dimensional coordinate plane is a virtual bounding box size, and each polygon displayed in the bounding box two-dimensional coordinate plane is a sub-model file.
Step S330, determining bounding boxes to which the position coordinates of each sub-model file belong.
Referring to the two-dimensional coordinate plane schematic diagram of the bounding box shown in fig. 3, the bounding box to which the position coordinates of each sub-model file belong is determined in the two-dimensional coordinate plane schematic diagram of the bounding box. Taking the upper right corner model in fig. 3 as an example, a certain simulation animation model file covers two bounding boxes (1, 3) and (2, 3), triangle sub-model files in the simulation animation model file cover two bounding boxes (1, 3) and (2, 3), and the other 3 sub-model files in the simulation animation model file cover only one bounding box (2, 3). In addition, referring to fig. 3, it is not necessarily a one-to-one correspondence between the submodel file and the bounding box index value.
Step S340, establishing a second index relation between each submodel index value and each bounding box index value according to the bounding box to which the position coordinate of each submodel file belongs and the first index relation, and generating the index file.
The index file includes a first index relationship between each submodel index value and each submodel file, and a second index relationship between each submodel index value and each bounding box index value. In this way, the corresponding submodel index value can be determined according to the observation target, and then the bounding box index value corresponding to the observation target can be obtained according to the corresponding relation between the submodel index value and the bounding box index value. And then obtaining each sub-model index value under the bounding box index value corresponding to the observation target according to the corresponding relation between the sub-model index value and the bounding box index value, and finally obtaining a sub-model file corresponding to each sub-model index value under the bounding box index value corresponding to the observation target, thereby completing external loading of the simulation animation model.
According to the method, the first index relation between each submodel index value and each submodel file and the second index relation between each submodel index value and each bounding box index value are established in the mode, and the index file is obtained, so that the simulation animation file externally constructed by a user is converted into the index file, the submodel file in the simulation animation file is loaded through the index file, and the external loading of the simulation animation model is realized.
It should be noted that, the index file in the present invention may exist in the form of an index tree. The index tree is created to search through indexes of the later streaming loading range, so that the speed of determining the loading range is improved.
The region covered by the sub-model file is smaller, so that the index tree obtained by creating the axis alignment bounding box based on the sub-model file is smaller, the traversing index speed is faster, and the dynamic loading of the simulation animation model is facilitated. The index complexity in the adjacent range is searched by using the sub-model file index to be O (1), and compared with other tree construction (such as KD tree and the like), the complexity O (log N) of the adjacent range is smaller (N is the number of model elements).
When intelligent driving simulation is carried out, the observation target is generally a vehicle, the observation range is generally a rectangular or prototype range, and the loading mode of the model cluster, namely the sub-model file, is adopted to better accord with the range loading concept.
The method for loading a simulation animation model disclosed in the present invention will be described in detail with reference to a specific example, and the simulation animation model loading schematic diagram shown in fig. 5 is as follows:
1. when the software is initialized, a pre-generated index file is read into a memory, and then a current bounding box index value (idx, idy) of a current position of an observation target is calculated according to the current position (x, y) of the observation target input by a user.
2. According to the current bounding box index value, 8 surrounding adjacent bounding box indexes are known, and 8 bounding box index values within a preset range from the current bounding box index value are to be obtained: (idx-1, idy-1), (idx-1, idy), (idx-1, idy+1), (idx, idy-1), (idx, idy +1), (idx+1, idy-1), (idx+1, idy), (idx+1, idy+1) are determined as the surrounding box index value corresponding to the observation target.
3. Taking fig. 5 as an example, if the current bounding box index value of the observation target is calculated to be (1, 1), the surrounding bounding box index value is: and determining sub-model files corresponding to the current bounding box index value and the surrounding bounding box index value in the simulation animation file according to the surrounding bounding box index values in the simulation animation file.
4. And loading the sub-model file. After loading, the loaded bounding box index map needs to be recorded, so that subsequent comparison is facilitated, and continuous loading is prevented. The loaded bounding box index map is the loaded current bounding box index value and the surrounding bounding box index value.
In this way, only the scenes around the observation target are loaded, which has the advantage that the initial loading only loads the adjacent areas, and the loading speed is high.
5. And judging the position of the observation target in real time in the running process, when the observation target enters the next bounding box, as shown in fig. 5, if the observation target enters the bounding box (2, 1) from the bounding box (1, 1), repeating the steps 1-4, carrying out index judgment by adopting the same method, simultaneously acquiring adjacent index values, then carrying out repeated region judgment, and only loading sub-model files in the new bounding box region, as shown in fig. 5, only loading sub-model files of the bounding boxes (3, 0), (3, 1) and (3, 2).
The simulation animation model loading device provided by the invention is introduced below, and the simulation animation model loading device described below can be referred to correspondingly to the simulation animation model loading method.
Fig. 6 is a block diagram of a simulation animation model loading apparatus according to an embodiment of the present invention, and referring to fig. 6, the simulation animation model loading apparatus includes:
A current bounding box index value determining unit 600, configured to determine a current bounding box index value to which the current position belongs according to an index calculation formula and the current position of the observation target;
a surrounding bounding box index value determining unit 610, configured to determine a surrounding bounding box index value of the current bounding box index value using a pre-established index file; the surrounding bounding box index value is a bounding box index value in a preset range taking the current bounding box index value as a center in the index file;
a loading unit 620, configured to load a sub-model file corresponding to the current bounding box index value and the surrounding bounding box index value in a simulation animation file; the adjacent relation of each bounding box index value in the index file is consistent with the physical adjacent relation in the simulation animation file, the simulation animation file comprises simulation animation model files, and each simulation animation model file comprises sub-model files.
Optionally, the method further comprises: a first index file generation unit;
the first index file generation unit includes:
the model file acquisition unit is used for acquiring each simulation animation model file in the simulation animation files;
The model file analysis unit is used for analyzing each simulation animation model file to obtain the position coordinates of each sub-model file in the simulation animation file;
the bounding box index value calculation unit is used for calculating a bounding box index value corresponding to each sub-model file by utilizing the index calculation formula and the position coordinates of each sub-model file;
and the first index relation establishing unit is used for establishing an index relation between each sub-model file and the corresponding bounding box index value to obtain the index file.
Optionally, the model file parsing unit includes:
the model element analysis unit is used for analyzing each simulation animation model file to obtain model elements under each sub-model file in the simulation animation file;
and the position coordinate determining unit is used for determining the position coordinate of each sub-model file according to the model element under each sub-model file.
Optionally, the current bounding box index value determining unit is specifically configured to:
determining a current bounding box index value to which the current position belongs according to an index calculation formula, the current position of an observation target and the index file; the index file includes a first index relationship between each submodel index value and each submodel file, and a second index relationship between each submodel index value and each bounding box index value.
Optionally, the method further comprises a second index file generating unit;
the second index file generation unit includes:
the model file acquisition unit is used for acquiring each simulation animation model file in the simulation animation files;
the model file analysis unit is used for analyzing each simulation animation file to obtain the position coordinates of each sub-model file in the simulation animation file;
the model index value calculation unit is used for calculating a sub-model index value corresponding to each sub-model file by utilizing the index calculation formula and the position coordinates of each sub-model file;
the second index relation establishing unit is used for establishing a first index relation between each submodel index value and each submodel file;
a bounding box determining unit for determining a bounding box to which the position coordinates of each sub-model file belong;
and the index file generation subunit is used for establishing a second index relation between the index values of each submodel and the index values of each bounding box according to the bounding box to which the position coordinates of each submodel belong and the first index relation to generate the index file.
Optionally, the loading unit is specifically configured to:
comparing the current bounding box index value and the peripheral bounding box index value with the history bounding box index values corresponding to all the sub-model files loaded by the history respectively, and screening out index values different from the history bounding box index values from the current bounding box index value and the peripheral bounding box index value as target bounding box index values;
And loading the sub-model file corresponding to the target bounding box index value.
Optionally, the invention further discloses a simulation device, which comprises:
a processor and a memory;
the processor is used for calling and executing the program stored in the memory;
the memory is used for storing the program, and the program is at least used for:
the simulated animation model loading method as described above is performed.
The technical features described in each embodiment in the present specification may be replaced or combined with each other, and each embodiment mainly describes differences from other embodiments, and the same similar parts between each embodiment are only needed to be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. A method for loading a simulated animation model, the method comprising:
determining a current bounding box index value to which the current position belongs according to an index calculation formula and the current position of an observation target;
Determining peripheral bounding box index values of the current bounding box index values by utilizing a pre-established index file; the surrounding bounding box index value is a bounding box index value in a preset range taking the current bounding box index value as a center in the index file;
loading sub-model files corresponding to the current bounding box index value and the surrounding bounding box index value in the simulation animation file; wherein, the adjacent relation of each bounding box index value in the index file is consistent with the physical adjacent relation in the simulation animation file, the simulation animation file comprises simulation animation model files, and each simulation animation model file comprises sub-model files;
determining a current bounding box index value to which the current position belongs according to an index calculation formula and the current position of an observation target, wherein the determining comprises the following steps:
determining a current bounding box index value to which the current position belongs according to an index calculation formula, the current position of an observation target and the index file; the index file includes a first index relationship between each submodel index value and each submodel file, and a second index relationship between each submodel index value and each bounding box index value.
2. The method of claim 1, wherein the generation of the index file comprises:
obtaining each simulation animation model file in the simulation animation files;
analyzing each simulation animation model file to obtain the position coordinates of each sub-model file in the simulation animation files;
calculating to obtain a bounding box index value corresponding to each sub-model file by using the index calculation formula and the position coordinates of each sub-model file;
and establishing an index relation between each sub-model file and the corresponding bounding box index value to obtain the index file.
3. The method according to claim 2, wherein parsing the simulated animation model files to obtain the position coordinates of each sub-model file in the simulated animation file comprises:
analyzing each simulation animation model file to obtain model elements under each sub-model file in the simulation animation file;
and determining the position coordinates of each sub-model file according to the model elements under each sub-model file.
4. The method of claim 1, wherein the generation of the index file comprises:
Obtaining each simulation animation model file in the simulation animation files;
analyzing each simulation animation file to obtain the position coordinates of each sub-model file in the simulation animation file;
calculating to obtain a sub-model index value corresponding to each sub-model file by using the index calculation formula and the position coordinates of each sub-model file, and establishing a first index relation between each sub-model index value and each sub-model file;
determining a bounding box to which the position coordinates of each sub-model file belong;
and establishing a second index relation between each submodel index value and each bounding box index value according to the bounding box to which the position coordinate of each submodel file belongs and the first index relation, and generating the index file.
5. The method according to claim 1, wherein loading the sub-model files corresponding to the current bounding box index value and the surrounding bounding box index value in the simulated animation file comprises:
comparing the current bounding box index value and the peripheral bounding box index value with the historical bounding box index values corresponding to all the sub-model files loaded by the histories respectively, and screening out index values different from the historical bounding box index values from the current bounding box index value and the peripheral bounding box index value as target bounding box index values;
And loading the sub-model file corresponding to the target bounding box index value.
6. A simulated animation model loading device, the device comprising:
the current bounding box index value determining unit is used for determining a current bounding box index value to which the current position belongs according to an index calculation formula and the current position of the observation target;
a surrounding bounding box index value determining unit, configured to determine a surrounding bounding box index value of the current bounding box index value by using a pre-established index file; the surrounding bounding box index value is a bounding box index value in a preset range taking the current bounding box index value as a center in the index file;
the loading unit is used for loading sub-model files corresponding to the current bounding box index value and the surrounding bounding box index value in the simulation animation file; wherein, the adjacent relation of each bounding box index value in the index file is consistent with the physical adjacent relation in the simulation animation file, the simulation animation file comprises simulation animation model files, and each simulation animation model file comprises sub-model files;
the current bounding box index value determining unit is specifically configured to:
Determining a current bounding box index value to which the current position belongs according to an index calculation formula, the current position of an observation target and the index file; the index file includes a first index relationship between each submodel index value and each submodel file, and a second index relationship between each submodel index value and each bounding box index value.
7. The apparatus as recited in claim 6, further comprising: a first index file generation unit;
the first index file generation unit includes:
the model file acquisition unit is used for acquiring each simulation animation model file in the simulation animation files;
the model file analysis unit is used for analyzing each simulation animation model file to obtain the position coordinates of each sub-model file in the simulation animation file;
the bounding box index value calculation unit is used for calculating a bounding box index value corresponding to each sub-model file by utilizing the index calculation formula and the position coordinates of each sub-model file;
and the first index relation establishing unit is used for establishing an index relation between each sub-model file and the corresponding bounding box index value to obtain the index file.
8. The apparatus of claim 7, wherein the model file parsing unit comprises:
the model element analysis unit is used for analyzing each simulation animation model file to obtain model elements under each sub-model file in the simulation animation file;
and the position coordinate determining unit is used for determining the position coordinate of each sub-model file according to the model element under each sub-model file.
9. A simulation apparatus, characterized in that the simulation apparatus comprises:
a processor and a memory;
the processor is used for calling and executing the program stored in the memory;
the memory is used for storing the program, and the program is at least used for:
a simulated animation model loading method as claimed in any of claims 1-5.
CN202110454025.9A 2021-04-26 2021-04-26 Simulation animation model loading method and device and simulation equipment Active CN113094546B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110454025.9A CN113094546B (en) 2021-04-26 2021-04-26 Simulation animation model loading method and device and simulation equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110454025.9A CN113094546B (en) 2021-04-26 2021-04-26 Simulation animation model loading method and device and simulation equipment

Publications (2)

Publication Number Publication Date
CN113094546A CN113094546A (en) 2021-07-09
CN113094546B true CN113094546B (en) 2024-04-09

Family

ID=76679995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110454025.9A Active CN113094546B (en) 2021-04-26 2021-04-26 Simulation animation model loading method and device and simulation equipment

Country Status (1)

Country Link
CN (1) CN113094546B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5852449A (en) * 1992-01-27 1998-12-22 Scientific And Engineering Software Apparatus for and method of displaying running of modeled system designs
WO2012065759A1 (en) * 2010-11-16 2012-05-24 Thomson Licensing Method and apparatus for automatic film restoration
CN111104410A (en) * 2019-12-25 2020-05-05 北京经纬恒润科技有限公司 Local road information extraction method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5852449A (en) * 1992-01-27 1998-12-22 Scientific And Engineering Software Apparatus for and method of displaying running of modeled system designs
WO2012065759A1 (en) * 2010-11-16 2012-05-24 Thomson Licensing Method and apparatus for automatic film restoration
CN111104410A (en) * 2019-12-25 2020-05-05 北京经纬恒润科技有限公司 Local road information extraction method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于ASE文件的3D模型成像仿真;赵阳;谢敏;;电子测试(12);全文 *

Also Published As

Publication number Publication date
CN113094546A (en) 2021-07-09

Similar Documents

Publication Publication Date Title
CN111161349B (en) Object posture estimation method, device and equipment
EP3955158B1 (en) Object detection method and apparatus, electronic device, and storage medium
CN111797983A (en) Neural network construction method and device
CN110990516B (en) Map data processing method, device and server
CN110879994A (en) Three-dimensional visual inspection detection method, system and device based on shape attention mechanism
CN112184867A (en) Point cloud feature extraction method, device, equipment and storage medium
CN111240736A (en) Model configuration method, device, equipment and storage medium
CN113822892B (en) Evaluation method, device and equipment of simulated radar and computer storage medium
CN117351133B (en) Data rendering method, device, equipment and computer readable storage medium
US20240193788A1 (en) Method, device, computer system for detecting pedestrian based on 3d point clouds
CN112669426B (en) Three-dimensional geographic information model rendering method and system based on generation countermeasure network
CN113094546B (en) Simulation animation model loading method and device and simulation equipment
CN117557754A (en) Point cloud semantic segmentation method, terminal equipment and computer storage medium
CN111784816A (en) High-frequency material rendering method and system based on micro-surface theory
CN116973891A (en) Laser radar calibration method and device for vehicle, electronic equipment and storage medium
CN114782652B (en) Model leveling method, device, equipment and storage medium
CN115731542A (en) Multi-mode weak supervision three-dimensional target detection method, system and equipment
Araújo et al. A part complexity measurement method supporting 3D printing
CN114140508A (en) Method, system and equipment for generating three-dimensional reconstruction model and readable storage medium
CN109840945B (en) Finite element preprocessing method and device
CN116758301B (en) Image processing method and related equipment
CN118115892B (en) Weather situation identification method, system, medium and electronic equipment based on classification model
CN113297340B (en) Vectorization method and device for point cloud map and method and device for converting vector map into point cloud map
CN118069105A (en) Method, device, equipment and storage medium for generating bounding box of model
Su et al. PFSC: Pyramid R-CNN for Point-Voxels with Focal Sparse Convolutional Networks for 3D Object Detection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant