Object arrangement method, device and equipment in virtual scene, medium and vehicle

By obtaining two-dimensional projections of objects and regions in virtual scenes, using preset coverage methods and texture coordinate arrangement technology, the problems of low object layout efficiency and insufficient space utilization in the existing technology are solved, and a more efficient three-dimensional scene construction is achieved.

CN119942037APending Publication Date: 2025-05-06BEIJING GUOKE FUNDAMENTAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411996610.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

When constructing three-dimensional virtual scenes, the object arrangement efficiency is low and the space to be arranged is not effectively utilized, especially for models of different shapes, which lack adaptability.

Method used

By obtaining the two-dimensional projection graphics of the object to be arranged and the projection area of ​​the area to be arranged, arranging it based on the preset coverage method, a target index array is established, and arranged in the converted projection area through texture coordinates, and finally restored to the three-dimensional scene.

Benefits of technology

The efficiency of object arrangement is improved, and the space of the area to be arranged can be used more effectively to adapt to models of different shapes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119942037A_ABST
    Figure CN119942037A_ABST
Patent Text Reader

Abstract

The invention relates to an object arrangement method, device and equipment in a virtual scene, a medium and a vehicle. The method comprises the following steps: acquiring projection graphs of a plurality of objects to be arranged on a two-dimensional surface and a first projection area of an area to be arranged on the two-dimensional surface; and based on a preset coverage mode, arranging the projection graph to the first projection area to select a to-be-arranged object corresponding to the projection graph which can be arranged as a target arrangement object, and establishing a target index array corresponding to the target arrangement object. And performing coordinate conversion on the first projection area to obtain a second projection area. And performing texture coordinate arrangement on a target arrangement object obtained by the target index array in the second projection area to obtain an arrangement result. And restoring the arrangement position of the target arrangement object according to the corresponding relationship between the texture coordinates and the three-dimensional coordinates. According to the invention, the projection pattern is arranged to the first projection area based on the preset coverage mode, so that the space of the projection area can be effectively utilized. And performing texture coordinate arrangement on the target arrangement object obtained by the target index array in the second projection area. The arrangement efficiency of the target arrangement object can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, equipment, medium and vehicle for arranging objects in a virtual scene. Background Art

[0002] At present, virtual reality (VR) technology, augmented reality (AR) technology, and automated driving technology are developing rapidly. The realization of these technologies depends on the construction of a three-dimensional virtual scene.

[0003] In the related art, the objects to be arranged are usually arranged manually in the area to be arranged so as to construct a three-dimensional virtual scene, but this arrangement method is inefficient.

[0004] In addition, in the related art, an algorithm can be used to arrange the models to be arranged in the area to be arranged, but the algorithm lacks adaptability to models of different shapes and cannot effectively utilize the space of the area to be arranged. Therefore, the efficiency of arranging the models to be arranged in the related art is not high, and the space of the area to be arranged cannot be effectively utilized. Summary of the invention

[0005] In order to overcome the problems existing in the related art, the present disclosure provides a method, device, equipment, medium and vehicle for arranging objects in a virtual scene, which can improve the efficiency of arranging objects to be arranged.

[0006] According to a first aspect of an embodiment of the present disclosure, a method for arranging objects in a virtual scene is provided, comprising:

[0007] Acquire projection graphics of a plurality of objects to be arranged on a two-dimensional surface of a virtual scene and a first projection area of ​​an area to be arranged on the two-dimensional surface of the virtual scene;

[0008] Based on a preset coverage method, the projection pattern is arranged to the first projection area to select the to-be-arranged objects corresponding to the projection pattern that can be arranged as target arrangement objects, and a target index array corresponding to the target arrangement objects is established, wherein the preset coverage method is determined based on a preset coverage threshold;

[0009] Performing coordinate transformation on the first projection area to obtain a second projection area;

[0010] Arrange the texture coordinates of the target arrangement object obtained by the target index array in the second projection area to obtain an arrangement result;

[0011] According to the correspondence between the texture coordinates and the three-dimensional coordinates, the arrangement position of the target arrangement object in the virtual scene is restored.

[0012] In one practicable implementation, obtaining projection graphics of a plurality of objects to be arranged on a two-dimensional surface of a virtual scene includes:

[0013] Obtain bounding boxes corresponding to multiple objects to be arranged respectively;

[0014] Based on the height direction normal of the bounding box, the multiple objects to be arranged are projected onto a plane with a height of zero to obtain projection graphics of the multiple objects to be arranged on the two-dimensional surface of the virtual scene.

[0015] In one feasible implementation, obtaining a first projection area of ​​the area to be arranged on a two-dimensional surface of a virtual scene includes:

[0016] Based on the normal corresponding to the plane corresponding to the area to be arranged, the area to be arranged is projected onto the plane in the direction of the normal to obtain a first projection area.

[0017] In an achievable implementation, performing coordinate transformation on the first projection area to obtain the second projection area includes:

[0018] Get the longest side of the first projection area;

[0019] Align the direction of the longest side with the target direction to perform coordinate transformation and obtain a transformation matrix;

[0020] Based on the transformation matrix, the first projection area is transformed into the second projection area.

[0021] In an achievable implementation, the target arrangement object obtained by the target index array is arranged in texture coordinates in the second projection area to obtain an arrangement result, including:

[0022] Based on the target index array, the objects to be arranged corresponding to the target index array are obtained in sequence;

[0023] Based on the target layout object corresponding to the target index array, the UVLayout node in the target application is used to arrange the texture coordinates in the second projection area to obtain the layout result.

[0024] In an achievable implementation, restoring the arrangement position of the target arrangement object in the virtual scene according to the correspondence between the texture coordinates and the three-dimensional coordinates includes:

[0025] Based on the arrangement results, texture attribute information is obtained;

[0026] Determine texture coordinates based on texture attribute information;

[0027] Based on the inverse matrix corresponding to the transformation matrix, the texture coordinates are converted into three-dimensional coordinates;

[0028] The arrangement position of the target arrangement object in the virtual scene is restored according to the three-dimensional coordinates.

[0029] According to a second aspect of an embodiment of the present disclosure, a device for arranging objects in a virtual scene is provided, comprising:

[0030] An acquisition module, used to acquire projection graphics of a plurality of objects to be arranged on a two-dimensional surface of a virtual scene and a first projection area of ​​an area to be arranged on the two-dimensional surface of the virtual scene;

[0031] an arrangement module, configured to arrange the projection graphics to the first projection area based on a preset coverage method to select objects to be arranged corresponding to the projection graphics that can be arranged as target arrangement objects, and to establish a target index array corresponding to the target arrangement objects, wherein the preset coverage method is determined based on a preset coverage threshold;

[0032] A conversion module, used for performing coordinate conversion on the first projection area to obtain a second projection area;

[0033] The arrangement module is further used to arrange the texture coordinates of the target arrangement object obtained by the target index array in the second projection area to obtain an arrangement result;

[0034] The restoration module is used to restore the arrangement position of the target arrangement object in the virtual scene according to the correspondence between the texture coordinates and the three-dimensional coordinates.

[0035] According to a third aspect of an embodiment of the present disclosure, a vehicle is provided, storing a set of instruction sets, which are executed by the vehicle to implement the method for arranging objects in a virtual scene provided by the first aspect of the present disclosure.

[0036] According to a fourth aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing processor executable instructions; a processor, configured to read executable instructions from the memory and execute the instructions to implement the method for arranging objects in a virtual scene provided in the first aspect of the present disclosure.

[0037] According to a fifth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method for arranging objects in a virtual scene provided in the first aspect of the present disclosure are implemented.

[0038] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: obtaining projection graphics of multiple objects to be arranged on the two-dimensional surface of the virtual scene and the first projection area of ​​the area to be arranged on the two-dimensional surface of the virtual scene. Arranging the projection graphics to the first projection area based on a preset coverage method to select the objects to be arranged corresponding to the projection graphics that can be arranged as the target arrangement objects, and establishing a target index array corresponding to the target arrangement objects. Performing coordinate transformation on the first projection area to obtain a second projection area. Arranging the target arrangement objects obtained by the target index array in the second projection area by texture coordinates to obtain an arrangement result. According to the correspondence between the texture coordinates and the three-dimensional coordinates, the arrangement position of the target arrangement object in the virtual scene is restored. The embodiment of the present disclosure arranges the projection graphics to the first projection area based on a preset coverage method, which can effectively utilize the space of the projection area. Arranging the target arrangement objects obtained by the target index array by texture coordinates in the second projection area can improve the arrangement efficiency of the target arrangement objects.

[0039] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0041] Figure 1 The figure is a flow chart showing a method for arranging objects in a virtual scene according to an exemplary embodiment.

[0042] Figure 2 The figure is a flow chart of a method for acquiring a projection image according to an exemplary embodiment.

[0043] Figure 3 The figure is a flow chart showing a method for obtaining a second projection area according to an exemplary embodiment.

[0044] Figure 4 The figure is a flowchart of a method for obtaining arrangement results according to an exemplary embodiment.

[0045] Figure 5 The invention is a flowchart showing a method for restoring a target arrangement object according to an exemplary embodiment.

[0046] Figure 6 The figure is a flowchart of another method for arranging objects in a virtual scene according to an exemplary embodiment.

[0047] Figure 7 It is a block diagram of a device for arranging objects in a virtual scene according to an exemplary embodiment.

[0048] Figure 8 is a block diagram of a vehicle according to an exemplary embodiment.

[0049] Fig. 9 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0050] Exemplary embodiments will be described in detail below with reference to the accompanying drawings.

[0051] It should be pointed out that the relevant embodiments and drawings are only for describing exemplary embodiments provided by the present disclosure, rather than all embodiments of the present disclosure, and it should not be understood that the present disclosure is limited to the relevant exemplary embodiments.

[0052] It should be noted that the terms "first", "second", etc. used in the present disclosure are only used to distinguish different steps, devices or modules, etc. The related terms neither represent any specific technical meanings nor indicate the order or interdependence between them.

[0053] It should be noted that the modifications of the terms "one", "multiple", and "at least one" used in the present disclosure are illustrative rather than restrictive. Unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0054] It should be noted that the term "and / or" used in this disclosure is used to describe the association relationship between associated objects, and generally indicates that there are at least three association relationships. For example, A and / or B can at least indicate the existence of three association relationships: A exists alone, A and B exist at the same time, and B exists alone.

[0055] It should be noted that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. Unless otherwise specified, the scope of the present disclosure is not limited by the order of description of the steps in the relevant embodiments.

[0056] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0057] Exemplary Methods

[0058] The rapid development of computer graphics, VR, AR and autonomous driving technologies is inseparable from the support of technologies such as automated simulation and layout of three-dimensional scenes. In the fields of game development, film and television production, architectural visualization and human-computer interaction, the layout technology of three-dimensional scenes can create the scenes required by developers. For example, developers can arrange multiple building models and tree models in the area to be arranged to obtain a community scene.

[0059] At present, the related technology usually arranges the objects to be arranged in the area to be arranged by manual adjustment, but this method is time-consuming and labor-intensive and cannot meet the needs of developers to create complex scenes.

[0060] In addition, in the related art, an algorithm can be used to arrange the models to be arranged in the area to be arranged, but the algorithm lacks adaptability to models of different shapes and cannot effectively utilize the space of the area to be arranged. Therefore, the efficiency of arranging the models to be arranged in the related art is not high, and the space of the area to be arranged cannot be effectively utilized.

[0061] The embodiments of the present disclosure provide a method, device, equipment, medium and vehicle for arranging objects in a virtual scene, which can solve the above-mentioned technical problems existing in the related technologies.

[0062] The embodiment of the present disclosure arranges the projection graphics to the first projection area based on the preset covering mode, which can effectively utilize the space of the projection area. The target arrangement object obtained by the target index array is arranged in the second projection area by texture coordinates, which can improve the arrangement efficiency of the target arrangement object.

[0063] Figure 1 is a flow chart showing a method for arranging objects in a virtual scene according to an exemplary embodiment. Figure 1 As shown, steps S110-S150 are included.

[0064] S110: Acquire projection graphics of a plurality of objects to be arranged on a two-dimensional surface of a virtual scene and a first projection area of ​​an area to be arranged on the two-dimensional surface of the virtual scene.

[0065] In this embodiment, projection graphics of a plurality of objects to be arranged on the two-dimensional surface of the virtual scene and a first projection area of ​​the area to be arranged on the two-dimensional surface of the virtual scene may be acquired.

[0066] In one example, the area to be arranged may be an uneven area, and therefore the area to be arranged needs to be projected in order to arrange the projection pattern on the plane of the area to be arranged.

[0067] In one example, if the multiple objects to be arranged are all spherical models, the projection figures of the multiple objects to be arranged on the two-dimensional surface of the virtual scene are circular.

[0068] S120: Based on a preset coverage method, the projection pattern is arranged to the first projection area to select objects to be arranged corresponding to the projection pattern that can be arranged as target arrangement objects, and a target index array corresponding to the target arrangement objects is established.

[0069] The preset coverage mode is determined based on a preset coverage threshold. The target index array is used to determine the position information of the projection pattern in the first projection area. In engineering, in order to avoid the simplification of the arrangement results, when the projection pattern is arranged in the first projection area, the selection of the projection pattern can be random.

[0070] In this embodiment, after obtaining projection patterns corresponding to multiple objects to be arranged, the projection patterns can be arranged to the first projection area according to a preset coverage method to select the objects to be arranged corresponding to the projection patterns that can be arranged as target arrangement objects, and establish a target index array corresponding to the target arrangement objects.

[0071] In one example, the preset coverage threshold is 70%, and the projection patterns of multiple objects to be arranged can be arranged to the first projection area to select the objects to be arranged corresponding to the projection patterns that can be arranged as the target arrangement objects, so that the area occupied by the projection patterns corresponding to the target arrangement objects accounts for 70% of the first projection area, and a target index array corresponding to the target arrangement objects is established.

[0072] In the step flow of the embodiment of the present disclosure, by arranging the projection patterns in the first projection area based on a preset coverage method, the density of the projection patterns in the first projection area can be controlled, thereby improving the space utilization of the first projection area.

[0073] S130: performing coordinate transformation on the first projection area to obtain a second projection area.

[0074] In this embodiment, after the first projection area is obtained, coordinate transformation is performed on the first projection area to obtain the second projection area.

[0075] In one embodiment, the coordinates of the first projection area may be modified by aligning coordinate axes to achieve coordinate conversion.

[0076] In the step flow of the embodiment of the present disclosure, the coordinates of the first projection area are transformed to obtain the second projection area, which is equivalent to normalizing the first projection area, that is, returning the coordinates of the first projection area to zero to the center of the world coordinates, so as to facilitate the subsequent texture coordinate arrangement operation.

[0077] S140: Arranging texture coordinates of the target arrangement object corresponding to the target index array in the second projection area to obtain an arrangement result.

[0078] In this embodiment, the target arrangement object corresponding to the target index array may be arranged in texture coordinates in the second projection area to obtain an arrangement result.

[0079] Among them, the texture coordinates represent UV coordinates, that is, two-dimensional coordinates, U is equivalent to the X-axis in the Cartesian coordinate system, which is used to specify the horizontal position in the two-dimensional space; it is similar to the Y-axis in the Cartesian coordinate system, which is used to specify the vertical position in the two-dimensional space.

[0080] S150: Restoring the arrangement position of the target arrangement object in the virtual scene according to the correspondence between the texture coordinates and the three-dimensional coordinates.

[0081] In this embodiment, the arrangement position of the target arrangement object in the virtual scene can be restored according to the correspondence between the texture coordinates and the three-dimensional coordinates.

[0082] The embodiment of the present disclosure arranges the projection graphics to the first projection area based on the preset covering mode, which can effectively utilize the space of the projection area. The target arrangement object obtained by the target index array is arranged in the second projection area by texture coordinates, which can improve the arrangement efficiency of the target arrangement object.

[0083] In one embodiment, a plurality of projection images of objects to be arranged on a two-dimensional surface of a virtual scene are obtained, such as Figure 2 As shown, it may include step S111 and step S112.

[0084] S111: Obtain bounding boxes corresponding to a plurality of objects to be arranged respectively.

[0085] In this embodiment, after a plurality of objects to be arranged are determined, bounding boxes corresponding to the plurality of objects to be arranged may be obtained.

[0086] Among them, the bounding box is the smallest cuboid used to describe the range occupied by a three-dimensional object in space.

[0087] S112: Based on the height direction normal of the bounding box, the multiple objects to be arranged are projected onto a plane with a height of zero to obtain projection graphics of the multiple objects to be arranged on the two-dimensional surface of the virtual scene.

[0088] In an embodiment of the present disclosure, after obtaining the bounding boxes corresponding to the multiple objects to be arranged, the multiple objects to be arranged can be projected onto a plane with zero height, i.e., a two-dimensional surface, according to the normal direction of the bounding box in the height direction, to obtain projection graphics of the multiple objects to be arranged on the two-dimensional surface of the virtual scene.

[0089] In one example, the three-dimensional space where the bounding box corresponding to the object to be arranged is located corresponds to three coordinate axes, where the x-axis represents the length direction, the y-axis represents the width direction, and the z-axis represents the height direction. The normal a of the bounding box corresponding to the object to be arranged in the z-axis direction is obtained, and the object to be arranged is projected onto the plane of z=0 in the direction of the normal a to obtain the projection figure of the object to be arranged on the two-dimensional surface of the virtual scene.

[0090] By acquiring bounding boxes corresponding to a plurality of objects to be arranged, the disclosed embodiment can project the objects to be arranged according to the height direction normal of the bounding boxes, thereby acquiring an accurate projection pattern.

[0091] In one embodiment, obtaining a first projection area of ​​the area to be arranged on the two-dimensional surface of the virtual scene may include step S113.

[0092] S113: Based on the normal corresponding to the plane corresponding to the area to be arranged, project the area to be arranged onto the plane in the direction of the normal to obtain a first projection area.

[0093] In this embodiment, the normal corresponding to the plane is determined according to the plane corresponding to the area to be arranged, and the area to be arranged is projected onto the plane in the direction of the normal to obtain a first projection area.

[0094] In one example, the plane corresponding to the area to be arranged represents a two-dimensional plane composed of the length direction x axis and the width direction y axis in the three-dimensional space. The normal corresponding to the plane is the normal in the height direction corresponding to the two-dimensional plane composed of the x axis and the y axis.

[0095] The disclosed embodiment projects the normal corresponding to the plane corresponding to the area to be arranged onto the area to be arranged to obtain a first projection area. The first projection area in the area to be arranged can be determined as the arrangement area to avoid the object to be arranged from penetrating the mold in the area to be arranged.

[0096] In one embodiment, based on the normal corresponding to the plane corresponding to the area to be arranged, the area to be arranged is projected onto the plane in the direction of the normal to obtain a first projection area, and it may also include: based on the normal corresponding to the plane corresponding to the area to be arranged, the area to be arranged is projected onto the plane in the direction of the normal to obtain an initial projection area. The initial projection area is divided and noise is added, and the projection area that meets the preset screening conditions is selected as the initial projection area.

[0097] In one embodiment, coordinate transformation is performed on the first projection area to obtain the second projection area, such as Figure 3 As shown, steps S131-S133 may be included.

[0098] S131: Obtain the longest side of the first projection area.

[0099] In this embodiment, after the first projection area is obtained, the lengths of multiple sides of the first projection area are compared to obtain the longest side of the first projection area.

[0100] S132: Align the direction of the longest side with the target direction to perform coordinate transformation to obtain a transformation matrix.

[0101] In this embodiment, after the longest side of the first projection area is determined, the direction of the longest side is aligned with the target direction, and coordinate transformation is performed to obtain a transformation matrix.

[0102] Among them, the transformation matrix represents the offset of the coordinate transformation.

[0103] In one example, the target direction may be a length direction of a coordinate axis.

[0104] It can be understood that in the step flow of the embodiment of the present disclosure, by aligning the direction of the longest side of the first projection area with the target direction, the subsequent objects to be arranged can be arranged along the length direction to meet user needs.

[0105] S133: Based on the transformation matrix, convert the first projection area into the second projection area.

[0106] In this embodiment, after the transformation matrix is ​​obtained, the first projection area is transformed into the second projection area using the transformation matrix.

[0107] It can be understood that the first projection area represents a two-dimensional plane area in a three-dimensional space, and the second projection area represents a two-dimensional plane area in a two-dimensional space, so the first projection area needs to be converted into the second projection area.

[0108] In the embodiment of the present disclosure, the second projection area is obtained by performing coordinate transformation on the first projection area, so that subsequent corresponding operations in the second projection area are convenient.

[0109] In one embodiment, the target arrangement object obtained by the target index array is arranged in texture coordinates in the second projection area to obtain an arrangement result, such as Figure 4 As shown, it may include step S141 and step S142.

[0110] S141: Based on the target index array, sequentially obtain the target arrangement objects corresponding to the target index array.

[0111] In this embodiment, the target arrangement objects corresponding to the target index array may be acquired in sequence according to the obtained target index array.

[0112] In one example, the target index array records information including that position a corresponds to the target arrangement object A, and position b corresponds to the target arrangement object B. Then, the target arrangement object A and the target arrangement object B may be acquired in sequence according to the target index array.

[0113] S142: Based on the target layout object corresponding to the target index array, the UVLayout node in the target application is used to arrange the texture coordinates in the second projection area to obtain an arrangement result.

[0114] In this embodiment, the UVLayout node in the target application program may be used to arrange the texture coordinates of the target layout object corresponding to the target index array in the second projection area to obtain an arrangement result.

[0115] In one example, the target application may be computer graphics software, such as Houdini.

[0116] It can be understood that Houdini's UVLayout node is used to optimize and arrange the two-dimensional space of the three-dimensional model, namely the UV space, and can automatically arrange UV fragments in the UV space.

[0117] The disclosed embodiment arranges texture coordinates of target arrangement objects corresponding to a target index array through a target application, thereby achieving automatic arrangement and improving arrangement efficiency.

[0118] In one embodiment, according to the correspondence between the texture coordinates and the three-dimensional coordinates, the arrangement position of the target arrangement object in the virtual scene is restored, such as Figure 5 As shown, steps S151-S154 may be included.

[0119] S151: Obtaining texture attribute information based on the arrangement result.

[0120] In this embodiment, after the arrangement result is obtained, the texture attribute information may be determined according to the arrangement result.

[0121] The texture attribute information represents UV attribute information.

[0122] S152: Determine texture coordinates based on texture attribute information.

[0123] In this embodiment, the texture coordinates may be determined according to the texture attribute information.

[0124] S153: Convert the texture coordinates into three-dimensional coordinates based on the inverse matrix corresponding to the transformation matrix.

[0125] In this embodiment, the texture coordinates may be converted into three-dimensional coordinates according to the inverse matrix corresponding to the transformation matrix.

[0126] S154: Restoring the arrangement position of the target arrangement object in the virtual scene according to the three-dimensional coordinates.

[0127] In this embodiment, the arrangement position of the target arrangement object in the virtual scene can be restored according to the three-dimensional coordinates.

[0128] The disclosed embodiment can accurately restore the arrangement position of the target arrangement object in the virtual scene by converting the texture coordinates into three-dimensional coordinates.

[0129] In one embodiment, after the target arrangement object is arranged using the object arrangement method in the virtual scene, the object arrangement method in the virtual scene can be repeatedly applied for secondary arrangement based on the projection of the arranged target arrangement object as the arrangement area to achieve the arrangement of multiple layers of objects.

[0130] In one embodiment, a flowchart of another method for arranging objects in a virtual scene is shown as follows: Figure 6 As shown, in S601, select the object to be arranged. If it exists, execute step S602 to calculate the bounding box of the object to be arranged. In S603, project the object to be arranged according to the normal of the bounding box to obtain a projection figure. In S604, calculate the area of ​​the projection figure. In S605, determine whether there is an untraversed object to be arranged. If there is an untraversed object to be arranged, re-execute S601.

[0131] In S606, the area to be arranged is projected to obtain a first projection area. In S607, the area of ​​the first projection area is calculated. If there are no untraversed objects to be arranged, and the first projection area is obtained, S608 is executed. In S608, based on the preset coverage method, the area of ​​the projection figure and the area of ​​the first projection area, the objects to be arranged whose projection figures are suitable for arrangement in the first projection area are screened out to obtain the target arrangement objects. In S609, a target index array corresponding to the target arrangement object is established. In S610, the target arrangement objects are selected from the target index array in turn.

[0132] In S611, the longest side of the first projection area is obtained. In S612, the direction of the longest side is aligned with the target direction to perform coordinate transformation to obtain a transformation matrix. In S613, based on the transformation matrix, the first projection area is transformed into a second projection area.

[0133] After obtaining the target arrangement object and the second projection area selected by the target index array, S614 is executed. In S614, UV arrangement calculation is performed. In S615, UV attributes are transferred to coordinates. In S616, the coordinates are restored by applying the inverse matrix of the transformation matrix. In S617, the target arrangement object with arrangement completed is obtained.

[0134] Exemplary Devices

[0135] Figure 7 is a block diagram of a device for arranging objects in a virtual scene according to an exemplary embodiment. Figure 7 The device 700 includes a first module 710 , a second module 720 , a third module 730 and a fourth module 740 .

[0136] The first module 710 is used for obtaining projection graphics of a plurality of objects to be arranged on a two-dimensional surface of a virtual scene and a first projection area of ​​an area to be arranged on the two-dimensional surface of the virtual scene;

[0137] The second module 720 is used to arrange the projection pattern to the first projection area based on a preset coverage method to select the to-be-arranged object corresponding to the projection pattern that can be arranged as the target arrangement object, and establish a target index array corresponding to the target arrangement object, wherein the preset coverage method is determined based on a preset coverage threshold;

[0138] The third module 730 is used to perform coordinate transformation on the first projection area to obtain a second projection area;

[0139] The second module 720 is further used to arrange the target arrangement object obtained by the target index array in the second projection area with texture coordinates to obtain an arrangement result;

[0140] The fourth module 740 is used to restore the arrangement position of the target arrangement object in the virtual scene according to the correspondence between the texture coordinates and the three-dimensional coordinates.

[0141] The embodiment of the present disclosure arranges the projection graphics to the first projection area based on the preset covering mode, which can effectively utilize the space of the projection area. The target arrangement object obtained by the target index array is arranged in the second projection area by texture coordinates, which can improve the arrangement efficiency of the target arrangement object.

[0142] In some embodiments, the first module 710 is specifically configured to:

[0143] Obtain bounding boxes corresponding to multiple objects to be arranged respectively;

[0144] Based on the height direction normal of the bounding box, the multiple objects to be arranged are projected onto a plane with a height of zero to obtain projection graphics of the multiple objects to be arranged on the two-dimensional surface of the virtual scene.

[0145] In some embodiments, the device 700 further includes a projection module, which is used to project the area to be arranged onto the plane according to the normal line corresponding to the plane corresponding to the area to be arranged, so as to obtain a first projection area.

[0146] In some embodiments, the first module 710 is specifically configured to:

[0147] Get the longest side of the first projection area;

[0148] Align the direction of the longest side with the target direction to perform coordinate transformation and obtain a transformation matrix;

[0149] Based on the transformation matrix, the first projection area is transformed into the second projection area.

[0150] In some embodiments, the first module 710 is specifically configured to:

[0151] Based on the target index array, the target arrangement objects corresponding to the target index array are obtained in sequence;

[0152] Based on the target layout object corresponding to the target index array, the UVLayout node in the target application is used to arrange the texture coordinates in the second projection area to obtain the layout result.

[0153] In some embodiments, the first module 710 is specifically configured to:

[0154] Based on the arrangement results, texture attribute information is obtained;

[0155] Determine texture coordinates based on texture attribute information;

[0156] Based on the inverse matrix corresponding to the transformation matrix, the texture coordinates are converted into three-dimensional coordinates;

[0157] The arrangement position of the target arrangement object in the virtual scene is restored according to the three-dimensional coordinates.

[0158] Example Vehicles

[0159] Figure 8 is a block diagram of a vehicle 800 according to an exemplary embodiment. The vehicle 800 may be a fuel vehicle, a hybrid vehicle, an electric vehicle, a fuel cell vehicle or other types of vehicles.

[0160] Reference Figure 8 The vehicle 800 may include multiple subsystems, for example, a driving system 810, a control system 820, a perception system 830, a communication system 840, an information display system 850, and a computing system 860. The vehicle 800 may also include more or fewer subsystems, and each subsystem may also include multiple components, which are not described one by one here.

[0161] The driving system 810 includes components that provide power movement for the vehicle 800, such as an engine, an energy source, a transmission device, etc.

[0162] The control system 820 includes components that provide control for the vehicle 800, such as vehicle control, cockpit equipment control, and driving assistance control.

[0163] The perception system 830 includes components that provide the vehicle 800 with surrounding environment perception, such as a vehicle positioning system, a laser sensor, a voice sensor, an ultrasonic sensor, a camera device, and the like.

[0164] The communication system 840 includes components that provide communication connections for the vehicle 800, such as mobile communication networks (such as 3G, 4G, 5G networks, etc.), WiFi, Bluetooth, and Internet of Vehicles.

[0165] The information display system 850 includes components that provide various information displays for the vehicle 800, such as vehicle information display, navigation information display, entertainment information display, etc.

[0166] The computing and processing system 860 includes components that provide data computing and processing capabilities for the vehicle 800. The computing and processing system 860 may include at least one processor 861 and a memory 862. The processor 861 may execute instructions stored in the memory 862.

[0167] The processor 861 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.

[0168] Memory 862 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0169] In the embodiment of the present disclosure, a set of instruction sets is stored in the memory 862, and the processor 861 can execute the instruction set to implement all or part of the steps of the method for arranging objects in a virtual scene described in any of the above exemplary embodiments.

[0170] Exemplary Electronic Devices

[0171] Fig. 9 1 is a block diagram of an electronic device 900 according to an exemplary embodiment. The electronic device 900 may be a vehicle controller, a vehicle terminal, a vehicle computer or other types of electronic devices.

[0172] Reference Fig. 9, the electronic device 900 may include at least one processor 910 and a memory 920. The processor 910 may execute instructions stored in the memory 920. The processor 910 is communicatively connected to the memory 920 via a data bus. In addition to the memory 920, the processor 910 may also be communicatively connected to an input device 930, an output device 940, and a communication device 950 via a data bus.

[0173] The processor 910 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.

[0174] The memory 920 may be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0175] In the embodiment of the present disclosure, executable instructions are stored in the memory 920, and the processor 910 can read the executable instructions from the memory 920 and execute the instructions to implement all or part of the steps of the method for arranging objects in a virtual scene described in any of the above exemplary embodiments.

[0176] Exemplary computer-readable storage media

[0177] In addition to the above methods and devices, the exemplary embodiments of the present disclosure may also be a computer program product or a computer-readable storage medium storing the computer program product. The computer product includes computer program instructions that can be executed by a processor to implement all or part of the steps described in any method in the above exemplary embodiments.

[0178] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and also conventional procedural programming languages, such as "C" language or similar programming languages ​​and scripting languages ​​(e.g., Python). The program code may be executed entirely on the user computing device, partially on the user computing device, as an independent software package, partially on the user computing device and partially on the remote computing device, or entirely on the remote computing device or server.

[0179] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of readable storage media include: a static random access memory (SRAM) with one or more wires electrically connected, an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic storage, a flash memory, a magnetic disk or an optical disk, or any suitable combination of the above.

[0180] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0181] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for arranging objects in a virtual scene, characterized in that: include: Acquire projection graphics of a plurality of objects to be arranged on a two-dimensional surface of a virtual scene and a first projection area of ​​an area to be arranged on the two-dimensional surface of the virtual scene; Based on a preset coverage method, the projection pattern is arranged to the first projection area to select objects to be arranged corresponding to the projection pattern that can be arranged as target arrangement objects, and a target index array corresponding to the target arrangement objects is established, wherein the preset coverage method is determined based on a preset coverage threshold; Performing coordinate transformation on the first projection area to obtain a second projection area; Arrange the texture coordinates of the target arrangement object corresponding to the target index array in the second projection area to obtain an arrangement result; According to the correspondence between the texture coordinates and the three-dimensional coordinates, the arrangement position of the target arrangement object in the virtual scene is restored.

2. The method according to claim 1, characterized in that: The step of obtaining projection graphics of a plurality of objects to be arranged on a two-dimensional surface of a virtual scene includes: Respectively obtain the bounding boxes corresponding to the multiple objects to be arranged; Based on the height direction normal of the bounding box, the multiple objects to be arranged are projected onto a plane with a height of zero to obtain projection graphics of the multiple objects to be arranged on the two-dimensional surface of the virtual scene.

3. The method according to claim 1, characterized in that The step of obtaining a first projection area of ​​the area to be arranged on the two-dimensional surface of the virtual scene includes: Based on the normal corresponding to the plane corresponding to the area to be arranged, the area to be arranged is projected onto the plane in the direction of the normal to obtain the first projection area.

4. The method according to claim 1, characterized in that The performing coordinate transformation on the first projection area to obtain the second projection area includes: Obtaining the longest side of the first projection area; Aligning the direction of the longest side with the target direction to perform coordinate transformation to obtain a transformation matrix; Based on the transformation matrix, the first projection area is transformed into a second projection area.

5. The method according to claim 1, characterized in that The step of arranging the target arrangement object obtained by the target index array in the second projection area with texture coordinates to obtain an arrangement result includes: Based on the target index array, sequentially obtain the target arrangement objects corresponding to the target index array; Based on the target arrangement object corresponding to the target index array, the UVLayout node in the target application is used to arrange the texture coordinates in the second projection area to obtain an arrangement result.

6. The method according to claim 4, characterized in that The step of restoring the arrangement position of the target arrangement object in the virtual scene according to the correspondence between the texture coordinates and the three-dimensional coordinates includes: Based on the arrangement result, obtaining texture attribute information; Determining the texture coordinates based on the texture attribute information; Based on the inverse matrix corresponding to the transformation matrix, converting the texture coordinates into the three-dimensional coordinates; The arrangement position of the target arrangement object in the virtual scene is restored according to the three-dimensional coordinates.

7. A device for arranging objects in a virtual scene, characterized in that: include: An acquisition module, the acquisition module is used to acquire projection graphics of a plurality of objects to be arranged on a two-dimensional surface of a virtual scene and a first projection area of ​​an area to be arranged on the two-dimensional surface of the virtual scene; An arrangement module, the arrangement module being used to arrange the projection graphics to the first projection area based on a preset coverage method to select objects to be arranged corresponding to the projection graphics that can be arranged as target arrangement objects, and to establish a target index array corresponding to the target arrangement objects, wherein the preset coverage method is determined based on a preset coverage threshold; A conversion module, the conversion module is used to perform coordinate conversion on the first projection area to obtain a second projection area; The arrangement module is further used to arrange the target arrangement object obtained by the target index array in the second projection area by performing texture coordinate arrangement to obtain an arrangement result; A restoration module is used to restore the arrangement position of the target arrangement object in the virtual scene according to the correspondence between the texture coordinates and the three-dimensional coordinates.

8. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method for arranging objects in a virtual scene as described in any one of claims 1-6.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of arranging objects in a virtual scene as described in any one of claims 1 to 6 are implemented.

10. A vehicle, characterized in that: A set of instruction sets is stored, and the instruction sets are executed by the vehicle to implement the method for arranging objects in a virtual scene as described in any one of claims 1-6.