A scene rendering method, computing device and storage medium

By tracking the light path in the virtual environment and calculating the indirect lighting results, the real scene environment is dynamically rendered, which solves the problem of the lack of realism in the virtual environment in the existing technology and improves the user experience.

CN113298924BActive Publication Date: 2025-03-07ALIBABA GROUP HOLDING LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010889632.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-28
Publication Date
2025-03-07
Estimated Expiration
2040-08-28

AI Technical Summary

Technical Problem

The prior art is difficult to create a real scene experience in a virtual environment, which limits the user's experience in online services.

Method used

By determining the emitted light of the spatial scene, tracking the path of the light in the scene, and calculating the indirect lighting results based on the material information of the object, dynamically rendering the real scene environment.

Benefits of technology

It realizes providing a more realistic scene experience in a virtual environment, improving the user's experience experience, and supports real-time spatial rendering and dynamic update of scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113298924B_ABST
    Figure CN113298924B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a scene rendering method, computing device and storage medium. In the embodiments of the present application, for the current spatial scene to be rendered, the emitted light of the spatial scene is determined; based on the object where the emitted light first intersects in the spatial scene, the light path formed by the emitted light in the spatial scene with the object as the starting point is determined; based on the light path and the material information of the object corresponding to the light path in the spatial scene, the indirect lighting result of the emitted light relative to the object is determined; based on the indirect lighting result corresponding to the spatial scene, the spatial scene is rendered, and the rendering result is displayed. This makes it possible to three-dimensionalize the virtual spatial scene, so that the user can feel the spatial scene more realistically, and improve the user's experience.
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 in particular to a scene rendering method, a computing device, and a storage medium. Background Art

[0002] With the development of the Internet, the network can provide users with many online services, such as online games, online shopping, and online design. However, most online services display service content to users through two-dimensional planes. However, for some online services, especially online services with scenario-based applications, such as online interior design, it is necessary to create a real application experience for users in a virtual environment to enhance the user experience. Summary of the invention

[0003] Multiple aspects of the present application provide a scene rendering method, a computing device, and a storage medium for dynamically rendering a spatial scene, so that a user can experience a more realistic scene environment in a virtual environment.

[0004] An embodiment of the present application provides a scene rendering method, comprising: determining, for a current spatial scene to be rendered, an emitted light of the spatial scene; determining, based on an object in the spatial scene where the emitted light first intersects, a light path formed by the emitted light in the spatial scene with the object as a starting point; determining, based on the light path and material information of an object corresponding to the light path in the spatial scene, an indirect lighting result of the emitted light relative to the object; rendering the spatial scene based on the indirect lighting result corresponding to the spatial scene, and displaying the rendering result.

[0005] An embodiment of the present application also provides a scene rendering method, comprising: determining a corresponding indoor space scene to be rendered based on a viewing operation; determining, for the current indoor space scene to be rendered, an emitted light of the indoor space scene; determining, based on an object in the indoor space scene where the emitted light first intersects, a light path formed by the emitted light in the indoor space scene with the object as a starting point; determining, based on the light path and material information of an object corresponding to the light path in the indoor space scene, an indirect lighting result of the emitted light relative to the object; rendering the indoor space scene based on the indirect lighting result corresponding to the indoor space scene, and displaying the rendering result.

[0006] An embodiment of the present application also provides a scene rendering method, comprising: determining a corresponding shopping space scene to be rendered based on a viewing operation; determining, for the current shopping space scene to be rendered, an emitted light of the shopping space scene; determining, based on an object in the shopping space scene where the emitted light first intersects with the object, a light path formed by the emitted light in the shopping space scene with the object as a starting point; determining, based on the light path and material information of an object corresponding to the light path in the shopping space scene, an indirect lighting result of the emitted light relative to the object; rendering the shopping space scene based on the indirect lighting result corresponding to the shopping space scene, and displaying the rendering result.

[0007] An embodiment of the present application also provides a scene rendering method, including: based on a viewing operation, determining a corresponding game scene to be rendered; for the current game scene to be rendered, determining the emitted light of the game scene; based on the object in the game scene where the emitted light first intersects, determining a light path formed by the emitted light in the game scene with the object as the starting point; based on the light path and material information of the object corresponding to the light path in the game scene, determining the indirect lighting result of the emitted light relative to the object; rendering the game scene based on the indirect lighting result corresponding to the game scene, and displaying the rendering result.

[0008] An embodiment of the present application also provides a method for rendering an object, comprising: determining, for a current spatial scene to be rendered, an emitted light of the spatial scene; determining, based on an object in the spatial scene where the emitted light first intersects, a light path formed by the emitted light in the spatial scene with the object as a starting point; determining, based on the light path and material information of an object corresponding to the light path in the spatial scene, an indirect lighting result of the emitted light relative to the object; rendering the object based on the indirect lighting result corresponding to the object, and displaying the rendering result.

[0009] An embodiment of the present application also provides a computing device, including: a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program, so as to: determine the emitted light of the spatial scene to be rendered; determine the light path formed by the emitted light in the spatial scene with the object as the starting point based on the object where the emitted light first intersects in the spatial scene; determine the indirect lighting result of the emitted light relative to the object based on the light path and material information of the object corresponding to the light path in the spatial scene; render the spatial scene based on the indirect lighting result corresponding to the spatial scene, and display the rendering result.

[0010] An embodiment of the present application also provides a computing device, comprising: a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program, so as to: determine, for a current indoor space scene to be rendered, an emitted light of the indoor space scene; determine, based on an object in the indoor space scene where the emitted light first intersects, a light path formed by the emitted light in the indoor space scene with the object as a starting point; determine, based on the light path and material information of an object in the indoor space scene corresponding to the light path, an indirect lighting result of the emitted light relative to the object; render the indoor space scene based on the indirect lighting result corresponding to the indoor space scene, and display the rendering result.

[0011] An embodiment of the present application further provides a computing device, comprising: a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program, so as to: determine a corresponding shopping space scene to be rendered based on a viewing operation; determine the emitted light of the shopping space scene for the current shopping space scene to be rendered; determine a light path formed by the emitted light in the shopping space scene with the object as the starting point based on the object where the emitted light first intersects in the shopping space scene; determine an indirect lighting result of the emitted light relative to the object based on the light path and material information of the object corresponding to the light path in the shopping space scene; render the shopping space scene based on the indirect lighting result corresponding to the shopping space scene, and display the rendering result.

[0012] An embodiment of the present application also provides a computing device, including: a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program, so as to: determine the corresponding game scene to be rendered based on a viewing operation; determine the emitted light of the game scene for the current game scene to be rendered; determine the light path formed by the emitted light in the game scene with the object as the starting point based on the object where the emitted light first intersects in the game scene; determine the indirect lighting result of the emitted light relative to the object based on the light path and the material information of the object corresponding to the light path in the game scene; render the game scene based on the indirect lighting result corresponding to the game scene, and display the rendering result.

[0013] An embodiment of the present application also provides a computing device, including: a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program, so as to: determine the emitted light of the spatial scene to be rendered; determine the light path formed by the emitted light in the spatial scene with the object as the starting point based on the object where the emitted light first intersects in the spatial scene; determine the indirect lighting result of the emitted light relative to the object based on the light path and the material information of the object corresponding to the light path in the spatial scene; render the object based on the indirect lighting result corresponding to the object, and display the rendering result.

[0014] An embodiment of the present application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by one or more processors, the one or more processors implement the steps in the above method.

[0015] In the embodiment of the present application, for the current spatial scene to be rendered, the emitted light of the spatial scene is determined; according to the object in the spatial scene where the emitted light first intersects, the light path formed by the emitted light in the spatial scene with the object as the starting point is determined; according to the light path and the material information of the object corresponding to the light path in the spatial scene, the indirect lighting result of the emitted light relative to the object is determined; based on the indirect lighting result corresponding to the spatial scene, the spatial scene is rendered and the rendering result is displayed. This makes it possible to make the virtual spatial scene three-dimensional, so that the user can feel the spatial scene more realistically, and improve the user's experience.

[0016] At the same time, real-time spatial rendering can be performed according to the spatial scene that the user needs to render, thereby achieving the effect of dynamic rendering of the spatial scene. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0018] Figure 1A A schematic diagram of the structure of a scene rendering system according to an exemplary embodiment of the present application;

[0019] Figure 1B A schematic diagram of the structure of a scene rendering system according to an exemplary embodiment of the present application;

[0020] Figure 2 A schematic diagram of a flow chart of a scene rendering method according to an exemplary embodiment of the present application;

[0021] Figure 3A schematic diagram of a scene space for another exemplary implementation of the present application;

[0022] Figure 4 A schematic diagram of a scene space for another exemplary implementation of the present application;

[0023] Figure 5 A schematic diagram of a light path according to another exemplary embodiment of the present application;

[0024] Figure 6 A schematic diagram of a light path according to another exemplary embodiment of the present application;

[0025] Figure 7 A schematic diagram of a spatial scene graph with noise according to another exemplary implementation of the present application;

[0026] Figure 8 This is a schematic diagram of a denoised spatial scene graph according to another exemplary implementation of the present application;

[0027] Fig. 9 A schematic flow chart of a scene rendering method according to another exemplary embodiment of the present application;

[0028] Fig.10 A schematic diagram of a flow chart of a scene rendering method according to an exemplary embodiment of the present application;

[0029] Fig.11 A schematic structural diagram of a scene rendering device provided by another exemplary embodiment of the present application;

[0030] Fig.12 A schematic structural diagram of a scene rendering device provided by another exemplary embodiment of the present application;

[0031] Fig.13 A schematic diagram of the structure of a scene rendering device provided by an exemplary embodiment of the present application;

[0032] Fig.14 A schematic diagram of the structure of a computing device provided for an exemplary embodiment of the present application;

[0033] Fig.15 A schematic diagram of the structure of a computing device provided for another exemplary embodiment of the present application;

[0034] Fig.16 A schematic diagram of the structure of a computing device provided for yet another exemplary embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0036] Based on the foregoing, it can be seen that in order to improve the user experience of using online services, the technical solution proposed in the embodiment of the present application can render a spatial effect diagram more dynamically to enhance the user experience.

[0037] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0038] Figure 1A The schematic diagram of the structure of a scene rendering system provided by an exemplary embodiment of the present application is as follows. Figure 1A As shown, the system 100 may include: a first device 101 and a second device 102 .

[0039] Among them, the first device 101 can be a device with certain computing capabilities, which can realize the function of sending data to the second device 102. The basic structure of the first device 101 may include: at least one processor. The number of processors may depend on the configuration and type of the device with certain computing capabilities. The device with certain computing capabilities may also include a memory, which may be volatile, such as RAM, or non-volatile, such as read-only memory (ROM), flash memory, etc., or may include both types at the same time. The memory usually stores an operating system (OS), one or more application programs, and may also store program data, etc. In addition to the processing unit and the memory, the device with certain computing capabilities also includes some basic configurations, such as a network card chip, an IO bus, a display component, and some peripheral devices, etc. Optionally, some peripheral devices may include, for example, a keyboard, an input pen, etc. Other peripheral devices are well known in the art and will not be described in detail here. Optionally, the first device 101 may be an intelligent terminal, such as a mobile phone, a desktop computer, a notebook, a tablet computer, etc.

[0040] The second device 102 refers to a device that can provide computing and processing services in a network virtual environment, and can refer to a device that uses the network to render a spatial scene. In physical implementation, the second device 102 can be anything that can provide computing services, respond to service requests, and return rendering results, such as a cloud server, cloud host, virtual center, conventional server, etc. The second device 102 mainly includes a processor, a hard disk, a memory, a system bus, etc., which is similar to a general computer architecture.

[0041] In an embodiment of the present application, the first device 101 may send a rendering request to the second device 102 in response to a user display instruction. The request may carry an identifier of the spatial scene to be rendered. The second device 102 receives the request and determines the corresponding spatial scene to be rendered. The second device 102 determines the emitted light of the spatial scene for the current spatial scene to be rendered; determines the light path formed by the emitted light in the spatial scene with the object as the starting point based on the object where the emitted light first intersects in the spatial scene; determines the indirect lighting result of the emitted light relative to the object based on the light path and the material information of the object corresponding to the light path in the spatial scene, renders the spatial scene based on the indirect lighting result corresponding to the spatial scene, and displays the rendering result.

[0042] In addition, the second device 102 can also determine the direct lighting result generated by the light source in the spatial scene when the emitted light is directly returned from the object based on the material information of the object; obtain the global lighting result based on the direct lighting result and the indirect lighting result, and render the spatial scene based on the global lighting result corresponding to the spatial scene to obtain the rendering result, and then send the rendering result to the first device 101 for display.

[0043] In addition, since the indirect illumination result will generate noise after the second device 102 obtains the indirect illumination result, the second device 102 can reduce the noise of the indirect illumination result according to the preset noise reduction algorithm to determine the global illumination result. After noise reduction, the indirect illumination result can also be multiplied by the material information of the first object to obtain a corrected indirect illumination result to determine the global illumination result.

[0044] In order to enhance the shadow effect, the shadow results between objects in the space scene can also be determined to determine the final global illumination result.

[0045] In the interior design application scenario of the embodiment of the present application, Figure 1BAs shown, a user, such as a designer, can select a corresponding indoor space scene through a first device 101, such as a computer or a mobile phone, and send a viewing instruction to the mobile phone. In response to the instruction, the mobile phone can send a rendering request to a second device 102, such as a cloud server. The request can carry an identifier of the indoor space scene. After receiving the request, the cloud server determines the corresponding indoor space scene according to the identifier. After determining the scene, the cloud server emits light into the scene 103 through a virtual camera 106 in the scene 103. A two-dimensional blank image 107 is set in front of the virtual camera 106, and light is emitted into the scene 103 according to the pixels therein. Take a pixel as an example for explanation: after emitting light 105 into the scene 103 through a pixel, it hits the first object in the scene 103, such as a table 108 in the indoor space scene, and the cloud server obtains the material information of the table. Based on the material information, it is determined how the emitted light propagates after hitting the table, such as diffuse reflection and highlight reflection, and the light path of the diffuse reflection and highlight reflection is determined at the same time. According to the recursive method of the light path and the illumination model, the indirect illumination result of the diffuse reflection and the indirect illumination result of the highlight reflection are determined. The cloud server can also determine the direct illumination result for the illumination effect produced by the light source in the scene directly shining on the table based on the illumination model and the material information of the table. The direct illumination result and the indirect illumination result are added to obtain the global illumination result. The cloud server can determine the color corresponding to the pixel according to the global illumination result and perform color drawing. Finally, all pixels have colors. The cloud service sends the rendering result to the user's mobile phone, and the mobile phone can directly display it according to the rendering result, and can display the rendering result of the scene 103, that is, the image 104 of the scene 103.

[0046] In addition, in order to improve the rendering effect, after determining the indirect lighting results, the cloud server performs noise reduction on these two results according to different indirect lighting results, such as the highlight reflection indirect lighting results and the diffuse reflection indirect lighting results. After noise reduction, each indirect lighting result is multiplied by the material information of the table to obtain the corrected indirect lighting result. The cloud server can add the corrected indirect lighting result to the direct lighting result. At the same time, the cloud server can also determine the shadow results between objects in the indoor space scene, and add them to the corrected indirect lighting results and direct lighting results to obtain the global lighting result, thereby determining the color of each pixel, performing color drawing, and sending the final rendering result to the user's mobile phone for display.

[0047] It should be noted that the user can also modify the indoor space scene, re-render the modified scene, and display it to the user. The user can also move in the scene, so that the virtual camera 106 moves accordingly, and re-render the scene with the new perspective of the virtual camera 106 and display it to the user.

[0048] In addition to being applied to the above scenarios, it can also be applied to online shopping scenarios. Among them, the user can be a buyer and watch the scene in a specific online sales scenario, such as an indoor furniture sales space scenario. At this time, the rendering result can be provided to the user and displayed according to the above method. The specific rendering method will not be repeated here.

[0049] In the above embodiment, the above device can be connected to the network, and the network connection can be a wireless connection. If it is a communication connection, the network standard of the mobile network can be any one of 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G+ (LTE+), WiMax, 5G, etc.

[0050] The rendering of the scene is described in detail below in conjunction with the method embodiment.

[0051] Figure 2 The flowchart of a method for rendering a scene according to an exemplary embodiment of the present application is shown in FIG. The method 200 provided in the embodiment of the present application is executed by a computing device, such as a cloud server. The method 200 includes the following steps:

[0052] 201: For the current spatial scene to be rendered, determine the emission light of the spatial scene.

[0053] 202: According to the object in the space scene where the emitted light first intersects, determine a light path formed by the emitted light in the space scene with the object as a starting point.

[0054] 203: Determine the indirect lighting result of the emitted light relative to the object according to the light path and the material information of the object corresponding to the light path in the space scene.

[0055] 204: Render the spatial scene based on the indirect lighting result corresponding to the spatial scene, and display the rendering result.

[0056] It should be noted that the execution subject may also be a smart terminal, and the method 200 may be executed if the performance of the smart terminal can support it.

[0057] The following is a detailed description of the above steps:

[0058] 201: For the current spatial scene to be rendered, determine the emission light of the spatial scene.

[0059] Rendering refers to the process of drawing 3D (3-dimension, also known as virtual space) data stored in text binary or other forms into an image.

[0060] The space scene refers to a virtual space, such as an indoor virtual space, a store virtual space, etc. The space scene may have light sources and objects. Different objects may be set according to different virtual spaces.

[0061] in, Figure 3 A space scene 300 is shown. The scene is an indoor space scene, i.e., an indoor virtual space. The scene 300 includes a lamp 301, a television 302, a table 303, and flowers 304. In addition, the scene 300 may also include walls and a floor, but these are not marked in the scene 300. At the same time, the scene 300 may also include a light source, which is not drawn or marked.

[0062] The method of obtaining the space scene may include:

[0063] A viewing request or a selection request is received, and the request may carry an identifier of a spatial scene, such as an ID, and the request is used to determine the spatial scene. Based on the identifier, a corresponding spatial scene may be selected or determined from a plurality of preset spatial scenes.

[0064] Alternatively, a modification request is received, the current spatial scene is modified, and the modified spatial scene is used as the spatial scene to be rendered.

[0065] For example, as described above, the cloud server receives a viewing request sent by the user's mobile phone. The user's mobile phone may be installed with an online interior design app (application). The user clicks on the app to display the design interface, and can select or view the designed interior space scenes. Based on the user's viewing operation or selection operation, the mobile phone responds to the operation and sends a request to the cloud server, carrying the ID of the space scene. The cloud server selects the corresponding space scene from multiple designed space scenes based on the ID. Alternatively, the user selects the corresponding apartment room from the cloud server and designs in the apartment room. The cloud server selects the furniture set in the room according to the user's selection request to make modifications in the room, and uses the modified room as the interior space scene to be rendered.

[0066] For a smart terminal, for example, a mobile phone or a computer can directly respond to the user's operation and directly select the corresponding spatial scene from the local of the smart terminal.

[0067] After the spatial scene is determined, the spatial scene may be rendered. The rendering process may be determined by tracing rays.

[0068] Specifically, for the current spatial scene to be rendered, determining the emission light of the spatial scene includes: determining the emission light of the spatial scene through a virtual camera.

[0069] The virtual camera refers to a virtual device that simulates the user's eye view. The virtual camera can be set in the space scene or outside the space scene, and can also be moved in the space scene through the user's operation. The virtual camera can have a certain viewing angle range. The viewing angle range can be determined by a plane in the virtual camera. The plane can be used as the user's screen image, which can also be called a video screen.

[0070] For example, as described above, the cloud server may determine the emitted light by emitting light from the virtual camera to the indoor space scene, that is, simulating light, in accordance with the ray tracing method.

[0071] It should be noted that, in addition to the virtual camera, other virtual devices that can realize the function of the virtual camera can be used, or the cloud server can directly simulate the virtual camera and directly send virtual light to the spatial scene.

[0072] In addition, in order to better render the spatial scene, a plane graphic can be set in front of the virtual camera as the final user screen image.

[0073] Specifically, the method 200 also includes: a two-dimensional image is set in front of the virtual camera; wherein, determining the emitted light of the spatial scene includes: emitting virtual light to pixels in the two-dimensional image through the virtual camera, so that the emitted virtual light passes through the pixel into the spatial scene, thereby determining the global illumination result corresponding to the pixel.

[0074] The two-dimensional image may be blank in color.

[0075] in, Figure 4A space scene 400 with a virtual camera is shown. Virtual light can be directly emitted into the space scene 400 through a virtual camera 401. The emitted virtual light is emitted at a certain light angle. At the same time, a two-dimensional blank image 402, which is also a video screen, can be set in front of the virtual camera 401. The image 402 has a plurality of pixels 403. For each pixel, the virtual camera 403 emits a virtual light to the pixel at a certain emission angle, so that the light passes through the image 402 and enters the space scene 400. Of course, a point in each pixel can also be randomly selected as a reference, and the virtual camera 403 emits light to the randomly selected point.

[0076] It should be noted that, for each pixel in the image 402 , the center point of each pixel can be used as a reference, and the virtual camera 403 can emit virtual light to the center point of the pixel, thereby determining the emission angle and emitting virtual light to the spatial scene 400 .

[0077] In addition, for smart terminals, the execution steps are similar to those of the cloud server, so they will not be repeated here.

[0078] 202: According to the object in the space scene where the emitted light first intersects, determine a light path formed by the emitted light in the space scene with the object as a starting point.

[0079] Among them, the ray path meets the conditions of rendering time.

[0080] A light path refers to a light path composed of light rays, which can be formed when light rays propagate in a spatial scene. A light path can be related to the object hit by the light rays. For example, when light rays hit an object, they can be reflected or refracted according to the material information of the object, thus forming a light path.

[0081] In the embodiment of the present application, the emitted light is traced to determine whether the light path eventually reaches the light source in the virtual space. If it can reach the light source, the illumination result can be calculated by recursively calculating the light path.

[0082] However, since the light paths are very complex and there may be a large number of them, there may also be some invalid light paths. Therefore, when calculating the lighting results, a large amount of calculations will be generated, resulting in an increase in rendering time. Therefore, in an embodiment of the present application, the light path can be restricted to meet the rendering time conditions. For example, the length and number of light paths are restricted to meet certain thresholds. For example, the length of the light path can be the length of the path passing through two objects. Alternatively, the light path is not traced for refraction inside the object to reduce the number of light paths.

[0083] It should also be noted that during the propagation process, light will attenuate after multiple refractions or reflections. Therefore, when the light path is too long, the light path can be shortened to determine the lighting result.

[0084] At the same time, you can also focus on the lighting results generated by reflected light, such as diffuse reflection and specular reflection, and ignore the lighting results of refraction. Of course, considering the lighting results of refraction can make the final lighting results more accurate. However, in order to accommodate rendering time, you can also ignore the lighting results of refraction according to your needs.

[0085] In addition, the object can be determined by: according to the position of each object in the current spatial scene, that is, the spatial coordinates, determining the object that the emitted light will hit for the first time, that is, the first object that the emitted light intersects with in the spatial scene. It is worth noting that the first object here is not an identification of the object, but refers to the first object in the spatial scene that intersects with the emitted light. The object can be any object that intersects with the light for the first time and is not restricted by the object identification. In addition, a beam of directional emitted light only directly intersects with one object in the spatial scene, and can intersect with other objects indirectly, that is, through reflection, etc.

[0086] It should be noted that, since the emitted light is emitted at a certain emission angle, the emitted light can be determined, and its propagation path (it can also be the light path before hitting the object) is also determined. At the same time, each object in the spatial scene has specific spatial coordinates, and for the sake of simplicity, each object can be represented by a triangle, thereby evolving into determining the first triangle that the emitted light will hit, and determining the triangle with the shortest propagation path, which can be reached, by determining the propagation path of the emitted light. And determine the identification of the triangle, such as the number. In addition, the coordinates of the hitting point of the triangle can also be determined based on the propagation path, that is, which point of the triangle is hit is also the coordinates of the hitting point of the object.

[0087] After the object is determined, the light path can be determined based on the material information of the object.

[0088] Specifically, determining a light path formed by emitting light from the object as a starting point in the space scene includes: determining the light path according to material information of the object.

[0089] Among them, material information refers to the visual properties of the object surface, which can include the object's diffuse color, highlight color, roughness, etc. This material information will be used to calculate the lighting results.

[0090] The acquisition of material information may include: since each object in the space scene can be pre-stored in the model library. And the material of each object can also be stored in a pre-stored storage area and marked with its identification, such as a number. According to the foregoing, after determining the number of the object, the corresponding material information can be obtained from the pre-stored storage area according to the number, and the material information is stored in the map.

[0091] For example, according to the above, the first object that the emitted light hits in the indoor space scene is a table. After determining the material information of the table, the cloud server can perform diffuse reflection, specular reflection, and refraction according to the material information. For example, after diffuse reflection, the emitted light propagates into the air without touching any object or returning to the light source, thus forming a light path.

[0092] It should be noted that, since this light path does not intersect with any object, the illumination result corresponding to the light path is 0.

[0093] In addition, the light path may continue to intersect with other objects through diffuse reflection, and then other light paths may be generated according to the material information of subsequent objects until the light returns to the light source.

[0094] in, Figure 5 A schematic diagram of the light path is shown. Figure 5 In the figure, the virtual camera 401 emits a ray 501 to one of the pixels 403 in the image 402. The ray 501 first hits the object table 303. According to the material information of the table 303, diffuse reflection is performed to generate a ray path 502, and then the ray hits the wall to generate a ray path 503, and then the ray hits the lamp 301 to generate a ray path 504, and then returns to the light source 505. Among them, the ray paths 502-504 constitute the ray path generated on the table.

[0095] Correspondingly, for other reflections, such as specular reflection and refraction, corresponding light paths will also be generated, thereby determining these different light paths.

[0096] Specifically, determining the light path includes: determining different light types corresponding to different light paths generated on the object according to material information; and determining corresponding light paths for different light types.

[0097] Among them, different light types refer to diffuse reflection, refraction, and specular reflection, etc. Therefore, different relationship paths are determined according to different types.

[0098] The specific determination method is similar to that described above and will not be repeated here.

[0099] Specifically, for different light types, the corresponding light paths are determined with the object as the starting point, including: for the light corresponding to the light type, the light paths generated by the light passing through other objects in the space scene are determined as the corresponding light paths. The number of other objects is less than the corresponding threshold in the rendering time condition.

[0100] This has been explained in detail in the previous article, so I will not repeat it here. I will just explain that in the process of reflection or refraction of the object, in order to meet the rendering time requirements, if the light path is too long due to passing through multiple objects, and because the light will attenuate, the subsequent light path can be ignored.

[0101] Among them, Figure 5 As shown, since the light paths 502-504 pass through objects such as tables, walls, and lamps, the light paths are too long, so the other objects can be set to 1, that is, the light paths after passing through the wall can be ignored. Figure 5 The light paths in are light path 502 and light path 503, returning to the light source.

[0102] In addition, the refraction inside the object can be ignored, and only the light paths generated by subsequent reflected light can be considered, thereby reducing the number of light paths, reducing the amount of calculation, and saving rendering time.

[0103] In addition, for diffuse reflection, since diffuse reflection is the reflection of light projected on a rough surface in all directions, that is, random reflection, multiple different light paths can be generated. In order to better determine the light path of diffuse reflection, a random algorithm can be used to determine it.

[0104] Specifically, when the light type is diffuse reflection, determining the corresponding light path includes: determining the diffuse reflection direction range of the diffuse reflection light on the object according to the emission direction and material information; selecting the diffuse reflection direction within the diffuse reflection direction range according to a preset random algorithm; and determining the light path according to the diffuse reflection direction. The number of diffuse reflection directions is less than the corresponding threshold in the rendering time condition.

[0105] Among them, random algorithms refer to algorithms that use probability and statistical methods to make random choices for the next calculation step during their execution. Random algorithms have certain advantages and randomness. For example, the Sobol sequence random algorithm.

[0106] For example, according to the previous description, the emitted light first hits the object, the table. Due to the material information of the table, when the table is a purely diffuse reflective object, the emitted light will be randomly reflected on the surface of the table, and the reflection direction range is the normal hemisphere of the hit point. The cloud server can use the sobol sequence random algorithm to let the emitted light randomly reflect in a certain direction of the normal hemisphere, generate multiple corresponding light paths, and iteratively calculate the lighting results until the maximum recursive layer is reached, and the final lighting results are returned. Among them, the maximum recursive layer refers to the number of recursions, which is similar to the number of other objects passed through as mentioned above. Therefore, the maximum recursive layer can also be limited, such as less than a certain threshold, to meet the needs of rendering time.

[0107] In addition, since diffuse reflection is performed within the range of reflection directions, the reflection within this range can also be limited, such as limiting the number of reflections. A random algorithm can be used to evenly diffuse reflection within this range under the condition of limiting the number, so as to reduce rendering time while maintaining rendering effects.

[0108] in, Figure 6 A schematic diagram of multiple light paths is shown. Figure 6 In the example, the emitted light 501 may hit the table 303 and generate diffuse reflection. Figure 6 The two diffuse reflection rays are used as an example: it should be understood that in practice, there may be multiple diffuse reflection rays within the preset direction range. Figure 6 In the figure, light 501 is diffusely reflected by table 303, generating light path 502 and light path 601, and light path 601 is then passed through the wall to generate light path 602. Thus, the indirect lighting result can be determined based on the light paths generated by these two diffuse reflections.

[0109] It should be noted that, in order to generate a high-quality spatial scene graph, the time required is generally between several minutes and tens of hours, which wastes high resource costs and time costs, and reduces the user experience. However, since the embodiment of the present application determines the light path according to the rendering time condition, it can flexibly grasp the light path, such as the number and length of the light path, while flexibly grasping the rendering time. Especially when the rendering time requirement is high, if the rendering time is required to be shorter, the light path can be determined accordingly, such as reducing the number and length of the light path. Thereby, the time required for the determination process of the indirect lighting result is reduced, thereby reducing the rendering time, speeding up the display of the image of the spatial scene, improving the rendering efficiency and improving the user experience.

[0110] For smart terminals, the execution steps are similar to those of cloud servers, so they will not be repeated here.

[0111] 203: Determine the indirect lighting result of the emitted light relative to the object according to the light path and the material information of the object corresponding to the light path in the space scene.

[0112] Among them, indirect lighting refers to the lighting effect produced by the light generated by the light source after being reflected or refracted on other objects, illuminating the object. The corresponding light brightness is the lighting result.

[0113] After determining the light path, the indirect lighting effect can be determined based on the material information of the objects that the light path passes through and the lighting model. Figure 6 As shown, the light paths 502 - 504 pass through the object table 303 , the wall and the lamp 301 .

[0114] In addition, the illumination model may include a Phong illumination model, a Lambert model, etc., which are used to calculate the illumination result.

[0115] Specifically, based on the light path and the material information of the object corresponding to the light path in the spatial scene, the indirect lighting result of the emitted light relative to the object is determined, including: for other objects passed by each light path, according to the recursive method of the light path, determining the indirect lighting result corresponding to each other object and the indirect lighting result of the object.

[0116] For example, according to the above, if Figure 6 As shown, the light path 502-504 is used as an example for explanation: it should be understood that here, only for the sake of clarity, a complete light path is used for explanation. In the embodiment of the present application, in order to meet the requirements of rendering time, a maximum recursive layer will be set, or the length of the light path will be limited, so the light path may not be a complete light path. The recursive method of the incomplete light path is the same as the recursive method of the complete light path, and it will not be repeated. Among them, for the light paths 502-504, according to the recursive method, the indirect lighting result of the light path 504 from the light source 505 to the lamp 301 is first determined based on the material information of the lamp 301 and the lighting model, and used as the indirect lighting result of the hitting point of the lamp 301. By analogy, the indirect lighting result corresponding to the light path 503 is determined based on the indirect lighting result of the hitting point of the lamp 301, and used as the indirect lighting result of the hitting point of the wall. Finally, the indirect lighting result of the hitting point of the table 301 is determined.

[0117] It should be noted that when determining the indirect lighting result for light paths 502-504, it can be assumed that no other light paths are generated. In actual situations, other light paths may be generated, so the indirect lighting result for the hitting point of an object may be determined by the indirect lighting results corresponding to multiple light paths. For example, for table 303, its indirect lighting result is determined by the sum of the indirect lighting results corresponding to light paths 502-504 and light paths 601-602. The indirect lighting results for other objects are calculated in the same way.

[0118] After calculating the indirect illumination results corresponding to each light path corresponding to the table 301, they are added to obtain the final result. In addition, in order to improve the accuracy of the indirect illumination results, 5 to 10 sampling points may be required for each pixel to sample the indirect illumination results and add them up, such as determining multiple times that different light paths will be generated after hitting the first object, and determining the sum of the corresponding indirect illumination results.

[0119] After determining the indirect illumination result, the direct illumination result can be determined, thereby determining the global illumination result.

[0120] 204: Render the spatial scene based on the indirect lighting result corresponding to the spatial scene, and display the rendering result.

[0121] Specifically, the method 200 also includes: determining, based on the material information of the object, a direct illumination result generated by emitting light directly from the object back to a light source in the spatial scene; obtaining a global illumination result based on the direct illumination result and the indirect illumination result, so as to render and display the spatial scene based on the global illumination result corresponding to the spatial scene.

[0122] Among them, direct illumination refers to the illumination effect produced by the light generated by the light source directly illuminating the object, and its light brightness is the direct illumination result. The sum of the direct illumination result and the indirect illumination result is the global illumination result.

[0123] Among them, the direct lighting result can be determined according to the rasterization method. After the direct lighting result is determined, it is added to the indirect lighting result to obtain the global lighting result and determine the corresponding color for rendering and display.

[0124] In the rasterization method, the space scene and the objects therein can be pixelated, and the direct lighting result can be determined by the material information of the object. Since the rasterization method can speed up the determination time of the direct lighting result, the overall rendering time can be accelerated.

[0125] It should be noted that the method for determining the global illumination result can also be determined based on the global illumination method of voxels. Among them, the global illumination method of voxels is to divide the spatial scene into 3D voxels when the spatial scene is initialized, and then treat each voxel as an object to receive illumination, calculate the illumination result, and store the illumination result in 3D data, such as 3D textures. Later, in the process of rendering the spatial scene, the calculated voxel illumination result is used as the light source to calculate the illumination of the object. However, the illumination result after voxelization of the spatial scene is not accurate enough, and its accuracy is very limited. And because voxels reflect light, light leakage problems will occur at objects such as walls. At the same time, due to the large number of voxels, the illumination result after multiple reflections is very large in calculation, and the effect is not ideal, which will consume time and resources.

[0126] In addition, as we know from the previous article, since the indirect lighting result is determined by a random algorithm, the indirect lighting result determined by the random algorithm will bring noise. Therefore, it is usually adopted to emit many rays to a pixel in the offline rendering method, and obtain accurate lighting results by superimposing sampling. However, the result of doing so is that the rendering time becomes very long. Therefore, in order to reduce noise and improve the rendering effect, the indirect lighting result can be denoised. The purpose of denoising is to obtain an indirect lighting result with less noise or no noise, while retaining the lighting details of the object as much as possible.

[0127] Specifically, the method 200 further includes: performing noise reduction on the indirect illumination result according to a preset noise reduction algorithm to determine the global illumination result.

[0128] Among them, the preset noise reduction algorithm refers to an algorithm for removing noise from the indirect lighting results. The algorithm will consider the position of the object, the normal of the object, and the indirect lighting results, etc., and retain the lighting details of the object to the greatest extent. The preset algorithm can be to use the average indirect lighting result of the pixels in the preset range as the indirect lighting result of the pixels in the range to perform noise reduction. However, the selection of the preset range needs to consider factors such as the position, normal and indirect lighting results of the object. For example, for the same table, the indirect lighting results of the table top and the table legs are quite different due to different positions, so they cannot be used as the same range. The indirect lighting results of the different corners of the tabletop are also quite different due to position problems, and cannot be used as the same range. Therefore, the pixels in the same preset range must belong to the same object and belong to the pixels within the same position threshold range, and the difference in their indirect lighting results is within a certain threshold range, so the average indirect lighting result in the preset range can be determined for noise reduction. For example, corresponding pixels smaller than the average indirect illumination result are regarded as noise points, and their indirect illumination results are modified to be the average indirect illumination result, thereby performing noise reduction.

[0129] For example, as mentioned above, the cloud server inputs the indirect illumination result into the preset algorithm to determine the indirect illumination result after noise reduction, so that the global illumination result can be determined more accurately.

[0130] In addition, in order to better perform noise reduction, layered noise reduction can be performed on the indirect lighting results of the object.

[0131] Specifically, the method 200 also includes: determining different types of light corresponding to different light paths generated on the object based on the material information of the object; determining different indirect lighting results corresponding to different types of light of the object based on a recursive method of the light paths; denoising different indirect lighting results respectively according to a preset denoising algorithm to obtain different indirect lighting results after denoising; obtaining a denoised indirect lighting result based on the different indirect lighting results after denoising to determine a global lighting result.

[0132] For example, as can be seen from the foregoing, the cloud server can store the diffuse reflection indirect lighting results, the refraction indirect lighting results, and the specular reflection indirect lighting results of the object, such as a table, respectively. Then, these indirect lighting results are denoised by a preset denoising algorithm to obtain the denoised indirect lighting results.

[0133] in, Figure 7 A spatial scene graph with noise. In order to account for the noise, the Figure 7 It is already an image after imaging, that is, a two-dimensional image. Figure 7 Many noise points can be seen in Figure 7 The black dots in the.

[0134] in, Figure 8 The spatial scene diagram after noise reduction is shown in Figure 1. Figure 8 is the image after imaging, that is, a two-dimensional image. Figure 8 You can see that the noise has been removed.

[0135] After denoising, in order to improve the rendering effect, you can continue to correct the indirect lighting results.

[0136] Specifically, the method 200 further includes: obtaining a corrected indirect illumination result based on the denoised indirect illumination result and the material information of the object; and determining a global illumination result based on the corrected indirect illumination result.

[0137] Since the material information is accurate and does not contain noise, multiplying the indirect lighting result by the material information can retain some of the object's details. The indirect lighting result here can be the sum of all indirect lighting results or the layered indirect lighting result. For the layered indirect lighting result, it is necessary to perform lighting synthesis on the total indirect lighting result. Then the global lighting result is finally determined.

[0138] In order to make the rendering effect more realistic, the shadow results of indirect lighting can also be used to increase the lighting details of the object.

[0139] Specifically, the method 200 also includes: determining, for the object, a shadow result between objects in the spatial scene, wherein the shadow result is generated based on indirect illumination of the objects in the spatial scene; and determining a global illumination result based on the shadow result, the indirect illumination result and the direct illumination result.

[0140] For example, according to the above description, the cloud server determines the shadow result according to the ambient light occlusion algorithm. This algorithm belongs to the prior art and will not be described here. After the shadow result is determined, the shadow result, all indirect lighting results and direct lighting results are synthesized to obtain the global lighting result.

[0141] It should be noted that for smart terminals, the execution steps are similar to those of cloud servers, and will not be repeated here.

[0142] In addition, when the user directly views the preset spatial scene when initializing the spatial scene on the cloud server or smart terminal, the corresponding spatial scene can be directly obtained from the preset storage spatial scene and rendered according to the corresponding preset global illumination result.

[0143] It should be noted that, after the cloud server determines the final rendering result, it returns the rendering result to the user's smart terminal for display. If the smart terminal directly obtains the rendering result, it can be displayed directly.

[0144] Specifically, the method 200 also includes: obtaining corresponding global illumination results based on different preset spatial scenes; based on the user's selection operation, selecting a corresponding preset spatial scene from different preset spatial scenes, and determining the corresponding global illumination result based on the selected spatial scene; based on the global illumination result, rendering and displaying the selected spatial scene.

[0145] For example, as described above, the cloud server receives a request sent by the user's mobile phone. The request is based on the selection interface provided by the user on the mobile phone. The interface displays multiple preset spatial scenes. The user selects one of the preset spatial scenes. The mobile phone responds to the instruction and sends a selection request. After receiving the request, the cloud server can determine the corresponding spatial scene according to the scene ID carried in the request, and then obtain the corresponding global illumination result, render it, and return the rendering result to the user's mobile phone for display.

[0146] It should be noted that the preset global illumination result can be determined by the above method or by the baked global illumination method. After the illumination result is determined by the baked global illumination method, the illumination result of the entire spatial scene is pre-calculated and stored in the texture. When rendering the spatial scene, the illumination result is obtained directly from the texture. However, the baked global illumination method only supports static spatial scenes and is not suitable for dynamic spatial scenes. Secondly, the illumination results saved in the texture are missing and the accuracy is insufficient. In addition, the texture usage is large, which has relatively high requirements for storage space and will also increase the scene loading time.

[0147] For smart terminals, the execution method is similar to that of cloud servers, so it will not be repeated here. It is only explained that smart terminals can directly respond to user instructions for rendering and display.

[0148] In order to improve the user experience, the embodiments of the present application may also support the user to dynamically modify the spatial scene, thereby dynamically rendering the modified spatial scene.

[0149] Specifically, the method 200 also includes: after displaying the rendering result, based on the user's modification operation, modifying the objects in the spatial scene and obtaining a new spatial scene; for the new spatial scene, executing the step of determining the emission light of the spatial scene for rendering and display.

[0150] For example, according to the foregoing, after the user's mobile phone displays the indoor space scene, the user can modify the space scene. For example, while displaying the space scene, the mobile phone can also display objects that can be modified, such as different furniture. The furniture can be displayed by type, such as beds, televisions, tables, etc. Each type can have multiple choices. The user can choose a table-shaped table from the table type and replace the table in the current indoor space scene. At this time, the mobile phone responds to the modification operation and sends a modification request to the cloud server. The request can carry the ID of the space scene and the IDs of the replacement table and the replaced table, and modify the space scene to obtain the modified space scene. The modified space scene is used as the space scene to be rendered, and is rendered again according to the method described above, and the rendering result is returned to the user's mobile phone for display.

[0151] For smart terminals, the execution method is similar to that of cloud servers, so it will not be repeated here. It is only explained that smart terminals can directly respond to user instructions for rendering and display.

[0152] In order to better meet the needs of users, multiple rendering modes may be provided for users to choose from, and different rendering modes may have different rendering effects.

[0153] Specifically, the method 200 further includes: determining a corresponding rendering mode based on a user's rendering mode selection operation; and rendering the spatial scene according to the determined rendering mode.

[0154] The rendering method may include an offline rendering method, a rendering method provided by the method 200 , indirect illumination rendering, global illumination rendering without shadow effects, and the like.

[0155] For example, as described above, after the user selects a spatial scene, or before rendering the spatial scene, a prompt message can be sent to the user's mobile phone to prompt the user to select a rendering method. After the user selects the rendering method, the rendering is performed based on the rendering method, and the rendering result is displayed.

[0156] In addition, the user may be provided with a function of turning on or off the rendering mode, so that the user may flexibly control the rendering mode.

[0157] Specifically, the method further includes: based on the user's opening or closing operation on the current rendering mode, opening or closing the corresponding rendering mode; after closing the current rendering mode, selecting a rendering mode from other rendering modes to render the spatial scene.

[0158] Since the implementation method of providing the mode of turning on and off rendering is similar to that described above, it will not be described in detail here.

[0159] Based on the above similar inventive concept, Fig. 9 A schematic flow chart of a scene rendering method provided by another exemplary embodiment of the present application is shown. The method 900 provided by the embodiment of the present application can be executed by the above-mentioned server, such as Fig. 9 As shown, the method 900 includes the following steps:

[0160] 901: Based on the viewing operation, determine a corresponding indoor space scene to be rendered.

[0161] 902: For the current indoor space scene to be rendered, determine the emission light of the indoor space scene.

[0162] 903: According to the object in the indoor space scene where the emitted light first intersects, determine a light path formed by the emitted light in the indoor space scene with the object as a starting point.

[0163] 904: Determine an indirect lighting result of the emitted light relative to the object according to the light path and material information of an object corresponding to the light path in the indoor space scene.

[0164] 905: Render the indoor space scene based on the indirect lighting result corresponding to the indoor space scene, and display the rendering result.

[0165] Among them, the ray path meets the conditions of rendering time.

[0166] Since the specific implementation of steps 901-905 has been described in detail above, they will not be repeated here. It is only explained that the execution subject of method 900 can also be a smart terminal, such as a mobile phone, a desktop computer, a tablet computer, etc.

[0167] In addition, the 900 method also includes: generating a new indoor space scene based on the modification operation of the objects in the indoor space scene; and executing the step of determining the emission light of the indoor space scene for the new indoor space scene to render and display the new indoor space scene.

[0168] Since this has been explained in the previous article, I will not repeat it here.

[0169] In addition, the 900 method also includes: determining a corresponding preset indoor space scene based on a selection operation of a preset indoor space scene; determining a corresponding preset global illumination result according to the determined preset indoor space scene; and rendering and displaying the determined preset indoor space scene based on the preset global illumination result.

[0170] Since it has been explained in detail in the previous article, it will not be repeated here.

[0171] In addition, for the contents not described in detail in the method 900, reference may also be made to the various steps in the above method 200.

[0172] Based on the above similar inventive concept, Fig.10 A schematic flow chart of a scene rendering method provided by another exemplary embodiment of the present application is shown. The method 1000 provided by the embodiment of the present application can be executed by the above server, such as Fig.10 As shown, the method 1000 comprises the following steps:

[0173] 1001: Based on the viewing operation, determine a corresponding shopping space scene to be rendered.

[0174] 1002: For the shopping space scene currently to be rendered, determine the emission light of the shopping space scene.

[0175] 1003: According to the object in the shopping space scene where the emitted light first intersects, determine a light path formed by the emitted light in the shopping space scene with the object as a starting point.

[0176] 1004: Determine the indirect lighting result of the emitted light relative to the object according to the light path and the material information of the object corresponding to the light path in the shopping space scene.

[0177] 1005: Render the shopping space scene based on the indirect lighting result corresponding to the shopping space scene, and display the rendering result.

[0178] Among them, the ray path meets the conditions of rendering time.

[0179] Since the specific implementation of steps 1001-1005 has been elaborated in detail above, they will not be repeated here. Just to explain: the viewing operation in step 1001 can be a user viewing a preset shopping space scene on the interface provided by the smart terminal, or it can be a shopping space scene just designed by the user. Among them, the shopping space scene can be a space scene of an online store, or a purchase space scene for indoor furniture display, etc. In response to the viewing operation, the smart terminal can send a request to the cloud server to render and display the space scene. In the case where the execution subject is a smart terminal, the smart terminal can directly perform the rendering.

[0180] At this point, the user can be a designer or a buyer, etc.

[0181] In addition, the method 1000 further includes: based on the movement operation in the shopping space scene, moving the position of the virtual camera in the shopping space scene; based on the moved virtual camera, determining the emission light of the shopping space scene to render and display the shopping space scene.

[0182] For example, as described above, users can view various products in the spatial scene of the store. Users can move in the scene by touching the screen of their mobile phone. In response to the movement operation, a movement request can be sent to the cloud server, and the position of the virtual camera in the scene can be moved. And the current scene is re-rendered based on the position of the virtual camera. The specific rendering process has been explained above and will not be repeated here. In addition, when the execution subject is a smart terminal, the smart terminal directly responds to the operation, moves the virtual camera, and renders.

[0183] In addition, the method 1000 further includes: determining a new shopping space scene based on the scene switching operation; and determining the emission light of the new shopping space scene for the new shopping space scene, so as to render and display the new shopping space scene.

[0184] Since it has been described in detail above, it will not be repeated here. It is only explained that the switching operation can be to switch the shopping space scene among multiple preset shopping space scenes, and then render and display the shopping space scene after switching.

[0185] In addition, for the contents not described in detail in the method 1000 , reference can also be made to the various steps in the above method 200 .

[0186] Fig.11 A schematic diagram of the structural framework of a rendering device for a scene provided by an exemplary embodiment of the present application. The device 1100 can be applied to a server. The device 1100 includes: a transmitting module 1101, a determining module 1102, and a rendering module 1103; the functions of each module are described in detail below:

[0187] The emission module 1101 is used to determine the emission light of the space scene for the current space scene to be rendered.

[0188] The determination module 1102 is used to determine, based on an object in the space scene intersected by the emitted light for the first time, a light path formed by the emitted light in the space scene with the object as the starting point.

[0189] The determination module 1102 is used to determine the indirect illumination result of the emitted light relative to the object according to the light path and the material information of the object corresponding to the light path in the space scene.

[0190] The rendering module 1103 is used to render the spatial scene based on the indirect lighting result corresponding to the spatial scene, and display the rendering result.

[0191] Among them, the ray path meets the conditions of rendering time.

[0192] In addition, the rendering module 1103 is used to determine the direct lighting result generated by the light source in the spatial scene when the emitted light directly returns from the object according to the material information of the object; and obtain the global lighting result according to the direct lighting result and the indirect lighting result, so as to render and display the spatial scene based on the global lighting result corresponding to the spatial scene.

[0193] Specifically, the emission module 1101 is used to determine the emission light of the space scene through a virtual camera.

[0194] In addition, the device 1100 includes: a setting module, which is used to set a two-dimensional image in front of the virtual camera; wherein, the transmitting module 1101 is used to emit virtual light to pixels in the two-dimensional image through the virtual camera, so that the emitted virtual light passes through the pixel into the spatial scene, thereby determining the global illumination result corresponding to the pixel.

[0195] Specifically, the determination module 1102 is used to determine the light path according to the material information of the object.

[0196] Specifically, the determination module 1102 includes: a first determination unit, used to determine different light types corresponding to different light paths generated on the object according to material information; and a second determination unit, used to determine corresponding light paths for different light types.

[0197] Specifically, the second determining unit is used to determine, for the light corresponding to the light type, a light path generated by the light passing through other objects in the space scene with the object as a starting point, as the corresponding light path.

[0198] Among them, the number of other objects is less than the corresponding threshold in the rendering time condition.

[0199] Specifically, when the type of light is diffuse reflection, the second determination unit is used to determine the diffuse reflection direction range of the diffuse reflection light generated on the object according to the emission direction and material information; select the diffuse reflection direction within the diffuse reflection direction range according to a preset random algorithm; and determine the light path according to the diffuse reflection direction.

[0200] Here, the number of diffuse reflection directions is less than the corresponding threshold in the render time condition.

[0201] Specifically, the determination module 1102 is used to determine, for each object passed by each light path, the indirect illumination result corresponding to each other object and the indirect illumination result of the object according to a recursive method of the light path.

[0202] In addition, the device 1100 further includes: a noise reduction module, which is used to perform noise reduction on the indirect illumination result according to a preset noise reduction algorithm to determine the global illumination result.

[0203] In addition, the determination module 1102 is used to determine the different types of light corresponding to different light paths generated on the object based on the material information of the object; determine the different indirect lighting results corresponding to the different types of light of the object according to the recursive method of the light path; the denoising module is used to perform denoising on different indirect lighting results according to a preset denoising algorithm to obtain different indirect lighting results after denoising; the determination module 1102 is used to obtain the denoised indirect lighting result based on the different indirect lighting results after denoising to determine the global lighting result.

[0204] In addition, the device 1100 also includes: a correction module, which is used to obtain a corrected indirect illumination result by combining the denoised indirect illumination result and the material information of the object; and determine the global illumination result according to the corrected indirect illumination result.

[0205] In addition, the determination module 1102 is used to determine the shadow result between objects in the spatial scene for the object, and the shadow result is generated based on the indirect lighting of the objects in the spatial scene; based on the shadow result, the indirect lighting result and the direct lighting result, determine the global lighting result.

[0206] In addition, the device 1100 also includes: an acquisition module, which is used to obtain corresponding global illumination results based on different preset spatial scenes; a selection module, which is used to select a corresponding preset spatial scene from different preset spatial scenes based on a user's selection operation, and determine the corresponding global illumination result based on the selected spatial scene; a rendering module 1103, which is also used to render and display the selected spatial scene based on the global illumination result.

[0207] In addition, the device 1100 also includes: a modification module, which is used to modify the objects in the spatial scene based on the user's modification operation after displaying the rendering result, and obtain a new spatial scene; for the new spatial scene, execute the step of determining the emission light of the spatial scene for rendering and display.

[0208] In addition, the determination module 1102 is further used to determine a corresponding rendering mode based on the user's selection operation of the rendering mode; the rendering module 1103 is further used to render the space scene according to the determined rendering mode.

[0209] In addition, the device 1100 also includes: a control module, which turns on or off the corresponding rendering mode based on the user's opening or closing operation of the current rendering mode; a rendering module 1103, which is also used to select a rendering mode from other rendering modes after closing the current rendering mode to render the spatial scene.

[0210] Fig.12 A schematic diagram of the structural framework of a rendering device for a scene provided by an exemplary embodiment of the present application. The device 1200 can be applied to a server. The device 1200 includes: a transmitting module 1201, a determining module 1202, and a rendering module 1203; the functions of each module are described in detail below:

[0211] The emission module 1201 is used to determine the emission light of the indoor space scene for the indoor space scene to be rendered.

[0212] The determination module 1202 is used to determine the corresponding indoor space scene to be rendered based on the viewing operation; and determine the light path formed by the emitted light in the indoor space scene with the object as the starting point according to the object where the emitted light first intersects in the indoor space scene.

[0213] The determination module 1202 is used to determine the indirect illumination result of the emitted light relative to the object according to the light path and the material information of the object corresponding to the light path in the indoor space scene.

[0214] The rendering module 1203 is used to render the indoor space scene based on the indirect lighting result corresponding to the indoor space scene, and display the rendering result.

[0215] Among them, the ray path meets the conditions of rendering time.

[0216] In addition, the device 1200 also includes: a generation module, which is used to generate a new indoor space scene based on the modification operation of the objects in the indoor space scene; for the new indoor space scene, execute the step of determining the emission light of the indoor space scene to render and display the new indoor space scene.

[0217] In addition, the determination module 1202 is also used to determine the corresponding preset indoor space scene based on the selection operation of the preset indoor space scene; determine the corresponding preset global illumination result according to the determined preset indoor space scene; the rendering module 1203 is also used to render and display the determined preset indoor space scene based on the preset global illumination result.

[0218] It should be noted that for some contents not mentioned in the device 1200 , reference may be made to the contents of the above-mentioned device 1100 .

[0219] Fig.13 A schematic diagram of the structural framework of a rendering device for a scene provided by an exemplary embodiment of the present application. The device 1300 can be applied to a server. The device 1300 includes: a determination module 1301, a transmission module 1302, and a rendering module 1303; the functions of each module are described in detail below:

[0220] The determination module 1301 is used to determine the corresponding shopping space scene to be rendered based on the viewing operation.

[0221] The emission module 1302 is used to determine the emission light of the shopping space scene for the current shopping space scene to be rendered.

[0222] The determination module 1301 is used to determine, based on an object in the shopping space scene where the emitted light first intersects the object, a light path formed by the emitted light in the shopping space scene with the object as a starting point.

[0223] The determination module 1301 is used to determine the indirect illumination result of the emitted light relative to the object according to the light path and the material information of the object corresponding to the light path in the shopping space scene.

[0224] The rendering module 1303 is used to render the shopping space scene based on the indirect lighting result corresponding to the shopping space scene, and display the rendering result.

[0225] Among them, the ray path meets the conditions of rendering time.

[0226] In addition, the device 1300 also includes: a moving module, which is used to move the position of the virtual camera in the shopping space scene based on the moving operation in the shopping space scene; and a transmitting module 1302, which is also used to determine the emission light of the shopping space scene based on the moved virtual camera to render and display the shopping space scene.

[0227] In addition, the determination module 1301 is used to determine a new shopping space scene based on the scene switching operation; the emission module 1302 is used to determine the emission light of the new shopping space scene for the new shopping space scene, so as to render and display the new shopping space scene.

[0228] It should be noted that for some contents not mentioned in the device 1300 , reference may be made to the contents of the above-mentioned device 1100 .

[0229] The above describes Fig.11 The internal functions and structure of the device 1100 shown, in one possible design, Fig.11 The structure of the device 1100 shown may be implemented as a computing device, such as a server. Fig.14 As shown, the device 1400 may include: a memory 1401 and a processor 1402;

[0230] The memory 1401 is used to store computer programs.

[0231] Processor 1402 is used to execute a computer program to: determine the emitted light of the spatial scene to be rendered; determine the light path formed by the emitted light in the spatial scene with the object as the starting point based on the object where the emitted light first intersects in the spatial scene; determine the indirect lighting result of the emitted light relative to the object based on the light path and material information of the object corresponding to the light path in the spatial scene; render the spatial scene based on the indirect lighting result corresponding to the spatial scene, and display the rendering result.

[0232] Among them, the ray path meets the conditions of rendering time.

[0233] In addition, processor 1402 is specifically used to: determine, based on the material information of the object, the direct lighting result generated by the light source in the spatial scene when the emitted light directly returns from the object; obtain the global lighting result based on the direct lighting result and the indirect lighting result, so as to render and display the spatial scene based on the global lighting result corresponding to the spatial scene.

[0234] Specifically, the processor 1402 is specifically used to determine the emission light of the space scene through the virtual camera.

[0235] In addition, processor 1402 is also used to: set a two-dimensional image in front of the virtual camera; wherein processor 1402 is specifically used to: emit virtual light to pixels in the two-dimensional image through the virtual camera, so that the emitted virtual light passes through the pixel into the spatial scene, thereby determining the global illumination result corresponding to the pixel.

[0236] Specifically, the processor 1402 is specifically used to determine the light path according to the material information of the object.

[0237] Specifically, the processor 1402 is specifically used to: determine different light types corresponding to different light paths generated on the object according to the material information; and determine corresponding light paths for different light types.

[0238] In addition, the processor 1402 is specifically configured to: for the light corresponding to the light type, determine a light path generated by the light passing through other objects in the space scene with the object as the starting point, as the corresponding light path.

[0239] Among them, the number of other objects is less than the corresponding threshold in the rendering time condition.

[0240] In addition, when the type of light is diffuse reflection, the processor 1402 is specifically used to: determine the diffuse reflection direction range of the diffuse reflection light on the object according to the emission direction and material information; select the diffuse reflection direction within the diffuse reflection direction range according to a preset random algorithm; and determine the light path according to the diffuse reflection direction.

[0241] Here, the number of diffuse reflection directions is less than the corresponding threshold in the render time condition.

[0242] Specifically, the processor 1402 is specifically configured to: for other objects passed by each light path, determine the indirect lighting result corresponding to each other object and the indirect lighting result of the object according to a recursive method of the light path.

[0243] In addition, the processor 1402 is further configured to: perform noise reduction on the indirect illumination result according to a preset noise reduction algorithm to determine the global illumination result.

[0244] In addition, processor 1402 is also used to: determine different types of light corresponding to different light paths generated on the object based on the material information of the object; determine different indirect lighting results corresponding to different types of light of the object based on a recursive method of the light path; perform denoising on different indirect lighting results according to a preset denoising algorithm to obtain different indirect lighting results after denoising; obtain the denoised indirect lighting result based on the different indirect lighting results after denoising to determine the global lighting result.

[0245] In addition, the processor 1402 is further used to: obtain a corrected indirect illumination result based on the denoised indirect illumination result and the material information of the object; and determine a global illumination result based on the corrected indirect illumination result.

[0246] In addition, processor 1402 is also used to: determine the shadow result between objects in the spatial scene for the object, the shadow result is generated based on the indirect lighting of the objects in the spatial scene; determine the global lighting result based on the shadow result, the indirect lighting result and the direct lighting result.

[0247] In addition, processor 1402 is also used to: obtain corresponding global illumination results based on different preset spatial scenes; select a corresponding preset spatial scene from different preset spatial scenes based on a user's selection operation, and determine the corresponding global illumination result based on the selected spatial scene; and render and display the selected spatial scene based on the global illumination result.

[0248] In addition, the processor 1402 is also used to: after displaying the rendering results, based on the user's modification operation, modify the objects in the spatial scene and obtain a new spatial scene; for the new spatial scene, execute the step of determining the emission light of the spatial scene for rendering and display.

[0249] In addition, the processor 1402 is further configured to: determine a corresponding rendering mode based on a user's selection operation of the rendering mode; and render the spatial scene according to the determined rendering mode.

[0250] In addition, the processor 1402 is further used to: turn on or off the corresponding rendering mode based on the user's turn on or turn off operation of the current rendering mode; after turning off the current rendering mode, select a rendering mode from other rendering modes to render the spatial scene.

[0251] In addition, an embodiment of the present invention provides a computer storage medium, when the computer program is executed by one or more processors, causing the one or more processors to implement Figure 2 The present invention provides steps of a method for rendering a scene in a method embodiment.

[0252] The above describes Fig.12 The internal functions and structure of the device 1200 shown, in one possible design, Fig.12 The structure of the device 1200 shown may be implemented as a computing device, such as a server. Fig.15 As shown, the device 1500 may include: a memory 1501 and a processor 1502;

[0253] The memory 1501 is used to store computer programs.

[0254] Processor 1502 is used to execute a computer program to: determine a corresponding indoor space scene to be rendered based on a viewing operation; determine the emitted light of the indoor space scene for the current indoor space scene to be rendered; determine a light path formed by the emitted light in the indoor space scene with the object as the starting point according to an object in the indoor space scene where the emitted light first intersects; determine an indirect lighting result of the emitted light relative to the object according to the light path and material information of an object corresponding to the light path in the indoor space scene; render the indoor space scene based on the indirect lighting result corresponding to the indoor space scene, and display the rendering result.

[0255] Among them, the ray path meets the conditions of rendering time.

[0256] In addition, the processor 1502 is further configured to: generate a new indoor space scene based on the modification operation on the objects in the indoor space scene; and execute the step of determining the emission light of the indoor space scene for the new indoor space scene to render and display the new indoor space scene.

[0257] In addition, the processor 1502 is also used to: determine the corresponding preset indoor space scene based on the selection operation of the preset indoor space scene; determine the corresponding preset global illumination result according to the determined preset indoor space scene; and render and display the determined preset indoor space scene based on the preset global illumination result.

[0258] It should be noted that for some contents not mentioned in device 1500 , reference may be made to the contents of the above-mentioned device 1400 .

[0259] In addition, an embodiment of the present invention provides a computer storage medium, when the computer program is executed by one or more processors, causing the one or more processors to implement Fig. 9 A step of rendering a scene in a method embodiment.

[0260] The above describes Fig.13 The internal functions and structure of the device 1300 shown, in one possible design, Fig.13 The structure of the device 1300 shown may be implemented as a computing device, such as a server. Fig.16 As shown, the device 1600 may include: a memory 1601 and a processor 1602;

[0261] The memory 1601 is used to store computer programs.

[0262] Processor 1602 is used to execute a computer program to: determine the corresponding shopping space scene to be rendered based on the viewing operation; determine the emitted light of the shopping space scene for the current shopping space scene to be rendered; determine the light path formed by the emitted light in the shopping space scene with the object as the starting point according to the object where the emitted light first intersects in the shopping space scene; determine the indirect lighting result of the emitted light relative to the object according to the light path and material information of the object corresponding to the light path in the shopping space scene; render the shopping space scene based on the indirect lighting result corresponding to the shopping space scene, and display the rendering result.

[0263] Among them, the ray path meets the conditions of rendering time.

[0264] In addition, the processor 1602 is further used to: move the position of the virtual camera in the shopping space scene based on the moving operation in the shopping space scene; determine the emission light of the shopping space scene based on the moved virtual camera to render and display the shopping space scene.

[0265] In addition, the processor 1602 is further configured to: determine a new shopping space scene based on the scene switching operation; and determine the emission light of the new shopping space scene for the new shopping space scene, so as to render and display the new shopping space scene.

[0266] It should be noted that for some contents not mentioned in device 1600 , reference may be made to the contents of the above-mentioned device 1400 .

[0267] In addition, an embodiment of the present invention provides a computer storage medium, when the computer program is executed by one or more processors, causing the one or more processors to implement Fig.10 The present invention provides steps of a method for rendering a scene in a method embodiment.

[0268] Based on the above similar inventive concept, another exemplary embodiment of the present application provides a flow chart of a scene rendering method. The method 1700 provided in the embodiment of the present application can be executed by the above server, and the method 1700 includes the following steps:

[0269] 1701: Based on the viewing operation, determine the corresponding game scene to be rendered.

[0270] 1702: For the current game scene to be rendered, determine the emission light of the game scene.

[0271] 1703: According to the object in the game scene where the emitted light first intersects, determine the light path formed by the emitted light in the game scene with the object as the starting point.

[0272] 1704: Determine the indirect lighting result of the emitted light relative to the object according to the light path and the material information of the object corresponding to the light path in the game scene.

[0273] 1705: Render the game scene based on the indirect lighting result corresponding to the game scene, and display the rendering result.

[0274] Among them, the ray path meets the conditions of rendering time.

[0275] Since the specific implementation of steps 1701-1705 has been described in detail above, they will not be repeated here. It is only explained that when the execution subject is a smart terminal, the smart terminal can directly perform rendering.

[0276] In addition, the method 1700 also includes: determining the direct lighting result generated by emitting light directly from the object and returning to the light source in the spatial scene based on the material information of the object; obtaining the global lighting result based on the direct lighting result and the indirect lighting result, so as to render and display the spatial scene based on the global lighting result corresponding to the spatial scene.

[0277] Since this has been explained in the previous article, I will not repeat it here.

[0278] In addition, the contents not described in detail in the present method 1700 may also refer to the various steps in the above-mentioned method 200.

[0279] A schematic diagram of the structural framework of a scene rendering device provided by an exemplary embodiment of the present application. The device 1800 can be applied to a server. The device 1800 includes: a determination module 1801, a transmission module 1802 and a rendering module 1803; the functions of each module are described in detail below:

[0280] The determination module 1801 is used to determine the corresponding game scene to be rendered based on the viewing operation.

[0281] The emission module 1802 is used to determine the emission light of the game scene for the current game scene to be rendered.

[0282] The determination module 1801 is used to determine the light path formed by the emitted light in the game scene with the object as the starting point according to the object that the emitted light first intersects with in the game scene.

[0283] The determination module 1801 is used to determine the indirect lighting result of the emitted light relative to the object according to the light path and the material information of the object corresponding to the light path in the game scene.

[0284] The rendering module 1803 is used to render the game scene based on the indirect lighting result corresponding to the game scene and display the rendering result.

[0285] Among them, the ray path meets the conditions of rendering time.

[0286] In addition, the determination module 1801 is also used to determine the direct lighting result generated by the light source in the spatial scene when the emitted light directly returns from the object according to the material information of the object; the rendering module 1803 is also used to obtain the global lighting result according to the direct lighting result and the indirect lighting result, so as to render and display the spatial scene based on the global lighting result corresponding to the spatial scene.

[0287] It should be noted that for some contents not mentioned in the device 1800 , reference may be made to the contents of the above-mentioned device 1100 .

[0288] The internal functions and structure of the device 1800 are described above. In a possible design, the structure of the device 1800 can be implemented as a computing device, such as a server. The device 1900 may include: a memory 1901 and a processor 1902;

[0289] The memory 1901 is used to store computer programs.

[0290] Processor 1902 is used to execute a computer program to: determine the corresponding game scene to be rendered based on the viewing operation; determine the emitted light of the game scene for the current game scene to be rendered; determine the light path formed by the emitted light in the game scene with the object as the starting point based on the object where the emitted light first intersects in the game scene; determine the indirect lighting result of the emitted light relative to the object based on the light path and material information of the object corresponding to the light path in the game scene; render the game scene based on the indirect lighting result corresponding to the game scene, and display the rendering result.

[0291] Among them, the ray path meets the conditions of rendering time.

[0292] In addition, processor 1902 is also used to determine the direct lighting result generated by the light source in the spatial scene when the emitted light directly returns from the object based on the material information of the object; obtain the global lighting result based on the direct lighting result and the indirect lighting result, so as to render and display the spatial scene based on the global lighting result corresponding to the spatial scene.

[0293] It should be noted that for some contents not mentioned in device 1900 , reference may be made to the contents of the above-mentioned device 1400 .

[0294] In addition, an embodiment of the present invention provides a computer storage medium. When a computer program is executed by one or more processors, the one or more processors are caused to implement the steps of a scene rendering method in the embodiment of method 1700.

[0295] Based on the above similar inventive concept, another exemplary embodiment of the present application provides a flowchart of a method for rendering an object. The method 2000 provided in the embodiment of the present application can be executed by the above server, and the method 2000 includes the following steps:

[0296] 2001: For the current spatial scene to be rendered, determine the emission light of the spatial scene.

[0297] 2002: According to the object where the emitted light first intersects in the space scene, determine the light path formed by the emitted light in the space scene with the object as the starting point.

[0298] 2003: According to the light path and the material information of the object corresponding to the light path in the space scene, the indirect lighting result of the emitted light relative to the object is determined.

[0299] 2004: Render the object based on the indirect lighting result corresponding to the object and display the rendering result.

[0300] Among them, the ray path meets the conditions of rendering time.

[0301] Since the specific implementation of steps 2001-2004 has been described in detail above, they will not be repeated here. It is only explained that when the execution subject is a smart terminal, the smart terminal can directly perform rendering. Moreover, it should be understood that when there is only one object in the spatial scene within the viewing angle, only the object can be rendered and displayed.

[0302] In addition, the method 2000 also includes: determining the direct lighting result generated by emitting light directly from the object to the light source in the spatial scene based on the material information of the object; obtaining the global lighting result based on the direct lighting result and the indirect lighting result, so as to render and display the object based on the global lighting result corresponding to the object.

[0303] Since it has been explained in detail in the previous article, it will not be repeated here.

[0304] In addition, for the contents not described in detail in the present method 2000, reference may also be made to the various steps in the above-mentioned method 200.

[0305] A schematic diagram of the structural framework of an object rendering device provided by an exemplary embodiment of the present application. The device 2100 can be applied to a server. The device 2100 includes: a determination module 2101, a transmission module 2102 and a rendering module 2103; the functions of each module are described in detail below:

[0306] The determination module 2101 is used to determine the emission light of the space scene for the current space scene to be rendered.

[0307] The transmitting module 2102 is used to determine a light path formed by the emitted light in the space scene with the object as the starting point according to the object that the emitted light first intersects with in the space scene.

[0308] The determination module 2101 is used to determine the indirect illumination result of the emitted light relative to the object according to the light path and the material information of the object corresponding to the light path in the space scene.

[0309] The rendering module 2103 is used to render the object based on the indirect lighting result corresponding to the object and display the rendering result.

[0310] Among them, the ray path meets the conditions of rendering time.

[0311] In addition, the determination module 2101 is also used to determine the direct lighting result generated by the light source in the spatial scene when the emitted light directly returns from the object according to the material information of the object; the rendering module 2103 is also used to obtain the global lighting result according to the direct lighting result and the indirect lighting result, so as to render and display the object based on the global lighting result corresponding to the object.

[0312] It should be noted that for some contents not mentioned in the device 2100 , reference may be made to the contents of the above-mentioned device 1100 .

[0313] The internal functions and structure of the device 2100 are described above. In a possible design, the structure of the device 2100 can be implemented as a computing device, such as a server. The device 2200 may include: a memory 2201 and a processor 2202;

[0314] The memory 2201 is used to store computer programs.

[0315] Processor 2202 is used to execute a computer program to: determine the emitted light of the spatial scene to be rendered; determine the light path formed by the emitted light in the spatial scene with the object as the starting point based on the object where the emitted light first intersects in the spatial scene; determine the indirect lighting result of the emitted light relative to the object based on the light path and material information of the object corresponding to the light path in the spatial scene; render the object based on the indirect lighting result corresponding to the object, and display the rendering result.

[0316] Among them, the ray path meets the conditions of rendering time.

[0317] In addition, processor 2202 is also used to: determine the direct lighting result generated by emitting light directly from the object and returning to the light source in the spatial scene based on the material information of the object; obtain the global lighting result based on the direct lighting result and the indirect lighting result, so as to render and display the object based on the global lighting result corresponding to the object.

[0318] It should be noted that for some contents not mentioned in device 2200, reference may be made to the contents of the above-mentioned device 1400.

[0319] In addition, an embodiment of the present invention provides a computer storage medium. When a computer program is executed by one or more processors, the one or more processors are caused to implement the steps of a method for rendering an object in the embodiment of method 2000.

[0320] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel, and the sequence numbers of the operations, such as 201, 202, 203, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

[0321] The device embodiments described above are merely illustrative, 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 on 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. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0322] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course can also be implemented by combining hardware and software. Based on such an understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a computer product, and the present invention can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0323] The present invention is described with reference to the flowchart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable multimedia data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable multimedia data processing device produce a device for implementing the functions specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.

[0324] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable multimedia data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0325] These computer program instructions may also be loaded onto a computer or other programmable multimedia data processing device so that a series of operational steps are executed on the computer or other programmable device to produce computer-implemented processing, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0326] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0327] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0328] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0329] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A scene rendering method, characterized in that: include: For a current spatial scene to be rendered, determining an emission light of the spatial scene; Determine, based on the object that the emitted light first intersects in the spatial scene, a light path formed by the emitted light in the spatial scene with the object as the starting point, wherein determining the light path formed by the emitted light in the spatial scene with the object as the starting point includes: determining, based on the material information of the object, different light types corresponding to different light paths generated on the object; determining corresponding light paths for different light types; wherein determining corresponding light paths for different light types includes: for the light corresponding to the light type, determining, with the object as the starting point, a light path generated by the light passing through other objects in the spatial scene as the corresponding light path; Determining an indirect illumination result of the emitted light relative to the object according to the light path and material information of an object in the spatial scene corresponding to the light path; The spatial scene is rendered based on the indirect lighting result corresponding to the spatial scene, and the rendering result is displayed.

2. The method according to claim 1, characterized in that The method further comprises: Determine, according to the material information of the object, a direct illumination result generated by the emitted light directly returning from the object to a light source in the space scene; A global illumination result is obtained according to the direct illumination result and the indirect illumination result, so as to render and display the spatial scene based on the global illumination result corresponding to the spatial scene.

3. The method according to claim 1, characterized in that: The step of determining the emission light of the spatial scene to be rendered currently includes: The emitted light of the space scene is determined by the virtual camera.

4. The method according to claim 3, characterized in that: The method further comprises: A two-dimensional image is arranged in front of the virtual camera; Wherein, determining the emission light of the space scene includes: A virtual light is emitted to a pixel in the two-dimensional image through a virtual camera, so that the emitted virtual light passes through the pixel and enters the spatial scene, thereby determining a global illumination result corresponding to the pixel.

5. The method according to claim 1, characterized in that When the light type is diffuse reflection, determining the corresponding light path includes: Determine the diffuse reflection direction range of the diffuse reflection light generated on the object according to the emission direction and the material information; Selecting a diffuse reflection direction within the diffuse reflection direction range according to a preset random algorithm; The light path is determined according to the diffuse reflection direction.

6. The method according to claim 1, characterized in that The determining, according to the light path and material information of an object corresponding to the light path in the space scene, an indirect illumination result of the emitted light relative to the object comprises: For other objects passed by each light path, the indirect lighting result corresponding to each other object and the indirect lighting result of the object are determined according to the recursive method of the light path.

7. The method according to claim 1, characterized in that The method further comprises: The indirect illumination result is denoised according to a preset denoising algorithm to determine a global illumination result.

8. The method according to claim 6, characterized in that The method further comprises: According to the material information of the object, different light types corresponding to different light paths generated on the object are determined; According to the recursive method of the light path, different indirect lighting results corresponding to different light types of the object are determined; According to a preset noise reduction algorithm, the different indirect lighting results are denoised respectively to obtain different indirect lighting results after noise reduction; According to different indirect illumination results after denoising, the indirect illumination result after denoising is obtained to determine the global illumination result.

9. The method according to claim 7 or 8, characterized in that: The method further comprises: The denoised indirect lighting result and the material information of the object are combined to obtain the corrected indirect lighting result; Determine the global illumination result based on the corrected indirect illumination result.

10. The method according to claim 1, characterized in that The method further comprises: For the object, determining a shadow result between objects in the spatial scene, wherein the shadow result is generated according to indirect illumination of the objects in the spatial scene; A global illumination result is determined based on the shadow result, the indirect illumination result, and the direct illumination result.

11. The method according to claim 1, characterized in that The method further comprises: Based on different preset space scenes, obtain the corresponding global illumination results; Based on the user's selection operation, a corresponding preset spatial scene is selected from different preset spatial scenes, and a corresponding global illumination result is determined according to the selected spatial scene; Based on the global illumination result, the selected space scene is rendered and displayed.

12. The method according to claim 1, characterized in that The method further comprises: After displaying the rendering result, based on the modification operation of the user, modify the objects in the spatial scene and obtain a new spatial scene; For the new spatial scene, the step of determining the emitted light of the spatial scene is performed to perform rendering and display.

13. The method according to claim 1, characterized in that The method further comprises: Determine a corresponding rendering mode based on a user's rendering mode selection operation; The spatial scene is rendered according to the determined rendering method.

14. The method according to claim 1, characterized in that The method further comprises: Based on the user's opening or closing operation on the current rendering mode, the corresponding rendering mode is opened or closed; After closing the current rendering mode, a rendering mode is selected from other rendering modes to render the space scene.

15. A scene rendering method, characterized in that: include: Based on the viewing operation, determining a corresponding indoor space scene to be rendered; For the current indoor space scene to be rendered, determining the emission light of the indoor space scene; According to the object in the indoor space scene where the emitted light first intersects, a light path formed by the emitted light in the indoor space scene with the object as the starting point is determined, wherein determining the light path formed by the emitted light in the indoor space scene with the object as the starting point includes: determining different light types corresponding to different light paths generated on the object according to material information of the object; determining corresponding light paths for different light types; wherein determining corresponding light paths for different light types includes: for the light corresponding to the light type, determining the light path generated by the light passing through other objects in the indoor space scene with the object as the starting point, as the corresponding light path; Determining an indirect illumination result of the emitted light relative to the object according to the light path and material information of an object in the indoor space scene corresponding to the light path; The indoor space scene is rendered based on the indirect lighting result corresponding to the indoor space scene, and the rendering result is displayed.

16. The method according to claim 15, characterized in that The method further comprises: Generate a new indoor space scene based on the modification operation of the objects in the indoor space scene; For the new indoor space scene, the step of determining the emitted light of the indoor space scene is performed to render and display the new indoor space scene.

17. The method according to claim 15, characterized in that The method further comprises: Based on the selection operation of the preset indoor space scene, determining the corresponding preset indoor space scene; Determining a corresponding preset global illumination result according to the determined preset indoor space scene; Based on the preset global illumination result, the determined preset indoor space scene is rendered and displayed.

18. A scene rendering method, characterized in that: include: Based on the viewing operation, determine the corresponding shopping space scene to be rendered; For a shopping space scene to be rendered, determining an emission light of the shopping space scene; According to the object in the shopping space scene where the emitted light first intersects, a light path formed by the emitted light in the shopping space scene with the object as the starting point is determined, wherein determining the light path formed by the emitted light in the shopping space scene with the object as the starting point includes: determining different light types corresponding to different light paths generated on the object according to material information of the object; determining corresponding light paths for different light types; wherein determining corresponding light paths for different light types includes: for the light corresponding to the light type, determining the light path generated by the light passing through other objects in the shopping space scene with the object as the starting point as the corresponding light path; Determining an indirect illumination result of the emitted light relative to the object according to the light path and material information of an object in the shopping space scene corresponding to the light path; The shopping space scene is rendered based on the indirect lighting result corresponding to the shopping space scene, and the rendering result is displayed.

19. The method according to claim 18, characterized in that The method further comprises: Based on the movement operation in the shopping space scene, move the position of the virtual camera in the shopping space scene; Based on the moved virtual camera, the emitted light of the shopping space scene is determined to render and display the shopping space scene.

20. The method according to claim 18, characterized in that The method further comprises: Determine new shopping space scenes based on scene switching operations; For a new shopping space scene, the emission light of the new shopping space scene is determined to render and display the new shopping space scene.

21. A scene rendering method, characterized in that: include: Based on the viewing operation, determine the corresponding game scene to be rendered; For a current game scene to be rendered, determining an emission light of the game scene; According to the object in the game scene where the emitted light first intersects, a light path formed by the emitted light in the game scene with the object as the starting point is determined, wherein determining the light path formed by the emitted light in the game scene with the object as the starting point includes: determining different light types corresponding to different light paths generated on the object according to the material information of the object; determining corresponding light paths for different light types; wherein determining corresponding light paths for different light types includes: for the light corresponding to the light type, determining the light path generated by the light passing through other objects in the game scene with the object as the starting point, as the corresponding light path; Determining an indirect lighting result of the emitted light relative to the object according to the light path and material information of an object corresponding to the light path in the game scene; The game scene is rendered based on the indirect lighting result corresponding to the game scene, and the rendering result is displayed.

22. The method according to claim 21, characterized in that The method further comprises: Determine, according to the material information of the object, a direct illumination result generated by the emitted light directly returning from the object to a light source in the game scene; A global illumination result is obtained according to the direct illumination result and the indirect illumination result, so as to render and display the game scene based on the global illumination result corresponding to the game scene.

23. A method for rendering an object, characterized in that: include: For a current spatial scene to be rendered, determining an emission light of the spatial scene; Determine, based on the object that the emitted light first intersects in the spatial scene, a light path formed by the emitted light in the spatial scene with the object as the starting point, wherein determining the light path formed by the emitted light in the spatial scene with the object as the starting point includes: determining, based on the material information of the object, different light types corresponding to different light paths generated on the object; determining corresponding light paths for different light types; wherein determining corresponding light paths for different light types includes: for the light corresponding to the light type, determining, with the object as the starting point, a light path generated by the light passing through other objects in the spatial scene as the corresponding light path; Determining an indirect illumination result of the emitted light relative to the object according to the light path and material information of an object in the spatial scene corresponding to the light path; The object is rendered based on the indirect lighting result corresponding to the object, and the rendering result is displayed.

24. The method according to claim 23, characterized in that The method further comprises: Determine, according to the material information of the object, a direct illumination result generated by the emitted light directly returning from the object to a light source in the spatial scene; A global illumination result is obtained according to the direct illumination result and the indirect illumination result, so as to render and display the object based on the global illumination result corresponding to the object.

25. A computing device comprising: Memory and processor; The memory is used to store computer programs; The processor is configured to execute the computer program to: For a current spatial scene to be rendered, determining an emission light of the spatial scene; Determine, based on the object that the emitted light first intersects in the spatial scene, a light path formed by the emitted light in the spatial scene with the object as the starting point, wherein determining the light path formed by the emitted light in the spatial scene with the object as the starting point includes: determining, based on the material information of the object, different light types corresponding to different light paths generated on the object; determining corresponding light paths for different light types; wherein determining corresponding light paths for different light types includes: for the light corresponding to the light type, determining, with the object as the starting point, a light path generated by the light passing through other objects in the spatial scene as the corresponding light path; Determining an indirect illumination result of the emitted light relative to the object according to the light path and material information of an object in the spatial scene corresponding to the light path; The spatial scene is rendered based on the indirect lighting result corresponding to the spatial scene, and the rendering result is displayed.

26. A computing device comprising: Memory and processor; The memory is used to store computer programs; The processor is configured to execute the computer program to: For the current indoor space scene to be rendered, determining the emission light of the indoor space scene; According to the object in the indoor space scene where the emitted light first intersects, the light path formed by the emitted light in the indoor space scene is determined with the object as the starting point, wherein determining the light path formed by the emitted light in the indoor space scene with the object as the starting point includes: determining different light types corresponding to different light paths generated on the object according to material information of the object; determining corresponding light paths for different light types; wherein determining corresponding light paths for different light types includes: for the light corresponding to the light type, determining the light path generated by the light passing through other objects in the indoor space scene with the object as the starting point, as the corresponding light path; Determining an indirect illumination result of the emitted light relative to the object according to the light path and material information of an object in the indoor space scene corresponding to the light path; The indoor space scene is rendered based on the indirect lighting result corresponding to the indoor space scene, and the rendering result is displayed.

27. A computing device comprising: Memory and processor; The memory is used to store computer programs; The processor is configured to execute the computer program to: Based on the viewing operation, determine the corresponding shopping space scene to be rendered; For a shopping space scene to be rendered, determining an emission light of the shopping space scene; According to the object in the shopping space scene where the emitted light first intersects, a light path formed by the emitted light in the shopping space scene with the object as the starting point is determined, wherein determining the light path formed by the emitted light in the shopping space scene with the object as the starting point includes: determining different light types corresponding to different light paths generated on the object according to material information of the object; determining corresponding light paths for different light types; wherein determining corresponding light paths for different light types includes: for the light corresponding to the light type, determining the light path generated by the light passing through other objects in the shopping space scene with the object as the starting point as the corresponding light path; Determining an indirect illumination result of the emitted light relative to the object according to the light path and material information of an object in the shopping space scene corresponding to the light path; The shopping space scene is rendered based on the indirect lighting result corresponding to the shopping space scene, and the rendering result is displayed.

28. A computing device comprising: Memory and processor; The memory is used to store computer programs; The processor is configured to execute the computer program to: Based on the viewing operation, determine the corresponding game scene to be rendered; For a current game scene to be rendered, determining an emission light of the game scene; According to the object in the game scene where the emitted light first intersects, a light path formed by the emitted light in the game scene with the object as the starting point is determined, wherein determining the light path formed by the emitted light in the game scene with the object as the starting point includes: determining different light types corresponding to different light paths generated on the object according to the material information of the object; determining corresponding light paths for different light types; wherein determining corresponding light paths for different light types includes: for the light corresponding to the light type, determining the light path generated by the light passing through other objects in the game scene with the object as the starting point, as the corresponding light path; Determining an indirect lighting result of the emitted light relative to the object according to the light path and material information of an object corresponding to the light path in the game scene; The game scene is rendered based on the indirect lighting result corresponding to the game scene, and the rendering result is displayed.

29. A computing device comprising: Memory and processor; The memory is used to store computer programs; The processor is configured to execute the computer program to: For a current spatial scene to be rendered, determining an emission light of the spatial scene; Determine, based on the object that the emitted light first intersects in the spatial scene, a light path formed by the emitted light in the spatial scene with the object as the starting point, wherein determining the light path formed by the emitted light in the spatial scene with the object as the starting point includes: determining, based on the material information of the object, different light types corresponding to different light paths generated on the object; determining corresponding light paths for different light types; wherein determining corresponding light paths for different light types includes: for the light corresponding to the light type, determining, with the object as the starting point, a light path generated by the light passing through other objects in the spatial scene as the corresponding light path; Determining an indirect illumination result of the emitted light relative to the object according to the light path and material information of an object in the spatial scene corresponding to the light path; The object is rendered based on the indirect lighting result corresponding to the object, and the rendering result is displayed.

30. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by one or more processors, the one or more processors are caused to implement the steps of the method according to any one of claims 1 to 28.

Citation Information

Patent Citations

  • High-accuracy high-resolution satellite imaging simulation engine and implementation method

    CN103279974A

  • Photon mapping accelerating method based on point cache

    CN104200509A