Target model internal model generation method and device, equipment and storage medium

CN117138347BActive Publication Date: 2026-10-27NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311028026.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-15
Publication Date
2026-10-27
Estimated Expiration
2043-08-15

AI Technical Summary

Technical Problem

[0003]在传统的编辑环境下,溶洞内部植被的装饰往往需要美术人员一棵棵进行布置,溶洞类模型内部植被的生成效率低

Benefits of technology

[0016]在本发明实施例中,通过识别目标模型的包围盒区域以及获取包围盒区域内的初始点集,基于能够表征内部模型的第一生成位置的初始点集对目标模型进行预设次数的射线检测,得到用于生成目标模型的内部模型的目标内部模型生成区域,即基于识别目标模型的包围区域并对目标模型进行迭代的射线检测,对目标模型的内部区域点进行识别,从而自动化实现模型内部模型的生成,达到快速实现对内部区域模型的初始布局的目的,进而提高模型内部模型的生成效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117138347B_ABST
    Figure CN117138347B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an internal model generation method, device and equipment of a target model and a storage medium. The method comprises: identifying a bounding box region of the target model, and obtaining an initial point set in the bounding box region; the bounding box region is used to indicate a generation range of the initial point set, wherein the initial point set is used to represent a first generation position of the internal model; performing ray detection on the target model for a preset number of times based on the initial point set, to obtain a target internal model generation region of the target model; and generating an internal model of the target model in the target internal model generation region. Based on identifying the bounding region of the target model and performing iterative ray detection on the target model, the internal region points of the target model are identified, so that the generation of the internal model of the model is automatically realized, the initial layout of the internal region model is quickly realized, and the generation efficiency of the internal model of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of rendering technology, and in particular to a method for generating an internal model of a target model, an apparatus for generating an internal model of a target model, a corresponding electronic device, and a corresponding computer-readable storage medium. Background Technology

[0002] In open-world game scenes, cave models can usually be added to the terrain, allowing players to explore the interior along designated passages. In order to provide players with a better experience inside the cave, vegetation-type decorations can be added inside the cave.

[0003] In traditional editing environments, decorating the interior of caves often requires artists to arrange each plant individually, resulting in low efficiency in generating vegetation within cave models. Summary of the Invention

[0004] In view of the above problems, embodiments of the present invention are proposed to provide an internal model generation method for a target model, an internal model generation apparatus for a target model, a corresponding electronic device, and a corresponding computer-readable storage medium to overcome or at least partially solve the above problems.

[0005] This invention discloses an internal model generation method for a target model, the method comprising:

[0006] Identify the bounding box region of the target model and obtain an initial point set within the bounding box region; the bounding box region is used to indicate the generation range of the initial point set, wherein the initial point set is used to characterize the first generation position of the internal model;

[0007] Based on the initial point set, the target model is subjected to ray detection a preset number of times to obtain the target internal model generation region of the target model;

[0008] Generate the internal model of the target model in the target internal model generation region.

[0009] This invention also discloses an internal model generation apparatus for a target model, the apparatus comprising:

[0010] An initial point set acquisition module is used to identify the bounding box region of the target model and acquire an initial point set within the bounding box region; the bounding box region is used to indicate the generation range of the initial point set, wherein the initial point set is used to characterize the first generation position of the internal model;

[0011] A ray detection module is used to perform a preset number of ray detections on the target model based on the initial point set to obtain the target internal model generation region of the target model;

[0012] The model generation module is used to generate an internal model of the target model in the model generation region inside the target.

[0013] This invention also discloses an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, it implements any one of the internal model generation methods for the target model.

[0014] This invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the internal model generation method for any of the target models.

[0015] The embodiments of the present invention have the following advantages:

[0016] In this embodiment of the invention, by identifying the bounding box region of the target model and obtaining the initial point set within the bounding box region, the target model is subjected to a preset number of ray detections based on the initial point set that can characterize the first generation position of the internal model, thereby obtaining the target internal model generation region for generating the internal model of the target model. That is, based on identifying the bounding box region of the target model and performing iterative ray detection on the target model, the internal region points of the target model are identified, thereby automatically realizing the generation of the internal model of the model, achieving the purpose of quickly realizing the initial layout of the internal region model, and thus improving the generation efficiency of the internal model of the model. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of a cave-like model provided in an embodiment of the present invention;

[0018] Figure 2 This is a flowchart illustrating the steps of an embodiment of the internal model generation method for a target model according to the present invention;

[0019] Figure 3 This is a flowchart illustrating the steps of another embodiment of the internal model generation method for the target model of the present invention;

[0020] Figure 4 This is an example diagram of vegetation objects generated in the cave-like model provided in this embodiment of the invention;

[0021] Figure 5 This is a structural block diagram of an embodiment of an internal model generation device for a target model according to the present invention. Detailed Implementation

[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0023] In open-world game environments, to enrich the exploration experience, cave-like models are often added to the terrain. These cave models refer to a type of scene model with a certain thickness and collision capabilities both inside and outside the cave. For example... Figure 1 As shown, a cave-like model can have an exterior and an interior, allowing players to explore the interior along designated passages.

[0024] Generally, cave models have a large internal area. To enhance the player's experience inside the cave, vegetation is often added for decoration. However, in traditional editing environments, vegetation generation inside caves is currently hampered by the lack of terrain attributes, preventing the use of terrain-based vegetation creation. This typically involves manual placement of vegetation, with artists manually adjusting, rotating, and scaling each plant individually. This manual approach is extremely time-consuming, especially for large areas or objects, resulting in low efficiency. Furthermore, manual vegetation placement leaves a trace of human intervention and lacks randomness, making post-processing for randomization cumbersome.

[0025] In this embodiment of the invention, based on identifying the enclosing region of the target model and performing iterative ray detection on the target model, points in the internal region of the target model are identified, thereby automatically generating the internal model and achieving the goal of quickly realizing the initial layout of the internal region model, thus improving the generation efficiency of the internal model. Furthermore, random point scattering can be used in the internal model generation region to ensure the randomness of the internal model generation, and during the generation process, random rotation and scaling adjustments can be performed on the internal model to make the generated internal model conform to reality.

[0026] Reference Figure 2 The diagram illustrates a flowchart of an embodiment of an internal model generation method for a target model according to the present invention, which may specifically include the following steps:

[0027] Step 201: Identify the bounding box region of the target model and obtain the initial point set within the bounding box region;

[0028] A target model can refer to a scene model in a game scene that has a certain thickness and collisions both inside and outside. It usually has a closed model exterior and a model interior located in a hollow part, such as a cave-like model with an exterior and interior. This allows an internal model to be generated inside the model. The generated internal model can be any object model that is related to the internal scene attributes of the target model. As an example, assuming the target model is a cave-like model, the internal model can be a vegetation object model, a flowing water model, or a rock model inside the cave-like model. As another example, assuming the target model is a well-like model, the internal model can be a withered grass model, a mosquito model, or a similar model inside the well-like model. This embodiment of the invention does not impose any limitations on this.

[0029] In this embodiment of the invention, in order to facilitate the generation of an internal model within a target model, it is necessary to determine the specific generation region of the internal model. First, the bounding box region of the target model can be identified, where the bounding box region refers to the smallest region that surrounds the model object. At this time, the initial point set within this smallest region can be obtained so as to determine the generation position of the internal model within this smallest region based on the obtained initial point set.

[0030] Specifically, the bounding box region can be used to indicate the generation range of the initial point set, which can be used to characterize the first generation position of the internal model. That is, the first generation position of the internal model can be determined based on the acquired initial point set within the generation range of the target model. Here, the first generation position specifically refers to the initial generation position determined for the internal model.

[0031] In practical applications, the process of identifying the bounding box region of a target model can be represented by arranging target point objects on the target model, and then identifying the bounding box region of the target objects based on the target point objects to obtain the bounding box region of the target model. The bounding box region can refer to the smallest area that surrounds the model object. The smallest area can be specifically represented as the rectangular area of ​​a planar bounding box. The set of points contained within the rectangular area can be called the initial point set.

[0032] Step 202: Perform a preset number of ray detections on the target model based on the initial point set to obtain the target internal model generation region of the target model;

[0033] After obtaining the initial point set, the initial point set can be used to represent the first generation position of the internal model, that is, the initial generation position. Since the target model is usually a scene model with a certain thickness and collisions both inside and outside, the rectangular area where the initial point set is located is only a plane range. The specific vertical position of the point set on the plane in the target model is not very clear. At this time, ray detection can be performed on the target model based on the initial point set, and the target internal model generation area of ​​the target model can be obtained based on the discrimination of ray collision objects.

[0034] The target model has a closed exterior and a hollow interior. A single ray detection of the target model based on the initial point set may not be sufficient to achieve a collision with the interior of the target model. In this embodiment of the invention, multiple iterative ray detections can usually be performed on the target model to determine the generation region of the internal model based on the collision that occurs with the interior of the target model. It should be noted that the number of iterations can be determined based on the number of collision points between the ray detection emission point and the target model, as well as the distance between each collision point. For example, if a ray is emitted from a certain point to the target model, and there are several collision points between the ray and the target model, there may be many collision points that are very close to each other. In this case, collision points with consecutive distances less than a preset distance threshold can be grouped into one set, and collision points with consecutive distances greater than the preset distance threshold can be grouped into another set. If there are two sets of collision points, for example, the collision points between the ray and the upper outer surface, upper inner surface, and the part between the upper outer surface and the upper inner surface of the cave-like model can be one set, and the collision points between the ray and the lower inner surface of the cave-like model can be another set. In this case, the number of iterations can be two. This embodiment of the invention does not limit this.

[0035] In practical applications, iterative ray detection involves using the collision points between the ray emitted from the previous point set and the target model as the emission points for the current ray detection, and then performing ray detection again with the target model. For example, the first ray emission can be performed based on the initial point set, resulting in an iterative point set based on the collision points with the target model. Then, another ray emission can be performed using this iterative point set as the emission point, and finally, another iterative point set can be obtained by identifying the ray collision objects.

[0036] Step 203: Generate the internal model of the target model in the target internal model generation region.

[0037] The set of points obtained after a preset number of ray detections can be considered as a set of collision points located inside the model. At this point, the model generation region inside the target can be determined based on this set.

[0038] In one embodiment of the present invention, after determining the target internal model generation region, the internal model of the target model can be generated in the target internal model generation region to complete the automated generation of the internal model of the model.

[0039] In this embodiment of the invention, by identifying the bounding box region of the target model and obtaining the initial point set within the bounding box region, the target model is subjected to a preset number of ray detections based on the initial point set that can characterize the first generation position of the internal model, thereby obtaining the target internal model generation region for generating the internal model of the target model. That is, based on identifying the bounding box region of the target model and performing iterative ray detection on the target model, the internal region points of the target model are identified, thereby automatically realizing the generation of the internal model of the model, achieving the purpose of quickly realizing the initial layout of the internal region model, and thus improving the generation efficiency of the internal model of the model.

[0040] Reference Figure 3 The flowchart illustrates another embodiment of the internal model generation method for the target model of the present invention, which may specifically include the following steps:

[0041] Step 301: Identify the bounding box region of the target model and obtain the initial point set within the bounding box region;

[0042] In this embodiment of the invention, in order to facilitate the generation of an internal model within the target model, it is necessary to determine the specific generation region of the generated internal model.

[0043] Specifically, the bounding box region of the target model can be identified. The bounding box region refers to the smallest region that encloses the model object, and it can be used to indicate the generation range of the initial point set. The initial point set within this smallest region can then be obtained. This obtained initial point set can be used to characterize the first generation position of the internal model, so that the first generation position of the internal model can be determined within the generation range of the target model based on the obtained initial point set. Specifically, the first generation position refers to the initial generation position determined for the internal model.

[0044] In practical applications, the process of identifying the bounding box region of a target model can be represented by arranging target point objects on the target model, and then identifying the bounding box region of the target objects based on the target point objects to obtain the bounding box region of the target model.

[0045] The bounding box region refers to the smallest region that encloses a model object. Specifically, this smallest region can be represented as a rectangular area within a planar bounding box. The set of points contained within this rectangular area can be called the initial point set. In practice, obtaining the initial point set can be achieved by dividing the rectangular area equally based on a predetermined number of points, scattering a predetermined number of points, and then using a random method to obtain the initial point set.

[0046] Specifically, the rectangular region surrounding the target model at the current position can be obtained based on the center point of the bounding box region. The rectangular region is then evenly divided into regions of a preset size to obtain several sub-regions. Then, points of an average number of points are evenly distributed to several sub-regions based on a preset number of points. The points distributed to each sub-region are then transferred to the initial point set.

[0047] The planar bounding box can be the bounding box of the XZ plane, YZ plane, or XY plane. It can be determined based on the placement direction of the target model, and is usually a plane perpendicular to the placement direction of the target model.

[0048] Assuming the target model is placed vertically in the game scene, the rectangular region surrounding the target model at the current position can be located in the XZ plane. For example, based on the target point object, the Unity engine's function to obtain the prefab bounding box can be used to obtain the center point of the prefab bounding box and the maximum and minimum values ​​in the XZ direction. Then, based on the center point, the minimum rectangular region surrounding the prefab at the current position can be determined. The obtained rectangular region is then divided equally. In order to make the point set sufficiently dense, 10,000 or even more generated points can be sampled in the rectangular region to obtain the initial point set within the rectangular region.

[0049] Step 302: Perform a preset number of ray detections on the target model based on the initial point set to obtain the target point set;

[0050] The initial point set can be used to characterize the first generation position of the internal model, i.e. the initial generation position. Since the target model is usually a scene model with a certain thickness and collisions both inside and outside, the rectangular area where the initial point set is located is only a plane range. The specific vertical position of the point set on the plane in the target model is not very clear. At this time, ray detection can be performed on the target model based on the initial point set, and the target internal model generation area of ​​the target model can be obtained based on the discrimination of ray collision objects.

[0051] The target model has a closed exterior and a hollow interior. A single ray detection based on the initial point set may not be sufficient to achieve a collision with the interior of the target model. In this embodiment of the invention, multiple iterative ray detections can be performed on the target model to determine the generation region of the internal model based on collisions occurring within the target model. In this case, a predetermined number of ray detections can be performed on the target model based on the initial point set to obtain the target point set.

[0052] Specifically, the target model can be iterated through a preset number of ray detections based on the initial point set to obtain the iterative point set, and then the target point set can be determined based on the iterative point set.

[0053] In practical applications, iterative ray detection involves using the collision points between the ray emitted from the previous point set and the target model as the emission points for the current ray detection, and then performing ray detection again with the target model. In other words, the set of collision points generated by the ray and the target model can be called the iterative point set.

[0054] In one embodiment of the present invention, since ray detection is performed a preset number of times, the iterative point set may include a first iterative point set and a second iterative point set. The first iterative point set may refer to the set of collision points generated by the first ray detection based on the initial point set and the target model, i.e., the initial iterative point set. The second iterative point set may be a collective term for all iterative point sets obtained by ray detection emitted in two or more iterations.

[0055] In practice, the initial point set can be offset in a preset direction, and ray detection can be performed on the target model based on the offset initial point set to obtain the first iteration point set; then the first iteration point set can be offset in a preset direction, and ray detection can be performed on the target model iteratively based on the offset first iteration point set to obtain the second iteration point set. Specifically, the first iteration point set can be updated to the initial point set, and then ray detection can be performed on the target model based on the updated initial point set until the second iteration point set is obtained.

[0056] The first iterative point set obtained by ray detection based on the initial point set can be used to characterize the surface point set of the target model, which is usually the set of collision points generated by the ray and the upper outer surface of the target model; the second iterative point set usually refers to the point set obtained after ray detection of a preset number of times, which can be used to characterize the internal point set of the target model, which can be considered as the set of collision points located inside the model. At this time, the second iterative point set can be determined as the target point set.

[0057] In practical applications, a first ray emission can be performed based on the initial point set mentioned above. At this point, an iterative point set can be obtained based on the collision points with the target model. Then, another ray emission can be performed using the obtained iterative point set as the emission point, and another iterative point set can be obtained by identifying the ray collision object. For example, using the XZ coordinates of each initial point as a reference, after offsetting in the Y direction, a first ray emission is performed to obtain the surface point set of the target model (i.e., the first iterative point set). Then, based on the obtained surface point set, after a slight offset in the Y direction, a ray emission can be performed again using this point, and the internal point set of the model (i.e., the second iterative point set) can be obtained by identifying the ray collision object.

[0058] As an example, the XZ coordinates of each point can be extracted, and the point can be moved upwards by 2000 units along the Y-axis square, using this point as the starting point for ray emission. Then, by detecting the collision points encountered by the ray during its movement, the collision points between the ray and the outer surface of the cave model can be obtained, thus obtaining the first iteration point set after scattering the points. Then, based on the coordinates of the first iteration point set, the iteration point set can be shifted downwards by a small distance in the Y direction to obtain the starting point for the second ray emission. At this point, a ray can be emitted downwards from this point, and the collision points of the ray can be detected again to obtain the second iteration point set after scattering the points.

[0059] As another example, based on a set of 10,000 points, the number or density of points is randomly selected from the set to obtain an initial iterative point set. Then, based on this initial iterative point set, the XZ coordinates of each point are extracted, and the point is moved upwards by 2000 units along a square on the Y-axis, using this point as the starting point for ray emission. A ray is then emitted downwards from this point. By detecting the collision points encountered by the ray during its journey, the collision points between the ray and the outer surface of the cave model are obtained, resulting in the first iterative point set after point distribution. Based on this first iterative point set, the iterative point set can be shifted downwards by a small distance in the Y-direction to obtain the starting point for a second ray emission. A ray can then be emitted downwards from this point, and the collision points of the ray are detected again to obtain the second iterative point set after point distribution.

[0060] Step 303: Obtain the target model generation region based on the target point set;

[0061] The obtained target point set can be used to represent the second generation position of the internal model. This second generation position can be an intermediate generation position determined based on the first generation position, so that the subsequent final generation position can be determined based on this intermediate generation position. At this point, the initial internal model generation region of the target model can be determined based on the second generation position represented by the target point set. Then, based on a preset random region range, the initial internal model generation region is used to acquire the target model generation region.

[0062] In practical applications, in order to ensure that the position of the internal model is randomly selected, after obtaining the second iteration point set of the scattered points, a random range value can be selected within the second iteration point set region according to the input generation quantity or density. That is, a region formed by a series of generated points is obtained according to the preset random region range, and the region formed is the target model generation region.

[0063] Step 304: Generate the internal model of the target model in the target internal model generation region.

[0064] In one embodiment of the present invention, after determining the target internal model generation region, the internal model of the target model can be generated in the target internal model generation region to complete the automated generation of the internal model of the model.

[0065] Specifically, the target internal model generation region has a final point set, which can be a set corresponding to a preset random range in the target point set. The final point set can be used to represent the third generation position of the internal model. The third generation position is the final generation position determined for the internal model. At this time, the internal model of the target model can be generated at the third generation position of the internal model, thus completing the random generation of the internal model of the target model.

[0066] In a preferred embodiment of the present invention, in order to ensure both random selection of location and random generation of physical attributes, the internal model of the target model can be adjusted within a preset random height range during the generation process. That is, the internal model can be adjusted according to a preset random height range. For example, the height of the internal model can be limited and scaled based on random values ​​(0.8, 1.2) within a set range to obtain the internal scene of the model after the points are scattered.

[0067] In this embodiment of the invention, based on identifying the enclosing region of the target model and performing iterative ray detection on the target model, points in the internal region of the target model are identified, thereby automatically generating the internal model and achieving the goal of quickly realizing the initial layout of the internal region model, thus improving the generation efficiency of the internal model. Furthermore, random point scattering can be used in the internal model generation region to ensure the randomness of the internal model generation, and during the generation process, random rotation and scaling adjustments can be performed on the internal model to make the generated internal model conform to reality.

[0068] For example, the internal model generation method for the target model provided in the embodiments of the present invention, such as Figure 4 As shown, this can be applied to scenarios where vegetation objects are generated in cave-like models.

[0069] In this example, the target model can be a cave-like model, and the internal model can be a vegetation-like object model inside the cave-like model.

[0070] In the process of generating vegetation objects, it can be represented as follows: First, based on the target point object, the bounding box region of the target object is identified, and rectangular points within the bounding box range of the XZ plane are obtained. Then, the rectangular region is evenly divided based on the set number of points, and the initial point set for vegetation generation is obtained using a random method according to the set number of points. Then, based on the obtained initial point set, the XZ coordinates of each initial point are used as a reference, and after offset in the Y direction, the first ray emission is performed to obtain the surface point set of the cave model. Then, based on the obtained surface point set, after a slight offset in the Y direction, the ray emission is performed again from this point, and the internal point set of the cave is obtained by judging the collision objects of the ray.

[0071] After obtaining the second-order iterative point set, based on the input generation quantity or density, random values ​​are selected within the area formed by the second-order iterative point set to obtain a series of vegetation generation points. To increase the naturalness of vegetation generation, the height and scaling of vegetation objects are randomly selected within a set range (0.8, 1.2) during the vegetation generation process to obtain the cave vegetation scene after point generation.

[0072] In this example, a given cave-like model can be quickly identified and its surrounding area can be randomly generated within the surrounding area. Then, based on secondary ray detection of the model, points in the internal area of ​​the cave model can be identified to generate vegetation objects. This achieves the goal of quickly realizing the initial layout of vegetation in the internal area, automating the generation of vegetation objects in cave-like models and improving the generation efficiency of vegetation objects.

[0073] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0074] Reference Figure 5 The diagram illustrates a structural block diagram of an embodiment of an internal model generation device for a target model according to the present invention, which may specifically include the following modules:

[0075] The initial point set acquisition module 501 is used to identify the bounding box region of the target model and acquire the initial point set within the bounding box region; the bounding box region is used to indicate the generation range of the initial point set, wherein the initial point set is used to characterize the first generation position of the internal model;

[0076] The ray detection module 502 is used to perform ray detection on the target model a preset number of times based on the initial point set to obtain the target internal model generation region of the target model;

[0077] The model generation module 503 is used to generate an internal model of the target model in the model generation region inside the target.

[0078] In one embodiment of the present invention, the initial point set acquisition module 501 may include the following sub-modules:

[0079] The initial point set acquisition submodule is used to acquire a rectangular region that surrounds the target model at the current position based on the center point of the bounding box region, and to uniformly divide the rectangular region into several sub-regions of a preset size; to evenly distribute the average number of points of the point set to the several sub-regions based on the preset number of point sets, and to transfer the points allocated to each sub-region to the initial point set.

[0080] In one embodiment of the present invention, the X-ray detection module 502 may include the following sub-modules:

[0081] The ray detection submodule is used to perform ray detection on the target model a preset number of times based on the initial point set to obtain a target point set; the target point set is used to characterize the second generation position of the internal model; the initial internal model generation region of the target model is determined according to the second generation position characterized by the target point set; and the target model generation region is obtained by acquiring the initial internal model generation region based on a preset random region range.

[0082] In one embodiment of the present invention, the X-ray detection submodule may include the following units:

[0083] A ray detection unit is used to perform ray detection on the target model iteratively a preset number of times based on the initial point set to obtain an iterative point set; and to determine the target point set based on the iterative point set.

[0084] The iterative point set includes a first iterative point set and a second iterative point set. The step of performing ray detection on the target model a preset number of times based on the initial point set to obtain the iterative point set includes: offsetting the initial point set according to a preset direction; performing ray detection on the target model based on the offset initial point set to obtain the first iterative point set; the first iterative point set is used to characterize the surface point set of the target model; updating the first iterative point set to the initial point set; and performing ray detection on the target model based on the updated initial point set until a second iterative point set is obtained; the second iterative point set is used to characterize the internal point set of the target model.

[0085] Determining the target point set based on the iterative point set includes: determining the second iterative point set as the target point set.

[0086] In one embodiment of the present invention, the target internal model generation region has a final point set, which is a set corresponding to a preset random range in the target point set, and the final point set is used to characterize the third generation position of the internal model;

[0087] Model generation module 503 may include the following sub-modules:

[0088] The model generation submodule is used to generate an internal model of the target model at the third generation position of the internal model, and to adjust the internal model according to a preset random height range during the generation of the internal model of the target model.

[0089] In this embodiment of the invention, the internal model generation device for the target model provides an internal model generation area for generating the internal model of the target model by identifying the bounding box region of the target model and obtaining the initial point set within the bounding box region, and performing ray detection on the target model a preset number of times based on the initial point set that can characterize the first generation position of the internal model, thereby obtaining the target internal model generation area for generating the internal model of the target model. That is, based on identifying the bounding box region of the target model and performing iterative ray detection on the target model, the internal region points of the target model are identified, thereby automatically realizing the generation of the internal model of the model, achieving the purpose of quickly realizing the initial layout of the internal region model, and thus improving the generation efficiency of the internal model of the model.

[0090] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0091] This invention also provides an electronic device, comprising:

[0092] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the various processes of the internal model generation method embodiment of the target model described above and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0093] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the internal model generation method embodiment of the target model described above and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0094] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0095] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0096] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0097] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0098] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0099] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0100] Finally, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0101] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0102] The foregoing has provided a detailed description of the internal model generation method, the internal model generation device, the corresponding electronic device, and the corresponding computer-readable storage medium for a target model provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for generating an internal model of a target model, characterized in that, The method includes: Identify the bounding box region of the target model and obtain an initial point set within the bounding box region; the bounding box region is used to indicate the generation range of the initial point set, wherein the initial point set is used to characterize the first generation position of the internal model; Based on the initial point set, the target model is iterated through ray detection a preset number of times to obtain the iterative point set; A target point set is determined based on the iterative point set; the target point set is used to characterize the second generation position of the internal model. Based on the second generation position represented by the target point set, determine the initial internal model generation region of the target model; Based on a preset random region range, the initial internal model generation region is used to obtain the target model generation region; Generate the internal model of the target model in the target model generation area.

2. The method according to claim 1, characterized in that, The step of obtaining the initial set of points within the bounding box region includes: Based on the center point of the bounding box region, obtain the rectangular region that surrounds the target model at the current position, and uniformly divide the rectangular region into regions of a preset size to obtain several sub-regions; The points are evenly distributed among the several sub-regions based on a preset number of points, and the points distributed in each sub-region are then transferred to the initial point set.

3. The method according to claim 1, characterized in that, The iterative point set includes a first iterative point set and a second iterative point set. The step of performing ray detection on the target model a preset number of times based on the initial point set to obtain the iterative point set includes: The initial point set is offset according to a preset direction, and ray detection is performed on the target model based on the offset initial point set to obtain a first iterative point set; the first iterative point set is used to characterize the surface point set of the target model. The first iterative point set is updated to the initial point set, and ray detection is performed on the target model based on the updated initial point set until a second iterative point set is obtained; the second iterative point set is used to characterize the internal point set of the target model.

4. The method according to claim 3, characterized in that, Determining the target point set based on the iterative point set includes: The second set of iterative points is determined as the target set of points.

5. The method according to claim 1, characterized in that, The target model generation region has a final point set, which is a set in the target point set that corresponds to a preset random range. The final point set is used to characterize the third generation position of the internal model. The step of generating the internal model of the target model in the target model generation region includes: The internal model of the target model is generated at the third generation position of the internal model; The method further includes: During the process of generating the internal model of the target model, the internal model is adjusted according to a preset random height range.

6. An internal model generation device for a target model, characterized in that, The device includes: An initial point set acquisition module is used to identify the bounding box region of the target model and acquire an initial point set within the bounding box region; the bounding box region is used to indicate the generation range of the initial point set, wherein the initial point set is used to characterize the first generation position of the internal model; A ray detection module is used to perform ray detection on the target model iteratively a preset number of times based on the initial point set to obtain an iterative point set; determine a target point set based on the iterative point set; the target point set is used to characterize the second generation position of the internal model; determine the initial internal model generation region of the target model according to the second generation position characterized by the target point set; and perform region acquisition on the initial internal model generation region based on a preset random region range to obtain the target model generation region. The model generation module is used to generate an internal model of the target model in the target model generation area.

7. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the internal model generation method for the target model as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the internal model generation method for the target model as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • FDTD mesh generation method and system based on ray tracing

    CN115935673A