Three-dimensional scene rendering processing method and device

By obtaining the transformation matrix of the three-dimensional model, the rendering problem caused by different model scales and poses in the three-dimensional scene is solved, the rendering quality and efficiency are improved, and more efficient three-dimensional scene rendering is achieved.

CN119169171APending Publication Date: 2024-12-20LENOVO SHANGHAI INFORMATION TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411392334.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

In the existing three-dimensional scene rendering methods, due to the inconsistent data acquisition methods of the three-dimensional model, the model has different scales and poses, which reduces the visual effect and authenticity of the rendered picture, and the model transformation processing will reduce the rendering quality and efficiency.

Method used

By obtaining the transformation matrix of each three-dimensional model, transforming the initial rendered position pose according to these matrices, obtaining the target rendered position pose, and rendering the picture based on the target pose, thereby meeting the layout requirements of the three-dimensional scene and avoiding directly transforming the three-dimensional model to improve rendering Quality and efficiency.

Benefits of technology

It improves the visual effect and authenticity of three-dimensional scene rendering, avoids quality decline caused by model transformation, saves computing resources, and improves rendering efficiency and model reusability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169171A_ABST
    Figure CN119169171A_ABST
Patent Text Reader

Abstract

The invention provides a three-dimensional scene rendering processing method and device, an electronic device obtains transformation matrixes corresponding to a plurality of three-dimensional models contained in a three-dimensional scene, the transformation matrixes represent that the corresponding three-dimensional models can meet the layout requirements of the three-dimensional scene after transformation processing, and a rendering request based on the three-dimensional models is responded. Based on the transformation matrix corresponding to the three-dimensional model requested to be rendered, carrying out transformation processing on the initial rendering pose of the three-dimensional scene to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered; and based on the three-dimensional model requested to be rendered, rendering a target picture corresponding to the target rendering pose.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically to a three-dimensional scene rendering processing method and device. Background Art

[0002] In 3D scene rendering applications such as film and television production, game development, architectural visualization, product design, and scientific simulation, due to the inconsistent data collection methods of each model in the 3D scene, the trained models will be different in scale and posture, making the layout of each picture rendered based on each model not meet the requirements of the 3D scene, reducing the visual effect and authenticity of the entire 3D scene rendering picture.

[0003] In order to improve the rendering effect of three-dimensional scenes, the scene mesh (three-dimensional model) generated by laser scanning is usually used as the scene base and the layout standard. The various models in the same three-dimensional scene are first rotated, scaled, translated and other transformations are performed to generate corresponding new models. The scene is then rendered based on each new model so that the rendering screen layout corresponding to each model meets the requirements of the three-dimensional scene.

[0004] However, in the above-mentioned 3D scene rendering processing method, the transformation processing of each model will reduce the quality of the rendered image, and because the new model cannot be shared with multiple 3D scenes, it will cause resource waste and reduce the rendering efficiency of multiple 3D scenes. Summary of the invention

[0005] In view of the above problems, this application provides the following solutions:

[0006] The first aspect of the present application provides a three-dimensional scene rendering processing method, the method comprising:

[0007] Obtaining transformation matrices corresponding to a plurality of three-dimensional models included in the three-dimensional scene; the transformation matrices indicate that the three-dimensional models can meet layout requirements of the three-dimensional scene after transformation processing;

[0008] In response to a rendering request based on the three-dimensional model, transforming an initial rendering pose of the three-dimensional scene based on a transformation matrix corresponding to the three-dimensional model requested to be rendered, to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered;

[0009] Based on the three-dimensional model requested to be rendered, a target screen corresponding to the target rendering posture is rendered.

[0010] In a possible implementation, in response to a rendering request based on the three-dimensional model, based on a transformation matrix corresponding to the three-dimensional model requested to be rendered, transforming an initial rendering pose of the three-dimensional scene to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered, and rendering a target screen corresponding to the target rendering pose based on the three-dimensional model requested to be rendered, includes:

[0011] In response to a rendering request based on the three-dimensional model, based on a first transformation matrix corresponding to the first three-dimensional model requested to be rendered, transforming an initial rendering pose of the three-dimensional scene into a first target rendering pose, and based on a second transformation matrix corresponding to the second three-dimensional model requested to be rendered, transforming the initial rendering pose into a second target rendering pose;

[0012] Rendering a first scene picture corresponding to the first target rendering posture based on the first three-dimensional model, and rendering a second scene picture corresponding to the second target rendering posture based on the second three-dimensional model;

[0013] The first scene picture and the second scene picture are superimposed to obtain a target picture requested for rendering.

[0014] In a possible implementation, in response to a rendering request based on the three-dimensional model, based on a transformation matrix corresponding to the three-dimensional model requested to be rendered, transforming an initial rendering pose of the three-dimensional scene to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered includes:

[0015] In response to a rendering request based on the three-dimensional model, obtaining an initial rendering pose of the three-dimensional scene;

[0016] Based on the inverse matrix of the transformation matrix corresponding to the three-dimensional model requested to be rendered, the initial rendering pose is transformed to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered.

[0017] In a possible implementation, the three-dimensional model requested for rendering includes a first three-dimensional model and a second three-dimensional model among the multiple three-dimensional models, and the relationship between a first transformation matrix corresponding to the first three-dimensional model and a second transformation matrix corresponding to the second three-dimensional model meets the layout requirements of the three-dimensional scene.

[0018] In a possible implementation, the transforming the initial rendering pose based on the inverse matrix of the transformation matrix corresponding to the three-dimensional model requested to be rendered to obtain the target rendering pose corresponding to the three-dimensional model requested to be rendered includes any one of the following:

[0019] Inverting the transformation matrix corresponding to the three-dimensional model requested to be rendered, and using the obtained inverse matrix to transform the initial rendering pose to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered;

[0020] Retrieve the stored inverse matrix corresponding to the three-dimensional model requested to be rendered, transform the initial rendering pose, and obtain the target rendering pose corresponding to the three-dimensional model requested to be rendered; the inverse matrix is ​​obtained by inverting the transformation matrix corresponding to the three-dimensional model requested to be rendered before the rendering request is responded to.

[0021] In a possible implementation, obtaining the transformation matrix corresponding to each of the plurality of three-dimensional models included in the three-dimensional scene includes:

[0022] Acquire a scene mesh of a three-dimensional scene and a plurality of three-dimensional models for constructing the three-dimensional scene;

[0023] Based on layout requirements for the multiple three-dimensional models in the three-dimensional scene, respectively compare the multiple three-dimensional models with the scene grid to generate transformation matrices corresponding to the multiple three-dimensional models;

[0024] The transformation matrix includes one or more combinations of a scaling matrix, a rotation matrix and a translation matrix relative to the scene grid when the corresponding three-dimensional model satisfies the layout requirement.

[0025] In a possible implementation, the method for determining the layout requirement of the multiple three-dimensional models in the three-dimensional scene includes any one of the following:

[0026] In response to a layout request for the plurality of three-dimensional models, a model layout interface is outputted, and a plurality of layout modes are presented on the model layout interface; in response to a layout mode selection operation for at least one group of the three-dimensional models, layout requirements of the corresponding three-dimensional models in the three-dimensional scene are determined using the selected layout mode;

[0027] In response to a layout request for the plurality of three-dimensional models, a model layout interface is outputted, and in response to a layout mode input operation on the model layout interface, a layout requirement of at least one group of the three-dimensional models in the three-dimensional scene is obtained;

[0028] Based on the layout mode between the multiple objects to be rendered contained in the three-dimensional scene, determining the layout requirements of the three-dimensional models corresponding to the multiple objects to be rendered in the three-dimensional scene;

[0029] The layout mode refers to the array arrangement mode of the scene pictures rendered corresponding to the multiple three-dimensional models in the three-dimensional scene;

[0030] A group of the three-dimensional models includes at least two of the multiple three-dimensional models, and different groups of the three-dimensional models can include the same three-dimensional model.

[0031] In a possible implementation, the step of acquiring a scene mesh of a three-dimensional scene and a plurality of three-dimensional models used to construct the three-dimensional scene includes:

[0032] In response to a rendering request for a three-dimensional scene, selecting a scene mesh of the three-dimensional scene requested to be rendered from a plurality of candidate scene meshes;

[0033] In response to a configuration request for the three-dimensional scene, a three-dimensional scene configuration interface is output, and a plurality of candidate models are presented in the three-dimensional scene configuration interface; the plurality of candidate models can be obtained through different acquisition methods;

[0034] In response to a selection operation on the candidate models, each of the selected candidate models is determined as a three-dimensional model for constructing the three-dimensional scene.

[0035] In a possible implementation, in response to a rendering request for the three-dimensional model, based on a transformation matrix corresponding to the three-dimensional model requested to be rendered, transforming an initial rendering pose of the three-dimensional scene to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered, and rendering a scene image corresponding to the target rendering pose based on the three-dimensional model requested to be rendered, includes:

[0036] Inverting the transformation matrix corresponding to each of the plurality of three-dimensional models to obtain a corresponding inverse matrix;

[0037] Outputting an initial scene picture of the three-dimensional scene;

[0038] In response to a perspective adjustment instruction for the initial scene image, determining a first three-dimensional model under an adjusted first perspective, and acquiring an initial rendering pose of the three-dimensional scene;

[0039] Based on the inverse matrix corresponding to the first three-dimensional model, transform the initial rendering pose into a first target rendering pose, so as to render a first scene picture corresponding to the first target rendering pose based on the first three-dimensional model;

[0040] In response to a perspective adjustment instruction for the first scene image, determining a second three-dimensional model under an adjusted second perspective, and acquiring the initial rendering pose;

[0041] Based on the inverse matrix corresponding to the second three-dimensional model, transform the initial rendering pose into a second target rendering pose, so as to render a second scene picture corresponding to the second target rendering pose based on the second three-dimensional model;

[0042] The first scene picture and the second scene picture are aligned in the spatial coordinate system of the three-dimensional scene.

[0043] A second aspect of the present application provides a three-dimensional scene rendering processing device, the device comprising:

[0044] A transformation matrix acquisition module is used to obtain the transformation matrix corresponding to each of the multiple three-dimensional models included in the three-dimensional scene; the transformation matrix indicates that the corresponding three-dimensional model can meet the layout requirements of the three-dimensional scene after transformation processing;

[0045] A rendering pose transformation module, configured to, in response to a rendering request based on the three-dimensional model, transform an initial rendering pose of the three-dimensional scene based on a transformation matrix corresponding to the three-dimensional model requested to be rendered, to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered;

[0046] A rendering module is used to render a target picture corresponding to the target rendering posture based on the three-dimensional model requested to be rendered.

[0047] The third aspect of the present application provides an electronic device, the electronic device comprising: at least one processor, at least one memory connected to the processor and at least one display screen, wherein:

[0048] The memory is used to store computer program instructions;

[0049] The processor is used to execute the computer program instructions to implement the following steps:

[0050] Obtaining transformation matrices corresponding to a plurality of three-dimensional models included in the three-dimensional scene; the transformation matrices indicate that the three-dimensional models can meet layout requirements of the three-dimensional scene after transformation processing;

[0051] In response to a rendering request based on the three-dimensional model, transforming an initial rendering pose of the three-dimensional scene based on a transformation matrix corresponding to the three-dimensional model requested to be rendered, to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered;

[0052] Based on the three-dimensional model requested to be rendered, a target screen corresponding to the target rendering posture is rendered.

[0053] The display screen is used to display the target picture. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0055] Figure 1 A schematic diagram of the process flow of the three-dimensional scene rendering processing method proposed in Example 1 of the present application;

[0056] Figure 2 A schematic diagram of the process flow of a three-dimensional scene rendering processing method proposed in Embodiment 2 of the present application;

[0057] Figure 3 A flowchart of a three-dimensional scene rendering processing method proposed in Embodiment 3 of the present application;

[0058] Figure 4 A flowchart of a three-dimensional scene rendering processing method proposed in Embodiment 4 of the present application;

[0059] Figure 5 A flowchart of a three-dimensional scene rendering processing method proposed in Embodiment 5 of the present application;

[0060] Figure 6 A schematic diagram of the rendering effect of a three-dimensional model parallel to the ground plane in the three-dimensional scene rendering processing method proposed in an embodiment of the present application;

[0061] Figure 7 A flowchart of a three-dimensional scene rendering processing method proposed in Embodiment 6 of the present application;

[0062] Figure 8 A schematic diagram of the structure of a three-dimensional scene rendering processing device provided in an embodiment of the present application;

[0063] Fig. 9 The present invention is a schematic diagram of the hardware structure of an electronic device suitable for the three-dimensional scene rendering processing method proposed in this application. DETAILED DESCRIPTION

[0064] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation mode of the present application are only used to explain the specific embodiments of the present application and are not intended to limit the present application. The embodiments of the present application are described below in conjunction with the drawings. It is known to those of ordinary skill in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0065] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0066] In order to solve the above problems, the embodiment of the present application provides a three-dimensional scene rendering processing method. The three-dimensional scene rendering processing method of the embodiment of the present application is described in detail below with reference to the accompanying drawings.

[0067] Reference Figure 1 , which is a flow chart of the three-dimensional scene rendering processing method proposed in the first embodiment of the present application, can be applied to electronic devices, and the electronic device can be a terminal device or a server with data processing capabilities, or the three-dimensional scene rendering processing method is implemented by a terminal device in cooperation with a server. Among them, the server can be one or more physical servers, or a cloud server that provides cloud services. The terminal device may include but is not limited to a smart phone, a tablet computer, a wearable device, a personal computer (personal computer, PC), an augmented reality technology (Augmented Reality, AR) device, a virtual reality (Virtual Reality, VR) device, a robot, a desktop computer, etc. One or more, and the present application does not limit the product form of the electronic device. The present application is described by taking the electronic device as any terminal device as an example.

[0068] Based on this, Figure 1 As shown, the 3D scene rendering processing method proposed in this embodiment may include but is not limited to the following steps:

[0069] Step S101, obtaining transformation matrices corresponding to a plurality of three-dimensional models included in a three-dimensional scene; the transformation matrices indicate that the corresponding three-dimensional models can meet the layout requirements of the three-dimensional scene after transformation processing;

[0070] In the embodiments of the present application, the three-dimensional scene can be any virtual scene (such as a designed game scene, etc.) or real-world scene (such as a building scene, a street scene, etc.) to be rendered. The present application does not limit the type of three-dimensional scene and the scene content it contains, which can be determined according to the situation. Generally, a three-dimensional scene can be composed of multiple scene objects, and different scene objects can be laid out in various ways in the entire three-dimensional scene, such as a nested layout, a straight line / broken line arrangement layout, or a specified shape arrangement layout, etc., which can be determined according to the actual situation of the specific three-dimensional scene.

[0071] For example, if the three-dimensional scene is a scene of a floor of a building, the scene objects therein may be the rooms on the floor. The layout of the rooms on the floor represents the layout requirements of the three-dimensional scene for the scene objects. A corresponding three-dimensional model may be constructed for each room. A one-to-one three-dimensional model may be constructed based on the scanning data of each room, such as obtaining the three-dimensional model through manual modeling, or by scanning the three-dimensional scene through video and performing three-dimensional reconstruction based on artificial intelligence AI methods (such as Gaussian Splatting, a rasterization technology for 3D Gaussian distribution description used for real-time radiation field rendering) to obtain each three-dimensional model.

[0072] It should be noted that this application does not restrict the construction method of each 3D model and the collection method of the scene object data used in its construction, such as using a mobile phone to scan each scene object in a real 3D scene, or using a fisheye camera to scan, or using a laser radar to scan, or using manual input for manual modeling, etc. The scales and postures of different 3D models constructed based on object data obtained by different collection methods may be inconsistent, and these 3D models can also be applied to the method proposed in the embodiment of this application, and it is not required to use the same collection method (such as a laser radar scanning method) to ensure that the size and posture of each 3D model constructed in the same 3D scene are consistent, which improves the diversity of 3D model construction and enriches the source of 3D models.

[0073] As analyzed above, the multiple three-dimensional models used in this application to form a three-dimensional scene are collected in various ways, resulting in the scale and posture of each three-dimensional model not meeting the layout requirements of the three-dimensional scene. In order to ensure that the picture obtained by rendering based on the three-dimensional model meets the layout requirements of the three-dimensional scene, it is necessary to transform the scale and posture of the three-dimensional model. If the three-dimensional model is directly transformed and then the corresponding picture is rendered, the quality of the rendered picture will be reduced. In order to further ensure the quality of the rendered picture, this application does not want to directly transform the three-dimensional model, but can also ensure that the corresponding rendered picture meets the layout requirements. After analyzing the rendering process, it is known that the factors that affect the rendering effect and quality of the three-dimensional model, in addition to the existing scale and posture of each three-dimensional model, there is also the initial rendering posture of the three-dimensional scene based on the rendering process (such as camera posture, which can refer to the position and orientation of the virtual camera in the three-dimensional scene and other information).

[0074] Therefore, in order to achieve the same rendering effect and rendering quality, without changing the scale and posture of the three-dimensional model, the present application proposes to achieve it by transforming the initial rendering posture of the three-dimensional scene, and the transformation process of the initial rendering posture matches the transformation process of only transforming the scale and posture of the corresponding three-dimensional model. Therefore, the present application first analyzes and determines how the three-dimensional model is transformed, and can meet the layout requirements of the three-dimensional scene based on the rendering effect and quality of the transformed three-dimensional model, and then determines how the initial rendering posture is transformed based on the matching relationship, so that the same rendering effect and quality can be achieved without changing the scale and posture of each three-dimensional model used to constitute the three-dimensional scene.

[0075] Based on the inventive concept of the present application described above, the embodiments of the present application can determine the layout results that need to be achieved in the virtual scene screen for rendering the three-dimensional scene by determining the various three-dimensional models used in the virtual scene screen, and the rendering screens corresponding to the various three-dimensional models, that is, after determining the layout requirements of the transformed three-dimensional models in the three-dimensional scene, analyze and determine the transformation matrix corresponding to each three-dimensional model, that is, without changing the initial rendering posture, control the corresponding rendering effect and quality of each three-dimensional model to achieve the transformation parameters that need to be executed to meet the layout requirements, such as one or more of scaling parameters, rotation parameters, and translation parameters. The present application does not limit the content of the transformation matrix and its acquisition method. It can be understood that the content of the transformation matrix corresponding to different three-dimensional models obtained in this way can be different, and some parameters in the transformation matrix can be different or all parameters can be different, depending on the situation.

[0076] Step S102, in response to a rendering request based on a three-dimensional model, based on a transformation matrix corresponding to the three-dimensional model requested to be rendered, transform an initial rendering pose of the three-dimensional scene to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered;

[0077] After determining the three-dimensional model that currently needs to be rendered, when requesting to render the corresponding picture, before rendering, this application will first transform the initial rendering pose of the three-dimensional scene into the target rendering pose based on the transformation matrix corresponding to the three-dimensional model, that is, it can make the originally acquired rendering picture of the three-dimensional model meet the layout requirements and ensure the camera pose used for high-quality rendering effects. This application does not describe the transformation processing process in detail.

[0078] It should be understood that for multiple three-dimensional models with different transformation matrices, before requesting to render their images, the same initial rendering pose is transformed, and the target rendering poses obtained for different three-dimensional models are different. The implementation process of determining the target rendering pose of each three-dimensional model when requesting rendering is similar, and this application does not give detailed examples one by one.

[0079] Step S103: based on the three-dimensional model requested to be rendered, a target screen corresponding to the target rendering posture is rendered.

[0080] Following the above analysis, in the process of real-time rendering of each three-dimensional model in the three-dimensional scene, after obtaining the initial rendering pose of the three-dimensional scene, before executing the rendering step accordingly, the present application first transforms the initial rendering pose into the target rendering pose corresponding to the three-dimensional model requested to be rendered, and then executes the rendering step accordingly, to ensure that the rendered target image meets the layout requirements of the three-dimensional scene.

[0081] It can be seen that in the process of requesting rendering of three-dimensional models used to constitute a three-dimensional scene, since the present application does not limit the acquisition method of the initially acquired three-dimensional models, the scales and postures of the three-dimensional models in the three-dimensional scene are diverse. If the rendering is performed directly according to the initial rendering posture of the three-dimensional scene, the corresponding rendered images do not meet the layout requirements of the three-dimensional scene. For example, in the rendering application of the images of each room in a floor scene, according to this rendering processing method, it is easy to cause the room orientations and positions presented in the rendered images to be uneven, which does not meet the layout requirements of the rooms designed for that floor.

[0082] In this regard, the embodiment of the present application can pre-acquire the transformation matrices corresponding to the above-mentioned three-dimensional models. In the process of requesting to render the three-dimensional model, after obtaining the initial rendering pose for the three-dimensional scene, before executing the rendering step, the initial rendering pose is first transformed into the target rendering pose for the three-dimensional model, and then rendering is performed according to the target rendering pose based on the acquired original three-dimensional model to ensure that the target picture obtained for the three-dimensional model reliably meets the layout requirements of the three-dimensional scene. Moreover, since the present application does not transform the original three-dimensional model, but uses the original three-dimensional model to achieve rendering, the situation in which the rendering quality is reduced due to the transformation of the three-dimensional model is avoided, thereby ensuring that a high-quality target picture is rendered.

[0083] Moreover, since the present application does not require transformation processing of the original three-dimensional model, it is conducive to the reuse of the three-dimensional model. For example, if it is necessary to re-render the three-dimensional scene in some applications, the original three-dimensional model can be directly used to execute the three-dimensional scene rendering processing method proposed in the present application. There is no need to re-transform the three-dimensional model, which saves the computing resource consumption of the three-dimensional model transformation processing and improves the efficiency of the three-dimensional model re-rendering and the quality of the rendered image.

[0084] Still taking the rendering application of the floor scene on the first floor described above as an example, you can first obtain the transformation matrix corresponding to the room model constructed for each room on this floor. When requesting to render the room screen of the room model of this floor, after obtaining the initial rendering pose of the floor, you will first transform the initial rendering pose into a target rendering pose that can make the rendering screen of the room model meet the room layout requirements of the floor scene according to the transformation matrix corresponding to the room model, that is, the rendering screen can achieve the rendering pose corresponding to the rendering effect of the converted room model. Only then will the room rendering step be started. Based on the room model, the target screen corresponding to its target rendering pose is rendered, so that the target screen meets the room layout requirements. Since the room model is not transformed, the authenticity of the rendered room screen is guaranteed.

[0085] Reference Figure 2 , which is a flow chart of the 3D scene rendering processing method proposed in the second embodiment of the present application, can describe a possible implementation method of the request rendering process for the 3D model included in the 3D scene in the 3D scene rendering processing method described in the above embodiment, such as Figure 2 As shown, the three-dimensional scene rendering processing method may include:

[0086] Step S201, obtaining the transformation matrix corresponding to each of the multiple three-dimensional models included in the three-dimensional scene; the transformation matrix indicates that the corresponding three-dimensional model can meet the layout requirements of the three-dimensional scene after transformation processing;

[0087] Step S202, in response to a rendering request based on a three-dimensional model, based on a first transformation matrix corresponding to a first three-dimensional model requested to be rendered, transforming an initial rendering pose of the three-dimensional scene into a first target rendering pose, and based on a second transformation matrix corresponding to a second three-dimensional model requested to be rendered, transforming the initial rendering pose into a second target rendering pose;

[0088] In combination with the above description of the technical solution of the present application, after determining the various three-dimensional models used to constitute a three-dimensional scene, such as models of various scene objects constructed by manual modeling or based on artificial intelligence algorithms, if a rendering request for the three-dimensional scene requires the use of multiple three-dimensional models, in order to render a target screen that meets this rendering request, in the process of responding to this rendering request, it is necessary to transform the same initial rendering pose into multiple target rendering poses corresponding to each of the multiple three-dimensional models that need to be used, using the transformation matrices corresponding to each of the multiple three-dimensional models.

[0089] Taking the case where two three-dimensional models are required for a rendering request as an example, these two three-dimensional models can be recorded as a first three-dimensional model and a second three-dimensional model. They can be models of scene objects of different categories in a three-dimensional scene, or different models of scene objects of the same category, or models corresponding to different rendering effects for rendering a scene object, etc. This application does not impose any restrictions on the contents of the first three-dimensional model and the second three-dimensional model, which can be determined based on actual conditions.

[0090] Based on this, when the first transformation matrix of the first three-dimensional model is different from the second transformation matrix of the second three-dimensional model, in the process of responding to this rendering request, after obtaining the initial rendering pose, before executing the rendering step, this application will first transform the initial rendering pose according to the first transformation matrix and the second transformation matrix respectively to obtain the first target rendering pose of the first three-dimensional model and the second target rendering pose of the second three-dimensional model.

[0091] Step S203, rendering a first scene picture corresponding to the first target rendering posture based on the first three-dimensional model, and rendering a second scene picture corresponding to the second target rendering posture based on the second three-dimensional model;

[0092] Step S204: superimpose the first scene picture and the second scene picture to obtain a target picture requested for rendering.

[0093] Following the above analysis, the new rendering poses corresponding to the first three-dimensional model and the second three-dimensional model are obtained according to the method described above (which is different from the initial rendering pose for the three-dimensional scene), that is, the first target rendering pose for the first three-dimensional model, and the second target rendering pose for the second three-dimensional model. Then, the new rendering poses of the two three-dimensional models are used to render the scene pictures of the corresponding three-dimensional models (correspondingly recorded as the first scene picture and the second scene picture). Afterwards, according to the layout relationship or rendering effect requirements between the two three-dimensional models, the scene pictures of the two three-dimensional models are processed one by one to obtain the target picture that meets this rendering request.

[0094] In one possible implementation, if a scene object in a three-dimensional scene requires the superposition of multiple scene pictures to achieve a unique visual effect (i.e., a rendering effect), after determining the three-dimensional models corresponding to the multiple scene pictures required to be rendered to achieve the visual effect, in response to a rendering request for the scene object, according to the method described above in this embodiment, the multiple scene pictures are rendered using the target rendering poses corresponding to the multiple three-dimensional models. After that, the multiple scene pictures can be superimposed to obtain a target picture with a unique perspective effect for the scene object.

[0095] In another possible implementation, if a scene object in a three-dimensional scene requires multiple scene images to be stitched together to achieve a complete visual effect, in response to a rendering request for the scene, the initial rendering pose of the three-dimensional scene can be transformed into different target rendering poses corresponding to the three-dimensional models of the multiple scene images, and then the corresponding multiple scene images rendered accordingly are stitched together to obtain a target image that satisfies the rendering request, etc. Of course, in actual applications, in order to achieve a unique visual effect for a scene object, multiple scene images required to achieve the visual effect may also be processed in other processing methods besides superposition and stitching. The processing implementation process is similar, and this application does not give detailed examples one by one.

[0096] It should be noted that in a rendering request process as described above, in addition to the processing method described in the above steps, the corresponding scene images can also be rendered in sequence for the multiple three-dimensional models used for rendering this request, that is, in the response process of the rendering request based on the three-dimensional model, the initial rendering pose is transformed into the first target rendering pose based on the first transformation matrix corresponding to the first three-dimensional model requested for rendering, and after rendering the first scene image corresponding to the first target rendering pose based on the first three-dimensional model, or after outputting the first scene image, the second scene image corresponding to the second three-dimensional model is rendered in this way, and the second scene image is superimposed on the first scene image to obtain the target image that meets this rendering request.

[0097] It can be seen that the embodiment of the present application requests rendering of multiple three-dimensional models at one time, such as when the first three-dimensional model and the second three-dimensional model are used in combination. After obtaining the different transformation matrices corresponding to the two three-dimensional models for indicating how to transform them to meet the three-dimensional scene layout requirements, in the implementation process of responding to the rendering request, the present application does not need to transform the two three-dimensional models themselves separately. After obtaining the initial rendering pose of the three-dimensional scene, the initial rendering pose can be transformed into corresponding different target rendering poses according to the different transformation matrices of the two three-dimensional models respectively, and then each original three-dimensional model is directly used to render according to the corresponding target rendering pose. Without sacrificing the rendering quality, it is ensured that the layout results between the two scene pictures rendered by the two three-dimensional models meet the layout requirements, or the rendering effect of the target picture obtained by superimposing the two scene pictures is consistent with the visual effect required by the scene object requested to be rendered, or the layout result of the target picture in the entire three-dimensional scene meets the layout requirements of the three-dimensional scene, thereby improving the rendering picture quality.

[0098] Reference Figure 3 , is a flow chart of the 3D scene rendering processing method proposed in the third embodiment of the present application, which can describe another possible implementation method of the 3D scene rendering processing method described in the above embodiment, for requesting rendering of the 3D model contained in the 3D scene, such as a detailed description of the scene picture rendering process corresponding to a 3D model. Figure 3 As shown, the three-dimensional scene rendering processing method may include:

[0099] Step S301, obtaining the transformation matrix corresponding to each of the multiple three-dimensional models included in the three-dimensional scene; the transformation matrix indicates that the corresponding three-dimensional model can meet the layout requirements of the three-dimensional scene after transformation processing;

[0100] Step S302, in response to a rendering request based on the three-dimensional model, obtaining an initial rendering pose of the three-dimensional scene;

[0101] In an embodiment of the present application, a rendering request can render a scene image corresponding to a three-dimensional model. After determining a three-dimensional model to be rendered in this request, the camera pose that affects the rendering quality and effect of the three-dimensional scene, i.e., the initial rendering pose, can be obtained, which can be determined by the position and orientation of the virtual camera in the three-dimensional scene. In practical applications, the initial rendering pose can be estimated by one or more methods such as feature matching, homography matrix decomposition, visual SLAM (Simultaneous Localization and Mapping) technology, deep learning, three-dimensional reconstruction, heuristic optimization, or multi-view geometry. The present application does not limit the implementation method of step S302.

[0102] Step S303, transforming the initial rendering pose based on the inverse matrix of the transformation matrix corresponding to the three-dimensional model requested to be rendered, to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered;

[0103] Step S304: based on the three-dimensional model requested to be rendered, a target screen corresponding to the target rendering posture is rendered.

[0104] According to the above description of the technical solution of the present application, when rendering a three-dimensional model, after obtaining the initial rendering pose to be rendered, rendering will not be performed directly. Instead, it is necessary to first use the transformation matrix corresponding to the three-dimensional model to transform the initial rendering pose into a target rendering pose that can control the rendering screen of the three-dimensional model to meet the layout requirements, and then rendering will be performed using the target rendering pose.

[0105] Among them, in order to make the rendering effect of the picture obtained by rendering according to the target rendering pose based on the original three-dimensional model consistent with the rendering effect of the picture obtained by transforming the original three-dimensional model into a new three-dimensional model according to the corresponding transformation matrix, and then rendering according to the initial rendering pose based on the new three-dimensional model, the present application can control the virtual camera with the initial rendering pose to perform a transformation process in the opposite direction of the transformation matrix to obtain a new rendering pose (i.e., the target rendering pose), and render the original three-dimensional model accordingly, so that the rendered picture can achieve the consistent rendering effect. Therefore, the present application can take the inverse of the transformation matrix corresponding to the acquired three-dimensional model, and multiply the obtained inverse matrix by the initial rendering pose, which is equivalent to adjusting the initial rendering pose of the virtual camera in the opposite direction of the transformation matrix (i.e., the transformation direction represented by the inverse matrix) to obtain the desired target rendering pose.

[0106] In this way, the rendering step is performed using the target rendering pose after the initial rendering pose is transformed, and the target image obtained for the 3D model requested to be rendered meets the layout requirements of the 3D scene. In the entire rendering process proposed in the present application, the 3D model requested to be rendered is not transformed, but the original 3D model is used to perform the rendering step without sacrificing the rendering quality. This solves the technical problem that the rendering quality is reduced and the reproducibility of the 3D model is not conducive to the use of the 3D model after the 3D model is transformed into a new 3D model, and ensures that the target image obtained by rendering meets the rendering quality requirements of the 3D scene.

[0107] In combination with the above analysis, in some other embodiments, if the three-dimensional model requested for rendering includes the first three-dimensional model and the second three-dimensional model among multiple three-dimensional models used to constitute the three-dimensional model, that is, a rendering request is initiated and the first three-dimensional model and the second three-dimensional model are needed to render the target screen that meets the three-dimensional scene layout requirements, combined with the scene screen rendering implementation process of a three-dimensional model described in Example 3, in the rendering request response process, after rendering the first scene screen corresponding to the first target rendering posture for the first three-dimensional model, the second target rendering posture of the second three-dimensional model can be obtained to render the second scene screen corresponding to the second target rendering posture for the second three-dimensional model, and the first scene screen and the second scene screen are processed (the processing method can also be determined based on the layout requirements that the two three-dimensional models need to meet) to obtain the target screen of this rendering request, but it is not limited to this successive rendering implementation method.

[0108] Among them, when obtaining the first transformation matrix corresponding to the first three-dimensional model and the second transformation matrix corresponding to the second three-dimensional model, the relationship between the first transformation matrix and the second transformation matrix is ​​required to meet the layout requirements of the three-dimensional scene. According to the transformation benchmarks of the two three-dimensional models indicated by the layout requirements, it is possible to estimate how the two three-dimensional models are transformed respectively to ensure that the two transformed three-dimensional models achieve the expected layout result after combination, and obtain the transformation matrices corresponding to the two three-dimensional models from the estimated transformation contents.

[0109] It should be understood that, in combination with the rendering implementation process of a three-dimensional model described in Example 3, the relationship between the first inverse matrix obtained by inverting the first transformation matrix and the second inverse matrix obtained by inverting the second transformation matrix, as well as the relationship between the first target rendering pose and the second target rendering pose obtained by further transforming the initial rendering pose, can meet the layout requirements of the three-dimensional scene and ensure that the target image obtained by this rendering request achieves the expected rendering result without sacrificing the rendering quality.

[0110] Exemplarily, if the first scene picture and the second scene picture rendered by the first three-dimensional model and the second three-dimensional model need to be superimposed so that the obtained target picture can achieve the expected rendering effect, then, in the process of obtaining the above two different transformation matrices, it is required that the scales and postures of the two transformed three-dimensional models have an overlay layout relationship, that is, the scene pictures rendered by the transformed three-dimensional models indicated by the first transformation matrix and the second transformation matrix have an overlay layout relationship. Similarly, if the first scene picture and the second scene picture need to be spliced ​​to achieve the expected rendering effect, the scene pictures rendered by the transformed three-dimensional models indicated by the first transformation matrix and the second transformation matrix have a splicing layout relationship, etc. The implementation methods for other layout relationships are similar. This application does not limit the matrix elements of how the first transformation matrix and the second transformation matrix achieve the corresponding layout relationship, which can be determined according to the circumstances.

[0111] In the three-dimensional scene rendering processing method proposed in an embodiment of the present application, no matter whether one or multiple three-dimensional models are used in a rendering request process, in a possible implementation, after starting to respond to the rendering request based on the three-dimensional model, the transformation matrix corresponding to the obtained three-dimensional model requested for rendering is inverted to obtain the inverse matrix of the three-dimensional model requested for rendering, and the inverse matrix is ​​used to transform the initial rendering pose to obtain the target rendering pose corresponding to the three-dimensional model requested for rendering, so as to render a high-quality scene picture of the corresponding three-dimensional model.

[0112] In another possible implementation, before starting to respond to rendering requests based on the three-dimensional model, after obtaining the transformation matrix of the three-dimensional model, the transformation matrix can be directly inverted, and after obtaining the inverse matrix of the three-dimensional model, the inverse matrix can be associated with the model identifier of the three-dimensional model and then stored. In this way, after starting to respond to rendering requests based on the three-dimensional model, the stored inverse matrix corresponding to the three-dimensional model requested to be rendered is directly called, the initial rendering pose is transformed, and the target rendering pose corresponding to the three-dimensional model requested to be rendered is obtained.

[0113] Reference Figure 4 , is a flow chart of the 3D scene rendering processing method proposed in the fourth embodiment of the present application, which can describe an optional refined implementation method of how to obtain the transformation matrices corresponding to the multiple 3D models in the 3D scene in the 3D scene rendering processing method described in each embodiment above, such as Figure 4 As shown, the 3D scene rendering processing method proposed in this embodiment may include:

[0114] Step S401, obtaining a scene mesh of a three-dimensional scene and a plurality of three-dimensional models for constructing the three-dimensional scene;

[0115] Step S402, based on the layout requirements of the multiple three-dimensional models in the three-dimensional scene, the multiple three-dimensional models are respectively compared with the scene grid to generate transformation matrices corresponding to the multiple three-dimensional models;

[0116] In an embodiment of the present application, a three-dimensional scene can be laser scanned (scene data can also be obtained by other acquisition methods), and a scene mesh can be generated using the scanned scene data as a scene base, that is, a reference for the rendering screen layout of each three-dimensional model that constitutes the three-dimensional scene. Each three-dimensional model to be rendered is aligned with the scene mesh or satisfies the required layout relationship, and the transformation processing that the original three-dimensional model needs to undergo to achieve the layout requirements of the alignment or the required layout relationship is obtained, and the transformation parameters represented by these transformation processing constitute a transformation matrix for the three-dimensional model.

[0117] Among them, the transformation matrix corresponding to each three-dimensional scene may include one or more combinations of a scale matrix, a rotation matrix and a translation matrix relative to the scene mesh, indicating that the corresponding three-dimensional model meets the layout requirements of the three-dimensional scene to which it belongs (such as alignment with the scene mesh or other specified layout relationships, etc.).

[0118] It can be seen that the content of the transformation matrix corresponding to each 3D model can be determined according to the transformation operation content that needs to be performed to transform the original 3D model from the existing scale and posture to meet the layout requirements. When the layout requirements are determined, this is determined by the scale and posture waiting transformation parameters of each original 3D model, that is, by the difference between the original layout relationship between each original 3D model and the scene Mesh and the actually required layout relationship (that is, the layout relationship indicated by the above layout requirements).

[0119] When the transformation matrix includes the three matrix combinations, the transformation matrix may be an RTS matrix. For example, if the transformation matrix of a 3D model is a 4×4 matrix, it may be expressed as:

[0120] "Rts": [

[0121] [-1.0, 0.021, -0.007, -2.654],

[0122] [-0.021, -1.0, 0.007, -52.456],

[0123] [-0.007, 0.008, 1.0, 0.113],

[0124] [0.0000000000000, 0.000000000000, 0.000000000000, 1.000000000000] ]

[0126] In the above 4×4 matrix, the first three rows represent the three component matrices of scaling, rotation and translation in sequence. When performing the transformation processing later, these three component matrices can be extracted and multiplied with the coordinate values ​​in the initial rendering pose. Since the order in which the three component matrices are multiplied with the initial rendering pose directly affects the final transformation result, i.e., the target rendering pose, in obtaining the transformation matrix, in addition to considering the respective transformation amounts of the three transformation processes of scaling, rotation and translation, it is also necessary to consider the execution order of the three transformation processes, i.e., the order of the corresponding three component matrices (i.e., scaling matrix, rotation matrix and translation matrix) in the transformation matrix, so as to ensure that the transformed three-dimensional model can meet the layout requirements, or in other words, the original three-dimensional model is rendered using the transformed target rendering pose, and the obtained scene picture meets the layout requirements / achieves the expected rendering effect, which is not limited to the order of the three component matrices in the example.

[0127] Therefore, it should be understood that for the same three-dimensional model in the same three-dimensional scene, when its layout requirements change, the corresponding transformation matrix obtained will change accordingly. This change includes changes in the elements of each component matrix, and may also include changes in the ordering of each component matrix, or may include both changes. It can be flexibly configured or adjusted in combination with the acquisition method described above and the actual rendering effect requirements.

[0128] Step S403, in response to a rendering request based on a three-dimensional model, based on a transformation matrix corresponding to the three-dimensional model requested to be rendered, transform an initial rendering pose of the three-dimensional scene to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered;

[0129] Step S404: based on the three-dimensional model requested to be rendered, a target screen corresponding to the target rendering posture is rendered.

[0130] After obtaining the transformation matrices corresponding to the three-dimensional models used to constitute the three-dimensional scene, the execution process of step S403 and step S404 can refer to the description of the corresponding part of the above embodiment, and will not be repeated in this embodiment.

[0131] It can be seen that in the embodiment of the present application, by obtaining the scene grid of the three-dimensional scene as the scene base, according to the layout requirements of the three-dimensional scene, each three-dimensional model used to construct the three-dimensional model is compared with the scene base, and the transformation matrix corresponding to each three-dimensional model is generated, so that each three-dimensional model can meet the required layout requirements after being transformed according to the corresponding transformation matrix. In this way, the initial rendering pose is transformed into different target rendering poses corresponding to each three-dimensional model using the transformation matrix corresponding to each three-dimensional model, and then rendering is performed accordingly, ensuring that the obtained scene pictures for each three-dimensional model meet the layout requirements, achieving the final rendering effect, and the rendering quality will not be reduced due to the transformation of the three-dimensional model itself.

[0132] Reference Figure 5 , is a flowchart of the three-dimensional scene rendering processing method proposed in the fifth embodiment of the present application, which can describe another optional detailed implementation method of how to obtain the transformation matrix corresponding to each of the multiple three-dimensional models in the three-dimensional scene in the three-dimensional scene rendering processing method described in each embodiment above. For other processing steps of the three-dimensional scene rendering processing method, please refer to the description of the corresponding part of the above embodiment, which will not be described in detail in this embodiment. Based on this, Figure 5 As shown, the method for obtaining the transformation matrices corresponding to each of the multiple three-dimensional models in the three-dimensional scene proposed in this embodiment may include:

[0133] Step S501, in response to a rendering request for a three-dimensional scene, selecting a scene mesh of the three-dimensional scene requested to be rendered from a plurality of candidate scene meshes;

[0134] In the embodiment of the present application, each candidate scene mesh can be generated by laser scanning the corresponding candidate three-dimensional scene and using the obtained candidate scene data. Of course, other acquisition methods can also be used to generate the candidate scene mesh of each candidate three-dimensional scene. This application does not limit the generation implementation method of each candidate scene mesh.

[0135] Based on this, when a certain three-dimensional scene needs to be reconstructed and rendered to obtain an immersive and realistic virtual scene image, in an embodiment of the present application, a user uses an electronic device to enter a three-dimensional scene rendering processing page, such as a game rendering processing page, or a building rendering processing page, etc., and performs a trigger operation on the page to select the three-dimensional scene to be rendered to output the existing candidate scene grid, and then select the scene grid of the three-dimensional scene from it, without the need to perform the scene grid generation process online, saving the computing resources consumed by the scene grid generation process. Of course, the present application is not limited to the selection method described in step S501. If the computing resources are sufficient, the scene grid of the three-dimensional scene can also be generated online according to the method described above. The implementation process is not described in detail in this embodiment.

[0136] Step S502, in response to a configuration request for a three-dimensional scene, outputting a three-dimensional scene configuration interface, and presenting a plurality of candidate models in the three-dimensional scene configuration interface; the plurality of candidate models can be obtained through different acquisition methods;

[0137] Step S503, in response to the selection operation on the candidate models, determining the selected candidate models as a plurality of three-dimensional models for constructing the three-dimensional scene;

[0138] For each 3D model used to construct a 3D scene, the user can directly select the corresponding 3D model from the model library according to each scene object (i.e., object to be rendered) required for the layout of the 3D scene, without the need for online construction. At this time, the candidate models contained in the model library, or the candidate models related to the 3D scene, can be directly presented in the output 3D scene configuration interface, and then the required 3D model, i.e., the 3D model corresponding to each scene object, can be selected therefrom, but it is not limited to this selection implementation method.

[0139] It should be understood that the various candidate models presented in the three-dimensional scene configuration interface do not include all the required three-dimensional models. For the three-dimensional models to be rendered that do not exist, the three-dimensional model can be constructed online according to the corresponding part of the above embodiment, such as by the user using modeling software to implement it manually, or after obtaining the object data of the corresponding scene object through one or more acquisition methods such as laser scanning or video acquisition, the corresponding three-dimensional model can be obtained based on artificial intelligence algorithm training, etc. The present application does not limit the method for constructing and implementing the three-dimensional model.

[0140] Step S504, in response to a layout request for multiple three-dimensional models, outputting a model layout interface;

[0141] Step S505, in response to the layout mode input operation on the model layout interface, obtaining a layout requirement of at least one group of three-dimensional models in the three-dimensional scene; a group of three-dimensional models includes at least two of the multiple three-dimensional models, and different groups of three-dimensional models can include the same three-dimensional model;

[0142] For the above-mentioned multiple three-dimensional models selected for constructing a three-dimensional scene, the layout requirements to be met can be directly determined during the selection process, such as directly determining the layout requirements for the three-dimensional models corresponding to the multiple objects to be rendered in the three-dimensional scene based on the layout between the multiple objects to be rendered contained in the three-dimensional scene (i.e., the above-mentioned scene objects, such as the rooms in the floor scene, etc.). Combined with the description of the corresponding part of the above embodiment, the layout method can refer to the array arrangement method of the scene pictures rendered by the multiple three-dimensional models in the three-dimensional scene, such as the superposition method described above, the straight line / broken line splicing method, or the superposition / splicing method of a specific shape, etc.

[0143] In some other embodiments proposed in the present application, especially in the case where each scene object in the designed three-dimensional scene is arranged into a specific shape (i.e., the shape formed by the connecting lines between the various scene objects), such as the specific layout of each virtual object in the designed game scene, the user can input the layout method between the corresponding multiple three-dimensional models according to actual needs, or adjust the placement positions of the various three-dimensional models presented in the model layout interface until the layout relationship formed between the various three-dimensional models with the adjusted placement positions meets the actual needs. At this time, the layout method between the multiple three-dimensional models presented in the interface can be identified and determined as the layout requirement of the corresponding three-dimensional model in the three-dimensional scene.

[0144] Among them, in the above-mentioned layout adjustment process, after selecting at least two three-dimensional models contained in each group of three-dimensional models, the layout method between each three-dimensional model in each group of three-dimensional models can be input or adjusted to obtain the corresponding layout requirements. Exemplarily, in the case of rendering various objects in a shopping mall scene, the three-dimensional models corresponding to the stores on the same side of the same floor in the shopping mall can be used as a group of three-dimensional models, or all three-dimensional models corresponding to the stores on the same floor can be used as a group of three-dimensional models, or the three-dimensional models corresponding to the chairs in each area of ​​the shopping mall can be used as a group of three-dimensional models, and so on. In the process of determining the layout method of each group of three-dimensional models, the corresponding multiple three-dimensional models can be adjusted or determined as a layout method that matches the shopping mall architectural design instructions or the layout instructions of the activity area, etc., to obtain the layout requirements of the group of three-dimensional models in the three-dimensional scene, but it is not limited to this implementation method.

[0145] In some other embodiments, in response to layout requests for multiple three-dimensional models, a model layout interface is output, and multiple layout modes are presented on the model layout interface for the user to select a suitable layout mode, that is, in response to a layout mode selection operation for at least one group of three-dimensional models, the layout requirements of the corresponding three-dimensional models in the three-dimensional scene are determined using the selected layout mode. Among them, the multiple layout modes presented on the model layout interface can be various linear placement modes, various nonlinear placement modes, and custom shape placement modes, etc.

[0146] Exemplarily, in combination with the above analysis, when the number of all three-dimensional models used to construct a three-dimensional scene is more than three, in an application in which model 1, model 2 and model 3 are selected to be added to the three-dimensional scene for rendering, according to but not limited to the method described above, model 1 and model 2 are aligned in a first direction, and model 2 and model 3 are aligned in a second direction. The first direction and the second direction may be different, so that models 1, 2 and 3 are arranged nonlinearly, such as in a triangular row, but are not limited to the layout of multiple three-dimensional models described in this example.

[0147] Step S506: Based on the layout requirement, the multiple three-dimensional models are compared with the scene grid respectively to generate transformation matrices corresponding to the multiple three-dimensional models.

[0148] Regarding the implementation method of step S506, reference may be made to the description of the corresponding part of the above embodiment, which will not be described in detail in this embodiment.

[0149] In another possible implementation of generating a transformation matrix, for a plurality of three-dimensional models used to construct a three-dimensional scene, corresponding transformation matrices may be generated according to comparison results between the three-dimensional models and other benchmarks different from the scene mesh.

[0150] For example, if the application requires that each 3D model be parallel to the ground plane (i.e., the expected rendering effect), if the original 3D model is not parallel to the ground plane, Figure 6 The flower model shown is tilted relative to the ground plane, as Figure 6 In the rendering process shown in Figure (a), if the initial rendering posture of the three-dimensional scene is directly used, the rendered flower picture cannot achieve the expected rendering effect parallel to the ground plane. In this regard, according to the three-dimensional scene rendering processing method proposed in the embodiment of the present application, the transformation matrix corresponding to the flower model is obtained, that is, the flower model can be transformed into the expected rendering effect parallel to the ground plane. After the transformation matrix indicating how the flower model needs to be transformed is inverted, the initial rendering posture is transformed into the target rendering posture using the obtained inverse matrix, and the original flower model tilted with respect to the ground plane is used to render the flower picture corresponding to the target rendering posture to ensure that the flower picture is parallel to the ground plane. Figure 6 The rendering result is shown in Figure (b).

[0151] In combination with the three-dimensional scene rendering processing method described in the above embodiment, the following will take the scene of adding two three-dimensional models to a three-dimensional scene for rendering as an example to explain in detail. Figure 7 The flowchart of the three-dimensional scene rendering processing method proposed in the sixth embodiment of the present application is shown in FIG. Figure 7 As shown, the three-dimensional scene rendering processing method may include:

[0152] Step S701, obtaining transformation matrices corresponding to the first three-dimensional model and the second three-dimensional model included in the three-dimensional scene; the transformation matrices indicate that the corresponding three-dimensional models can meet the layout requirements of the three-dimensional scene after transformation processing;

[0153] Step S702, inverting the transformation matrices corresponding to the first three-dimensional model and the second three-dimensional model to obtain corresponding inverse matrices;

[0154] Step S703, outputting the initial scene image of the three-dimensional scene;

[0155] Regarding the implementation method of step S701 and step S702, reference may be made to the description of the corresponding part of the above embodiment, which will not be repeated in this embodiment. This application refers to the method described above, selects the first three-dimensional model and the second three-dimensional model to add to the three-dimensional scene for rendering, and can obtain the corresponding transformation matrix by comparing each three-dimensional model with the scene Mesh, such as estimating how the first three-dimensional model and the second three-dimensional model are aligned with the scene Mesh, how the original first three-dimensional model and the second three-dimensional model need to be transformed, and the transformation parameters representing the transformation of the corresponding three-dimensional model constitute the transformation matrix of the three-dimensional model, such as the first RTS matrix and the second RTS matrix.

[0156] Among them, the authenticity of the initial scene picture of the three-dimensional scene directly composed of the constructed first three-dimensional model and the second three-dimensional model is low, and the user's sense of immersion is very poor. The present application can improve the user's sense of immersion in the three-dimensional scene by reconstructing and rendering a more realistic scene picture. Therefore, the output initial scene picture can be a scene picture from any perspective in the three-dimensional scene. In the floor scene described above, the initial scene picture that the user starts to output using the terminal device can be a scene picture from the default perspective in the floor scene, so that the user can present the content in combination with the scene picture and adjust the perspective in combination with the actual viewing needs to dynamically output the scene picture that the user needs to view. In the dynamic output process, it can be implemented according to but not limited to the method steps described below.

[0157] Step S704, in response to the view angle adjustment instruction for the initial scene image, determining the first three-dimensional model under the adjusted first view angle, and acquiring the initial rendering pose of the three-dimensional scene;

[0158] Step S705, based on the inverse matrix corresponding to the first three-dimensional model, transforming the initial rendering posture into a first target rendering posture, so as to render a first scene picture corresponding to the first target rendering posture based on the first three-dimensional model and output it;

[0159] Following the above analysis, the scene image of the three-dimensional scene that the user wants to view is determined by adjusting the viewing angle, that is, it is determined that the corresponding three-dimensional model such as the first three-dimensional model needs to be rendered. After obtaining the camera pose that needs to be rendered, that is, the initial rendering pose, the inverse matrix corresponding to the first three-dimensional model can be used to transform the camera pose to obtain a new camera pose, that is, the initial rendering pose is transformed into the first target rendering pose, and then the transformed camera pose is used for rendering processing. There is no need to transform the first three-dimensional model itself, so as to ensure that the first scene image of the first three-dimensional model obtained under the first target rendering pose achieves the expected rendering effect and meets the layout requirements of the first three-dimensional model in the three-dimensional scene, so that the output initial scene image is switched to the first scene image.

[0160] Step S706, in response to the view angle adjustment instruction for the first scene image, determining a second three-dimensional model under the adjusted second view angle, and acquiring an initial rendering pose of the three-dimensional scene;

[0161] Step S707, based on the inverse matrix corresponding to the second three-dimensional model, transform the initial rendering pose into a second target rendering pose, and output a second scene picture corresponding to the second target rendering pose based on the second three-dimensional model; the first scene picture and the second scene picture are aligned in the spatial coordinate system of the three-dimensional scene.

[0162] Following the above analysis, while continuing to adjust the viewing angle, if the user wants to view the scene picture corresponding to the second three-dimensional model, the method described above can still be followed. Without changing the original second three-dimensional model, by transforming the initial rendering pose, the second target rendering pose is used for rendering. That is, when rendering the second three-dimensional model, after obtaining the camera pose to be rendered, the inverse matrix of the second three-dimensional model is used to transform the camera pose, and after obtaining the new camera pose, namely the second target rendering pose, the transformed camera pose is used for rendering to obtain the second scene picture for the second three-dimensional model under the second target rendering pose, thereby enabling the terminal device to switch from the first scene picture to the second scene picture output, or to splice / superimpose the second scene picture with the first scene picture and output it, so that the first scene picture and the second scene picture are aligned in the spatial coordinate system of the three-dimensional scene, thereby realizing the aligned rendering of the first three-dimensional model and the second three-dimensional model in the three-dimensional scene.

[0163] Taking the rendering application of each room in the floor scene described above as an example, the visual effect of each room model obtained by manual modeling or training is very poor in authenticity. The user uses the terminal device to output the floor scene. During the dynamic adjustment of the viewing angle, it is equivalent to the user being in the floor scene. The user's viewing angle changes dynamically in the floor scene. During the process of entering each room, the viewing angle is adjusted at each level. The room screen of the corresponding room model can be reconstructed and rendered according to the method described above, and the rendered room screen is output, which improves the authenticity of the room screen. In addition, in the rendering process, since the room model itself is not transformed, but the new room model or the three objects in the room are determined each time the viewing angle is adjusted. After the 3D model is constructed, the corresponding transformation matrix is ​​directly used to transform the initial camera pose, and the transformed camera pose is used for rendering to improve the rendering picture quality of the 3D model and ensure that the rendering effect of each room achieves the expected aligned rendering effect, that is, the first 3D model is aligned with the scene Mesh, and the second 3D model is aligned with the scene Mesh. According to the method described above, the scene pictures of the first 3D model and the second 3D model are aligned with the scene base, such as the rooms are aligned and presented in the floor scene, so as to achieve the correction rendering of the layout relationship between the original first 3D model and the second 3D model, but it is not limited to the reconstruction rendering processing method required by this layout.

[0164] A three-dimensional scene rendering processing method provided by an embodiment of the present application is introduced above, and a device for executing the above-mentioned three-dimensional scene rendering processing method will be introduced below.

[0165] Reference Figure 8 , is a schematic diagram of the structure of a 3D scene rendering processing device provided in an embodiment of the present application, and the 3D scene rendering processing device may include:

[0166] The transformation matrix acquisition module 810 is used to obtain the transformation matrix corresponding to each of the multiple three-dimensional models included in the three-dimensional scene; the transformation matrix indicates that the corresponding three-dimensional model can meet the layout requirements of the three-dimensional scene after transformation processing;

[0167] A rendering pose transformation module 820 is used to transform the initial rendering pose of the three-dimensional scene in response to a rendering request based on the three-dimensional model, based on a transformation matrix corresponding to the three-dimensional model requested to be rendered, to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered;

[0168] The rendering module 830 is used to render a target screen corresponding to the target rendering posture based on the three-dimensional model requested to be rendered.

[0169] In some embodiments, the rendering pose transformation module 820 and the rendering module 830 may include:

[0170] A first transformation processing unit is configured to, in response to a rendering request based on the three-dimensional model, transform an initial rendering pose of the three-dimensional scene into a first target rendering pose based on a first transformation matrix corresponding to the first three-dimensional model requested to be rendered, and transform the initial rendering pose into a second target rendering pose based on a second transformation matrix corresponding to the second three-dimensional model requested to be rendered;

[0171] A first rendering unit, configured to render a first scene picture corresponding to the first target rendering posture based on the first three-dimensional model, and to render a second scene picture corresponding to the second target rendering posture based on the second three-dimensional model;

[0172] The superimposing unit is used to superimpose the first scene picture with the second scene picture to obtain a target picture requested for rendering.

[0173] In some further embodiments, the rendering pose transformation module 820 may include:

[0174] An initial rendering pose acquisition unit, configured to acquire an initial rendering pose of the three-dimensional scene in response to a rendering request based on the three-dimensional model;

[0175] The second transformation processing unit is used to transform the initial rendering pose based on the inverse matrix of the transformation matrix corresponding to the three-dimensional model requested to be rendered, so as to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered.

[0176] Among them, the three-dimensional model requested to be rendered includes a first three-dimensional model and a second three-dimensional model among the multiple three-dimensional models, and the relationship between a first transformation matrix corresponding to the first three-dimensional model and a second transformation matrix corresponding to the second three-dimensional model meets the layout requirements of the three-dimensional scene.

[0177] In a possible implementation, the second transformation processing unit may include any of the following seed units:

[0178] A first transformation subunit is configured to invert a transformation matrix corresponding to the three-dimensional model requested to be rendered, and transform the initial rendering pose using the obtained inverse matrix to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered;

[0179] The second transformation sub-unit is used to call the stored inverse matrix corresponding to the three-dimensional model requested to be rendered, transform the initial rendering pose, and obtain the target rendering pose corresponding to the three-dimensional model requested to be rendered; the inverse matrix is ​​obtained by inverting the transformation matrix corresponding to the three-dimensional model requested to be rendered before the rendering request is responded to.

[0180] In some further embodiments, the transformation matrix acquisition module 810 may include:

[0181] A three-dimensional model acquisition unit, used to acquire a scene grid of a three-dimensional scene and to construct a plurality of three-dimensional models of the three-dimensional scene;

[0182] a transformation matrix generating unit, configured to compare the plurality of three-dimensional models with the scene grid respectively based on layout requirements for the plurality of three-dimensional models in the three-dimensional scene, and generate transformation matrices corresponding to the plurality of three-dimensional models respectively;

[0183] The transformation matrix includes one or more combinations of a scaling matrix, a rotation matrix and a translation matrix relative to the scene grid when the corresponding three-dimensional model satisfies the layout requirement.

[0184] Optionally, the determination module for determining layout requirements for the multiple three-dimensional models in the three-dimensional scene may include:

[0185] A first output unit, configured to output a model layout interface in response to a layout request for the plurality of three-dimensional models, and present a plurality of layout modes on the model layout interface;

[0186] The first selection unit is used to determine the layout requirements of the corresponding three-dimensional models in the three-dimensional scene by using the selected layout mode in response to the layout mode selection operation for at least one group of the three-dimensional models.

[0187] In another possible implementation, the above-mentioned determination module may include:

[0188] A second output unit, configured to output a model layout interface in response to a layout request for the plurality of three-dimensional models;

[0189] The first input unit is used to obtain layout requirements of at least one group of the three-dimensional models in the three-dimensional scene in response to a layout mode input operation on the model layout interface.

[0190] In yet another possible implementation, the above-mentioned determination module may include:

[0191] A layout requirement determination unit, configured to determine, based on a layout mode among a plurality of objects to be rendered contained in the three-dimensional scene, a layout requirement for the three-dimensional models corresponding to each of the plurality of objects to be rendered in the three-dimensional scene;

[0192] Among them, the layout method refers to the array arrangement method of the scene pictures rendered corresponding to the multiple three-dimensional models in the three-dimensional scene; a group of the three-dimensional models includes at least two of the multiple three-dimensional models, and different groups of the three-dimensional models can contain the same three-dimensional model.

[0193] Optionally, the three-dimensional model acquisition unit may include:

[0194] A scene mesh selection unit, configured to select, in response to a rendering request for a three-dimensional scene, a scene mesh of the three-dimensional scene requested to be rendered from a plurality of candidate scene meshes;

[0195] A candidate model output unit, configured to output a three-dimensional scene configuration interface in response to a configuration request for the three-dimensional scene, and present a plurality of candidate models in the three-dimensional scene configuration interface; the plurality of candidate models can be obtained through different acquisition methods;

[0196] The three-dimensional model selection unit is used to determine each of the selected candidate models as a three-dimensional model for constructing the three-dimensional scene in response to a selection operation on the candidate models.

[0197] In some further embodiments, the rendering pose transformation module 820 and the rendering module 830 may include:

[0198] An inverse matrix obtaining unit is used to invert the transformation matrix corresponding to each of the plurality of three-dimensional models to obtain a corresponding inverse matrix;

[0199] An initial scene picture output unit, used to output the initial scene picture of the three-dimensional scene;

[0200] A first three-dimensional model determining unit, configured to determine a first three-dimensional model under an adjusted first perspective in response to a perspective adjustment instruction for the initial scene image;

[0201] A first acquisition unit, used to acquire an initial rendering pose of the three-dimensional scene;

[0202] a first transformation rendering unit, configured to transform the initial rendering posture into a first target rendering posture based on the inverse matrix corresponding to the first three-dimensional model, so as to render a first scene picture corresponding to the first target rendering posture based on the first three-dimensional model;

[0203] A second three-dimensional model determining unit, configured to determine a second three-dimensional model under an adjusted second perspective in response to a perspective adjustment instruction for the first scene image;

[0204] A second acquisition unit, used to acquire the initial rendering pose;

[0205] a second transformation rendering unit, configured to transform the initial rendering pose into a second target rendering pose based on the inverse matrix corresponding to the second three-dimensional model, so as to render a second scene picture corresponding to the second target rendering pose based on the second three-dimensional model;

[0206] The first scene picture and the second scene picture are aligned in the spatial coordinate system of the three-dimensional scene.

[0207] An embodiment of the present application also provides a computer program product, including one or more computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any three-dimensional scene rendering processing method provided in the embodiment of the present application.

[0208] Wherein, when loading and executing computer-readable instructions on a computer, all or part of the process or function described in the embodiment of the present application is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer-readable instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer-readable instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center, to meet the data / instruction transmission requirements in the execution process of the three-dimensional scene rendering processing method proposed in the embodiment of the present application.

[0209] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any three-dimensional scene rendering processing method provided in the embodiment of the present application.

[0210] The computer-readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a training device or a data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)).

[0211] Reference Fig. 9 , is a schematic diagram of the hardware structure of an electronic device applicable to the three-dimensional scene rendering processing method proposed in this application. In the case where the electronic device is a terminal device, such as Fig. 9As shown, the electronic device may include: at least one processor 910, at least one memory 920 connected to the processor 910, and at least one display screen 930, wherein:

[0212] At least one processor 910, at least one memory 920 and at least one display screen 930 may be interconnected via bus communication. The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one bidirectional line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0213] The display screen 930 is used to display the target screen of the three-dimensional scene. In some embodiments, various interactive interfaces in the three-dimensional scene rendering processing method proposed in the embodiment of the present application can also be displayed, such as a three-dimensional scene configuration interface, a model layout interface, etc. The display screen 930 can be a touch screen to collect user touch operations on or near it (as described in the above embodiment, using any input device such as a stylus, keyboard and mouse, function keys, fingers, etc., to select the three-dimensional model / layout mode, or input the layout mode, etc.), drive the corresponding connection device according to the pre-set program, and implement the corresponding function.

[0214] The memory 920 can be used to store computer program instructions for implementing the three-dimensional scene rendering processing method described in the above-mentioned method embodiments; the processor 910 can load and execute the computer program instructions stored in the memory to implement the various steps of the three-dimensional scene rendering processing method described in the above-mentioned corresponding method embodiments. The specific implementation process can refer to the description of the corresponding part of the above-mentioned embodiment and will not be repeated here.

[0215] In the embodiment of the present application, the memory 920 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device. The processor 910 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, etc. The present application does not limit the structure and model of the above-mentioned memory 920 and processor 910, and can be flexibly adjusted according to actual needs.

[0216] It should be understood that Fig. 9 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiment of the present application. In practical applications, the electronic device may include Fig. 9 More or fewer components as shown, or a combination of certain components, such as microphones, speakers, various sensors, antennas, power modules, RF components, various communication elements, external ports and other input / output components, etc., can be determined based on processing function requirements, and this application does not list them one by one.

[0217] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0218] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0219] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. In this specification, each embodiment is described in a progressive or parallel manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referred to each other. For the device and electronic device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

Claims

1. A three-dimensional scene rendering processing method, the method include: Obtain the transformation matrix corresponding to each of the multiple three-dimensional models contained in the three-dimensional scene; The transformation matrix indicates that the three-dimensional model can meet the layout requirements of the three-dimensional scene after transformation processing; In response to a rendering request based on the three-dimensional model, transforming an initial rendering pose of the three-dimensional scene based on a transformation matrix corresponding to the three-dimensional model requested to be rendered, to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered; Based on the three-dimensional model requested to be rendered, a target screen corresponding to the target rendering posture is rendered.

2. The method according to claim 1, wherein in response to a rendering request based on the three-dimensional model, based on a transformation matrix corresponding to the three-dimensional model requested to be rendered, an initial rendering pose of the three-dimensional scene is transformed to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered, and based on the three-dimensional model requested to be rendered, a target screen corresponding to the target rendering pose is rendered, include: In response to a rendering request based on the three-dimensional model, based on a first transformation matrix corresponding to the first three-dimensional model requested to be rendered, transforming an initial rendering pose of the three-dimensional scene into a first target rendering pose, and based on a second transformation matrix corresponding to the second three-dimensional model requested to be rendered, transforming the initial rendering pose into a second target rendering pose; Rendering a first scene picture corresponding to the first target rendering posture based on the first three-dimensional model, and rendering a second scene picture corresponding to the second target rendering posture based on the second three-dimensional model; The first scene picture and the second scene picture are superimposed to obtain a target picture requested for rendering.

3. The method according to claim 1, wherein in response to a rendering request based on the three-dimensional model, based on a transformation matrix corresponding to the three-dimensional model requested to be rendered, an initial rendering pose of the three-dimensional scene is transformed to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered, include: In response to a rendering request based on the three-dimensional model, obtaining an initial rendering pose of the three-dimensional scene; Based on the inverse matrix of the transformation matrix corresponding to the three-dimensional model requested to be rendered, the initial rendering pose is transformed to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered.

4. The method according to claim 3, in: The three-dimensional model requested for rendering includes a first three-dimensional model and a second three-dimensional model among the multiple three-dimensional models, and the relationship between a first transformation matrix corresponding to the first three-dimensional model and a second transformation matrix corresponding to the second three-dimensional model meets the layout requirements of the three-dimensional scene.

5. The method according to claim 3, wherein the transforming process is performed on the initial rendering pose based on the inverse matrix of the transformation matrix corresponding to the three-dimensional model requested to be rendered to obtain the target rendering pose corresponding to the three-dimensional model requested to be rendered, including any one of the following: Inverting the transformation matrix corresponding to the three-dimensional model requested to be rendered, and using the obtained inverse matrix to transform the initial rendering pose to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered; Retrieving a stored inverse matrix corresponding to the three-dimensional model requested to be rendered, transforming the initial rendering pose, and obtaining a target rendering pose corresponding to the three-dimensional model requested to be rendered; The inverse matrix is ​​obtained by inverting the transformation matrix corresponding to the three-dimensional model requested to be rendered before responding to the rendering request.

6. The method according to any one of claims 1 to 5, wherein the step of obtaining the transformation matrices corresponding to the multiple three-dimensional models included in the three-dimensional scene comprises: include: Acquire a scene mesh of a three-dimensional scene and a plurality of three-dimensional models for constructing the three-dimensional scene; Based on layout requirements for the multiple three-dimensional models in the three-dimensional scene, respectively compare the multiple three-dimensional models with the scene grid to generate transformation matrices corresponding to the multiple three-dimensional models; The transformation matrix includes one or more combinations of a scaling matrix, a rotation matrix and a translation matrix relative to the scene grid when the corresponding three-dimensional model satisfies the layout requirement.

7. According to the method of claim 6, the method for determining the layout requirements of the multiple three-dimensional models in the three-dimensional scene comprises any one of the following: In response to a layout request for the plurality of three-dimensional models, a model layout interface is outputted, and a plurality of layout modes are presented on the model layout interface; in response to a layout mode selection operation for at least one group of the three-dimensional models, layout requirements of the corresponding three-dimensional models in the three-dimensional scene are determined using the selected layout mode; In response to a layout request for the plurality of three-dimensional models, a model layout interface is outputted, and in response to a layout mode input operation on the model layout interface, a layout requirement of at least one group of the three-dimensional models in the three-dimensional scene is obtained; Based on the layout mode between the multiple objects to be rendered contained in the three-dimensional scene, determining the layout requirements of the three-dimensional models corresponding to the multiple objects to be rendered in the three-dimensional scene; in, The layout mode refers to the array arrangement mode of the scene pictures rendered corresponding to the multiple three-dimensional models in the three-dimensional scene; A group of the three-dimensional models includes at least two of the multiple three-dimensional models, and different groups of the three-dimensional models can include the same three-dimensional model.

8. The method according to claim 6, wherein the step of acquiring a scene mesh of a three-dimensional scene and a plurality of three-dimensional models for constructing the three-dimensional scene comprises: include: In response to a rendering request for a three-dimensional scene, selecting a scene mesh of the three-dimensional scene requested to be rendered from a plurality of candidate scene meshes; In response to a configuration request for the three-dimensional scene, a three-dimensional scene configuration interface is output, and a plurality of candidate models are presented in the three-dimensional scene configuration interface; the plurality of candidate models can be obtained through different acquisition methods; In response to a selection operation on the candidate models, each of the selected candidate models is determined as a three-dimensional model for constructing the three-dimensional scene.

9. The method according to claim 2, wherein in response to a rendering request for the three-dimensional model, based on a transformation matrix corresponding to the three-dimensional model requested to be rendered, an initial rendering pose of the three-dimensional scene is transformed to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered, and based on the three-dimensional model requested to be rendered, a scene image corresponding to the target rendering pose is rendered. include: Inverting the transformation matrix corresponding to each of the plurality of three-dimensional models to obtain a corresponding inverse matrix; Outputting an initial scene picture of the three-dimensional scene; In response to a perspective adjustment instruction for the initial scene image, determining a first three-dimensional model under an adjusted first perspective, and acquiring an initial rendering pose of the three-dimensional scene; Based on the inverse matrix corresponding to the first three-dimensional model, transform the initial rendering pose into a first target rendering pose, so as to render a first scene picture corresponding to the first target rendering pose based on the first three-dimensional model; In response to a perspective adjustment instruction for the first scene image, determining a second three-dimensional model under an adjusted second perspective, and acquiring the initial rendering pose; Based on the inverse matrix corresponding to the second three-dimensional model, transform the initial rendering pose into a second target rendering pose, so as to render a second scene picture corresponding to the second target rendering pose based on the second three-dimensional model; The first scene picture and the second scene picture are aligned in the spatial coordinate system of the three-dimensional scene.

10. A three-dimensional scene rendering processing device, the device include: A transformation matrix acquisition module is used to obtain the transformation matrices corresponding to the multiple three-dimensional models contained in the three-dimensional scene; The transformation matrix indicates that the three-dimensional model can meet the layout requirements of the three-dimensional scene after transformation processing; A rendering pose transformation module, configured to, in response to a rendering request based on the three-dimensional model, transform an initial rendering pose of the three-dimensional scene based on a transformation matrix corresponding to the three-dimensional model requested to be rendered, to obtain a target rendering pose corresponding to the three-dimensional model requested to be rendered; A rendering module is used to render a target picture corresponding to the target rendering posture based on the three-dimensional model requested to be rendered.

Citation Information

Cited By

  • Three-dimensional scene real-time rendering optimization system and method based on 3D Gaussian sputtering

    CN120599137A

  • Three-dimensional scene real-time rendering optimization system and method based on 3D gaussian sputtering

    CN120599137B