Storage area scene rendering method and device, equipment, medium and product
By determining the triangular facet and axis-aligned bounding box in the image model of the storage area, and combining the intersection detection algorithm for light and shadow rendering, the problem of difficult rendering of image model in complex storage areas is solved, and efficient scene rendering is achieved.
Patent Information
- Application Number
- CN202411780036.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-05-02
AI Technical Summary
In complex storage areas, it is difficult for the prior art to effectively render scenes of image models, especially when there are more goods and shelves.
By obtaining the target image model, a triangle face is determined and a triangle array is constructed, the axis is aligned to the bounding box according to the position information, and the preset intersection detection algorithm is used to determine the bounding box intersecting the target light, and light and shadow rendering is performed.
The calculation process of intersecting light and objects is optimized, the efficiency of scene rendering is improved, and the image model of complex storage areas can be rendered more accurately.
Smart Images

Figure CN119919567A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the technical field of image processing, and more specifically, to a method, device, equipment, medium and product for scene rendering in a storage area. Background Art
[0002] With the rapid development of image processing technology, image processing technology can be applied to fields such as logistics management or warehouse management. At present, in order to realize the visual management of the warehouse area, an image model of the warehouse area is usually constructed based on the location information of the goods in the warehouse area and the shelves where the goods are stored. However, when a large number of goods and shelves form a complex warehouse area, it is difficult to render the image model scene. Summary of the invention
[0003] One purpose of the embodiments of the present disclosure is to provide a new technical solution for scene rendering of a storage area.
[0004] According to a first aspect of the present disclosure, a method for scene rendering of a storage area is provided, the method comprising:
[0005] Acquire a target image model of the storage area;
[0006] Determine the triangular facets in the target image model to obtain a triangle array; wherein the triangle array includes position information of each of the triangular facets;
[0007] Determine, according to the position information, the node associated with each of the triangular facets in the bounding volume hierarchy of the set target image model and the axis-aligned bounding box contained in the node;
[0008] When the setting conditions of the target light are obtained, a target axis-aligned bounding box intersecting with the target light is determined in the axis-aligned bounding boxes of the bounding volume hierarchy according to a preset intersection detection algorithm and the setting conditions;
[0009] According to the intersection position of the target axis-aligned bounding box and the target light, the target image model is rendered to obtain a rendered target image model.
[0010] Optionally, after determining, according to the position information, the nodes associated with each of the triangular facets in the bounding volume hierarchy of the set target image model and the axis-aligned bounding boxes contained in the nodes, the method further comprises:
[0011] Acquire first update information about the target image model;
[0012] Determine the object type of the first object to be updated in the first update information;
[0013] When the object type is a storage device, determining a carrier object of the first object to be updated;
[0014] The bounding volume hierarchy is updated according to the position information of the triangular facets associated with the bearing object and the first object to be updated.
[0015] Optionally, the first update information includes removing a first object to be updated located at a first position in the target image model; and updating the bounding volume hierarchy structure according to the position information of the triangular facet associated with the bearing object and the first object to be updated includes:
[0016] determining a first axis-aligned bounding box associated with the first position;
[0017] According to the position information of the triangular facets associated with the first object to be updated and the bearing object, the features of the first object to be updated and the bearing object in the first axis-aligned bounding box are deleted to obtain an updated bounding volume hierarchy structure.
[0018] Optionally, the first update information includes that a first object to be updated located at a second position in the target image model is moved to a third position; and updating the bounding volume hierarchy structure according to the position information of the triangular facets associated with the bearing object and the first object to be updated includes:
[0019] Determine a second axis-aligned bounding box associated with the second position and a third axis-aligned bounding box associated with the third position;
[0020] According to the position information of the triangular facets associated with the first object to be updated and the carrying object, the features of the first object to be updated and the carrying object in the second axis-aligned bounding box are deleted, and the features of the first object to be updated and the carrying object are added in the third axis-aligned bounding box to obtain an updated bounding volume hierarchy.
[0021] Optionally, after determining the object type of the first object to be updated in the first update information, the method further includes:
[0022] When the object type is cargo, the bounding volume hierarchy is updated according to the position information of the triangular facets associated with the first object to be updated.
[0023] Optionally, after determining, according to the position information, the nodes associated with each of the triangular facets in the bounding volume hierarchy of the set target image model and the axis-aligned bounding boxes contained in the nodes, the method further comprises:
[0024] Acquire second update information about the target image model; wherein the second update information includes adding a second object to be updated to a fourth position in the target image model;
[0025] determining a fourth axis-aligned bounding box associated with the fourth position;
[0026] According to the position information of the triangular facet associated with the second object to be updated, features related to the second object to be updated are added to the fourth axis-aligned bounding box to obtain an updated bounding volume hierarchy structure.
[0027] According to a second aspect of the present disclosure, a scene rendering device for a storage area is also provided, the device comprising:
[0028] A model acquisition module, used to acquire a target image model of the storage area;
[0029] An array obtaining module, used for determining the triangular facets in the target image model and obtaining a triangular array; wherein the triangular array includes the position information of each triangular facet;
[0030] A bounding box determination module, used to determine, according to the position information, the nodes associated with each of the triangular facets in the bounding volume hierarchy of the set target image model and the axis-aligned bounding boxes contained in the nodes;
[0031] An intersection determination module, configured to determine, when the setting conditions of the target light are obtained, a target axis-aligned bounding box intersecting with the target light in each of the axis-aligned bounding boxes according to a preset intersection detection algorithm and the setting conditions;
[0032] The light and shadow rendering module is used to perform light and shadow rendering on the target image model according to the intersection position of the target axis-aligned bounding box and the target light to obtain a rendered target image model.
[0033] According to a third aspect of the present disclosure, an electronic device is also provided, including a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the method according to the first aspect of the present disclosure.
[0034] According to a fourth aspect of the present disclosure, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the method according to the first aspect of the present disclosure is implemented.
[0035] According to a fifth aspect of the present disclosure, a computer program product is further provided, comprising a computer program, wherein when the computer program is executed by a processor, the method according to the first aspect of the present disclosure is implemented.
[0036] One beneficial effect of the disclosed embodiments is that the scene rendering method for the storage area provided by the present invention can determine the triangular facets in the target image model based on the acquired target image model to obtain a triangle array. According to the position information of each triangular facet in the triangle array, an axis-aligned bounding box is determined. The axis-aligned bounding box that intersects with the target light ray of the set condition is determined, that is, the target axis-aligned bounding box. According to the intersection position of the target axis-aligned bounding box and the target light ray, the target image model can be rendered with light and shadow. Through the target axis-aligned bounding box, the calculation process of the intersection of the light ray and the objects in the storage area can be optimized, thereby accelerating the efficiency of the target image model scene rendering.
[0037] Other features and advantages of the embodiments of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the embodiments of the present disclosure.
[0039] Figure 1 is a flow chart of a scene rendering method for a storage area according to an embodiment;
[0040] Figure 2 is a schematic diagram of the intersection of a light ray and a planar figure according to one embodiment;
[0041] Figure 3 is a block diagram of a scene rendering device for a storage area according to an embodiment;
[0042] Figure 4 is a schematic diagram of the hardware structure of an electronic device according to an embodiment. DETAILED DESCRIPTION
[0043] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.
[0044] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0045] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0046] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0047] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0048] <Method Example>
[0049] Figure 1 The following is a flow chart of a scene rendering method for a storage area according to an embodiment. The implementation subject may be a smart terminal, such as a computer, a mobile phone or a tablet, which is not limited here.
[0050] like Figure 1 As shown, the scene rendering method of the storage area of this embodiment may include the following steps S110 to S150:
[0051] Step S110, obtaining a target image model of the storage area.
[0052] In the present application, the image model may be a three-dimensional image model, and the target image model of the storage area may display objects such as goods, shelves, and lockers in the storage area, which is not limited here.
[0053] In the present application, the user can upload the target image model of the storage area to the smart terminal, and the smart terminal can obtain the target image model of the storage area.
[0054] Step S120, determining the triangular facets in the target image model to obtain a triangle array; wherein the triangle array includes the position information of each triangular facet.
[0055] In the present application, a three-dimensional target image model can be converted into a two-dimensional plane image under six viewing angles, and the object in each plane image can be composed of multiple triangular facets. That is to say, for a plane image, the vertex position of a triangular facet in the plane image can represent the position information of the triangular facet.
[0056] In some examples, the location information can be obtained through the following procedures, specifically:
[0057]
[0058] Step S130 : determining the nodes associated with each triangular facet in the bounding volume hierarchy of the set target image model and the axis-aligned bounding box contained in the node according to the position information.
[0059] In the present application, the root node of the bounding volume hierarchy (Bounding Volume Hierarchy BasedOn Tree, BVH tree) of the target image model represents a maximum bounding box, and its multiple leaf nodes represent multiple axis-aligned bounding boxes (Axis-aligned bounding boxes, AABB).
[0060] In some examples, the nodes associated in the bounding volume hierarchy of the target image model may be obtained by the following procedure, specifically:
[0061]
[0062] }
[0063] / / You can add other methods to operate BVHNode objects, for example:
[0064] / / Set the bounding box of the node
[0065] setBoundingBox(aa,bb){
[0066] this.AA = aa;
[0067] this.BB = bb;
[0068] }
[0069] / / Set the node's child nodes
[0070] setChildren(left,right){
[0071] this.left = left;
[0072] this.right = right;
[0073] }
[0074] / / Set leaf node information
[0075] setLeafInfo(n,index){
[0076] this.n = n;
[0077] this.index = index;
[0078] }
[0079] }
[0080] In some examples, for the construction of the bounding volume hierarchy of the target image model, each triangle in the triangle array can be traversed, and the maximum and minimum values on the X, Y, and Z axes can be calculated to determine the axis-aligned bounding box of the current node. When the number of triangles contained in the current node is less than the preset threshold N, the recursion is stopped, and a leaf node is constructed and returned. When the number of triangles of the current node is greater than or equal to the preset threshold N, the tree structure is continued to be recursively constructed. For an axis-aligned bounding box, the axis corresponding to the longest side of the axis-aligned bounding box is determined, and each triangle is sorted according to the coordinates of each triangle on the axis. Determine the midpoint mid of the sorted triangle array, divide the sorted triangle array into two left and right subsets, namely [l, mid] and [mid+1, r], and recursively perform tree construction on these two subsets. The tree construction result of the tree construction can be the entire target image model collision box, which is then divided into two parts, divided into two parts again, and so on.
[0081] In some embodiments, after step S130, the method further includes the following steps S210 to S240:
[0082] Step S210: obtaining first update information about the target image model.
[0083] In the present application, the first update information may be the removal or displacement of one or some objects, wherein the one or some objects are the first objects to be updated, and the first objects to be updated may be goods, shelves, lockers or pallets, etc., which are not limited here.
[0084] Step S220: Determine the object type of the first object to be updated in the first update information.
[0085] In the present application, object types may include storage equipment and goods. The storage equipment may be, for example, goods, shelves, storage cabinets, or pallets, etc., which are not limited here.
[0086] Step S230: When the object type is a storage device, determine the bearing object of the first object to be updated.
[0087] In the present application, the carrying object is, for example, goods placed on the first object to be updated.
[0088] Step S240: updating the bounding volume hierarchy structure according to the position information of the triangular facets associated with the bearing object and the first object to be updated.
[0089] In the present application, updating the bounding volume hierarchy structure may be updating the axis-aligned bounding box associated with a node that is part of the bounding volume hierarchy structure. Such updates may be adding or deleting some features in the axis-aligned bounding box.
[0090] In other words, by determining that the object type of the first object to be updated is a storage device, the bounding volume hierarchy is updated according to the position information of the triangular facets associated with the carrying object and the first object to be updated, thereby effectively improving the accuracy of updating the bounding volume hierarchy.
[0091] In some embodiments, the first update information includes removing a first object to be updated located at a first position in the target image model; step S240 may include the following steps S2401 and S2402:
[0092] Step S2401: determine a first axis-aligned bounding box associated with a first position.
[0093] In the present application, the first position may be a relative three-dimensional position in the target image model.
[0094] Step S2402: according to the position information of the triangular facets associated with the first object to be updated and the carrier object, the features of the first axis-aligned bounding box related to the first object to be updated and the carrier object are deleted to obtain an updated bounding volume hierarchy structure.
[0095] In other words, by deleting the features of the first object to be updated and the bearing object in the local axis-aligned bounding box, local updating can be achieved, effectively improving the performance of subsequent rendering of the target image model.
[0096] In some embodiments, the first update information includes that the first object to be updated located at the second position in the target image model moves to the third position; the step S240 may include the following steps S2403 and S2404:
[0097] Step S2403: determine a second axis-aligned bounding box associated with the second position and a third axis-aligned bounding box associated with the third position.
[0098] In the present application, the second position may be a relative three-dimensional position in the target image model, and the third position may also be a relative three-dimensional position in the target image model.
[0099] Step S2404, based on the position information of the triangular facets associated with the first object to be updated and the carrier object, delete the features of the first object to be updated and the carrier object in the second axis-aligned bounding box, add the features of the first object to be updated and the carrier object in the third axis-aligned bounding box, and obtain an updated bounding volume hierarchy.
[0100] In other words, by deleting the features about the first object to be updated and the carrying object in one of the local axis-aligned bounding boxes and adding the features about the first object to be updated and the carrying object in another local axis-aligned bounding box, local updating can be achieved, thereby further improving the performance of subsequent rendering of the target image model.
[0101] In some embodiments, after step S220, the method further includes the following step S250:
[0102] Step S250: When the object type is cargo, the bounding volume hierarchy is updated according to the position information of the triangular facet associated with the first object to be updated.
[0103] In other words, when the first object to be updated is cargo, directly adding or deleting the features of the first object to be updated from the corresponding axis-aligned bounding box can effectively improve the response speed of subsequent light and shadow rendering of the target image model.
[0104] In some embodiments, after step S130, the method further includes the following steps S310 to S330:
[0105] Step S310, obtaining second update information about the target image model; wherein the second update information includes adding a second object to be updated to a fourth position in the target image model.
[0106] In the present application, the second update information may be the addition of one or some objects, wherein the one or some objects are the second objects to be updated, and the second objects to be updated may be goods, shelves, lockers or pallets, etc., which are not limited here.
[0107] Step S320: determining a fourth axis-aligned bounding box associated with a fourth position.
[0108] In the present application, the fourth position may be a relative three-dimensional position in the target image model.
[0109] Step S330 : adding features related to the second object to be updated to the fourth axis-aligned bounding box according to the position information of the triangular facet associated with the second object to be updated, to obtain an updated bounding volume hierarchy structure.
[0110] In the present application, updating the bounding volume hierarchy structure may be updating the axis-aligned bounding box associated with a node that is part of the bounding volume hierarchy structure. Such updates may be adding some additional features to the axis-aligned bounding box.
[0111] In other words, when adding the second object to be updated, directly adding features about the second object to be updated to the fourth axis-aligned bounding box can effectively improve the response speed of subsequent light and shadow rendering of the target image model.
[0112] Step S140 , when the setting conditions of the target light are obtained, a first axis-aligned bounding box intersecting with the target light is determined in the axis-aligned bounding boxes of the bounding volume hierarchy according to a preset intersection detection algorithm and the setting conditions.
[0113] In some examples, such as Figure 2 As shown, when the coordinates of point AA and point BB are known, the coordinates of point AA are divided by the direction vector direction of the light, thereby obtaining a two-dimensional vector in, in.x represents the point where the light penetrates the surface corresponding to the x-axis, and in.y represents the point where the light penetrates the surface corresponding to the y-axis. The coordinates of point BB are divided by the direction vector direction of the light, thereby obtaining a two-dimensional vector out, out.x represents the point where the light penetrates the surface corresponding to the x-axis, and out.y represents the point where the light penetrates the surface corresponding to the y-axis. In the vector out, the minimum value is selected, recorded as t1, which represents the farthest point where the light intersects with the axis-aligned bounding box. At the same time, the maximum value is selected from the vector in, recorded as t0, which represents the closest point where the light intersects with the axis-aligned bounding box. By comparing these two values, it can be determined whether the light intersects with the axis-aligned bounding box, that is, if t1 is greater than t0, the light intersects with the bounding box, and then the position where the light first intersects with the axis-aligned bounding box can be determined.
[0114] Step S150 , performing light and shadow rendering on the target image model according to the intersection position of the first axis-aligned bounding box and the target light ray to obtain a rendered target image model.
[0115] In the present application, according to the first intersection position of the first axis-aligned bounding box and the target light ray, the target image model can be rendered with light and shadow to obtain a rendered target image model.
[0116] <Equipment Example 1>
[0117] Figure 3 FIG. 1 is a block diagram of a scene rendering device for a storage area according to an embodiment. Figure 3 As shown, the scene rendering device 200 of the storage area may include:
[0118] A model acquisition module 210 is used to acquire a target image model of a storage area;
[0119] An array obtaining module 220 is used to determine the triangular facets in the target image model and obtain a triangular array; wherein the triangular array includes the position information of each triangular facet;
[0120] The bounding box determination module 230 is used to determine the nodes associated with each triangular facet in the bounding volume hierarchy of the set target image model and the axis-aligned bounding box contained in the node according to the position information;
[0121] The intersection determination module 240 is used to determine the target axis-aligned bounding box intersecting with the target light in each axis-aligned bounding box according to the preset intersection detection algorithm and the set conditions when the set conditions of the target light are obtained;
[0122] The light and shadow rendering module 250 is used to perform light and shadow rendering on the target image model according to the intersection position of the target axis-aligned bounding box and the target light to obtain a rendered target image model.
[0123] Optionally, the scene rendering device 200 of the storage area also includes a first update module, which is used to obtain first update information about the target image model; determine the object type of the first object to be updated in the first update information; when the object type is a storage device, determine the carrier object of the first object to be updated; and update the bounding volume hierarchy according to the position information of the triangular facets associated with the carrier object and the first object to be updated.
[0124] Optionally, the first update module is also used to determine a first axis-aligned bounding box associated with the first position; based on the position information of the triangular facets associated with the first object to be updated and the carrier object, delete the features of the first object to be updated and the carrier object in the first axis-aligned bounding box to obtain an updated bounding volume hierarchy.
[0125] Optionally, the first update module is also used to determine a second axis-aligned bounding box associated with the second position and a third axis-aligned bounding box associated with the third position; based on the position information of the triangular facets associated with the first object to be updated and the carrier object, delete the features about the first object to be updated and the carrier object in the second axis-aligned bounding box, add the features about the first object to be updated and the carrier object in the third axis-aligned bounding box, and obtain an updated bounding volume hierarchy.
[0126] Optionally, the scene rendering device 200 for the storage area further includes a second updating module, which is used to update the bounding volume hierarchy structure according to the position information of the triangular facets associated with the first object to be updated when the object type is goods.
[0127] Optionally, the scene rendering device 200 of the storage area also includes a third update module, which is used to obtain second update information about the target image model; wherein the second update information includes adding a second object to be updated to a fourth position in the target image model; determining a fourth axis-aligned bounding box associated with the fourth position; and adding features about the second object to be updated in the fourth axis-aligned bounding box based on the position information of the triangular facet associated with the second object to be updated, to obtain an updated bounding volume hierarchy.
[0128] <Equipment Example 2>
[0129] Figure 4 is a schematic diagram of the hardware structure of an electronic device according to another embodiment.
[0130] like Figure 4As shown, the electronic device 300 includes a processor 310 and a memory 320, wherein the memory 320 is used to store an executable computer program, and the processor 310 is used to execute a method such as any of the above method embodiments under the control of the computer program.
[0131] Each module of the scene rendering device 200 for the storage area described above may be implemented by the processor 310 in this embodiment executing a computer program stored in the memory 320, or may be implemented by other structures, which are not limited here.
[0132] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0133] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0134] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0135] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.
[0136] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.
[0137] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0138] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0139] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0140] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.
Claims
1. A scene rendering method for a storage area, characterized in that: The method comprises: Acquire a target image model of the storage area; Determine the triangular facets in the target image model to obtain a triangle array; wherein the triangle array includes position information of each of the triangular facets; Determine, according to the position information, the node associated with each of the triangular facets in the bounding volume hierarchy of the set target image model and the axis-aligned bounding box contained in the node; When the setting conditions of the target light are obtained, a target axis-aligned bounding box intersecting with the target light is determined in the axis-aligned bounding boxes of the bounding volume hierarchy according to a preset intersection detection algorithm and the setting conditions; According to the intersection position of the target axis-aligned bounding box and the target light, the target image model is rendered with light and shadow to obtain a rendered target image model.
2. The method according to claim 1, characterized in that After determining, according to the position information, the nodes associated with each of the triangular facets in the bounding volume hierarchy of the set target image model and the axis-aligned bounding boxes contained in the nodes, the method further comprises: Acquire first update information about the target image model; Determining an object type of a first object to be updated in the first update information; When the object type is a storage device, determining a carrier object of the first object to be updated; The bounding volume hierarchy is updated according to the position information of the triangular facets associated with the bearing object and the first object to be updated.
3. The method according to claim 2, characterized in that The first update information includes removing a first object to be updated located at a first position in the target image model; and updating the bounding volume hierarchy structure according to the position information of the triangular facet associated with the bearing object and the first object to be updated includes: determining a first axis-aligned bounding box associated with the first position; According to the position information of the triangular facets associated with the first object to be updated and the bearing object, the features of the first object to be updated and the bearing object in the first axis-aligned bounding box are deleted to obtain an updated bounding volume hierarchy structure.
4. The method according to claim 2, characterized in that: The first update information includes that a first object to be updated located at a second position in the target image model is moved to a third position; and the updating of the bounding volume hierarchy structure according to the position information of the triangular facet associated with the bearing object and the first object to be updated includes: Determine a second axis-aligned bounding box associated with the second position and a third axis-aligned bounding box associated with the third position; According to the position information of the triangular facets associated with the first object to be updated and the carrying object, the features of the first object to be updated and the carrying object in the second axis-aligned bounding box are deleted, and the features of the first object to be updated and the carrying object are added in the third axis-aligned bounding box to obtain an updated bounding volume hierarchy.
5. The method according to claim 2, characterized in that: After determining the object type of the first object to be updated in the first update information, the method further includes: When the object type is cargo, the bounding volume hierarchy is updated according to the position information of the triangular facets associated with the first object to be updated.
6. The method according to claim 1, characterized in that After determining, according to the position information, the nodes associated with each of the triangular facets in the bounding volume hierarchy of the set target image model and the axis-aligned bounding boxes contained in the nodes, the method further comprises: Acquire second update information about the target image model; wherein the second update information includes adding a second object to be updated to a fourth position in the target image model; determining a fourth axis-aligned bounding box associated with the fourth position; According to the position information of the triangular facet associated with the second object to be updated, features related to the second object to be updated are added to the fourth axis-aligned bounding box to obtain an updated bounding volume hierarchy structure.
7. A scene rendering device for a storage area, characterized in that: The device comprises: A model acquisition module, used to acquire a target image model of the storage area; An array obtaining module, used for determining the triangular facets in the target image model and obtaining a triangular array; wherein the triangular array includes the position information of each triangular facet; A bounding box determination module, used to determine, according to the position information, the nodes associated with each of the triangular facets in the bounding volume hierarchy of the set target image model and the axis-aligned bounding boxes contained in the nodes; An intersection determination module, configured to determine, when the setting conditions of the target light are obtained, a target axis-aligned bounding box intersecting with the target light in each of the axis-aligned bounding boxes according to a preset intersection detection algorithm and the setting conditions; The light and shadow rendering module is used to perform light and shadow rendering on the target image model according to the intersection position of the target axis-aligned bounding box and the target light to obtain a rendered target image model.
8. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.