[go: up one dir, main page]

WO2024066559A1 - Rendering method, apparatus and system, electronic device, and storage medium - Google Patents

Rendering method, apparatus and system, electronic device, and storage medium Download PDF

Info

Publication number
WO2024066559A1
WO2024066559A1 PCT/CN2023/103299 CN2023103299W WO2024066559A1 WO 2024066559 A1 WO2024066559 A1 WO 2024066559A1 CN 2023103299 W CN2023103299 W CN 2023103299W WO 2024066559 A1 WO2024066559 A1 WO 2024066559A1
Authority
WO
WIPO (PCT)
Prior art keywords
light
rendering
lamp model
layer
scene
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2023/103299
Other languages
French (fr)
Chinese (zh)
Inventor
孙继发
宋璐
梁恩宁
黄俊荣
唐睿
曹阳
刘建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Qunhe Information Technology Ltd
Original Assignee
Hangzhou Qunhe Information Technology Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202211187133.5A external-priority patent/CN115526972A/en
Priority claimed from CN202211254298.XA external-priority patent/CN115661326A/en
Application filed by Hangzhou Qunhe Information Technology Ltd filed Critical Hangzhou Qunhe Information Technology Ltd
Publication of WO2024066559A1 publication Critical patent/WO2024066559A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/20Perspective computation

Definitions

  • the present disclosure relates to the technical field of computer image processing and interior design, and in particular to a rendering method in lighting simulation, a rendering device in lighting simulation, a rendering system in lighting simulation, a scenario interaction method of a lamp model with self-luminous material in lighting simulation, an electronic device and a storage medium.
  • a rendering method in lighting simulation which is applied to a terminal and includes: obtaining lighting parameters of a light group to be adjusted of a scene to be rendered; wherein the scene to be rendered is associated with at least one light group, and the at least one light group includes the light group to be adjusted; according to the lighting parameters, determining target image parameters of a light layer corresponding to the light group to be adjusted; wherein the target image parameters include at least one of a target brightness and a target color temperature; according to at least one of the target brightness and the target color temperature, post-processing the light layer corresponding to the light group to be adjusted; wherein layer data corresponding to the scene to be rendered is included in the terminal, and the layer data includes initial light layers corresponding to at least one light group respectively; and obtaining a target image of the scene to be rendered based on the light layers corresponding to at least one light group respectively.
  • the method may further include: obtaining layer data from a server in advance; wherein the layer data is obtained by the server performing rendering calculations on each of at least one light group according to rendering process parameters.
  • the rendering process parameters may include: at least one of overflow correction, highlight correction, color enhancement, or convergence termination conditions.
  • post-processing the light layer corresponding to the light group to be adjusted according to at least one of the target brightness and the target color temperature may include: post-processing the initial light layer corresponding to the light group to be adjusted according to at least one of the target brightness and the target color temperature; or post-processing the light layer corresponding to the light group to be adjusted that has been post-processed at least once according to at least one of the target brightness and the target color temperature.
  • obtaining a target image of a scene to be rendered based on light layers respectively corresponding to at least one light group may include: when at least one light group is a plurality of light groups, superimposing light layers respectively corresponding to the plurality of light groups.
  • superimposing light layers corresponding to the plurality of light groups may include: performing color temperature superposition calculation using a normalization method.
  • the color temperature superposition calculation method may include: multiplying each light layer by its brightness adjustment factor and color temperature adjustment weight.
  • the post-processing may include at least one of automatic exposure, white balance, or tone mapping, wherein the tone mapping includes a Reinhard method.
  • obtaining the lighting parameters of the light group to be adjusted of the scene to be rendered may include: determining the light group to be adjusted according to the selected lighting point.
  • the method may further include: obtaining camera parameters and world coordinates of the light group to be adjusted; converting the world coordinates of the light group to be adjusted into coordinates on a two-dimensional image based on the camera parameters; and presenting light points based on the coordinates on the two-dimensional image.
  • the method may further include: prompting the user to select a light point through a prompt circle; and, in response to the light point being selected, determining a light layer corresponding to the light group to be adjusted.
  • the lighting parameter includes at least one of brightness, color temperature, or color.
  • a rendering method in lighting simulation is provided, which is applied to a server, comprising: performing rendering calculations on a scene to be rendered according to rendering process parameters to obtain layer data; wherein the scene to be rendered is associated with at least one light group, and the layer data includes initial light layers corresponding to the at least one light group; and The layer data is transmitted to the terminal; wherein the server does not perform post-processing during the rendering calculation for the scene to be rendered.
  • the method may further include: obtaining rendering process parameters; wherein the rendering process parameters include: at least one of overflow correction, highlight correction, color enhancement, or convergence termination conditions.
  • the method before transmitting the layer data to the terminal, the method may further include: encoding the layer data using an encoding method that reduces the space occupied by the image.
  • a device for rendering in lighting simulation which is arranged in a terminal and includes: an acquisition unit, configured to acquire lighting parameters of a light group to be adjusted of a scene to be rendered; wherein the scene to be rendered is associated with at least one light group, and the at least one light group includes the light group to be adjusted; and a processing unit, configured to determine target image parameters of a light layer corresponding to the light group to be adjusted according to the lighting parameters; wherein the target image parameters include at least one of a target brightness and a target color temperature; according to at least one of the target brightness and the target color temperature, post-processing the light layer corresponding to the light group to be adjusted; wherein layer data corresponding to the scene to be rendered is included in the terminal, and the layer data includes initial light layers corresponding to at least one light group respectively; and based on the light layers corresponding to at least one light group respectively, a target image of the scene to be rendered is obtained.
  • a device for rendering in lighting simulation which is arranged in a server and includes: a rendering unit, configured to perform rendering calculations on a scene to be rendered according to rendering process parameters to obtain layer data; wherein the scene to be rendered is associated with at least one light group, and the layer data includes an initial light layer corresponding to the at least one light group; and a transmission unit, configured to transmit the layer data to a terminal; wherein the rendering unit does not perform post-processing during the process of performing rendering calculations on the scene to be rendered.
  • a system for rendering in lighting simulation comprising: a server, configured to perform rendering calculations on a scene to be rendered according to rendering process parameters to obtain layer data; wherein the scene to be rendered is associated with at least one light group, and the layer data includes initial light layers corresponding to the at least one light group; and transmitting the layer data to a terminal device; wherein the server does not perform post-processing during the process of performing rendering calculations on the scene to be rendered; and the terminal device, configured to obtain Light parameters of a light group to be adjusted of a scene to be rendered; wherein the light group to be adjusted is included in at least one light group; according to the light parameters, target image parameters of a light layer corresponding to the light group to be adjusted are determined; wherein the target image parameters include at least one of a target brightness and a target color temperature; according to at least one of the target brightness and the target color temperature, post-processing the light layer corresponding to the light group to be adjusted; and obtaining a target image of the scene
  • a scenario interaction method for a lamp model with a self-luminous material in a lighting simulation comprising: obtaining data of the lamp model with a self-luminous material; converting the data of the lamp model with a self-luminous material into universal format data that can be used for layer separation; separating each lamp model and the IES corresponding to the lamp model from the universal format data into a single layer to obtain a plurality of separate lamp model layers; wherein the lamp model comprises a single lamp model, and/or a lamp model group formed by a plurality of lamp models; obtaining lighting parameters of the lamp model to be adjusted; rendering the separate lamp model layer corresponding to the lamp model to be adjusted according to the lighting parameters; and displaying the rendering result to achieve scenario interaction.
  • separating each lamp model from the general format data into a single layer may include: filtering the lamp model layer from the general format data; wherein filtering the lamp model layer from the general format data includes: when the lamp model is a solid color lamp model without a texture, extracting at least one of the object name of the lamp model, the location information of the lamp model, the material information of the lamp model, the self-luminous property of the lamp model, or the diffuse reflection property of the lamp model; and, when the lamp model has a texture, extracting at least one of the object name of the lamp model, the location information of the lamp model, the material information of the lamp model, the self-luminous property of the lamp model, the information of the lamp model's texture, or the diffuse reflection property of the lamp model; wherein the self-luminous properties include light color and/or light intensity.
  • the method may further include: adding a light on/off logic of the lamp model; and, according to the light on/off logic, presenting the light on/off effect of the lamp model during the rendering process; wherein, according to the light on/off logic, presenting the light on/off effect of the lamp model during the rendering process includes: in the case of rendering a separate lamp model layer, reading the self-luminous property of the lamp model; and, in the case of rendering other layers, reading the self-luminous property of the lamp model. Diffuse properties of .
  • the light on/off effect of the lamp model is presented during the rendering process, which may include: enlarging the size corresponding to the lightmesh data of the individual lamp model by a set multiple and retaining the self-luminous property, so that when rendering a separate lamp model layer, the self-luminous property of the individual lamp model can be read to achieve the display of the light on effect; and retaining the diffuse reflection property of the individual lamp model, so that when rendering other layers, the diffuse reflection property of the individual lamp model can be read to achieve the display of the light off effect.
  • the on/off light effect of the lamp model is presented during the rendering process according to the on/off light logic, which may include: when the vraymtl data of a separate lamp model includes a self-luminous attribute value, and when rendering a separate lamp model layer, the self-luminous attribute value of the separate lamp model is read to achieve the display of the light-on effect; and, when rendering other layers, the diffuse reflection attribute of the separate lamp model is read to achieve the display of the light-off effect.
  • an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor executes the method provided in the first aspect, the second aspect or the sixth aspect above.
  • a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the method provided by the first aspect, the second aspect or the sixth aspect above.
  • FIG1 is a schematic flow chart of a rendering method in lighting simulation provided by an embodiment of the present disclosure.
  • FIG. 2 is another schematic flow chart of a rendering method in lighting simulation provided by an embodiment of the present disclosure.
  • FIG. 3 is another schematic flow chart of a rendering method in lighting simulation provided by an embodiment of the present disclosure.
  • FIG. 4 is another schematic flow chart of a rendering method in lighting simulation provided by an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of the architecture of a system for rendering in lighting simulation provided by an embodiment of the present disclosure.
  • FIG. 6 is a flow chart of a scenario interaction method for a lamp model with a self-luminous material in a lighting simulation provided by an embodiment of the present disclosure.
  • FIG. 7 is another flow chart of a scenario interaction method for a lamp model with a self-luminous material in a lighting simulation provided by an embodiment of the present disclosure.
  • FIG. 8 is a schematic block diagram of an electronic device provided by an embodiment of the present disclosure.
  • WebP image format a highly compressed sRGB (standard Red Green Blue) data format.
  • PNG image format PNG (Portable Network Graphics), portable network graphics, is a bitmap format that uses a lossless compression algorithm. It supports index, grayscale, RGB (Red Green Blue) three color schemes and Alpha channel and other features.
  • EXR image format a high-dynamic linear image data.
  • Tone Mapping Used to convert colors from their original hue (usually High dynamic range, HDR) is mapped to a target tone (usually low dynamic range, LDR).
  • HDR High dynamic range
  • LDR low dynamic range
  • the design platform directly renders the image after fixing the viewing angle.
  • Scenario interaction results After scenario configuration of the lighting simulation in the design platform, the animation effect of the lighting simulation is obtained.
  • the front end mentioned in this article may refer to a terminal (ie, a terminal device), and the back end may refer to a server.
  • the embodiment of the present disclosure provides a rendering method in lighting simulation. As shown in FIG1 , it is a flow chart of a rendering method in lighting simulation provided by the embodiment of the present disclosure, and the rendering method in lighting simulation includes S101 to S106.
  • the server performs rendering calculations on the scene to be rendered according to the rendering process parameters to obtain layer data; wherein the scene to be rendered is associated with at least one light group, and the layer data includes initial light layers corresponding to the at least one light group; wherein the server does not perform post-processing during the process of performing rendering calculations on the scene to be rendered.
  • the scene to be rendered may be associated with one light group or multiple light groups.
  • the at least one light group associated with the scene to be rendered may refer to all light groups that affect the lighting effect of the scene to be rendered.
  • all light groups associated with the living room may include light groups located in the living room space and light groups located in the corridor space connecting the living room and the bedroom.
  • any light group may include one or more lamps.
  • the server may also establish a mapping relationship between the identification information of the scene to be rendered and the identification information of at least one light group.
  • the server may also establish a mapping relationship between at least one light group and the identification information of the initial light layer corresponding to the at least one light group.
  • the rendering method in the lighting simulation may further include, before S101: the server receives a rendering request sent by the terminal. That is, the server may receive a rendering request sent by the terminal, and in response to the rendering request, perform rendering calculations for the scene to be rendered according to the rendering process parameters.
  • the rendering request may carry rendering process parameters and/or information related to the scene to be rendered.
  • the information related to the scene to be rendered may include identification information of the scene to be rendered, layout information of the scene to be rendered, light group information associated with the scene to be rendered, etc.
  • the server can perform rendering calculations for the scene to be rendered according to the rendering request and pre-stored information, It is sufficient to perform rendering calculations on the scene to be rendered, and the embodiments of the present disclosure do not impose any limitation on this.
  • the terminal sending the rendering request may be triggered by a user clicking, dragging, and/or inputting on the terminal interface.
  • the server may perform rendering calculations for the scene to be rendered in response to the user's operation.
  • the server transmits the layer data to the terminal.
  • the server may encode the layer data using an encoding method that reduces the space occupied by the image and then transmit the encoded layer data to the terminal, and the terminal decodes the received layer data.
  • the server can transmit the layer data to the terminal by pushing or pulling, that is, the server can actively send the layer data to the terminal, or the terminal can actively obtain the layer data from the server.
  • the server can transmit the layer data to the terminal by pushing or pulling, that is, the server can actively send the layer data to the terminal, or the terminal can actively obtain the layer data from the server.
  • the present embodiment does not impose any limitation on this.
  • the server may also transmit to the terminal a mapping relationship between identification information of a scene to be rendered and identification information of at least one light group, and/or a mapping relationship between at least one light group and identification information of an initial light layer corresponding to the at least one light group, and the embodiments of the present disclosure will not be elaborated herein.
  • the terminal obtains the lighting parameters of the light group to be adjusted of the scene to be rendered.
  • the light group to be adjusted is included in at least one light group associated with the scene to be rendered, and the light group to be adjusted may be part or all of the at least one light group associated with the scene to be rendered. That is, on the terminal side, the light parameters of all the light groups associated with the scene to be rendered may be adjusted, or the light parameters of some of the light groups associated with the scene to be rendered may be adjusted.
  • the terminal obtains the lighting parameters of the light group to be adjusted for the scene to be rendered, which may specifically include: the terminal receives a lighting parameter adjustment request input by a user, and the lighting parameter adjustment request may include identification information of the light group to be adjusted, and/or the lighting parameters of the light group to be adjusted.
  • the user can input a lighting parameter adjustment request by clicking, dragging, and/or inputting on the terminal interface.
  • the terminal can adjust the lighting parameters of the light group to be adjusted in response to the user's operation.
  • the terminal determines the light corresponding to the light group to be adjusted according to the light parameters.
  • the target image parameters of the layer wherein the target image parameters include at least one of a target brightness and a target color temperature.
  • the lighting parameter may include at least one of color temperature and brightness, that is, on the terminal side, for any light group to be adjusted, only the color temperature of the light group to be adjusted may be adjusted, only the brightness of the light group to be adjusted may be adjusted, or both the color temperature and the brightness of the light group to be adjusted may be adjusted.
  • the categories of the lighting parameters to be adjusted i.e., brightness and/or color temperature
  • determining the target brightness of the light layer corresponding to the light group to be adjusted according to the light parameters may include: determining a brightness adjustment factor according to the brightness of the light group to be adjusted; and determining the target brightness as the product of the brightness of the current light layer corresponding to the light group to be adjusted and the brightness adjustment factor.
  • determining the target color temperature of the light layer corresponding to the light group to be adjusted according to the light parameters may include: determining the first color of the light group to be adjusted and the second color of the basic light according to the color temperature of the light group to be adjusted and the basic color temperature; determining the color temperature adjustment weight as the ratio of the first color to the second color; and determining the target color temperature as the product of the color temperature of the current light layer corresponding to the light group to be adjusted and the color temperature adjustment weight.
  • the current light layer corresponding to the light group to be adjusted may be the initial light layer corresponding to the light group to be adjusted. That is, when the light parameters of the light group to be adjusted are set or the light parameters of the light group to be adjusted are changed, the terminal may adjust the initial light layer corresponding to the light group to be adjusted obtained by the server rendering according to the light parameters of the light group to be adjusted.
  • the current light layer corresponding to the light group to be adjusted may be a light layer corresponding to the light group to be adjusted that has been post-processed at least once. That is, when setting the light parameters of the light group to be adjusted, or when the light parameters of the light group to be adjusted change, the terminal may also determine the target image parameters based on the light parameters of the light group to be adjusted and the light layer corresponding to the light group to be adjusted obtained in the last adjustment process, and adjust the light layer corresponding to the light group to be adjusted obtained in the last adjustment process according to the target image parameters. That is to say, the inventive concept of the present disclosure is to render the light groups associated with the scene to be rendered on the server side, respectively, and obtain the light layers corresponding to the light groups respectively.
  • the terminal side can adjust the initial lighting layer corresponding to the lighting group to be adjusted once or multiple times in a progressive manner to obtain the target lighting layer, and finally obtain the target image of the scene to be rendered based on the target lighting layer.
  • the terminal performs post-processing on the light layer corresponding to the light group to be adjusted according to at least one of the target brightness and the target color temperature.
  • post-processing the light layer corresponding to the light group to be adjusted according to at least one of the target brightness and the target color temperature may include: according to the target brightness, the terminal automatically exposes the light layer corresponding to the light group to be adjusted, that is, the terminal adjusts the brightness of the light layer corresponding to the light group to be adjusted according to the target brightness.
  • post-processing the light layer corresponding to the light group to be adjusted according to at least one of the target brightness and the target color temperature may include: according to the target color temperature, the terminal performs white balance processing on the light layer corresponding to the light group to be adjusted, that is, the terminal performs color adjustment on the light layer corresponding to the light group to be adjusted according to the target color temperature.
  • post-processing the light layer corresponding to the light group to be adjusted according to at least one of the target brightness and the target color temperature may include: according to the target brightness and the target color temperature, the terminal performs tone mapping processing on the light layer corresponding to the light group to be adjusted, that is, the terminal adjusts the pixel value of the light layer corresponding to the light group to be adjusted according to the target brightness and the target color temperature.
  • the terminal obtains a target image of the scene to be rendered based on the light layers respectively corresponding to the at least one light group.
  • a target light layer obtained by post-processing the light layer corresponding to the light group to be adjusted can be used as the target image of the scene to be rendered without superimposing other light layers.
  • light layers corresponding to the multiple light groups respectively can be superimposed to obtain a target image of the scene to be rendered.
  • the scene interaction mode of lighting simulation it is only necessary to Adjust the lighting parameters of the lighting group, determine the target image parameters of the lighting layer corresponding to the lighting group to be adjusted at multiple moments; and for each of the multiple moments, post-process the lighting layer corresponding to the lighting group to be adjusted according to the target image parameters corresponding to the moment and generate a target image frame of the scene to be rendered corresponding to the moment; finally, arrange the multiple target image frames corresponding to the multiple moments in chronological order to generate a scene interactive effect animation to dynamically display the lighting effect of the scene to be rendered.
  • rendering calculation can be performed on each of at least one light group associated with the scene to be rendered without performing post-processing according to the rendering process parameters, so as to obtain an initial light layer corresponding to the at least one light group respectively;
  • the target brightness and/or target color temperature of the light layer corresponding to the light group to be adjusted can be determined according to the obtained light parameters of the light group to be adjusted, and the light layer corresponding to the light group to be adjusted can be post-processed according to the target brightness and/or target color temperature, so that the brightness and/or color temperature of the light layer corresponding to the light group to be adjusted after post-processing is equal to or approximately equal to the target brightness and/or target color temperature, and finally, based on the light parameters of the at least one light group respectively associated with the scene to be rendered, the target brightness and/or target color temperature of the light layer can be determined according to the obtained light parameters of the light group to be adjusted.
  • a rendering is performed on the server side once to obtain the initial light layers corresponding to the at least one light group; when modifying the design, such as modifying the light parameters, the terminal can generate a target image of the scene to be rendered based on the light layers corresponding to the at least one light group, which is equivalent to the result of direct rendering. This not only saves rendering resources, but also avoids the frequent use of the network to transmit the results of direct rendering, thereby reducing the burden of network transmission and improving rendering efficiency.
  • the rendering method in lighting simulation may include S201-S205.
  • the front end obtains the lighting parameters of the scene interaction mode.
  • the front end may obtain the lighting parameters of the scene interaction mode input by the user, such as the color temperature and/or brightness of the light group to be adjusted.
  • the lighting parameters of the scene interaction mode may involve the light combination used in the lighting scheme and the color temperature, brightness, color, and brightness of each light (e.g., the light group to be adjusted and each light in the light group to be adjusted).
  • the delay time of the light, and/or the gradient time of the light may be used in the lighting scheme and the color temperature, brightness, color, and brightness of each light (e.g., the light group to be adjusted and each light in the light group to be adjusted).
  • the backend performs rendering calculations on each light layer to obtain a layer rendering result.
  • the rendering process parameters can be set before the backend performs the rendering calculation of each light layer. Since it may be necessary to solve problems such as brightness overexposure and/or highlights during the rendering process, rendering process parameters including but not limited to overflow correction, highlight correction, color enhancement, or at least one of the convergence termination conditions are often added during the rendering process.
  • the rendering process parameters used in the scene interaction rendering process can be made consistent with the rendering process parameters used in the direct rendering process. For example, the parameter values of overflow correction, highlight correction, color enhancement and/or convergence termination conditions set in the scene interaction rendering process are respectively the same as the parameter values of overflow correction, highlight correction, color enhancement and/or convergence termination conditions used in the direct rendering process.
  • the backend can perform rendering calculations of the light layers for each light group associated with the scene to be rendered to obtain a layer rendering result, which includes an initial light layer corresponding to each light group.
  • the method of setting the rendering process parameters may include: receiving preset parameters selected by a user from a lighting template.
  • the backend encodes the layer rendering result and transmits it to the frontend, and the frontend decodes it to obtain the layer data.
  • the layer data is the layer rendering result.
  • This step mainly encodes the layer rendering result and transmits it to the front end, and then decodes it on the front end to obtain the layer data.
  • the reason for image encoding/decoding is that the layer rendering result is saved in EXR format.
  • EXR is a high dynamic range HDR picture (or light layer).
  • the stored image information is very detailed, but it takes up a lot of space, which causes a lot of network transmission pressure on the front end. It needs to be solved by using appropriate image compression and decoding technology.
  • the disclosed embodiment provides three encoding/decoding methods, but it can be recognized that the disclosed embodiment does not impose any restrictions on the encoding/decoding methods, and any method passed in the back end is not limited. Methods of reducing the space occupied by over-encoding layer rendering results (ie, layer data) and transmitting the encoded layer rendering results to the front end for decoding and use are all within the scope of protection of the present disclosure.
  • encoding/decoding method 1 may be adopted.
  • This method refers to the decoding method of lightmap in UE4 to restore UE4's encoding of lightmap.
  • v_min min(img_i);
  • v_max max(img_i);
  • n_mul 1/(v_max-v_min);
  • n_add -v_min/(v_max - v_min);
  • img_webp_i img_i*n_mul+n_add;
  • img_webp_i is the pixel value of the i-th pixel of the encoded image (i.e., the light layer), which can be stored in WebP format or JPEG (Joint Photographic Experts Group) format.
  • img_hdr_i is the pixel value of the i-th pixel of the EXR image (that is, the light layer) finally decoded by the front end.
  • encoding/decoding method 2 may be adopted.
  • Xp_i stores three values, Xp_i[0], Xp_i[1] and Xp_i[2] represent the first value, the second value and the third value respectively, and the same below.
  • img_webp_i[0] resX_i;
  • img_webp_i[1] resY_i;
  • img_webp_i[2] resZ_i/255;
  • img_webp_i[3] resW_i;
  • img_webp_i stores four values, resW_i is the decimal part of Le_i, and resZ_i is the integer part of Le_i. After the assignment is completed, each value in img_webp_i is multiplied by 255, and then rounded, and the values less than 0 are assigned to 0, and the values greater than 255 are assigned to 255.
  • the encoded image is obtained, which is saved in WebP format and transmitted to the front end for decoding:
  • M_inverse is the inverse matrix of M
  • img_hdr_i is the pixel value of the i-th pixel of the rendering image (that is, the light layer) obtained by front-end decoding.
  • encoding/decoding method three may be adopted.
  • img_hdr_i is the pixel value of the i-th pixel of the rendering image (that is, the light layer) obtained by front-end decoding.
  • the above three methods can effectively compress EXR images. For example, a 2048 ⁇ 2048 pixel EXR file with a size of 5.33M can be compressed to 218K.
  • methods 2 and 3 can be used to store images with four channels, which can save more information and effectively solve the above problems.
  • the data transmitted over the network is not limited to the WebP format.
  • the data transmitted over the network can be in JPEG, PNG or WebP format; using encoding/decoding method two or three, the data transmitted over the network can be in PNG or WebP format. Since the PNG and WebP formats have the same precision, both are higher than the JPEG format, and the WebP format has a higher compression rate but there are compatibility issues.
  • the layer rendering results can be compressed to the WebP format by default; if the WebP format is not supported, the terminal can request the server (for example, a cloud server) to transcode the data into PNG format and return it.
  • the server for example, a cloud server
  • the front end performs post-processing on the decoded layer data.
  • the front end performs post-processing on the obtained image (i.e., the light layer corresponding to the light group to be adjusted), and the post-processing may include at least one of automatic exposure, white balance, or tone mapping. Tone Mapping in the rendering layering process These may include: Linear multiply, Exponential, HSV exponential, Gamma correction, and/or Reinhard, etc., briefly described below:
  • Linear multiply Linear addition, the brightness is directly added linearly without any changes.
  • Exponential changes based on brightness can prevent overly bright parts from being overexposed.
  • HSV exponential Similar to exponential correction, but preserves the hue and saturation of the color instead of washing out the color to white.
  • Gamma correction Directly apply gamma function correction to color.
  • Input parameters include burn value (mixed value or burning value). When burn value is 0, it shows the effect of linear multiplication, the picture is beautiful but easy to be exposed; when burn value is 1, it shows the effect of exponential multiplication, the picture is soft but the saturation and layer relationship are not clear. Adjust burn value between 0 and 1 according to the actual situation.
  • automatic exposure can automatically adjust rendering parameters according to the brightness of the rendered image to achieve the best exposure effect, which can avoid repeated manual adjustment of parameters and improve rendering efficiency.
  • automatic exposure can automatically adjust parameters such as exposure, contrast and color balance to make the rendered image closer to the real scene, while also avoiding errors or deviations caused by manual adjustment.
  • White balance Through white balance, users can adjust the warmth or coldness of the picture to what they need, making the picture appear closer to reality.
  • Tone Mapping In computer graphics, some special lighting conditions produce very bright or very dark areas, which are beyond the perception of the human eye. Tone mapping can help users restore the details of HDR scenes on LDR display devices, thereby improving the quality of the image. In addition, HDR images contain a lot of detail information, which low dynamic range display devices cannot faithfully restore. By using excellent tone mapping algorithms, these detail information can be compressed into LDR images and presented on low dynamic range display devices. After tone mapping, the LDR image can make the color, brightness, and contrast of the entire image more balanced, enhance the visual effect, and allow users to better immerse themselves in the image scene. Tone mapping can select appropriate tone mapping algorithms for different display devices. The appropriate algorithm is used to achieve the best rendering effect, which allows users to convert HDR images into LDR images that meet the requirements of different display devices, thereby enhancing the versatility and applicability of the image.
  • the built-in post-processing must be turned off in the rendering process of the backend of S202, that is, no post-processing algorithm is added in S202.
  • the post-processing algorithm in the rendering layering process including but not limited to Color Mapping
  • the original layering result that is, the initial light layer
  • the post-processing is implemented in the layer overlay part of the front end
  • the Reinhard algorithm is selected to implement tone mapping (Tone Mapping).
  • the layer data is directly encoded and transmitted to the front-end.
  • the front-end uses the Reinhard algorithm to perform tone mapping (Tone Mapping) on the decoded layer data.
  • the Reinhard exposure method takes into account the characteristics of both "linear multiplication” and "exponential multiplication". A larger exposure degree, such as near the HDR space pixel value 1, is equivalent to linear multiplication, while a smaller exposure value is equivalent to exponential multiplication.
  • the use of the Reinhard algorithm can make the color performance of the interior space richer. This method converts the data of the HDR space into the image data of the image unit8 space, which can reduce the data loss from the HDR space to the image unit8 space, and the gap with the direct rendering result, such as the image in PNG format, will be smaller.
  • the front end performs layer overlay according to the target brightness and the target color temperature, and generates and displays a scene interaction effect animation.
  • the front end calculates the target brightness and target color temperature of the light layer corresponding to each light group to be adjusted in each frame of image through the delay, gradient and other parameters of the scene mode (that is, the lighting parameters of the light group to be adjusted), and then superimposes the layers in the decoded layer data according to their respective target brightness and target color temperature to obtain each image frame, and finally generates and displays the scene interaction effect animation.
  • superimposing light layers corresponding to the plurality of light groups may include: performing color temperature superposition calculation using a normalization method.
  • the backend uses the basic color temperature 6500k to render light_1 and light_2 respectively to obtain the corresponding light layers img_exr_1 and img_exr_2.
  • the light group to be adjusted light_1 The brightness and color temperature of the light group light_2 to be adjusted are set to bright_ratio_1 and temperature_1 respectively, and the brightness and color temperature of the light group light_2 to be adjusted are set to bright_ratio_2 and temperature_2 respectively.
  • the target brightness of img_exr_1 corresponding to light_1 can be determined as img_exr_1*bright_ratio_1
  • the target brightness of img_exr_2 corresponding to light_2 can be determined as img_exr_2*bright_ratio_2.
  • the color temperature of the light group can be converted into RGB values used to describe the pixel color in the image.
  • the corresponding conversion algorithm can be:
  • the above calculations can respectively obtain the color color_1 of light_1, color_2 of light_2, and color_base of the base light. Since both img_exr_1 and img_exr_2 are layers rendered based on the color temperature of 6500k, the target color temperature of img_exr_1 corresponding to light_1 can be determined as img_exr_1*(color_1/color_base) according to the color color_base of the base light and color_1 of light_1, and the target color temperature of img_exr_2 corresponding to light_2 can be determined as img_exr_2*(color_2/color_base) according to the color color_base of the base light and color_2 of light_2.
  • img_exr_1 is post-processed according to the target brightness img_exr_1*bright_ratio_1 and the target color temperature img_exr_1*(color_1/color_base) of img_exr_1 to obtain the target light layer img_exr_post_1 corresponding to light_1, and the target light layer img_exr_2 is post-processed according to the target brightness img_exr_2*bright_ratio_2 and the target color temperature img_exr_1*(color_1/color_base) of img_exr_1.
  • the scene interaction mode and the direct rendering results can be effectively aligned.
  • Experimental results show that the average pixel error between the final effect of the scene interaction and the direct rendering effect can be controlled within 10, and the difference between the picture level and the direct rendering is almost invisible, so that the scene interaction and direct rendering results are aligned, successfully realizing on-demand use and reducing rendering costs.
  • the disclosed embodiments can effectively narrow the gap between the lighting scene interaction effect and the final image output effect, optimize the difference between the scene interaction and the direct rendering results, and make the difference between the two almost invisible to the naked eye.
  • the results show that the average pixel error is about 9.41.
  • the direct rendering can be used to preview the results and continuously adjust the design during the design process. After the design is completed, the same effect but with dynamic scene interaction can be rendered, thereby reducing the demand for rendering resources and thus reducing costs.
  • the method provided by the disclosed embodiments can be extended to real-time lighting effects and scene interactions, and the method can be used to achieve an effect aligned with direct rendering, so that users can obtain a consistent experience.
  • the rendering method in the lighting simulation adds a single lamp dimming function based on the scene interaction, so that the user can further realize the change of the brightness, color temperature and/or color of the lamp based on the results of the scene interaction, thereby quickly achieving the lighting effect desired by the designer.
  • FIG3 and FIG4 are another flow chart of the rendering method in the lighting simulation provided by the embodiment of the present disclosure.
  • the rendering method in the lighting simulation provided by the embodiment of the present disclosure can realize the scene interaction of a single lamp or a single lamp group, and may include S301-S305.
  • the front end obtains the light of each light group in the current scene interaction result. Layer.
  • the back-end separates the light layers of each light group through the rendering layer separation of the rendering engine, and transmits the light layers of each light group to the front-end.
  • the front-end receives the light layers of each light group and presents the lighting results of the light layers of each light group in the current scene interaction results.
  • the front end determines the light group to be adjusted according to the presented light points.
  • the front end can also generate light points for users to select the light groups to be adjusted.
  • the camera parameters and the world coordinates of the light groups can be obtained from the current scene interaction results, and the world coordinates of the light groups can be converted into coordinates on the two-dimensional image based on the camera parameters, and the light points can be presented based on the coordinates on the two-dimensional image.
  • the camera parameters may include at least one of the camera's horizontal viewing angle, the camera's vertical viewing angle, the camera's position, the camera's clipping depth, the camera's horizontal rightward direction U, the camera's vertical upward direction V, or the camera's lookat direction W.
  • the world coordinates of the light group are projected according to the orthogonal projection model to calculate the image coordinate point position corresponding to the light group, that is, the light group in the world coordinate system is converted into a light point on a two-dimensional image.
  • the front end can prompt the user to select the presented light point through a prompt circle, and selecting the light group to be adjusted can trigger the search and matching of the light layer. That is, the front end displays the positions of each light group that can be clicked in the form of a prompt circle, and the user can select the light point to be adjusted according to the prompt circle. After determining the selected light point to be adjusted, the front end searches and determines the light layer to be adjusted corresponding to the light group to be adjusted.
  • the front end may determine the light layer to be adjusted corresponding to the light group to be adjusted based on a mapping relationship between the acquired at least one light group and identification information of the initial light layer respectively corresponding to the at least one light group.
  • the front end searches for a light layer corresponding to the light group to be adjusted from the light layers corresponding to each light group, and uses the light layer to be adjusted as the light layer.
  • the front end searches for the light layer corresponding to the light group to be adjusted from all light layers as the light layer to be adjusted for subsequent adjustment.
  • the front end obtains the lighting parameters of the light group to be adjusted, and adjusts the light according to the lighting parameters.
  • the target light layer corresponding to the light group to be adjusted is formed.
  • the user adjusts the lighting parameters of the light group to be adjusted through the lighting parameter adjustment function provided by the front end, wherein the lighting parameters may include at least one of brightness, color temperature, or color, that is, the user can adjust at least one of the brightness, color temperature, or color of the light group to be adjusted.
  • the target lighting layer formed based on the adjusted lighting parameters can be used for subsequent layer overlay to display the adjusted lighting effect.
  • the front end superimposes the target light layer and the light layers corresponding to other light groups, and displays the scene interaction effect after superposition in real time.
  • the target light layer formed according to the brightness, color temperature and/or color input by the user and the light layers corresponding to other light groups are re-superimposed and displayed in real time, and finally the adjusted brightness, color temperature and/or color are saved, and then the adjusted data is used to re-perform scene interaction or directly render the image, so that the scene interaction effect desired by the designer can be achieved with just one adjustment.
  • this process does not require re-rendering of the lighting group, that is, the lighting effect can be changed, which greatly improves the scene interaction efficiency of a single lamp.
  • the embodiment of the present disclosure provides a system for rendering in lighting simulation to implement the rendering method in lighting simulation provided by the embodiment of the present disclosure.
  • the system for rendering in lighting simulation includes: one or more servers 120, and at least one terminal device 110 communicatively connected to the server 120.
  • the terminal device 110 and the server 120 cooperate to implement the rendering method in lighting simulation.
  • the server is configured to perform rendering calculations on a scene to be rendered according to rendering process parameters to obtain layer data; wherein the scene to be rendered is associated with at least one light group, and the layer data includes initial light layers corresponding to the at least one light group; and transmit the layer data to a terminal device; wherein the server does not perform post-processing during the process of performing rendering calculations on the scene to be rendered.
  • the terminal device is configured to obtain lighting parameters of the light group to be adjusted of the scene to be rendered; Wherein, the light group to be adjusted is included in at least one light group; according to the light parameters, the target image parameters of the light layer corresponding to the light group to be adjusted are determined; wherein the target image parameters include at least one of the target brightness and the target color temperature; according to at least one of the target brightness and the target color temperature, the light layer corresponding to the light group to be adjusted is post-processed; and based on the light layers corresponding to at least one light group, a target image of the scene to be rendered is obtained.
  • the terminal device can obtain the lighting parameters of the scene interaction mode in the lighting simulation of the scene to be rendered, and send the lighting parameters to the server; the server performs rendering calculations of each light layer according to the set rendering parameters, and encodes the layer rendering results and transmits them to the terminal device; the terminal device receives the rendering results, decodes them to obtain the layer data, and post-processes the decoded layer data, and superimposes the layers according to the brightness and color temperature to generate and display the scene interaction effect animation.
  • a terminal device includes: an acquisition unit and a processing unit.
  • the acquisition unit is configured to acquire the lighting parameters of the light group to be adjusted of the scene to be rendered; wherein the scene to be rendered is associated with at least one light group, and the at least one light group includes the light group to be adjusted.
  • the processing unit is configured to determine target image parameters of a light layer corresponding to the light group to be adjusted according to the light parameters; wherein the target image parameters include at least one of a target brightness and a target color temperature; and post-process the light layer corresponding to the light group to be adjusted according to at least one of the target brightness and the target color temperature; wherein layer data corresponding to the scene to be rendered is included in the terminal, and the layer data includes initial light layers respectively corresponding to at least one light group; and based on the light layers respectively corresponding to at least one light group, a target image of the scene to be rendered is obtained.
  • the terminal device may further include a receiving unit and a decoding unit.
  • the acquiring unit may be configured to acquire the lighting parameters of the scene interaction mode in the lighting simulation of the scene to be rendered.
  • the receiving unit may be configured to receive the encoded layer rendering result.
  • the decoding unit may be configured to decode the received layer rendering result to obtain the layer data.
  • the processing unit may be configured to calculate the target brightness and target color temperature of each light layer of each frame image according to the lighting parameters, post-process the decoded light layer according to the target brightness and target color temperature, and superimpose the layers and transform them into the LDR space to generate and display the scene interaction effect animation.
  • the server includes: a rendering unit and a transmission unit.
  • the rendering unit is configured to perform rendering calculations on the scene to be rendered according to the rendering process parameters to obtain layer data; wherein the scene to be rendered is associated with at least one light group, and the layer data includes initial light layers corresponding to the at least one light group.
  • the transmission unit is configured to transmit the layer data to the terminal; wherein the rendering unit does not perform post-processing during the process of performing rendering calculations for the scene to be rendered.
  • the server may further include an encoding unit.
  • the rendering unit may be configured to perform rendering calculations of each light layer according to the rendering process parameters.
  • the encoding unit may be configured to encode the layer rendering result using an encoding method that reduces the space occupied by the image.
  • the transmission unit may be configured to transmit the encoded layer rendering result to the terminal device.
  • the specific process of the terminal device 110 and the server 120 cooperating to implement the rendering method in the lighting simulation can refer to the description of the rendering method in the lighting simulation in the embodiment of the present disclosure, and the embodiment of the present disclosure will not be repeated here.
  • the terminal device includes but is not limited to tablet computers, laptop computers, desktop computers, smart phones, intelligent voice interaction devices and other devices; the terminal device may be installed with a client related to the presentation of the scene interaction mode effect, which may be software (such as a browser, etc.), or a web page, a small program, etc.
  • the terminal device may include a memory, a communication module and one or more processors.
  • the memory is used to store computer programs executed by the processor.
  • the memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, and programs required to run data transmission and communication functions, etc.; the data storage area may store various data transmission and communication information and operation instruction sets, etc.
  • the memory may be a volatile memory (volatile memory), such as a random-access memory (RAM); it may also be a non-volatile memory (non-volatile memory), such as a read-only memory, a flash memory (flash memory), a hard disk drive (HDD) or a solid-state drive (SSD); or it may be any other medium that can be used to carry or store a desired computer program in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto.
  • the memory may also be a combination of the above memories.
  • the processor may include one or more central processing units (CPU) or a digital processing unit, etc.
  • the server is a background server corresponding to the software, webpage, applet, etc., or a server dedicated to image rendering, which is not specifically limited in this disclosure.
  • the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
  • the disclosed embodiment provides a scene interaction method for lamp models with self-luminous materials in lighting simulation, realizes the layer separation of the lamp model, expresses/characterizes the self-luminous material on the lamp model with universal format data that can be used for layer separation, and reads the self-luminous properties of the lamp model when rendering the lamp model layer, and reads the diffuse reflection properties of the lamp model when rendering other light layers, thereby realizing the on/off light effect of the lamp model.
  • diffuse reflection means that the microscopic state of the surface of an object is uneven, and the incident light will be reflected in different directions according to the normal of the surface it hits. Even in a very small area, it does not have the property that the angle of incidence is equal to the angle of reflection like a mirror or metal.
  • Common latex paint walls, cloth, plastic, wood, etc. all have diffuse reflection properties. Lamps made of these materials are no longer light sources after turning off the lights, but degenerate into ordinary models, receiving illumination from other light sources.
  • Figures 6 and 7 are flow charts of a scenario interaction method for a lamp model with self-luminous material in a lighting simulation provided by an embodiment of the present disclosure.
  • the scenario interaction method for a lamp model with self-luminous material in a lighting simulation provided by an embodiment of the present disclosure includes S601-S604.
  • the front end obtains data of a lamp model with a self-luminous material, and converts the data of the lamp model with a self-luminous material into general format data that can be used for layer separation.
  • the front end obtains the lamp with self-luminous material from the back end.
  • the data of the lamp model with self-luminous material is converted into the general format data that can be used for layer separation.
  • the general format data includes lightmesh and vraymtl. Among them, lightmesh is a kind of luminous mesh in the rendering business. Converting the rendering data of the lamp model into lightmesh can facilitate the separation of a single lamp model. Vraymtl is a standard material. Converting the data of the lamp model with self-luminous material into Vraymtl material can also facilitate the separation of the lamp model.
  • the backend when the backend renders a layer of a lamp model having a self-luminous material, the lightmesh and the IES file of the lamp model are rendered on the same layer.
  • the data of the lamp model may include the spatial position information of the lamp, the geometric information of the lamp, the material information of the lamp, the light color information of the lamp, the light intensity information of the lamp, the information used to characterize whether the lamp uses a texture, or at least one of the information of the lamp's texture.
  • the spatial position information of the lamp can characterize how the self-luminous material on the lamp model is translated, rendered, and scaled from the origin to reach the specified position in the 3D scene:
  • intensity the intensity of the original light
  • use_tex 1or 0Whether to use texture information
  • tex texture information if texture is used
  • the front end separates each lamp model from the general format data into a single layer, and obtains a plurality of separate lamp model layers.
  • the lamp model may include a single lamp model, and/or a lamp model group formed by multiple lamp models.
  • separating each lamp model with self-luminous material from the general format data into a single layer may include: for a solid color lamp model without a texture, extracting at least one of the object name of the lamp model, the position information of the lamp model, the material information of the lamp model, the self-luminous property of the lamp model, or the diffuse reflection property of the lamp model; for a lamp model with a texture, extracting at least one of the object name of the lamp model, the position information of the lamp model, the material information of the lamp model, the self-luminous property of the lamp model, the texture information of the lamp model, or the diffuse reflection property of the lamp model to obtain a lamp model layer.
  • the self-luminous property may include at least one of light color (color(R, G, B)), light intensity (intensity), or a self-illumination texture (self illumination texture).
  • a separate layering logic is added to the lamp model. If all the lights of the lamp model are output to the same layer, the color temperature and brightness of the self-luminous lights cannot be changed individually. Therefore, the data of the lamp model is converted into a universal format data that can be used for layer separation, and then the self-luminous lights of each lamp model with a self-luminous material are separated into a separate layer (that is, each type of self-luminous light is converted to lightmesh and then separated), thereby achieving control of the separate layer of the lamp model.
  • the front end obtains the lighting parameters of the lamp model to be adjusted.
  • the front end provides the user with a function of adjusting the lighting parameters of the lamp model, through which the user can adjust lighting parameters such as brightness and/or color temperature.
  • the adjusted lighting parameters are received by the front end.
  • the front end renders a separate lamp model layer corresponding to the lamp model to be adjusted according to the lighting parameters, and displays the rendering result to achieve scene interaction.
  • the server may also render a separate lamp model layer corresponding to the lamp model to be adjusted according to the lighting parameters, and the terminal (ie, the front end) may display the rendering result to achieve scene interaction, which will not be described in detail in the disclosed embodiments.
  • a light on/off logic can be added to the lamp model.
  • the light on/off logic the light on/off effect of the lamp model is presented during rendering.
  • when rendering a separate lamp model layer read the self-luminous properties of the lamp model to achieve the rendering result of turning on the light; and when rendering other layers, read the diffuse reflection properties of the lamp model to achieve the rendering result of turning off the light.
  • the rendering results of turning on/off lights are also different.
  • the size corresponding to the lightmesh data of the individual lamp model that is, the self-luminous material model
  • the self-luminous properties are retained, and the diffuse reflection properties of the original individual lamp model are retained.
  • the self-luminous properties of the individual lamp model are read to achieve the display of the light-on effect; when rendering other layers, the diffuse reflection properties of the individual lamp model are read. Since lightmesh is a transparent property, the diffuse reflection properties retained internally are naturally displayed to achieve the display of the light-off effect, thereby achieving the separation logic of the lamp model layer and the separation logic of the light-on/light-off layer.
  • vraymtl materials and ordinary diffuse materials have the same properties.
  • the vraymtl data of a separate lamp model includes self-luminous attribute values
  • the self-luminous attribute values of the separate lamp model are read to display the lighting effect
  • the diffuse reflection properties of the separate lamp model are read to display the lighting effect.
  • the layer separation of the lamp model is realized, so as to realize individual control, and the self-luminous property is read when rendering the lamp model layer, and the diffuse reflection property of the lamp model is read when rendering other layers, so as to realize the switching light effect of the lamp model, which greatly improves the scene interaction effect of a single lamp model.
  • an electronic device and a readable storage medium are also provided.
  • FIG8 shows a schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure.
  • the electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers.
  • the electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices.
  • the components shown herein, their connections and relationships are The systems, and their functions, are merely examples and are not intended to limit implementations of the present disclosure described and/or claimed herein.
  • the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 to a random access memory (RAM) 803.
  • ROM read-only memory
  • RAM random access memory
  • various programs and data required for the operation of the device 800 can also be stored.
  • the computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804.
  • An input/output (I/O) interface 805 is also connected to the bus 804.
  • a number of components in the electronic device 800 are connected to the I/O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc.
  • the communication unit 809 allows the device 800 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.
  • the computing unit 801 may be a variety of general and/or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc.
  • the computing unit 801 performs the various methods and processes described above, such as the rendering method in the lighting simulation, and/or the scenario interaction method of the lamp model with self-luminous material in the lighting simulation.
  • the rendering method in the lighting simulation, and/or the scenario interaction method of the lamp model with self-luminous material in the lighting simulation can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808.
  • part or all of the computer program can be loaded and/or installed on the device 800 via the ROM 802 and/or the communication unit 809.
  • the computing unit 801 may be configured to execute the training method of the target ranking model and/or the target ranking method in any other appropriate manner (eg, by means of firmware).
  • Various implementations of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof.
  • FPGAs field programmable gate arrays
  • ASICs application specific integrated circuits
  • ASSPs application-specific standard products
  • SOCs systems on chips
  • CPLDs complex programmable logic devices
  • These various implementations may include: being implemented in one or more computer programs that are executable and/or interpreted on a programmable system that includes at least one programmable processor that may be a special purpose or general purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
  • the program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions/operations specified in the flow chart and/or block diagram to be implemented.
  • the program code may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing.
  • machine-readable storage media include base An electrical connection on one or more wires, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
  • base An electrical connection on one or more wires a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
  • the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) or a liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer.
  • a display device e.g., a cathode ray tube (CRT) or a liquid crystal display (LCD) monitor
  • a keyboard and pointing device e.g., a mouse or trackball
  • Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
  • the systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components.
  • the components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include: Local Area Network (LAN), Wide Area Network (WAN), and the Internet.
  • a computer system may include a client and a server.
  • the client and the server are generally remote from each other and usually interact through a communication network.
  • the relationship of client and server is generated by computer programs running on the respective computers and having a client and server relationship with each other.
  • the server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
  • the embodiments of the present disclosure may be provided as methods, devices, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take 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 a computer-usable computer program.
  • a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • each process and/or box in the flowchart and/or block diagram, as well as the combination of the process and/or box in the flowchart and/or block diagram can be implemented by computer program commands.
  • These computer program commands can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the command executed by the processor of the computer or other programmable data processing device generates a device for implementing the function specified in one process or multiple processes in the flowchart and/or one box or multiple boxes in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Geometry (AREA)
  • Image Generation (AREA)

Abstract

Provided are a rendering method, apparatus and system for use in illumination simulation, a scene interaction method, for use in illumination simulation, for a lamp model made of a self-luminous material, an electronic device, and a storage medium, relating to the technical fields of computer image processing and decoration design. The rendering method for use in illumination simulation comprises: acquiring light parameters of lamp sets to be adjusted of a scene to be rendered; according to the light parameters, determining target image parameters of light layers corresponding to said lamp sets; according to the target image parameters, performing post-processing on the light layers corresponding to said lamp sets; and obtaining a target image of said scene on the basis of the light layers respectively corresponding to the lamp sets of said scene.

Description

渲染方法、装置和系统、电子设备及存储介质Rendering method, device and system, electronic device and storage medium 技术领域Technical Field

本公开涉及计算机图像处理和装修设计技术领域,具体涉及一种照明模拟中的渲染方法、用于照明模拟中的渲染的装置、用于照明模拟中的渲染的系统、照明模拟中的具有自发光材质的灯具模型的情景互动方法、电子设备及存储介质。The present disclosure relates to the technical field of computer image processing and interior design, and in particular to a rendering method in lighting simulation, a rendering device in lighting simulation, a rendering system in lighting simulation, a scenario interaction method of a lamp model with self-luminous material in lighting simulation, an electronic device and a storage medium.

背景技术Background technique

设计师在进行房屋装修设计时,为了进一步提高设计效果,除了必要的场景设计之外,还需对灯光布局进行设置,进而家居照明仿真系统应运而生。When designers are designing house decoration, in order to further improve the design effect, in addition to the necessary scene design, they also need to set the lighting layout, and then the home lighting simulation system comes into being.

在相关的照明仿真系统中,例如,如专利申请CN114299219A所公开的,每次修改设计,例如修改灯光参数,都需要重新调用渲染引擎进行情景渲染图的渲染,这需要消耗大量的渲染资源,增加了使用成本。In related lighting simulation systems, for example, as disclosed in patent application CN114299219A, each time a design is modified, such as modifying lighting parameters, the rendering engine needs to be re-called to render the scene rendering image, which consumes a large amount of rendering resources and increases the cost of use.

发明内容Summary of the invention

根据本公开的第一方面,提供了一种照明模拟中的渲染方法,应用于终端,包括:获取待渲染场景的待调整灯组的灯光参数;其中,待渲染场景与至少一个灯组相关联,至少一个灯组包括待调整灯组;根据灯光参数,确定与待调整灯组对应的灯光图层的目标图像参数;其中,目标图像参数包括目标亮度和目标色温中的至少一个;根据目标亮度和目标色温中的至少一个,对与待调整灯组对应的灯光图层进行后处理;其中,在终端中包括与待渲染场景对应的图层数据,图层数据包括与至少一个灯组分别对应的初始灯光图层;以及基于与至少一个灯组分别对应的灯光图层,得到待渲染场景的目标图像。According to a first aspect of the present disclosure, a rendering method in lighting simulation is provided, which is applied to a terminal and includes: obtaining lighting parameters of a light group to be adjusted of a scene to be rendered; wherein the scene to be rendered is associated with at least one light group, and the at least one light group includes the light group to be adjusted; according to the lighting parameters, determining target image parameters of a light layer corresponding to the light group to be adjusted; wherein the target image parameters include at least one of a target brightness and a target color temperature; according to at least one of the target brightness and the target color temperature, post-processing the light layer corresponding to the light group to be adjusted; wherein layer data corresponding to the scene to be rendered is included in the terminal, and the layer data includes initial light layers corresponding to at least one light group respectively; and obtaining a target image of the scene to be rendered based on the light layers corresponding to at least one light group respectively.

在一种实施方式中,该方法还可以包括:预先从服务器获取图层数据;其中,图层数据是由服务器根据渲染流程参数,针对至少一个灯组中的每一个执行渲染计算得到的。 In one embodiment, the method may further include: obtaining layer data from a server in advance; wherein the layer data is obtained by the server performing rendering calculations on each of at least one light group according to rendering process parameters.

在一种实施方式中,渲染流程参数可以包括:溢色修正、高光修正、色彩增强,或收敛终止条件中的至少一个。In one implementation, the rendering process parameters may include: at least one of overflow correction, highlight correction, color enhancement, or convergence termination conditions.

在一种实施方式中,根据目标亮度和目标色温中的至少一个,对与待调整灯组对应的灯光图层进行后处理,可以包括:根据目标亮度和目标色温中的至少一个,对与待调整灯组对应的初始灯光图层进行后处理;或,根据目标亮度和目标色温中的至少一个,对与待调整灯组对应的、经过至少一次后处理的灯光图层进行后处理。In one embodiment, post-processing the light layer corresponding to the light group to be adjusted according to at least one of the target brightness and the target color temperature may include: post-processing the initial light layer corresponding to the light group to be adjusted according to at least one of the target brightness and the target color temperature; or post-processing the light layer corresponding to the light group to be adjusted that has been post-processed at least once according to at least one of the target brightness and the target color temperature.

在一种实施方式中,基于与至少一个灯组分别对应的灯光图层,得到待渲染场景的目标图像,可以包括:在至少一个灯组为多个灯组的情况下,叠加与多个灯组分别对应的灯光图层。In one embodiment, obtaining a target image of a scene to be rendered based on light layers respectively corresponding to at least one light group may include: when at least one light group is a plurality of light groups, superimposing light layers respectively corresponding to the plurality of light groups.

在一种实施方式中,叠加与多个灯组分别对应的灯光图层,可以包括:使用归一化方法进行色温叠加计算。In one implementation, superimposing light layers corresponding to the plurality of light groups may include: performing color temperature superposition calculation using a normalization method.

在一种实施方式中,色温叠加计算方法可以包括:每个灯光图层乘以其亮度调节因数和色温调节权重。In one implementation, the color temperature superposition calculation method may include: multiplying each light layer by its brightness adjustment factor and color temperature adjustment weight.

在一种实施方式中,后处理可以包括:自动曝光、白平衡,或色调映射中的至少一个,其中,色调映射包括莱因哈德方法。In one embodiment, the post-processing may include at least one of automatic exposure, white balance, or tone mapping, wherein the tone mapping includes a Reinhard method.

在一种实施方式中,获取待渲染场景的待调整灯组的灯光参数,可以包括:依据被选定的灯光点,确定待调整灯组。In one implementation, obtaining the lighting parameters of the light group to be adjusted of the scene to be rendered may include: determining the light group to be adjusted according to the selected lighting point.

在一种实施方式中,该方法还可以包括:获取相机参数和待调整灯组的世界坐标;依据相机参数,将待调整灯组的世界坐标转换为在二维图像上的坐标;以及,根据在二维图像上的坐标,呈现灯光点。In one embodiment, the method may further include: obtaining camera parameters and world coordinates of the light group to be adjusted; converting the world coordinates of the light group to be adjusted into coordinates on a two-dimensional image based on the camera parameters; and presenting light points based on the coordinates on the two-dimensional image.

在一种实施方式中,该方法还可以包括:通过提示圈提示用户选择灯光点;以及,响应于灯光点被选择,确定与待调整灯组对应的灯光图层。In one embodiment, the method may further include: prompting the user to select a light point through a prompt circle; and, in response to the light point being selected, determining a light layer corresponding to the light group to be adjusted.

在一种实施方式中,灯光参数包括亮度、色温,或颜色中的至少一个。In one embodiment, the lighting parameter includes at least one of brightness, color temperature, or color.

根据本公开的第二方面,提供了一种照明模拟中的渲染方法,应用于服务器,包括:根据渲染流程参数,针对待渲染场景执行渲染计算,以得到图层数据;其中,待渲染场景与至少一个灯组相关联,图层数据包括与至少一个灯组分别对应的初始灯光图层;以及,将图 层数据传输给终端;其中,服务器在针对待渲染场景执行渲染计算的过程中,不执行后处理。According to a second aspect of the present disclosure, a rendering method in lighting simulation is provided, which is applied to a server, comprising: performing rendering calculations on a scene to be rendered according to rendering process parameters to obtain layer data; wherein the scene to be rendered is associated with at least one light group, and the layer data includes initial light layers corresponding to the at least one light group; and The layer data is transmitted to the terminal; wherein the server does not perform post-processing during the rendering calculation for the scene to be rendered.

在一种实施方式中,该方法还可以包括:获取渲染流程参数;其中,渲染流程参数包括:溢色修正、高光修正、色彩增强,或收敛终止条件中的至少一个。In one embodiment, the method may further include: obtaining rendering process parameters; wherein the rendering process parameters include: at least one of overflow correction, highlight correction, color enhancement, or convergence termination conditions.

在一种实施方式中,在将图层数据传输给终端之前,该方法还可以包括:采用降低图片占用空间的编码方法对图层数据进行编码。In one implementation, before transmitting the layer data to the terminal, the method may further include: encoding the layer data using an encoding method that reduces the space occupied by the image.

根据本公开的第三方面,提供了一种用于照明模拟中的渲染的装置,设置在终端中,包括:获取单元,被配置为获取待渲染场景的待调整灯组的灯光参数;其中,待渲染场景与至少一个灯组相关联,至少一个灯组包括待调整灯组;以及,处理单元,被配置为根据灯光参数,确定与待调整灯组对应的灯光图层的目标图像参数;其中,目标图像参数包括目标亮度和目标色温中的至少一个;根据目标亮度和目标色温中的至少一个,对与待调整灯组对应的灯光图层进行后处理;其中,在终端中包括与待渲染场景对应的图层数据,图层数据包括与至少一个灯组分别对应的初始灯光图层;以及基于与至少一个灯组分别对应的灯光图层,得到待渲染场景的目标图像。According to a third aspect of the present disclosure, there is provided a device for rendering in lighting simulation, which is arranged in a terminal and includes: an acquisition unit, configured to acquire lighting parameters of a light group to be adjusted of a scene to be rendered; wherein the scene to be rendered is associated with at least one light group, and the at least one light group includes the light group to be adjusted; and a processing unit, configured to determine target image parameters of a light layer corresponding to the light group to be adjusted according to the lighting parameters; wherein the target image parameters include at least one of a target brightness and a target color temperature; according to at least one of the target brightness and the target color temperature, post-processing the light layer corresponding to the light group to be adjusted; wherein layer data corresponding to the scene to be rendered is included in the terminal, and the layer data includes initial light layers corresponding to at least one light group respectively; and based on the light layers corresponding to at least one light group respectively, a target image of the scene to be rendered is obtained.

根据本公开的第四方面,提供了一种用于照明模拟中的渲染的装置,设置在服务器中,包括:渲染单元,被配置为根据渲染流程参数,针对待渲染场景执行渲染计算,以得到图层数据;其中,待渲染场景与至少一个灯组相关联,图层数据包括与至少一个灯组分别对应的初始灯光图层;以及,传输单元,被配置为将图层数据传输给终端;其中,渲染单元在针对待渲染场景执行渲染计算的过程中,不执行后处理。According to a fourth aspect of the present disclosure, there is provided a device for rendering in lighting simulation, which is arranged in a server and includes: a rendering unit, configured to perform rendering calculations on a scene to be rendered according to rendering process parameters to obtain layer data; wherein the scene to be rendered is associated with at least one light group, and the layer data includes an initial light layer corresponding to the at least one light group; and a transmission unit, configured to transmit the layer data to a terminal; wherein the rendering unit does not perform post-processing during the process of performing rendering calculations on the scene to be rendered.

根据本公开的第五方面,提供了一种用于照明模拟中的渲染的系统,包括:服务器,被配置为根据渲染流程参数,针对待渲染场景执行渲染计算,以得到图层数据;其中,待渲染场景与至少一个灯组相关联,图层数据包括与至少一个灯组分别对应的初始灯光图层;以及将图层数据传输给终端设备;其中,服务器在针对待渲染场景执行渲染计算的过程中,不执行后处理;以及,终端设备,被配置为获取 待渲染场景的待调整灯组的灯光参数;其中,待调整灯组包括在至少一个灯组中;根据灯光参数,确定与待调整灯组对应的灯光图层的目标图像参数;其中,目标图像参数包括目标亮度和目标色温中的至少一个;根据目标亮度和目标色温中的至少一个,对与待调整灯组对应的灯光图层进行后处理;以及基于与至少一个灯组分别对应的灯光图层,得到待渲染场景的目标图像。According to a fifth aspect of the present disclosure, a system for rendering in lighting simulation is provided, comprising: a server, configured to perform rendering calculations on a scene to be rendered according to rendering process parameters to obtain layer data; wherein the scene to be rendered is associated with at least one light group, and the layer data includes initial light layers corresponding to the at least one light group; and transmitting the layer data to a terminal device; wherein the server does not perform post-processing during the process of performing rendering calculations on the scene to be rendered; and the terminal device, configured to obtain Light parameters of a light group to be adjusted of a scene to be rendered; wherein the light group to be adjusted is included in at least one light group; according to the light parameters, target image parameters of a light layer corresponding to the light group to be adjusted are determined; wherein the target image parameters include at least one of a target brightness and a target color temperature; according to at least one of the target brightness and the target color temperature, post-processing the light layer corresponding to the light group to be adjusted; and obtaining a target image of the scene to be rendered based on the light layers respectively corresponding to at least one light group.

根据本公开的第六方面,提供了一种照明模拟中的具有自发光材质的灯具模型的情景互动方法,包括:获取具有自发光材质的灯具模型的数据;将具有自发光材质的灯具模型的数据转换为能够用于图层分离的通用格式数据;从通用格式数据中将每个灯具模型和与灯具模型对应的IES分离到单个图层,以得到多个单独灯具模型图层;其中,灯具模型包括单个灯具模型,和/或多个灯具模型形成的灯具模型组;获取待调整灯具模型的灯光参数;根据灯光参数,对与待调整灯具模型对应的单独灯具模型图层进行渲染;以及,显示渲染结果以实现情景互动。According to a sixth aspect of the present disclosure, a scenario interaction method for a lamp model with a self-luminous material in a lighting simulation is provided, comprising: obtaining data of the lamp model with a self-luminous material; converting the data of the lamp model with a self-luminous material into universal format data that can be used for layer separation; separating each lamp model and the IES corresponding to the lamp model from the universal format data into a single layer to obtain a plurality of separate lamp model layers; wherein the lamp model comprises a single lamp model, and/or a lamp model group formed by a plurality of lamp models; obtaining lighting parameters of the lamp model to be adjusted; rendering the separate lamp model layer corresponding to the lamp model to be adjusted according to the lighting parameters; and displaying the rendering result to achieve scenario interaction.

在一种实施方式中,从通用格式数据中将每个灯具模型分离到单个图层,可以包括:从通用格式数据中筛选灯具模型图层;其中,从通用格式数据中筛选灯具模型图层,包括:在灯具模型为无贴图的纯色灯具模型的情况下,提取灯具模型的物体名称、灯具模型的位置信息、灯具模型的材质信息、灯具模型的自发光属性,或灯具模型的漫反射属性中的至少一个;以及,在灯具模型带有贴图的情况下,提取灯具模型的物体名称、灯具模型的位置信息、灯具模型的材质信息、灯具模型的自发光属性、灯具模型的贴图的信息,或灯具模型的漫反射属性中的至少一个;其中,自发光属性包括灯光颜色和/或灯光强度。In one embodiment, separating each lamp model from the general format data into a single layer may include: filtering the lamp model layer from the general format data; wherein filtering the lamp model layer from the general format data includes: when the lamp model is a solid color lamp model without a texture, extracting at least one of the object name of the lamp model, the location information of the lamp model, the material information of the lamp model, the self-luminous property of the lamp model, or the diffuse reflection property of the lamp model; and, when the lamp model has a texture, extracting at least one of the object name of the lamp model, the location information of the lamp model, the material information of the lamp model, the self-luminous property of the lamp model, the information of the lamp model's texture, or the diffuse reflection property of the lamp model; wherein the self-luminous properties include light color and/or light intensity.

在一种实施方式中,该方法还可以包括:添加灯具模型的开/关灯逻辑;以及,根据开/关灯逻辑,在渲染过程中呈现灯具模型的开/关灯效果;其中,根据开/关灯逻辑,在渲染过程中呈现灯具模型的开/关灯效果,包括:在渲染单独灯具模型图层的情况下,读取灯具模型的自发光属性;以及,在渲染其它图层的情况下,读取灯具模型 的漫反射属性。In one embodiment, the method may further include: adding a light on/off logic of the lamp model; and, according to the light on/off logic, presenting the light on/off effect of the lamp model during the rendering process; wherein, according to the light on/off logic, presenting the light on/off effect of the lamp model during the rendering process includes: in the case of rendering a separate lamp model layer, reading the self-luminous property of the lamp model; and, in the case of rendering other layers, reading the self-luminous property of the lamp model. Diffuse properties of .

在一种实施方式中,在通用格式数据为lightmesh数据的情况下,根据开/关灯逻辑,在渲染过程中呈现灯具模型的开/关灯效果,可以包括:将单独灯具模型的lightmesh数据对应的尺寸放大设定的倍数并保留自发光属性,以使得在渲染单独灯具模型图层的情况下能够读取单独灯具模型的自发光属性,以实现开灯效果的展示;以及,保留单独灯具模型的漫反射属性,以使得在渲染其它图层的情况下能够读取单独灯具模型的漫反射属性,以实现关灯效果的展示。In one embodiment, when the general format data is lightmesh data, according to the light on/off logic, the light on/off effect of the lamp model is presented during the rendering process, which may include: enlarging the size corresponding to the lightmesh data of the individual lamp model by a set multiple and retaining the self-luminous property, so that when rendering a separate lamp model layer, the self-luminous property of the individual lamp model can be read to achieve the display of the light on effect; and retaining the diffuse reflection property of the individual lamp model, so that when rendering other layers, the diffuse reflection property of the individual lamp model can be read to achieve the display of the light off effect.

在一种实施方式中,在通用格式数据为vraymtl数据的情况下,根据开/关灯逻辑,在渲染过程中呈现灯具模型的开/关灯效果,可以包括:在单独灯具模型的vraymtl数据包括自发光属性值,并在渲染单独灯具模型图层的情况下,读取单独灯具模型的自发光属性值,以实现开灯效果的展示;以及,在渲染其它图层的情况下,读取单独灯具模型的漫反射属性,以实现关灯效果的展示。In one embodiment, when the general format data is vraymtl data, the on/off light effect of the lamp model is presented during the rendering process according to the on/off light logic, which may include: when the vraymtl data of a separate lamp model includes a self-luminous attribute value, and when rendering a separate lamp model layer, the self-luminous attribute value of the separate lamp model is read to achieve the display of the light-on effect; and, when rendering other layers, the diffuse reflection attribute of the separate lamp model is read to achieve the display of the light-off effect.

根据本公开的第七方面,提供了一种电子设备,包括:至少一个处理器;以及与该至少一个处理器通信连接的存储器;其中,存储器存储有能够被至少一个处理器执行的指令,指令被至少一个处理器执行,使得至少一个处理器执行上述第一方面或第二方面或第六方面所提供的方法。According to the seventh aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor executes the method provided in the first aspect, the second aspect or the sixth aspect above.

根据本公开的第八方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,该计算机指令用于使该计算机执行上述第一方面或第二方面或第六方面所提供的方法。According to an eighth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method provided by the first aspect, the second aspect or the sixth aspect above.

应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

附图用于更好地理解本方案,不构成对本公开的限定。The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

图1是本公开实施例提供的照明模拟中的渲染方法的一种流程示意图。 FIG1 is a schematic flow chart of a rendering method in lighting simulation provided by an embodiment of the present disclosure.

图2是本公开实施例提供的照明模拟中的渲染方法的另一种流程示意图。FIG. 2 is another schematic flow chart of a rendering method in lighting simulation provided by an embodiment of the present disclosure.

图3是本公开实施例提供的照明模拟中的渲染方法的又一种流程示意图。FIG. 3 is another schematic flow chart of a rendering method in lighting simulation provided by an embodiment of the present disclosure.

图4是本公开实施例提供的照明模拟中的渲染方法的再一种流程示意图。FIG. 4 is another schematic flow chart of a rendering method in lighting simulation provided by an embodiment of the present disclosure.

图5是本公开实施例提供的用于照明模拟中的渲染的系统的架构示意图。FIG. 5 is a schematic diagram of the architecture of a system for rendering in lighting simulation provided by an embodiment of the present disclosure.

图6是本公开实施例提供的照明模拟中的具有自发光材质的灯具模型的情景互动方法的一种流程图。FIG. 6 is a flow chart of a scenario interaction method for a lamp model with a self-luminous material in a lighting simulation provided by an embodiment of the present disclosure.

图7是本公开实施例提供的照明模拟中的具有自发光材质的灯具模型的情景互动方法的另一种流程图。FIG. 7 is another flow chart of a scenario interaction method for a lamp model with a self-luminous material in a lighting simulation provided by an embodiment of the present disclosure.

图8是本公开实施例提供的电子设备的示意性框图。FIG. 8 is a schematic block diagram of an electronic device provided by an embodiment of the present disclosure.

具体实施方式Detailed ways

以下结合附图及实施例,对本公开进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本公开,并不用于限定本公开。The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.

除非另有说明,本实施例使用的术语(包括科技术语)对所属技术领域的技术人员具有通常的理解含义。另外,可以理解的是,以通常使用的词典限定的术语,应当被理解为与其相关领域的语境具有一致的含义,而不应该被理解为理想化的或过于正式的意义。Unless otherwise specified, the terms (including scientific and technological terms) used in this embodiment have the commonly understood meanings to those skilled in the art. In addition, it is understood that the terms defined in commonly used dictionaries should be understood to have the same meanings as those in the context of the relevant fields, and should not be understood as idealized or overly formal meanings.

以下为部分术语的定义:The following are definitions of some terms:

WebP图片格式:一种高压缩比的sRGB(standard Red Green Blue)数据格式。WebP image format: a highly compressed sRGB (standard Red Green Blue) data format.

PNG图片格式:PNG(Portable Network Graphics),便携式网络图形,是一种采用无损压缩算法的位图格式,支持索引、灰度、RGB(Red Green Blue)三种颜色方案以及Alpha通道等特性。PNG image format: PNG (Portable Network Graphics), portable network graphics, is a bitmap format that uses a lossless compression algorithm. It supports index, grayscale, RGB (Red Green Blue) three color schemes and Alpha channel and other features.

EXR图片格式:一种高动态的线性图片数据。EXR image format: a high-dynamic linear image data.

色调映射(Tone Mapping):用于将颜色从原始色调(通常是 高动态范围,HDR)映射到目标色调(通常是低动态范围,LDR)。Tone Mapping: Used to convert colors from their original hue (usually High dynamic range, HDR) is mapped to a target tone (usually low dynamic range, LDR).

直接渲染图片:设计平台固定好视角后直接渲染出图的结果。Directly render the image: The design platform directly renders the image after fixing the viewing angle.

情景互动结果:对设计平台中的照明模拟进行情景配置后,得到的照明模拟的动画效果。Scenario interaction results: After scenario configuration of the lighting simulation in the design platform, the animation effect of the lighting simulation is obtained.

此外,本文提及的前端可以指终端(也即终端设备),后端可以指服务器。In addition, the front end mentioned in this article may refer to a terminal (ie, a terminal device), and the back end may refer to a server.

本公开实施例提供一种照明模拟中的渲染方法。如图1所示,其为本公开实施例提供的照明模拟中的渲染方法的一种流程示意图,该照明模拟中的渲染方法包括S101至S106。The embodiment of the present disclosure provides a rendering method in lighting simulation. As shown in FIG1 , it is a flow chart of a rendering method in lighting simulation provided by the embodiment of the present disclosure, and the rendering method in lighting simulation includes S101 to S106.

在S101中,服务器根据渲染流程参数,针对待渲染场景执行渲染计算,以得到图层数据;其中,待渲染场景与至少一个灯组相关联,图层数据包括与该至少一个灯组分别对应的初始灯光图层;其中,服务器在针对待渲染场景执行渲染计算的过程中,不执行后处理。In S101, the server performs rendering calculations on the scene to be rendered according to the rendering process parameters to obtain layer data; wherein the scene to be rendered is associated with at least one light group, and the layer data includes initial light layers corresponding to the at least one light group; wherein the server does not perform post-processing during the process of performing rendering calculations on the scene to be rendered.

在一种实施方式中,待渲染场景可以与一个灯组相关联,也可以与多个灯组相关联。与待渲染场景相关联的至少一个灯组,可以是指对待渲染场景的照明效果产生影响的全部灯组,例如,针对客厅,与客厅相关联的全部灯组可以包括位于客厅的空间内的灯组,以及位于连接客厅与卧室的走廊的空间内的灯组。此外,任一灯组可以包括一个或者多个灯具。In one embodiment, the scene to be rendered may be associated with one light group or multiple light groups. The at least one light group associated with the scene to be rendered may refer to all light groups that affect the lighting effect of the scene to be rendered. For example, for a living room, all light groups associated with the living room may include light groups located in the living room space and light groups located in the corridor space connecting the living room and the bedroom. In addition, any light group may include one or more lamps.

在一种实施方式中,服务器还可以建立待渲染场景的标识信息与至少一个灯组的标识信息之间的映射关系,服务器还可以建立至少一个灯组和与该至少一个灯组分别对应的初始灯光图层的标识信息之间的映射关系,本公开实施例在此不再赘述。In one embodiment, the server may also establish a mapping relationship between the identification information of the scene to be rendered and the identification information of at least one light group. The server may also establish a mapping relationship between at least one light group and the identification information of the initial light layer corresponding to the at least one light group. The embodiments of the present disclosure will not be described in detail herein.

在一种实施方式中,该照明模拟中的渲染方法在S101之前还可以包括:服务器接收终端发送的渲染请求。也就是说,服务器可以接收终端发送的渲染请求,响应于渲染请求,根据渲染流程参数,针对待渲染场景执行渲染计算。渲染请求中可以携带有渲染流程参数,和/或与待渲染场景相关的信息,与待渲染场景相关的信息可以包括待渲染场景的标识信息、待渲染场景的布局信息、与待渲染场景相关联的灯组信息等,只要服务器能够根据渲染请求以及预先存储的信息针 对待渲染场景执行渲染计算即可,本公开实施例对此不作任何限定。In one embodiment, the rendering method in the lighting simulation may further include, before S101: the server receives a rendering request sent by the terminal. That is, the server may receive a rendering request sent by the terminal, and in response to the rendering request, perform rendering calculations for the scene to be rendered according to the rendering process parameters. The rendering request may carry rendering process parameters and/or information related to the scene to be rendered. The information related to the scene to be rendered may include identification information of the scene to be rendered, layout information of the scene to be rendered, light group information associated with the scene to be rendered, etc. As long as the server can perform rendering calculations for the scene to be rendered according to the rendering request and pre-stored information, It is sufficient to perform rendering calculations on the scene to be rendered, and the embodiments of the present disclosure do not impose any limitation on this.

另外需要说明的是,终端发送渲染请求,可以由用户在终端界面上的点击、拖拽,和/或输入等操作触发。也就是说,服务器可以响应于用户的操作,针对待渲染场景执行渲染计算。It should also be noted that the terminal sending the rendering request may be triggered by a user clicking, dragging, and/or inputting on the terminal interface. In other words, the server may perform rendering calculations for the scene to be rendered in response to the user's operation.

在S102中,服务器将图层数据传输给终端。In S102, the server transmits the layer data to the terminal.

在一种实施方式中,服务器可以采用降低图片占用空间的编码方法对图层数据进行编码后再传输给终端,终端解码接收到的图层数据。In one implementation, the server may encode the layer data using an encoding method that reduces the space occupied by the image and then transmit the encoded layer data to the terminal, and the terminal decodes the received layer data.

需要说明的是,服务器可以通过推或者拉的方式将图层数据传输给终端,也就是说,可以是服务器主动向终端发送图层数据,也可以是终端主动从服务器获取图层数据,本公开实施例对此不作任何限定。It should be noted that the server can transmit the layer data to the terminal by pushing or pulling, that is, the server can actively send the layer data to the terminal, or the terminal can actively obtain the layer data from the server. The present embodiment does not impose any limitation on this.

在一种实施方式中,服务器还可以将待渲染场景的标识信息与至少一个灯组的标识信息之间的映射关系,和/或至少一个灯组和与该至少一个灯组分别对应的初始灯光图层的标识信息之间的映射关系传输给终端,本公开实施例在此不再赘述。In one embodiment, the server may also transmit to the terminal a mapping relationship between identification information of a scene to be rendered and identification information of at least one light group, and/or a mapping relationship between at least one light group and identification information of an initial light layer corresponding to the at least one light group, and the embodiments of the present disclosure will not be elaborated herein.

在S103中,终端获取待渲染场景的待调整灯组的灯光参数。In S103, the terminal obtains the lighting parameters of the light group to be adjusted of the scene to be rendered.

在一种实施方式中,待调整灯组包括在与待渲染场景相关联的至少一个灯组中,待调整灯组可以是与待渲染场景相关联的至少一个灯组中的部分或者全部。也就是说,在终端侧,可以对与待渲染场景相关联的全部灯组的灯光参数进行调整,也可以对与待渲染场景相关联的灯组中的部分灯组的灯光参数进行调整。In one embodiment, the light group to be adjusted is included in at least one light group associated with the scene to be rendered, and the light group to be adjusted may be part or all of the at least one light group associated with the scene to be rendered. That is, on the terminal side, the light parameters of all the light groups associated with the scene to be rendered may be adjusted, or the light parameters of some of the light groups associated with the scene to be rendered may be adjusted.

在一种实施方式中,终端获取待渲染场景的待调整灯组的灯光参数可以具体包括:终端接收用户输入的灯光参数调整请求,灯光参数调整请求可以包括待调整灯组的标识信息,和/或待调整灯组的灯光参数。In one embodiment, the terminal obtains the lighting parameters of the light group to be adjusted for the scene to be rendered, which may specifically include: the terminal receives a lighting parameter adjustment request input by a user, and the lighting parameter adjustment request may include identification information of the light group to be adjusted, and/or the lighting parameters of the light group to be adjusted.

需要说明的是,用户可以通过在终端界面上的点击、拖拽,和/或输入等操作输入灯光参数调整请求。也就是说,终端可以响应于用户的操作,对待调整灯组的灯光参数进行调整。It should be noted that the user can input a lighting parameter adjustment request by clicking, dragging, and/or inputting on the terminal interface. In other words, the terminal can adjust the lighting parameters of the light group to be adjusted in response to the user's operation.

在S104中,终端根据灯光参数,确定与待调整灯组对应的灯光 图层的目标图像参数;其中,目标图像参数包括目标亮度和目标色温中的至少一个。In S104, the terminal determines the light corresponding to the light group to be adjusted according to the light parameters. The target image parameters of the layer; wherein the target image parameters include at least one of a target brightness and a target color temperature.

在一种实施方式中,灯光参数可以包括色温和亮度中的至少一个,也就是说,在终端侧,针对任一待调整灯组,可以只调整该待调整灯组的色温,也可以只调整该待调整灯组的亮度,还可以既调整该待调整灯组的色温,又调整该待调整灯组的亮度。此外,针对所有的待调整灯组,被调整的灯光参数的类别(即亮度和/或色温)可以相同,也可以不同。In one embodiment, the lighting parameter may include at least one of color temperature and brightness, that is, on the terminal side, for any light group to be adjusted, only the color temperature of the light group to be adjusted may be adjusted, only the brightness of the light group to be adjusted may be adjusted, or both the color temperature and the brightness of the light group to be adjusted may be adjusted. In addition, for all light groups to be adjusted, the categories of the lighting parameters to be adjusted (i.e., brightness and/or color temperature) may be the same or different.

在一种实施方式中,根据灯光参数,确定与待调整灯组对应的灯光图层的目标亮度可以包括:根据待调整灯组的亮度,确定亮度调节因数;以及,确定目标亮度为与待调整灯组对应的当前灯光图层的亮度与亮度调节因数的乘积。In one embodiment, determining the target brightness of the light layer corresponding to the light group to be adjusted according to the light parameters may include: determining a brightness adjustment factor according to the brightness of the light group to be adjusted; and determining the target brightness as the product of the brightness of the current light layer corresponding to the light group to be adjusted and the brightness adjustment factor.

在一种实施方式中,根据灯光参数,确定与待调整灯组对应的灯光图层的目标色温可以包括:根据待调整灯组的色温以及基础色温,确定待调整灯组的第一颜色和基础灯光的第二颜色;确定色温调节权重为第一颜色与第二颜色的比值;以及确定目标色温为与待调整灯组对应的当前灯光图层的色温与色温调节权重的乘积。In one embodiment, determining the target color temperature of the light layer corresponding to the light group to be adjusted according to the light parameters may include: determining the first color of the light group to be adjusted and the second color of the basic light according to the color temperature of the light group to be adjusted and the basic color temperature; determining the color temperature adjustment weight as the ratio of the first color to the second color; and determining the target color temperature as the product of the color temperature of the current light layer corresponding to the light group to be adjusted and the color temperature adjustment weight.

在一种优选的实施方式中,与待调整灯组对应的当前灯光图层可以为与待调整灯组对应的初始灯光图层。也就是说,在设置待调整灯组的灯光参数,或者待调整灯组的灯光参数发生变化时,终端可以根据待调整灯组的灯光参数,对服务器渲染得到的、与该待调整灯组对应的初始灯光图层进行调整。In a preferred embodiment, the current light layer corresponding to the light group to be adjusted may be the initial light layer corresponding to the light group to be adjusted. That is, when the light parameters of the light group to be adjusted are set or the light parameters of the light group to be adjusted are changed, the terminal may adjust the initial light layer corresponding to the light group to be adjusted obtained by the server rendering according to the light parameters of the light group to be adjusted.

在另一种实施方式中,与待调整灯组对应的当前灯光图层可以为与待调整灯组对应的、经过至少一次后处理的灯光图层。也即,在设置待调整灯组的灯光参数,或者待调整灯组的灯光参数发生变化时,终端还可以根据待调整灯组的灯光参数以及在上一次调整过程中得到的与待调整灯组对应的灯光图层确定目标图像参数,并根据该目标图像参数对在上一次调整过程中得到的与待调整灯组对应的灯光图层进行调整。也就是说,本公开的发明构思在于,在服务器侧针对与待渲染场景相关联的各个灯组分别进行渲染,得到与各个灯组分别对 应的初始灯光图层,在有待调整灯组的灯光参数需要设置或者变化的情况下,终端侧可以对与待调整灯组对应的初始灯光图层进行一次调整或者多次递进式调整以得到目标灯光图层,并基于该目标灯光图层最终得到待渲染场景的目标图像。In another embodiment, the current light layer corresponding to the light group to be adjusted may be a light layer corresponding to the light group to be adjusted that has been post-processed at least once. That is, when setting the light parameters of the light group to be adjusted, or when the light parameters of the light group to be adjusted change, the terminal may also determine the target image parameters based on the light parameters of the light group to be adjusted and the light layer corresponding to the light group to be adjusted obtained in the last adjustment process, and adjust the light layer corresponding to the light group to be adjusted obtained in the last adjustment process according to the target image parameters. That is to say, the inventive concept of the present disclosure is to render the light groups associated with the scene to be rendered on the server side, respectively, and obtain the light layers corresponding to the light groups respectively. When the lighting parameters of the lighting group to be adjusted need to be set or changed, the terminal side can adjust the initial lighting layer corresponding to the lighting group to be adjusted once or multiple times in a progressive manner to obtain the target lighting layer, and finally obtain the target image of the scene to be rendered based on the target lighting layer.

在S105中,终端根据目标亮度和目标色温中的至少一个,对与待调整灯组对应的灯光图层进行后处理。In S105, the terminal performs post-processing on the light layer corresponding to the light group to be adjusted according to at least one of the target brightness and the target color temperature.

在一种实施方式中,根据目标亮度和目标色温中的至少一个,对与待调整灯组对应的灯光图层进行后处理,可以包括:根据目标亮度,终端对与待调整灯组对应的灯光图层进行自动曝光处理,也即终端根据目标亮度,对与待调整灯组对应的灯光图层进行亮度调节。In one embodiment, post-processing the light layer corresponding to the light group to be adjusted according to at least one of the target brightness and the target color temperature may include: according to the target brightness, the terminal automatically exposes the light layer corresponding to the light group to be adjusted, that is, the terminal adjusts the brightness of the light layer corresponding to the light group to be adjusted according to the target brightness.

在一种实施方式中,根据目标亮度和目标色温中的至少一个,对与待调整灯组对应的灯光图层进行后处理,可以包括:根据目标色温,终端对与待调整灯组对应的灯光图层进行白平衡处理,也即终端根据目标色温,待对与待调整灯组对应的灯光图层进行颜色调节。In one embodiment, post-processing the light layer corresponding to the light group to be adjusted according to at least one of the target brightness and the target color temperature may include: according to the target color temperature, the terminal performs white balance processing on the light layer corresponding to the light group to be adjusted, that is, the terminal performs color adjustment on the light layer corresponding to the light group to be adjusted according to the target color temperature.

在一种实施方式中,根据目标亮度和目标色温中的至少一个,对与待调整灯组对应的灯光图层进行后处理,可以包括:根据目标亮度和目标色温,终端对与待调整灯组对应的灯光图层进行色调映射处理,也即终端根据目标亮度和目标色温,对与待调整灯组对应的灯光图层进行像素值的调整。In one embodiment, post-processing the light layer corresponding to the light group to be adjusted according to at least one of the target brightness and the target color temperature may include: according to the target brightness and the target color temperature, the terminal performs tone mapping processing on the light layer corresponding to the light group to be adjusted, that is, the terminal adjusts the pixel value of the light layer corresponding to the light group to be adjusted according to the target brightness and the target color temperature.

在S106中,终端基于与该至少一个灯组分别对应的灯光图层,得到待渲染场景的目标图像。In S106, the terminal obtains a target image of the scene to be rendered based on the light layers respectively corresponding to the at least one light group.

在一种实施方式中,在与待渲染场景相关联的至少一个灯组为一个灯组,也即仅有一个待调整灯组与待渲染场景相关联的情况下,对与该待调整灯组对应的灯光图层进行后处理得到的目标灯光图层无需叠加其它灯光图层即可以作为待渲染场景的目标图像。In one embodiment, when at least one light group associated with the scene to be rendered is one light group, that is, only one light group to be adjusted is associated with the scene to be rendered, a target light layer obtained by post-processing the light layer corresponding to the light group to be adjusted can be used as the target image of the scene to be rendered without superimposing other light layers.

在一种实施方式中,在与待渲染场景相关联的至少一个灯组为多个灯组的情况下,可以叠加与该多个灯组分别对应的灯光图层(包括对与该待调整灯组对应的灯光图层进行后处理得到的目标灯光图层),得到待渲染场景的目标图像。In one embodiment, when there are multiple light groups associated with at least one light group to be rendered, light layers corresponding to the multiple light groups respectively (including target light layers obtained by post-processing the light layers corresponding to the light groups to be adjusted) can be superimposed to obtain a target image of the scene to be rendered.

需要说明的是,针对照明模拟的情景互动模式,只需要根据待 调整灯组的灯光参数,确定与待调整灯组对应的灯光图层在多个时刻的目标图像参数;并针对该多个时刻中的每一时刻,根据与该时刻对应的目标图像参数,对与待调整灯组对应的灯光图层进行后处理并生成与该时刻对应的待渲染场景的目标图像帧;最后将与多个时刻分别对应的多个目标图像帧按照时间顺序排列,便可生成情景互动效果动画,以动态显示待渲染场景的照明效果。It should be noted that for the scene interaction mode of lighting simulation, it is only necessary to Adjust the lighting parameters of the lighting group, determine the target image parameters of the lighting layer corresponding to the lighting group to be adjusted at multiple moments; and for each of the multiple moments, post-process the lighting layer corresponding to the lighting group to be adjusted according to the target image parameters corresponding to the moment and generate a target image frame of the scene to be rendered corresponding to the moment; finally, arrange the multiple target image frames corresponding to the multiple moments in chronological order to generate a scene interactive effect animation to dynamically display the lighting effect of the scene to be rendered.

根据本公开实施例,在服务器侧,可以根据渲染流程参数,对与待渲染场景相关联的至少一个灯组中的每一个执行渲染计算而不执行后处理,以得到与该至少一个灯组分别对应的初始灯光图层;在终端侧,可以根据获取的待调整灯组的灯光参数,确定与待调整灯组对应的灯光图层的目标亮度和/或目标色温,并根据目标亮度和/或目标色温对与待调整灯组对应的灯光图层进行后处理,使得经过后处理的、与待调整灯组对应的灯光图层的亮度和/或色温分别等于或约等于目标亮度和/或目标色温,最后基于与该至少一个灯组分别对应的灯光图层得到待渲染场景的目标图像;也就是说,针对与至少一个灯组相关联的待渲染场景,在服务器侧进行一次渲染得到与该至少一个灯组分别对应的各个初始灯光图层;在修改设计,例如修改灯光参数时,终端在根据待调整灯组的灯光参数对与待调整灯组对应的灯光图层进行后处理后,就可以基于与该至少一个灯组分别对应的各个灯光图层生成与直接渲染的结果效果相当的待渲染场景的目标图像,这不仅节约了渲染资源,还可以避免频繁地使用网络传输直接渲染的结果,从而减轻了网络传输负担并提升了渲染的效率。According to an embodiment of the present disclosure, on the server side, rendering calculation can be performed on each of at least one light group associated with the scene to be rendered without performing post-processing according to the rendering process parameters, so as to obtain an initial light layer corresponding to the at least one light group respectively; on the terminal side, the target brightness and/or target color temperature of the light layer corresponding to the light group to be adjusted can be determined according to the obtained light parameters of the light group to be adjusted, and the light layer corresponding to the light group to be adjusted can be post-processed according to the target brightness and/or target color temperature, so that the brightness and/or color temperature of the light layer corresponding to the light group to be adjusted after post-processing is equal to or approximately equal to the target brightness and/or target color temperature, and finally, based on the light parameters of the at least one light group respectively associated with the scene to be rendered, the target brightness and/or target color temperature of the light layer can be determined according to the obtained light parameters of the light group to be adjusted. that is, for the scene to be rendered associated with at least one light group, a rendering is performed on the server side once to obtain the initial light layers corresponding to the at least one light group; when modifying the design, such as modifying the light parameters, the terminal can generate a target image of the scene to be rendered based on the light layers corresponding to the at least one light group, which is equivalent to the result of direct rendering. This not only saves rendering resources, but also avoids the frequent use of the network to transmit the results of direct rendering, thereby reducing the burden of network transmission and improving rendering efficiency.

以下结合附图详细描述本公开实施例提供的照明模拟中的渲染方法的一种实施方式。参考图2,照明模拟中的渲染方法,可以包括S201-S205。An implementation of a rendering method in lighting simulation provided by an embodiment of the present disclosure is described in detail below in conjunction with the accompanying drawings. Referring to Fig. 2 , the rendering method in lighting simulation may include S201-S205.

在S201中,前端获取情景互动模式的灯光参数。In S201, the front end obtains the lighting parameters of the scene interaction mode.

在一种实施方式中,前端可以获取由用户输入的情景互动模式的灯光参数,例如待调整灯组的色温和/或亮度等。情景互动模式的灯光参数可以涉及照明方案使用的灯具组合以及每个灯具(例如,待调整灯组以及待调整灯组中的每个灯具)的色温、亮度、颜色、灯具 的延时时长,和/或灯具的渐变时长等参数。In one embodiment, the front end may obtain the lighting parameters of the scene interaction mode input by the user, such as the color temperature and/or brightness of the light group to be adjusted. The lighting parameters of the scene interaction mode may involve the light combination used in the lighting scheme and the color temperature, brightness, color, and brightness of each light (e.g., the light group to be adjusted and each light in the light group to be adjusted). The delay time of the light, and/or the gradient time of the light.

在S202中,后端执行各灯光图层的渲染计算,以得到图层渲染结果。In S202, the backend performs rendering calculations on each light layer to obtain a layer rendering result.

在一种实施方式中,在后端执行各灯光图层的渲染计算之前,可以设定渲染流程参数。由于在渲染的过程中可能需要解决亮度过曝和/或高光等问题,因此在渲染的过程中经常会添加包括但不限于溢色修正、高光修正、色彩增强,或收敛终止条件中的至少一个的渲染流程参数。为保证情景互动的结果与直接渲染的结果能够对应起来,可以使得在情景互动渲染的过程中使用的渲染流程参数和在直接渲染的过程中使用的渲染流程参数一致,例如,在情景互动渲染的过程中设定的溢色修正、高光修正、色彩增强和/或收敛终止条件的参数值分别与在直接渲染的过程中使用的溢色修正、高光修正、色彩增强和/或收敛终止条件的参数值相同。在设定渲染流程参数后,后端可以针对与待渲染场景相关联的各个灯组分别进行灯光图层的渲染计算,以得到图层渲染结果,该图层渲染结果包括与每个灯组对应的初始灯光图层。In one embodiment, before the backend performs the rendering calculation of each light layer, the rendering process parameters can be set. Since it may be necessary to solve problems such as brightness overexposure and/or highlights during the rendering process, rendering process parameters including but not limited to overflow correction, highlight correction, color enhancement, or at least one of the convergence termination conditions are often added during the rendering process. In order to ensure that the result of scene interaction can correspond to the result of direct rendering, the rendering process parameters used in the scene interaction rendering process can be made consistent with the rendering process parameters used in the direct rendering process. For example, the parameter values of overflow correction, highlight correction, color enhancement and/or convergence termination conditions set in the scene interaction rendering process are respectively the same as the parameter values of overflow correction, highlight correction, color enhancement and/or convergence termination conditions used in the direct rendering process. After setting the rendering process parameters, the backend can perform rendering calculations of the light layers for each light group associated with the scene to be rendered to obtain a layer rendering result, which includes an initial light layer corresponding to each light group.

在一种实施方式中,渲染流程参数的设定方式可以包括:接收用户从灯光模板中选择的预设参数。In one implementation, the method of setting the rendering process parameters may include: receiving preset parameters selected by a user from a lighting template.

在S203中,后端将图层渲染结果进行编码后传输给前端,前端解码得到图层数据。In S203, the backend encodes the layer rendering result and transmits it to the frontend, and the frontend decodes it to obtain the layer data.

另外需要说明的是,在不对图层渲染结果进行编/解码的实施方式中,或者在忽略编/解码导致的数据损失的情况下,图层数据即为图层渲染结果。It should also be noted that, in an implementation manner where the layer rendering result is not encoded/decoded, or when data loss caused by encoding/decoding is ignored, the layer data is the layer rendering result.

本步骤主要是将图层渲染结果进行编码后传输到前端,然后在前端解码得到图层数据。之所以要进行图像编/解码是因为得到的图层渲染结果是用EXR格式保存的,EXR是高动态范围的HDR图片(或灯光图层),存储的图片信息非常精细,但是占用空间非常大,导致前端的网络传输压力非常大,需要使用合适的图片压缩和解码技术解决。本公开实施例提供了三种编/解码的方法,但可以认识到的是,本公开实施例并不对编/解码方法进行任何限制,任何在后端通 过编码图层渲染结果(也即图层数据)降低其占用空间、将编码后的图层渲染结果传输到前端后再解码使用的方法都在本公开的保护范围内。This step mainly encodes the layer rendering result and transmits it to the front end, and then decodes it on the front end to obtain the layer data. The reason for image encoding/decoding is that the layer rendering result is saved in EXR format. EXR is a high dynamic range HDR picture (or light layer). The stored image information is very detailed, but it takes up a lot of space, which causes a lot of network transmission pressure on the front end. It needs to be solved by using appropriate image compression and decoding technology. The disclosed embodiment provides three encoding/decoding methods, but it can be recognized that the disclosed embodiment does not impose any restrictions on the encoding/decoding methods, and any method passed in the back end is not limited. Methods of reducing the space occupied by over-encoding layer rendering results (ie, layer data) and transmitting the encoded layer rendering results to the front end for decoding and use are all within the scope of protection of the present disclosure.

在一种可能的实施方式中,可以采用编/解码方法一。In a possible implementation, encoding/decoding method 1 may be adopted.

该方法参考UE4中的lightmap的解码方法,还原出UE4对lightmap的编码,具体公式如下:
img_i=(log2(img_hdr_i+0.00390625)+8)/16;
This method refers to the decoding method of lightmap in UE4 to restore UE4's encoding of lightmap. The specific formula is as follows:
img_i=(log2(img_hdr_i+0.00390625)+8)/16;

其中img_hdr_i为后端渲染得到的EXR图片(也即灯光图层)的第i个像素的像素值,其中,i=1,2,…N,N为EXR图片中的总像素数;
v_min=min(img_i);
v_max=max(img_i);
n_mul=1/(v_max-v_min);
n_add=-v_min/(v_max-v_min);
img_webp_i=img_i*n_mul+n_add;
Where img_hdr_i is the pixel value of the i-th pixel of the EXR image (i.e., the light layer) rendered by the backend, where i = 1, 2, ... N, and N is the total number of pixels in the EXR image;
v_min = min(img_i);
v_max = max(img_i);
n_mul=1/(v_max-v_min);
n_add = -v_min/(v_max - v_min);
img_webp_i=img_i*n_mul+n_add;

img_webp_i为编码得到的图片(也即灯光图层)的第i个像素的像素值,可以存储为WebP格式或JPEG(Joint Photographic Experts Group)格式,将该图片传输到前端进行解码:
img_i=(img_webp_i-n_add)/n_mul;
img_hdr_i=2img_i*16-8-0.00390625;
img_webp_i is the pixel value of the i-th pixel of the encoded image (i.e., the light layer), which can be stored in WebP format or JPEG (Joint Photographic Experts Group) format. The image is transmitted to the front end for decoding:
img_i = (img_webp_i - n_add)/n_mul;
img_hdr_i=2img_i*16-8-0.00390625;

img_hdr_i为最终前端解码得到的EXR图片(也即灯光图层)的第i个像素的像素值。img_hdr_i is the pixel value of the i-th pixel of the EXR image (that is, the light layer) finally decoded by the front end.

在另一种可能的实施方式中,可以采用编/解码方法二。In another possible implementation, encoding/decoding method 2 may be adopted.

Xp_i=img_hdr_i*M,其中img_hdr_i为后端渲染得到的EXR图片(也即灯光图层)的第i个像素的像素值,其中,i=1,2,…N,N为EXR图片中的总像素数,M为编码矩阵:Xp_i=img_hdr_i*M, where img_hdr_i is the pixel value of the i-th pixel of the EXR image (i.e., the light layer) rendered by the backend, where i=1,2,…N, N is the total number of pixels in the EXR image, and M is the encoding matrix:


resX_i=Xp_i[0]/Xp_i[2];
resY_i=Xp_i[1]/Xp_i[2];
Le_i=2*log2(Xp_i[1])+127;

resX_i=Xp_i[0]/Xp_i[2];
resY_i=Xp_i[1]/Xp_i[2];
Le_i=2*log2(Xp_i[1])+127;

Xp_i中存储有三个值,Xp_i[0],Xp_i[1]和Xp_i[2]分别表示第一个值,第二个值和第三个值,下同。
img_webp_i[0]=resX_i;
img_webp_i[1]=resY_i;
img_webp_i[2]=resZ_i/255;
img_webp_i[3]=resW_i;
Xp_i stores three values, Xp_i[0], Xp_i[1] and Xp_i[2] represent the first value, the second value and the third value respectively, and the same below.
img_webp_i[0] = resX_i;
img_webp_i[1] = resY_i;
img_webp_i[2] = resZ_i/255;
img_webp_i[3] = resW_i;

其中,img_webp_i存储有四个值,resW_i为Le_i的小数部分,resZ_i为Le_i的整数部分。赋值完成后,将img_webp_i中的每一个值乘以255之后,再四舍五入,将其中小于0的值赋值为0,大于255的值赋值为255,处理之后便得到了编码完成的图片,其保存为WebP格式,将其传输到前端进行解码:
Le_i=img_webp_i[2]*255+img_webp_i[3];
y_i=2(Le_i-127)/2;
z_i=y_i/img_webp_i[1];
x_i=img_webp_i[0]*z_i;
Xp_i[0]=x_i;
Xp_i[1]=y_i;
Xp_i[2]=z_i;
img_hdr_i=Xp_i*M_reverse;
Among them, img_webp_i stores four values, resW_i is the decimal part of Le_i, and resZ_i is the integer part of Le_i. After the assignment is completed, each value in img_webp_i is multiplied by 255, and then rounded, and the values less than 0 are assigned to 0, and the values greater than 255 are assigned to 255. After processing, the encoded image is obtained, which is saved in WebP format and transmitted to the front end for decoding:
Le_i = img_webp_i[2]*255+img_webp_i[3];
y_i=2(Le_i-127)/2;
z_i=y_i/img_webp_i[1];
x_i=img_webp_i[0]*z_i;
Xp_i[0]=x_i;
Xp_i[1]=y_i;
Xp_i[2]=z_i;
img_hdr_i=Xp_i*M_reverse;

其中,M_inverse为M的逆矩阵,img_hdr_i为前端解码得到的渲染图(也即灯光图层)的第i个像素的像素值。Among them, M_inverse is the inverse matrix of M, and img_hdr_i is the pixel value of the i-th pixel of the rendering image (that is, the light layer) obtained by front-end decoding.

在另一种可能的实施方式中,可以采用编/解码方法三。In another possible implementation, encoding/decoding method three may be adopted.

max_float_i存储后端渲染得到的EXR图片(也即灯光图层)的第i个像素img_exr_i中的三个值中的最大值与0.00001之和,其中,i=1,2,…N,N为EXR图片中的总像素数;max_float_i stores the sum of the maximum of the three values in the i-th pixel img_exr_i of the EXR image (i.e., the light layer) rendered by the backend and 0.00001, where i = 1, 2, ... N, and N is the total number of pixels in the EXR image;

将max_float_i拆分成两个值:scale_i和exponent_i,它们之间的关系为max_float_i=scale_i*2exponent_i;
scale_i=scale_i*256/max_float_i;
img_webp_i[0]=(img_exr_i*scale_i)[0];
img_webp_i[1]=(img_exr_i*scale_i)[1];
img_webp_i[2]=(img_exr_i*scale_i)[2];
img_webp_i[3]=exponent_i+128;
Split max_float_i into two values: scale_i and exponent_i, the relationship between them is max_float_i = scale_i * 2exponent_i;
scale_i = scale_i*256/max_float_i;
img_webp_i[0]=(img_exr_i*scale_i)[0];
img_webp_i[1]=(img_exr_i*scale_i)[1];
img_webp_i[2] = (img_exr_i * scale_i)[2];
img_webp_i[3] = exponent_i + 128;

img_webp_i为编码得到的图片(也即灯光图层)的第i个像素的像素值,其可以保存为WebP格式,将其传输到前端进行解码:
img3_i=2img_webp_i[3]*255-128;
img_hdr_i[0]=img_webp_i[0]*img3_i;
img_hdr_i[1]=img_webp_i[1]*img3_i;
img_hdr_i[2]=img_webp_i[2]*img3_i;
img_webp_i is the pixel value of the i-th pixel of the encoded image (i.e., the light layer), which can be saved in WebP format and transmitted to the front end for decoding:
img3_i=2img_webp_i[3]*255-128;
img_hdr_i[0]=img_webp_i[0]*img3_i;
img_hdr_i[1]=img_webp_i[1]*img3_i;
img_hdr_i[2]=img_webp_i[2]*img3_i;

其中,img_hdr_i为前端解码得到的渲染图(也即灯光图层)的第i个像素的像素值。Among them, img_hdr_i is the pixel value of the i-th pixel of the rendering image (that is, the light layer) obtained by front-end decoding.

上述的三种方法均能有效压缩EXR图片,例如,大小为5.33M的2048像素×2048像素的EXR文件可以被压缩到218K。采用方法一编码,由于存储空间只有三个通道,在图像层面会存在肉眼难以察觉的条纹瑕疵,以及杂色问题;因此,在要求数据损失率低或者图层数较多的情况下,可以采用方法二和方法三使用四通道存储图片,保存的信息更多,可以较为有效地解决上述问题。The above three methods can effectively compress EXR images. For example, a 2048×2048 pixel EXR file with a size of 5.33M can be compressed to 218K. When encoding with method 1, since there are only three channels in the storage space, there will be stripe defects and color noise problems that are difficult to detect with the naked eye at the image level; therefore, when a low data loss rate is required or there are many layers, methods 2 and 3 can be used to store images with four channels, which can save more information and effectively solve the above problems.

由此可知,实际应用中网络传输的数据并不限于WebP格式。采用编/解码方法一,网络传输的数据可以是JPEG、PNG或WebP格式;采用编/解码方法二或三,网络传输的数据可以是PNG或WebP格式。由于PNG和WebP格式的精度相同,均比JPEG格式的精度高,且WebP格式的压缩率更高但是存在兼容性问题,约有5%的浏览器不支持WebP格式;因此,在一种实施方式中,可以默认将图层渲染结果压缩为WebP格式;如遇WebP格式不被支持的情况,则终端可请求服务器(例如,云端服务器)将数据转码为PNG格式后返回。It can be seen that in actual applications, the data transmitted over the network is not limited to the WebP format. Using encoding/decoding method one, the data transmitted over the network can be in JPEG, PNG or WebP format; using encoding/decoding method two or three, the data transmitted over the network can be in PNG or WebP format. Since the PNG and WebP formats have the same precision, both are higher than the JPEG format, and the WebP format has a higher compression rate but there are compatibility issues. About 5% of browsers do not support the WebP format; therefore, in one embodiment, the layer rendering results can be compressed to the WebP format by default; if the WebP format is not supported, the terminal can request the server (for example, a cloud server) to transcode the data into PNG format and return it.

在S204中,前端对解码后的图层数据进行后处理。In S204, the front end performs post-processing on the decoded layer data.

前端对得到的图片(也即与待调整灯组对应的灯光图层)进行后处理,后处理可以包括自动曝光、白平衡,或色调映射(Tone Mapping)中的至少一个。渲染分层过程中的色调映射(Tone Mapping) 可以包括:Linear multiply、Exponential、HSV exponential、Gamma correction,和/或莱因哈德(Reinhard)等,简要说明如下:The front end performs post-processing on the obtained image (i.e., the light layer corresponding to the light group to be adjusted), and the post-processing may include at least one of automatic exposure, white balance, or tone mapping. Tone Mapping in the rendering layering process These may include: Linear multiply, Exponential, HSV exponential, Gamma correction, and/or Reinhard, etc., briefly described below:

Linear multiply:线性相加,亮度直接线性相加而不作用任何更改。Linear multiply: Linear addition, the brightness is directly added linearly without any changes.

Exponential:根据亮度做指数变化,可以使得过度亮的部分不会过曝。Exponential: Exponential changes based on brightness can prevent overly bright parts from being overexposed.

HSV exponential:类似于指数函数矫正,但保留了颜色的色调和饱和度,而不是洗掉的颜色变为白色。HSV exponential: Similar to exponential correction, but preserves the hue and saturation of the color instead of washing out the color to white.

Gamma correction:直接对颜色进行gamma函数矫正。Gamma correction: Directly apply gamma function correction to color.

Reinhard:指数乘和线性乘的混合。输入参数包括burn value(混合值或称为燃烧值)等。burn value为0时显示的是线性倍增的效果,画面靓丽但容易曝光;burn value为1时显示的是指数倍增的效果,画面柔和但饱和度以及层次关系不够明确。根据实际情况在0~1之间调节burn value。Reinhard: A mixture of exponential multiplication and linear multiplication. Input parameters include burn value (mixed value or burning value). When burn value is 0, it shows the effect of linear multiplication, the picture is beautiful but easy to be exposed; when burn value is 1, it shows the effect of exponential multiplication, the picture is soft but the saturation and layer relationship are not clear. Adjust burn value between 0 and 1 according to the actual situation.

自动曝光:自动曝光一方面可以根据渲染出来的图像亮度自动调节渲染参数,从而达到最佳的曝光效果,这样可以避免反复地手动调整参数,从而提高了渲染的效率;另一方面,自动曝光可以自动调整曝光、对比度和色彩平衡等参数,从而使渲染出的图像更加接近于真实的场景,同时也能够避免因为手动调节导致的错误或偏差。Automatic exposure: On the one hand, automatic exposure can automatically adjust rendering parameters according to the brightness of the rendered image to achieve the best exposure effect, which can avoid repeated manual adjustment of parameters and improve rendering efficiency. On the other hand, automatic exposure can automatically adjust parameters such as exposure, contrast and color balance to make the rendered image closer to the real scene, while also avoiding errors or deviations caused by manual adjustment.

白平衡:通过白平衡,用户可以将画面的冷暖调整为自己所需要的情况,可以让画面表现更贴近真实。White balance: Through white balance, users can adjust the warmth or coldness of the picture to what they need, making the picture appear closer to reality.

色调映射(Tone Mapping):在计算机图形学中,一些特殊的光照条件下会产生非常亮或非常暗的区域,这超出了人眼的感知范围。色调映射可以帮助用户在LDR显示设备上还原HDR场景的细节,从而提高图像的质量。此外,HDR图像包含大量的细节信息,而低动态范围的显示设备无法忠实地还原这些信息。通过使用优秀的色调映射算法,可以将这些细节信息压缩到LDR图像中,并使其在低动态范围的显示设备上得以呈现。LDR图像经过色调映射处理后可以使得整张图像的颜色、亮度、对比度更加均衡,增强视觉效果,让用户更好地沉浸在图像场景中。色调映射可以针对不同的显示设备选择合 适的算法,以达到最佳的渲染效果,这使得用户可以将HDR图像转换成符合不同显示设备需求的LDR图像,从而增强了图像的通用性和适用性。Tone Mapping: In computer graphics, some special lighting conditions produce very bright or very dark areas, which are beyond the perception of the human eye. Tone mapping can help users restore the details of HDR scenes on LDR display devices, thereby improving the quality of the image. In addition, HDR images contain a lot of detail information, which low dynamic range display devices cannot faithfully restore. By using excellent tone mapping algorithms, these detail information can be compressed into LDR images and presented on low dynamic range display devices. After tone mapping, the LDR image can make the color, brightness, and contrast of the entire image more balanced, enhance the visual effect, and allow users to better immerse themselves in the image scene. Tone mapping can select appropriate tone mapping algorithms for different display devices. The appropriate algorithm is used to achieve the best rendering effect, which allows users to convert HDR images into LDR images that meet the requirements of different display devices, thereby enhancing the versatility and applicability of the image.

需要说明的是,在前述S202的后端的渲染过程中须将自带的后处理关闭,即在S202中不添加任何后处理算法。也就是说,关闭渲染分层过程中的后处理算法(包括但不限于Color Mapping),输出原始的分层结果(也即初始灯光图层),后处理在前端的图层叠加部分实施,并选择Reinhard算法来实现色调映射(Tone Mapping)。It should be noted that the built-in post-processing must be turned off in the rendering process of the backend of S202, that is, no post-processing algorithm is added in S202. In other words, the post-processing algorithm in the rendering layering process (including but not limited to Color Mapping) is turned off, the original layering result (that is, the initial light layer) is output, the post-processing is implemented in the layer overlay part of the front end, and the Reinhard algorithm is selected to implement tone mapping (Tone Mapping).

后端渲染原始灯光的图层分离后不添加任何后处理操作,直接编码图层数据并将其传输到前端,前端对解码之后的图层数据使用Reinhard算法进行色调映射(Tone Mapping)。Reinhard曝光方式兼顾了“线性倍增”和“指数倍增”两种曝光方式的特性,较大的曝光程度,如在HDR空间像素值1附近,相当于线性倍增,而较小的曝光值相当于指数倍增,使用Reinhard算法能让室内空间的色彩表现更加丰富,此方法将HDR空间的数据转为图像unit8空间的图像数据,可以减少由HDR空间到图像Unit8空间的数据损失,和直接渲染结果,比如PNG格式的图像,的差距会更小。After the back-end renders the original light layer separation, no post-processing operations are added. The layer data is directly encoded and transmitted to the front-end. The front-end uses the Reinhard algorithm to perform tone mapping (Tone Mapping) on the decoded layer data. The Reinhard exposure method takes into account the characteristics of both "linear multiplication" and "exponential multiplication". A larger exposure degree, such as near the HDR space pixel value 1, is equivalent to linear multiplication, while a smaller exposure value is equivalent to exponential multiplication. The use of the Reinhard algorithm can make the color performance of the interior space richer. This method converts the data of the HDR space into the image data of the image unit8 space, which can reduce the data loss from the HDR space to the image unit8 space, and the gap with the direct rendering result, such as the image in PNG format, will be smaller.

在S205中,前端根据目标亮度和目标色温进行图层叠加,生成并显示情景互动效果动画。In S205, the front end performs layer overlay according to the target brightness and the target color temperature, and generates and displays a scene interaction effect animation.

前端通过情景模式的延时、渐变等参数(也即待调整灯组的灯光参数),计算每一帧图像的与每个待调整灯组对应的灯光图层的目标亮度和目标色温,然后对解码后的图层数据中的图层按照各自的目标亮度和目标色温进行叠加,以得到各图像帧,最终生成并显示情景互动效果动画。The front end calculates the target brightness and target color temperature of the light layer corresponding to each light group to be adjusted in each frame of image through the delay, gradient and other parameters of the scene mode (that is, the lighting parameters of the light group to be adjusted), and then superimposes the layers in the decoded layer data according to their respective target brightness and target color temperature to obtain each image frame, and finally generates and displays the scene interaction effect animation.

在一种实施方式中,叠加与多个灯组分别对应的灯光图层,可以包括:使用归一化方法进行色温叠加计算。In one implementation, superimposing light layers corresponding to the plurality of light groups may include: performing color temperature superposition calculation using a normalization method.

下面结合具体示例,详细说明本公开实施例中的色温叠加算法。The color temperature superposition algorithm in the embodiment of the present disclosure is described in detail below with reference to specific examples.

以待渲染场景与两个灯组light_1和light_2相关联为例,后端使用基础色温6500k,针对light_1和light_2分别进行渲染得到对应的灯光图层img_exr_1和img_exr_2;假设在前端,待调整灯组light_1 的亮度和色温分别被设置为bright_ratio_1和temperature_1,待调整灯组light_2的亮度和色温分别被设置为bright_ratio_2和temperature_2。Take the scene to be rendered as an example, which is associated with two light groups light_1 and light_2. The backend uses the basic color temperature 6500k to render light_1 and light_2 respectively to obtain the corresponding light layers img_exr_1 and img_exr_2. Assume that on the front end, the light group to be adjusted light_1 The brightness and color temperature of the light group light_2 to be adjusted are set to bright_ratio_1 and temperature_1 respectively, and the brightness and color temperature of the light group light_2 to be adjusted are set to bright_ratio_2 and temperature_2 respectively.

首先,可以根据light_1的亮度bright_ratio_1以及light_2的亮度bright_ratio_2,确定与light_1对应的img_exr_1的目标亮度为img_exr_1*bright_ratio_1,以及确定与light_2对应的img_exr_2的目标亮度为img_exr_2*bright_ratio_2。First, according to the brightness bright_ratio_1 of light_1 and the brightness bright_ratio_2 of light_2, the target brightness of img_exr_1 corresponding to light_1 can be determined as img_exr_1*bright_ratio_1, and the target brightness of img_exr_2 corresponding to light_2 can be determined as img_exr_2*bright_ratio_2.

然后,可以将灯组的色温转化为用于描述图像中像素颜色的RGB值,对应的转换算法可以为:Then, the color temperature of the light group can be converted into RGB values used to describe the pixel color in the image. The corresponding conversion algorithm can be:

根据CIE 1931色度图中的黑体辐射曲线函数,将色温转化为相对色度坐标(x,y);再通过公式:X=(x/y)、Z=(1-x-y)/y将相对色度坐标(x,y)转为绝对色度坐标(X,Y,Z),其中为了保证调整色温不改变亮度的性质,Y固定为1;最后通过预设矩阵将绝对色度坐标转化为RGB值,该预设矩阵可以为:
According to the blackbody radiation curve function in the CIE 1931 chromaticity diagram, the color temperature is converted into relative chromaticity coordinates (x, y); then the relative chromaticity coordinates (x, y) are converted into absolute chromaticity coordinates (X, Y, Z) by the formula: X = (x/y), Z = (1-xy)/y, where Y is fixed to 1 to ensure that the adjustment of the color temperature does not change the brightness; finally, the absolute chromaticity coordinates are converted into RGB values by a preset matrix, which can be:

根据色温temperature_1、temperature_2和6500k,通过上述计算可以分别得到light_1的颜色color_1、light_2的color_2,以及基础灯光的颜色color_base。由于img_exr_1与img_exr_2都是基于6500k的色温渲染的图层,因此,可以根据基础灯光的颜色color_base以及light_1的颜色color_1,确定与light_1对应的img_exr_1的目标色温为img_exr_1*(color_1/color_base),根据基础灯光的颜色color_base以及light_2的颜色color_2,确定与light_2对应的img_exr_2的目标色温为img_exr_2*(color_2/color_base)。According to the color temperatures temperature_1, temperature_2 and 6500k, the above calculations can respectively obtain the color color_1 of light_1, color_2 of light_2, and color_base of the base light. Since both img_exr_1 and img_exr_2 are layers rendered based on the color temperature of 6500k, the target color temperature of img_exr_1 corresponding to light_1 can be determined as img_exr_1*(color_1/color_base) according to the color color_base of the base light and color_1 of light_1, and the target color temperature of img_exr_2 corresponding to light_2 can be determined as img_exr_2*(color_2/color_base) according to the color color_base of the base light and color_2 of light_2.

最后,根据img_exr_1的目标亮度img_exr_1*bright_ratio_1和目标色温img_exr_1*(color_1/color_base)对img_exr_1进行后处理,得到与light_1对应的目标灯光图层img_exr_post_1,根据img_exr_2的目标亮度img_exr_2*bright_ratio_2和目标色温 img_exr_2*(color_2/color_base)对img_exr_2进行后处理,得到与light_2对应的目标灯光图层img_exr_post_2,再将img_exr_post_1与img_exr_post_2相加,并应用Tone mapping算法输出PNG格式的图片,即得到待渲染场景的目标图像。Finally, img_exr_1 is post-processed according to the target brightness img_exr_1*bright_ratio_1 and the target color temperature img_exr_1*(color_1/color_base) of img_exr_1 to obtain the target light layer img_exr_post_1 corresponding to light_1, and the target light layer img_exr_2 is post-processed according to the target brightness img_exr_2*bright_ratio_2 and the target color temperature img_exr_1*(color_1/color_base) of img_exr_1. img_exr_2*(color_2/color_base) post-processes img_exr_2 to obtain the target light layer img_exr_post_2 corresponding to light_2, then adds img_exr_post_1 to img_exr_post_2, and applies the Tone mapping algorithm to output a PNG format image to obtain the target image of the scene to be rendered.

通过本公开实施例提供的照明模拟中的渲染方法,能够有效对齐情景互动模式和直接渲染的结果。实验结果显示,情景互动最终效果和直接渲染的效果图的平均像素误差可以控制在10以内,图片级别已经几乎看不出和直接渲染的差距,从而使情景互动和直接渲染结果对齐,成功实现按需使用,降低渲染成本。Through the rendering method in the lighting simulation provided by the embodiment of the present disclosure, the scene interaction mode and the direct rendering results can be effectively aligned. Experimental results show that the average pixel error between the final effect of the scene interaction and the direct rendering effect can be controlled within 10, and the difference between the picture level and the direct rendering is almost invisible, so that the scene interaction and direct rendering results are aligned, successfully realizing on-demand use and reducing rendering costs.

本公开实施例可以有效缩小灯光情景互动效果和最终出图效果的差距,优化情景互动和直接渲染出图结果的差异,使得肉眼几乎看不出两者的区别,结果显示平均像素误差在9.41左右,如此可以在设计过程中用直接渲染图来预览结果不断调整设计,设计完成后再渲染同样效果但拥有动态过程的情景互动,降低渲染资源需求,从而降低成本,同时本公开提供的方法可以扩展到实时光效、情景互动,均可以使用该方法来达到和直接渲染对齐的效果,使用户获得一致性的体验。The disclosed embodiments can effectively narrow the gap between the lighting scene interaction effect and the final image output effect, optimize the difference between the scene interaction and the direct rendering results, and make the difference between the two almost invisible to the naked eye. The results show that the average pixel error is about 9.41. In this way, the direct rendering can be used to preview the results and continuously adjust the design during the design process. After the design is completed, the same effect but with dynamic scene interaction can be rendered, thereby reducing the demand for rendering resources and thus reducing costs. At the same time, the method provided by the disclosed embodiments can be extended to real-time lighting effects and scene interactions, and the method can be used to achieve an effect aligned with direct rendering, so that users can obtain a consistent experience.

在家居照明仿真系统中,情景互动的产品前端调整分组灯具的亮度和色温后,需要在等待离线渲染结果之后,才可以查看情景互动的效果,此段时间一般为几分钟甚至几十分钟的时长,这降低了单灯的情景互动效率。针对这个问题,本公开实施例提供的照明模拟中的渲染方法,通过在情景互动基础上添加单灯调光的功能,使得用户可以在情景互动的结果的基础上面进一步实现灯具的亮度、色温和/或颜色的改变,从而快速达到设计师想要的灯光效果。In the home lighting simulation system, after the scene interaction product front end adjusts the brightness and color temperature of the grouped lamps, it is necessary to wait for the offline rendering results before the scene interaction effect can be viewed. This period of time is generally several minutes or even dozens of minutes, which reduces the scene interaction efficiency of a single lamp. In response to this problem, the rendering method in the lighting simulation provided by the embodiment of the present disclosure adds a single lamp dimming function based on the scene interaction, so that the user can further realize the change of the brightness, color temperature and/or color of the lamp based on the results of the scene interaction, thereby quickly achieving the lighting effect desired by the designer.

以下结合附图详细描述本公开实施例提供的照明模拟中的渲染方法的另一种实施方式。图3和图4是本公开实施例提供的照明模拟中的渲染方法的另一种流程示意图。如图3和图4所示,本公开实施例提供的照明模拟中的渲染方法,能够实现单灯或单灯组的情景互动,可以包括S301-S305。Another implementation of the rendering method in the lighting simulation provided by the embodiment of the present disclosure is described in detail below in conjunction with the accompanying drawings. FIG3 and FIG4 are another flow chart of the rendering method in the lighting simulation provided by the embodiment of the present disclosure. As shown in FIG3 and FIG4, the rendering method in the lighting simulation provided by the embodiment of the present disclosure can realize the scene interaction of a single lamp or a single lamp group, and may include S301-S305.

在S301中,前端获取在当前情景互动结果中的每个灯组的灯光 图层。In S301, the front end obtains the light of each light group in the current scene interaction result. Layer.

在家居照明仿真系统中,后端通过渲染引擎的渲染图层分离实现各个灯组的灯光图层分离,并将各个灯组的灯光图层传输至前端,前端接收各个灯组的灯光图层,并对各个灯组的灯光图层的照明结果在当前情景互动结果中呈现。In the home lighting simulation system, the back-end separates the light layers of each light group through the rendering layer separation of the rendering engine, and transmits the light layers of each light group to the front-end. The front-end receives the light layers of each light group and presents the lighting results of the light layers of each light group in the current scene interaction results.

在S302中,前端依据呈现的灯光点,确定需求调整的待调整灯组。In S302, the front end determines the light group to be adjusted according to the presented light points.

前端在呈现当前情景互动结果的同时,还可以生成灯光点供用户选择需要调整的待调整灯组。具体地,可以从当前情景互动结果中获取相机参数和灯组的世界坐标,依据相机参数,将灯组的世界坐标转换为在二维图像上的坐标,并根据在二维图像上的坐标呈现灯光点。While presenting the current scene interaction results, the front end can also generate light points for users to select the light groups to be adjusted. Specifically, the camera parameters and the world coordinates of the light groups can be obtained from the current scene interaction results, and the world coordinates of the light groups can be converted into coordinates on the two-dimensional image based on the camera parameters, and the light points can be presented based on the coordinates on the two-dimensional image.

其中,相机参数可以包括相机的水平视角、相机的垂直视角、相机的位置、相机的裁剪深度、相机的水平向右U、相机的竖直向上V,或相机的lookat方向W中的至少一个。基于这些相机参数,根据正交投影模型对灯组的世界坐标进行投影,以计算与灯组对应的图像坐标点位置,即实现了将世界坐标系中的灯组转换为二维图像上的灯光点。The camera parameters may include at least one of the camera's horizontal viewing angle, the camera's vertical viewing angle, the camera's position, the camera's clipping depth, the camera's horizontal rightward direction U, the camera's vertical upward direction V, or the camera's lookat direction W. Based on these camera parameters, the world coordinates of the light group are projected according to the orthogonal projection model to calculate the image coordinate point position corresponding to the light group, that is, the light group in the world coordinate system is converted into a light point on a two-dimensional image.

在一种实施方式中,前端可以通过提示圈提示用户选择被呈现的灯光点,选择待调整灯组可以触发进行灯光图层的搜索匹配。即前端通过提示圈的形式显示出可以点击的各个灯组的位置,用户可以根据提示圈选择待调整灯光点,前端在确定选择的待调整灯光点之后,进行搜索确定与待调整灯组对应的待调整灯光图层。In one embodiment, the front end can prompt the user to select the presented light point through a prompt circle, and selecting the light group to be adjusted can trigger the search and matching of the light layer. That is, the front end displays the positions of each light group that can be clicked in the form of a prompt circle, and the user can select the light point to be adjusted according to the prompt circle. After determining the selected light point to be adjusted, the front end searches and determines the light layer to be adjusted corresponding to the light group to be adjusted.

在一种实施方式中,前端可以根据获取到的至少一个灯组和与该至少一个灯组分别对应的初始灯光图层的标识信息之间的映射关系,确定与待调整灯组对应的待调整灯光图层。In one implementation, the front end may determine the light layer to be adjusted corresponding to the light group to be adjusted based on a mapping relationship between the acquired at least one light group and identification information of the initial light layer respectively corresponding to the at least one light group.

在S303中,前端从与各灯组分别对应的灯光图层中搜索匹配与待调整灯组对应的灯光图层作为待调整灯光图层。In S303, the front end searches for a light layer corresponding to the light group to be adjusted from the light layers corresponding to each light group, and uses the light layer to be adjusted as the light layer.

当用户选择待调整灯组后,前端从所有的灯光图层中搜索与待调整灯组对应的灯光图层作为待调整灯光图层,以供后续进行调整。When the user selects the light group to be adjusted, the front end searches for the light layer corresponding to the light group to be adjusted from all light layers as the light layer to be adjusted for subsequent adjustment.

在S304中,前端获取待调整灯组的灯光参数,并根据该灯光参 数形成与待调整灯组对应的目标灯光图层。In S304, the front end obtains the lighting parameters of the light group to be adjusted, and adjusts the light according to the lighting parameters. The target light layer corresponding to the light group to be adjusted is formed.

在一种实施方式中,用户通过前端提供的灯光参数调整功能,调整待调整灯组的灯光参数,其中,灯光参数可以包括亮度、色温,或颜色中的至少一个,即用户可以调整待调整灯组的亮度、色温,或颜色中的至少一个。基于调整后的灯光参数形成的目标灯光图层可用于后续的图层叠加以显示调整后的灯光效果。In one embodiment, the user adjusts the lighting parameters of the light group to be adjusted through the lighting parameter adjustment function provided by the front end, wherein the lighting parameters may include at least one of brightness, color temperature, or color, that is, the user can adjust at least one of the brightness, color temperature, or color of the light group to be adjusted. The target lighting layer formed based on the adjusted lighting parameters can be used for subsequent layer overlay to display the adjusted lighting effect.

在S305中,前端叠加目标灯光图层和与其它灯组对应的灯光图层,并实时显示叠加后情景互动效果。In S305, the front end superimposes the target light layer and the light layers corresponding to other light groups, and displays the scene interaction effect after superposition in real time.

在一种实施方式中,将根据用户输入的亮度、色温和/或颜色形成的目标灯光图层和与其它灯组(即,在与待渲染场景相关联的至少一个灯组中的、除待调整灯组之外的灯组)对应的灯光图层进行重新叠加并实时显示,最后保存调整好的亮度、色温和/或颜色,之后使用调整好的数据重新进行情景互动或者直接渲染出图,从而实现一次调整即可完成设计师想要的情景互动效果。In one embodiment, the target light layer formed according to the brightness, color temperature and/or color input by the user and the light layers corresponding to other light groups (i.e., light groups other than the light group to be adjusted in at least one light group associated with the scene to be rendered) are re-superimposed and displayed in real time, and finally the adjusted brightness, color temperature and/or color are saved, and then the adjusted data is used to re-perform scene interaction or directly render the image, so that the scene interaction effect desired by the designer can be achieved with just one adjustment.

根据本公开实施例,通过为待调整灯组增加灯光参数调整图层,并将灯光参数调整图层叠加到与其它灯组对应的灯光图层,并实时显示叠加后情景互动效果,该过程不需要对灯组重新进行渲染,即可以改变灯光效果,大大提升了单灯的情景互动效率。According to the embodiment of the present disclosure, by adding a lighting parameter adjustment layer for the lighting group to be adjusted, and superimposing the lighting parameter adjustment layer on the lighting layer corresponding to other lighting groups, and displaying the superimposed scene interaction effect in real time, this process does not require re-rendering of the lighting group, that is, the lighting effect can be changed, which greatly improves the scene interaction efficiency of a single lamp.

本公开实施例提供一种用于照明模拟中的渲染的系统,以实现本公开实施例提供的照明模拟中的渲染方法。The embodiment of the present disclosure provides a system for rendering in lighting simulation to implement the rendering method in lighting simulation provided by the embodiment of the present disclosure.

如图5所示,本公开实施例提供的用于照明模拟中渲染的系统包括:一个或多个服务器120,以及与服务器120通信连接的至少一台终端设备110。终端设备110和服务器120协同实现照明模拟中的渲染方法。As shown in Fig. 5, the system for rendering in lighting simulation provided by the embodiment of the present disclosure includes: one or more servers 120, and at least one terminal device 110 communicatively connected to the server 120. The terminal device 110 and the server 120 cooperate to implement the rendering method in lighting simulation.

服务器,被配置为根据渲染流程参数,针对待渲染场景执行渲染计算,以得到图层数据;其中,待渲染场景与至少一个灯组相关联,图层数据包括与至少一个灯组分别对应的初始灯光图层;以及将图层数据传输给终端设备;其中,服务器在针对待渲染场景执行渲染计算的过程中,不执行后处理。The server is configured to perform rendering calculations on a scene to be rendered according to rendering process parameters to obtain layer data; wherein the scene to be rendered is associated with at least one light group, and the layer data includes initial light layers corresponding to the at least one light group; and transmit the layer data to a terminal device; wherein the server does not perform post-processing during the process of performing rendering calculations on the scene to be rendered.

终端设备,被配置为获取待渲染场景的待调整灯组的灯光参数; 其中,待调整灯组包括在至少一个灯组中;根据灯光参数,确定与待调整灯组对应的灯光图层的目标图像参数;其中,目标图像参数包括目标亮度和目标色温中的至少一个;根据目标亮度和目标色温中的至少一个,对与待调整灯组对应的灯光图层进行后处理;以及基于与至少一个灯组分别对应的灯光图层,得到待渲染场景的目标图像。The terminal device is configured to obtain lighting parameters of the light group to be adjusted of the scene to be rendered; Wherein, the light group to be adjusted is included in at least one light group; according to the light parameters, the target image parameters of the light layer corresponding to the light group to be adjusted are determined; wherein the target image parameters include at least one of the target brightness and the target color temperature; according to at least one of the target brightness and the target color temperature, the light layer corresponding to the light group to be adjusted is post-processed; and based on the light layers corresponding to at least one light group, a target image of the scene to be rendered is obtained.

在一种实施方式中,可以由终端设备获取待渲染场景的照明模拟中的情景互动模式的灯光参数,并将灯光参数发送给服务器;服务器根据设定的渲染参数执行各灯光图层的渲染计算,以及将图层渲染结果进行编码后传输给终端设备;终端设备接收渲染结果,解码得到图层数据,并对解码得到的图层数据进行后处理,以及根据亮度和色温进行图层叠加,生成并显示情景互动效果动画。In one embodiment, the terminal device can obtain the lighting parameters of the scene interaction mode in the lighting simulation of the scene to be rendered, and send the lighting parameters to the server; the server performs rendering calculations of each light layer according to the set rendering parameters, and encodes the layer rendering results and transmits them to the terminal device; the terminal device receives the rendering results, decodes them to obtain the layer data, and post-processes the decoded layer data, and superimposes the layers according to the brightness and color temperature to generate and display the scene interaction effect animation.

在一种实施方式中,终端设备,包括:获取单元和处理单元。In one implementation, a terminal device includes: an acquisition unit and a processing unit.

获取单元,被配置为获取待渲染场景的待调整灯组的灯光参数;其中,待渲染场景与至少一个灯组相关联,至少一个灯组包括待调整灯组。The acquisition unit is configured to acquire the lighting parameters of the light group to be adjusted of the scene to be rendered; wherein the scene to be rendered is associated with at least one light group, and the at least one light group includes the light group to be adjusted.

处理单元,被配置为根据灯光参数,确定与待调整灯组对应的灯光图层的目标图像参数;其中,目标图像参数包括目标亮度和目标色温中的至少一个;根据目标亮度和目标色温中的至少一个,对与待调整灯组对应的灯光图层进行后处理;其中,在终端中包括与待渲染场景对应的图层数据,图层数据包括与至少一个灯组分别对应的初始灯光图层;以及基于与至少一个灯组分别对应的灯光图层,得到待渲染场景的目标图像。The processing unit is configured to determine target image parameters of a light layer corresponding to the light group to be adjusted according to the light parameters; wherein the target image parameters include at least one of a target brightness and a target color temperature; and post-process the light layer corresponding to the light group to be adjusted according to at least one of the target brightness and the target color temperature; wherein layer data corresponding to the scene to be rendered is included in the terminal, and the layer data includes initial light layers respectively corresponding to at least one light group; and based on the light layers respectively corresponding to at least one light group, a target image of the scene to be rendered is obtained.

在一种实施方式中,终端设备还可以包括接收单元和解码单元。获取单元,可以被配置为获取待渲染场景的照明模拟中的情景互动模式的灯光参数。接收单元,可以被配置为接收编码后的图层渲染结果。解码单元,可以被配置为对接收到的图层渲染结果进行解码,以得到图层数据。处理单元,可以被配置为根据灯光参数计算每一帧图像的每个灯光图层的目标亮度和目标色温,对解码后的灯光图层按照目标亮度和目标色温进行后处理以及图层叠加并变换到LDR空间,生成并显示情景互动效果动画。 In one embodiment, the terminal device may further include a receiving unit and a decoding unit. The acquiring unit may be configured to acquire the lighting parameters of the scene interaction mode in the lighting simulation of the scene to be rendered. The receiving unit may be configured to receive the encoded layer rendering result. The decoding unit may be configured to decode the received layer rendering result to obtain the layer data. The processing unit may be configured to calculate the target brightness and target color temperature of each light layer of each frame image according to the lighting parameters, post-process the decoded light layer according to the target brightness and target color temperature, and superimpose the layers and transform them into the LDR space to generate and display the scene interaction effect animation.

在一种实施方式中,服务器包括:渲染单元和传输单元。In one implementation, the server includes: a rendering unit and a transmission unit.

渲染单元,被配置为根据渲染流程参数,针对待渲染场景执行渲染计算,以得到图层数据;其中,待渲染场景与至少一个灯组相关联,图层数据包括与至少一个灯组分别对应的初始灯光图层。The rendering unit is configured to perform rendering calculations on the scene to be rendered according to the rendering process parameters to obtain layer data; wherein the scene to be rendered is associated with at least one light group, and the layer data includes initial light layers corresponding to the at least one light group.

传输单元,被配置为将图层数据传输给终端;其中,渲染单元在针对待渲染场景执行渲染计算的过程中,不执行后处理。The transmission unit is configured to transmit the layer data to the terminal; wherein the rendering unit does not perform post-processing during the process of performing rendering calculations for the scene to be rendered.

在一种实施方式中,服务器还可以包括编码单元。渲染单元,可以被配置为根据渲染流程参数执行各灯光图层的渲染计算。编码单元,可以被配置为采用降低图片占用空间的编码方法对图层渲染结果进行编码。传输单元,可以被配置为将编码后的图层渲染结果传输给终端设备。In one embodiment, the server may further include an encoding unit. The rendering unit may be configured to perform rendering calculations of each light layer according to the rendering process parameters. The encoding unit may be configured to encode the layer rendering result using an encoding method that reduces the space occupied by the image. The transmission unit may be configured to transmit the encoded layer rendering result to the terminal device.

终端设备110和服务器120协同实现照明模拟中的渲染方法的具体过程可以参照本公开实施例对照明模拟中的渲染方法的描述,本公开实施例在此不再赘述。The specific process of the terminal device 110 and the server 120 cooperating to implement the rendering method in the lighting simulation can refer to the description of the rendering method in the lighting simulation in the embodiment of the present disclosure, and the embodiment of the present disclosure will not be repeated here.

如图5所示,终端设备包括但不限于平板电脑、笔记本电脑、台式电脑、智能手机、智能语音交互设备等设备;终端设备上可以安装有情景互动模式效果呈现相关的客户端,该客户端可以是软件(例如浏览器等),也可以是网页、小程序等。终端设备可以包括存储器,通讯模块以及一个或多个处理器。存储器用于存储处理器执行的计算机程序。存储器可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统,以及运行数据传输通讯功能所需的程序等;存储数据区可存储各种数据传输通讯信息和操作指令集等。存储器可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);也可以是非易失性存储器(non-volatile memory),例如只读存储器,快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);或者是能够用于携带或存储具有指令或数据结构形式的期望的计算机程序并能够由计算机存取的任何其它介质,但不限于此。存储器还可以是上述存储器的组合。处理器可以包括一个或多个中央处理单元(central processing unit,CPU)或者为数字处理单元等等。 As shown in FIG5 , the terminal device includes but is not limited to tablet computers, laptop computers, desktop computers, smart phones, intelligent voice interaction devices and other devices; the terminal device may be installed with a client related to the presentation of the scene interaction mode effect, which may be software (such as a browser, etc.), or a web page, a small program, etc. The terminal device may include a memory, a communication module and one or more processors. The memory is used to store computer programs executed by the processor. The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, and programs required to run data transmission and communication functions, etc.; the data storage area may store various data transmission and communication information and operation instruction sets, etc. The memory may be a volatile memory (volatile memory), such as a random-access memory (RAM); it may also be a non-volatile memory (non-volatile memory), such as a read-only memory, a flash memory (flash memory), a hard disk drive (HDD) or a solid-state drive (SSD); or it may be any other medium that can be used to carry or store a desired computer program in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory may also be a combination of the above memories. The processor may include one or more central processing units (CPU) or a digital processing unit, etc.

服务器则是与软件或是网页、小程序等相对应的后台服务器,或者是专门用于图片渲染的服务器,本公开不作具体限定。服务器既可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(Content Delivery Network,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器。The server is a background server corresponding to the software, webpage, applet, etc., or a server dedicated to image rendering, which is not specifically limited in this disclosure. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

在家居灯光仿真系统中,由于目前情景互动只支持IES灯光的图层分离和单独控制,针对场景中常见的具有自发光材质的灯具模型目前全部输出到一个图层上面,因此不能单独控制,影响具有自发光材质的灯具模型的情景互动效果。本公开实施例提供了一种照明模拟中的具有自发光材质的灯具模型的情景互动方法,实现灯具模型的图层分离,用可以用于图层分离的通用格式数据表达/表征灯具模型上的自发光材质,并在渲染灯具模型图层的时候读取灯具模型的自发光属性,在渲染其它灯光图层的时候读取灯具模型的漫反射属性,从而实现灯具模型开/关灯效果。In the home lighting simulation system, since the current scene interaction only supports the layer separation and individual control of IES lights, the common lamp models with self-luminous materials in the scene are currently all output to one layer, so they cannot be controlled individually, affecting the scene interaction effect of the lamp models with self-luminous materials. The disclosed embodiment provides a scene interaction method for lamp models with self-luminous materials in lighting simulation, realizes the layer separation of the lamp model, expresses/characterizes the self-luminous material on the lamp model with universal format data that can be used for layer separation, and reads the self-luminous properties of the lamp model when rendering the lamp model layer, and reads the diffuse reflection properties of the lamp model when rendering other light layers, thereby realizing the on/off light effect of the lamp model.

需要说明的是,漫反射表示物体表面的微观状态是凹凸不平的,入射光线会根据击中的表面的法线反射到不同的方向,即使是很小的区域内也不会像镜面或金属一样具有入射角等于反射角的属性,常见的乳胶漆墙面,布料,塑料,木头等都具有漫反射属性,具有这些材质的灯具在关灯之后不再是光源,而是退化成普通模型,接受其它光源的光照。It should be noted that diffuse reflection means that the microscopic state of the surface of an object is uneven, and the incident light will be reflected in different directions according to the normal of the surface it hits. Even in a very small area, it does not have the property that the angle of incidence is equal to the angle of reflection like a mirror or metal. Common latex paint walls, cloth, plastic, wood, etc. all have diffuse reflection properties. Lamps made of these materials are no longer light sources after turning off the lights, but degenerate into ordinary models, receiving illumination from other light sources.

图6和图7是本公开实施例提供的一种照明模拟中的具有自发光材质的灯具模型的情景互动方法的流程图。如图6和7所示,本公开实施例提供的照明模拟中的具有自发光材质的灯具模型的情景互动方法,包括S601-S604。Figures 6 and 7 are flow charts of a scenario interaction method for a lamp model with self-luminous material in a lighting simulation provided by an embodiment of the present disclosure. As shown in Figures 6 and 7, the scenario interaction method for a lamp model with self-luminous material in a lighting simulation provided by an embodiment of the present disclosure includes S601-S604.

在S601中,前端获取具有自发光材质的灯具模型的数据,并将具有自发光材质的灯具模型的数据转换为能够用于图层分离的通用格式数据。In S601, the front end obtains data of a lamp model with a self-luminous material, and converts the data of the lamp model with a self-luminous material into general format data that can be used for layer separation.

在家居照明仿真系统中,前端从后端获得具有自发光材质的灯 具模型的数据,并将具有自发光材质的灯具模型的数据转换为能够用于图层分离的通用格式数据。通用格式数据包括lightmesh和vraymtl,其中,lightmesh是渲染业务中的一种发光网格,将灯具模型的渲染数据转换成lightmesh可以便于单个灯具模型的分离。Vraymtl是一种标准材质,将具有自发光材质的灯具模型的数据转换成Vraymtl材质也可便于灯具模型的分离。In the home lighting simulation system, the front end obtains the lamp with self-luminous material from the back end. The data of the lamp model with self-luminous material is converted into the general format data that can be used for layer separation. The general format data includes lightmesh and vraymtl. Among them, lightmesh is a kind of luminous mesh in the rendering business. Converting the rendering data of the lamp model into lightmesh can facilitate the separation of a single lamp model. Vraymtl is a standard material. Converting the data of the lamp model with self-luminous material into Vraymtl material can also facilitate the separation of the lamp model.

在一种实施方式中,后端在渲染具有自发光材质的灯具模型的图层时,将该灯具模型的lightmesh与IES文件渲染到同一个图层上。In one implementation, when the backend renders a layer of a lamp model having a self-luminous material, the lightmesh and the IES file of the lamp model are rendered on the same layer.

以将具有自发光材质的灯具模型的数据转换为lightmesh为例,需要从灯具模型的数据中提取如下信息并转换到lightmesh,其中,灯具模型的数据可以包括灯具的空间位置信息、灯具的几何信息、灯具的材质信息、灯具的灯光颜色信息、灯具的灯光强度信息、用于表征灯具是否使用贴图的信息,或灯具的贴图的信息中的至少一个,灯具的空间位置信息可以表征灯具模型上的自发光材质从原点经过怎样的平移,渲染,缩放,到达3D场景中指定的位置:Taking the conversion of the data of a lamp model with a self-luminous material into a lightmesh as an example, the following information needs to be extracted from the data of the lamp model and converted into a lightmesh, wherein the data of the lamp model may include the spatial position information of the lamp, the geometric information of the lamp, the material information of the lamp, the light color information of the lamp, the light intensity information of the lamp, the information used to characterize whether the lamp uses a texture, or at least one of the information of the lamp's texture. The spatial position information of the lamp can characterize how the self-luminous material on the lamp model is translated, rendered, and scaled from the origin to reach the specified position in the 3D scene:

LightMesh node{LightMesh node{

Transform=空间位置信息;Transform = spatial location information;

geometry=几何信息;geometry=geometry information;

material=原始的材质信息;material = original material information;

color=原始灯光颜色信息;color = original light color information;

intensity=原始灯光的强度;intensity = the intensity of the original light;

use_tex=1or 0是否使用贴图信息;use_tex=1or 0Whether to use texture information;

tex=如果使用贴图则为贴图信息;tex = texture information if texture is used;

affectDiffuse=0;affectDiffuse=0;

affectSpecular=0;affectSpecular=0;

affectReflections=0;关闭GI(Global Illumination,全局光照)信息}affectReflections=0;turn off GI (Global Illumination) information}

在将灯具模型的数据转换为lightmesh的过程中,需要继承其原始的颜色和贴图进行基础图层的渲染,同时为了后续绑定IES文件,需要关闭转换后的lightmesh的间接光影响部分的GI。 In the process of converting the data of the lamp model to lightmesh, it is necessary to inherit its original color and texture for rendering the base layer. At the same time, in order to bind the IES file later, it is necessary to turn off the GI of the indirect light affected part of the converted lightmesh.

在S602中,前端从通用格式数据中将每个灯具模型分离到单个图层,得到多个单独灯具模型图层。In S602, the front end separates each lamp model from the general format data into a single layer, and obtains a plurality of separate lamp model layers.

在一种实施方式中,灯具模型可以包括单个灯具模型,和/或多个灯具模型形成的灯具模型组。具体地,从通用格式数据中将每个具有自发光材质的灯具模型分离到单个图层,可以包括:针对无贴图的纯色灯具模型,提取该灯具模型的物体名称、该灯具模型的位置信息、该灯具模型的材质信息、该灯具模型的自发光属性,或该灯具模型的漫反射属性中的至少一个;针对带有贴图的灯具模型,提取该灯具模型的物体名称、该灯具模型的位置信息、该灯具模型的材质信息、该灯具模型的自发光属性、该灯具模型的贴图信息,或该灯具模型的漫反射属性中的至少一个,以得到灯具模型图层。自发光属性可以包括灯光颜色(color(R,G,B))、灯光强度(intensity),或自发光贴图(self illumination texture)中的至少一个。In one embodiment, the lamp model may include a single lamp model, and/or a lamp model group formed by multiple lamp models. Specifically, separating each lamp model with self-luminous material from the general format data into a single layer may include: for a solid color lamp model without a texture, extracting at least one of the object name of the lamp model, the position information of the lamp model, the material information of the lamp model, the self-luminous property of the lamp model, or the diffuse reflection property of the lamp model; for a lamp model with a texture, extracting at least one of the object name of the lamp model, the position information of the lamp model, the material information of the lamp model, the self-luminous property of the lamp model, the texture information of the lamp model, or the diffuse reflection property of the lamp model to obtain a lamp model layer. The self-luminous property may include at least one of light color (color(R, G, B)), light intensity (intensity), or a self-illumination texture (self illumination texture).

在一种实施方式中,为灯具模型增加了单独分层逻辑,如果灯具模型的灯光全部输出到同一个图层,则无法单独改变自发光灯光的色温和亮度,因此将灯具模型的数据转换为可以用于图层分离的通用格式数据,再将每一个具有自发光材质的灯具模型的自发光灯光分离到单独图层中(也即,将各类型的自发光转换到lightmesh后,再分离),从而实现灯具模型单独图层的控制。In one embodiment, a separate layering logic is added to the lamp model. If all the lights of the lamp model are output to the same layer, the color temperature and brightness of the self-luminous lights cannot be changed individually. Therefore, the data of the lamp model is converted into a universal format data that can be used for layer separation, and then the self-luminous lights of each lamp model with a self-luminous material are separated into a separate layer (that is, each type of self-luminous light is converted to lightmesh and then separated), thereby achieving control of the separate layer of the lamp model.

在S603中,前端获取待调整灯具模型的灯光参数。In S603, the front end obtains the lighting parameters of the lamp model to be adjusted.

在一种实施方式中,前端为用户提供了灯具模型的灯光参数的调整功能,用户通过该功能可以调整亮度和/或色温等灯光参数。调整后的灯光参数被前端接收。In one embodiment, the front end provides the user with a function of adjusting the lighting parameters of the lamp model, through which the user can adjust lighting parameters such as brightness and/or color temperature. The adjusted lighting parameters are received by the front end.

在S604中,前端根据灯光参数对与待调整灯具模型对应的单独灯具模型图层进行渲染,并显示渲染结果以实现情景互动。In S604, the front end renders a separate lamp model layer corresponding to the lamp model to be adjusted according to the lighting parameters, and displays the rendering result to achieve scene interaction.

在一种实施方式中,还可以由服务器根据灯光参数对与待调整灯具模型对应的单独灯具模型图层进行渲染,由终端(即前端)显示渲染结果以实现情景互动,本公开实施例在此不再赘述。In one implementation, the server may also render a separate lamp model layer corresponding to the lamp model to be adjusted according to the lighting parameters, and the terminal (ie, the front end) may display the rendering result to achieve scene interaction, which will not be described in detail in the disclosed embodiments.

在一种实施方式中,还可以为灯具模型添加开/关灯逻辑,根据该开/关灯逻辑,在渲染的时候呈现灯具模型的开/关灯效果,可以包 括:在渲染单独灯具模型图层的情况下,读取灯具模型的自发光属性,实现开灯的渲染结果;以及,在渲染其它图层的情况下,读取灯具模型的漫反射属性,实现关灯的渲染结果。In one embodiment, a light on/off logic can be added to the lamp model. According to the light on/off logic, the light on/off effect of the lamp model is presented during rendering. In short: when rendering a separate lamp model layer, read the self-luminous properties of the lamp model to achieve the rendering result of turning on the light; and when rendering other layers, read the diffuse reflection properties of the lamp model to achieve the rendering result of turning off the light.

当采用不同的通用格式时,实现开/关灯的渲染结果的方式也不一样。针对lightmesh数据,将单独灯具模型(也即自发光材质模型)的lightmesh数据对应的尺寸放大一定的倍数(例如,1.01倍)并保留自发光属性,保留原单独灯具模型的漫反射属性,这样在渲染单独灯具模型图层时,读取单独灯具模型的自发光属性,实现开灯效果的展示;在渲染其它图层的时候读取单独灯具模型的漫反射属性,由于lightmesh为透明属性,自然显示内部保留的漫反射属性,实现关灯效果的展示,从而达到灯具模型图层分离逻辑和开/关灯的图层分离逻辑。When different universal formats are used, the rendering results of turning on/off lights are also different. For lightmesh data, the size corresponding to the lightmesh data of the individual lamp model (that is, the self-luminous material model) is enlarged by a certain multiple (for example, 1.01 times) and the self-luminous properties are retained, and the diffuse reflection properties of the original individual lamp model are retained. In this way, when rendering the individual lamp model layer, the self-luminous properties of the individual lamp model are read to achieve the display of the light-on effect; when rendering other layers, the diffuse reflection properties of the individual lamp model are read. Since lightmesh is a transparent property, the diffuse reflection properties retained internally are naturally displayed to achieve the display of the light-off effect, thereby achieving the separation logic of the lamp model layer and the separation logic of the light-on/light-off layer.

针对vraymtl数据,vraymtl材质和普通的diffuse材质具有一样的属性,当单独灯具模型的vraymtl数据包括自发光属性值时,在渲染单独灯具模型图层时,读取单独灯具模型的自发光属性值,实现开灯效果的展示;在渲染其它图层的时候读取单独灯具模型的漫反射属性,实现关灯效果的展示。For vraymtl data, vraymtl materials and ordinary diffuse materials have the same properties. When the vraymtl data of a separate lamp model includes self-luminous attribute values, when rendering a separate lamp model layer, the self-luminous attribute values of the separate lamp model are read to display the lighting effect; when rendering other layers, the diffuse reflection properties of the separate lamp model are read to display the lighting effect.

根据本公开实施例,在将灯具模型转换成通用格式数据时,实现灯具模型的图层分离,从而实现单独控制,并在渲染灯具模型图层的时候读取自发光属性,渲染其它图层的时候读取灯具模型的漫反射属性,从而实现灯具模型开关灯效果,这大大提高单个灯具模型的情景互动效果。According to the embodiment of the present disclosure, when the lamp model is converted into universal format data, the layer separation of the lamp model is realized, so as to realize individual control, and the self-luminous property is read when rendering the lamp model layer, and the diffuse reflection property of the lamp model is read when rendering other layers, so as to realize the switching light effect of the lamp model, which greatly improves the scene interaction effect of a single lamp model.

根据本公开的实施例,还提供了一种电子设备和一种可读存储介质。According to an embodiment of the present disclosure, an electronic device and a readable storage medium are also provided.

图8示出了可以用来实施本公开的实施例的示例电子设备800的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关 系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。FIG8 shows a schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships are The systems, and their functions, are merely examples and are not intended to limit implementations of the present disclosure described and/or claimed herein.

如图8所示,电子设备800包括计算单元801,其可以根据存储在只读存储器(Read-Only Memory,ROM)802中的计算机程序或者从存储单元808加载到随机访问存储器(Random Access Memory,RAM)803中的计算机程序,来执行各种适当的动作和处理。在RAM803中,还可存储设备800操作所需的各种程序和数据。计算单元801、ROM 802以及RAM 803通过总线804彼此相连。输入/输出(Input/Output,I/O)接口805也连接至总线804。As shown in FIG8 , the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.

电子设备800中的多个部件连接至I/O接口805,包括:输入单元806,例如键盘、鼠标等;输出单元807,例如各种类型的显示器、扬声器等;存储单元808,例如磁盘、光盘等;以及通信单元809,例如网卡、调制解调器、无线通信收发机等。通信单元809允许设备800通过诸如因特网的计算机网络和/或各种电信网络与其它设备交换信息/数据。A number of components in the electronic device 800 are connected to the I/O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.

计算单元801可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元801的一些示例包括但不限于中央处理单元(Central Processing Unit,CPU)、图形处理单元(Graphics Processing Unit,GPU)、各种专用的人工智能(Artificial Intelligence,AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(Digital Signal Processor,DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元801执行上文所描述的各个方法和处理,例如照明模拟中的渲染方法,和/或照明模拟中的具有自发光材质的灯具模型的情景互动方法。例如,在一些实施方式中,照明模拟中的渲染方法,和/或照明模拟中的具有自发光材质的灯具模型的情景互动方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元808。在一些实施方式中,计算机程序的部分或者全部可以经由ROM 802和/或通信单元809而被载入和/或安装到设备800上。当计算机程序加载到RAM 803并由计算单元801执行时,可以执行上文描述的照明模拟中的渲染方法,和/或照明模拟中的具有自 发光材质的灯具模型的情景互动方法的一个或多个步骤。备选地,在其它实施方式中,计算单元801可以通过其它任何适当的方式(例如,借助于固件)而被配置为执行目标排序模型的训练方法,和/或目标排序方法。The computing unit 801 may be a variety of general and/or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as the rendering method in the lighting simulation, and/or the scenario interaction method of the lamp model with self-luminous material in the lighting simulation. For example, in some embodiments, the rendering method in the lighting simulation, and/or the scenario interaction method of the lamp model with self-luminous material in the lighting simulation can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program can be loaded and/or installed on the device 800 via the ROM 802 and/or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, the rendering method in the lighting simulation described above and/or the automatic rendering method in the lighting simulation can be executed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the training method of the target ranking model and/or the target ranking method in any other appropriate manner (eg, by means of firmware).

本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、现场可编程门阵列(Field Programmable Gate Array,FPGA)、专用集成电路(Application Specific Integrated Circuit,ASIC)、专用标准产品(Application-Specific Standard Products,ASSP)、芯片上系统的系统(System on Chip,SOC)、复杂可编程逻辑设备(Complex Programmable Logic Device,CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various implementations may include: being implemented in one or more computer programs that are executable and/or interpreted on a programmable system that includes at least one programmable processor that may be a special purpose or general purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions/operations specified in the flow chart and/or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基 于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器、只读存储器、可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)、快闪存储器、光纤、便捷式紧凑盘只读存储器(Compact Disk Read Only Memory,CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include base An electrical connection on one or more wires, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,阴极射线管(Cathode Ray Tube,CRT)或者液晶显示器(Liquid Crystal Display,LCD)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入、或者触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) or a liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(Local Area Network,LAN)、广域网(Wide Area Network,WAN)和互联网。The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include: Local Area Network (LAN), Wide Area Network (WAN), and the Internet.

计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端和服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,也可以为分布式系统的服务器,或者是结合了区块链的服务器。A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on the respective computers and having a client and server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

值得说明的是,尽管在附图中以特定顺序描述了本公开提供的方法的执行过程,但是,这并非要求或者暗示必须按照该特定顺序来 执行,或是必须执行全部所示的步骤才能实现预期结果。可选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,和/或将一个步骤分解为多个步骤执行。It is worth noting that, although the execution process of the method provided by the present disclosure is described in a specific order in the drawings, this does not require or imply that the execution process must be performed in this specific order. Execution, or all the steps shown must be executed to achieve the expected result. Optionally, some steps can be omitted, multiple steps can be combined into one step, and/or one step can be decomposed into multiple steps.

本领域技术人员应明白,本公开实施例可提供为方法、装置、或计算机程序产品。因此,本公开可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开可采用在一个或多个其中包含有计算机可用计算机程序的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。It will be appreciated by those skilled in the art that the embodiments of the present disclosure may be provided as methods, devices, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take 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 a computer-usable computer program.

本公开是参照根据本公开实施例的方法、装置、电子设备和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序命令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序命令到通用计算机、专用计算机、嵌入式处理机或其它可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其它可编程数据处理设备的处理器执行的命令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present disclosure is described with reference to the flowchart and/or block diagram of the method, device, electronic device and computer program product according to the embodiment of the present disclosure. It should be understood that each process and/or box in the flowchart and/or block diagram, as well as the combination of the process and/or box in the flowchart and/or block diagram can be implemented by computer program commands. These computer program commands can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the command executed by the processor of the computer or other programmable data processing device generates a device for implementing the function specified in one process or multiple processes in the flowchart and/or one box or multiple boxes in the block diagram.

应理解,说明书中提到的“一个实施例”、“一种实施方式”意味着与实施例有关的特定特征、结构或特性包括在本公开的至少一个实施例或实施方式中。因此,在整个说明书各处出现的“在一个实施例中”、“一种实施方式”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。 It should be understood that the "one embodiment" or "one implementation" mentioned in the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment or implementation of the present disclosure. Therefore, the "in one embodiment" or "one implementation" appearing in various places throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner.

Claims (25)

一种照明模拟中的渲染方法,应用于终端,包括:A rendering method in lighting simulation, applied to a terminal, comprising: 获取待渲染场景的待调整灯组的灯光参数;其中,所述待渲染场景与至少一个灯组相关联,所述至少一个灯组包括所述待调整灯组;Obtaining lighting parameters of a light group to be adjusted of a scene to be rendered; wherein the scene to be rendered is associated with at least one light group, and the at least one light group includes the light group to be adjusted; 根据所述灯光参数,确定与所述待调整灯组对应的灯光图层的目标图像参数;其中,所述目标图像参数包括目标亮度和目标色温中的至少一个;Determine, according to the light parameters, a target image parameter of the light layer corresponding to the light group to be adjusted; wherein the target image parameter includes at least one of a target brightness and a target color temperature; 根据所述目标亮度和所述目标色温中的至少一个,对与所述待调整灯组对应的灯光图层进行后处理;其中,在所述终端中包括与所述待渲染场景对应的图层数据,所述图层数据包括与所述至少一个灯组分别对应的初始灯光图层;以及According to at least one of the target brightness and the target color temperature, post-processing the light layer corresponding to the light group to be adjusted; wherein the terminal includes layer data corresponding to the scene to be rendered, and the layer data includes initial light layers corresponding to the at least one light group respectively; and 基于与所述至少一个灯组分别对应的灯光图层,得到所述待渲染场景的目标图像。Based on the light layers respectively corresponding to the at least one light group, a target image of the scene to be rendered is obtained. 根据权利要求1所述的方法,还包括:The method according to claim 1, further comprising: 预先从服务器获取所述图层数据;其中,所述图层数据是由所述服务器根据渲染流程参数,针对所述至少一个灯组中的每一个执行渲染计算得到的。The layer data is obtained in advance from a server; wherein the layer data is obtained by the server performing rendering calculations on each of the at least one light group according to rendering process parameters. 根据权利要求2所述的方法,其中,所述渲染流程参数包括:溢色修正、高光修正、色彩增强,或收敛终止条件中的至少一个。The method according to claim 2, wherein the rendering process parameters include: at least one of overflow correction, highlight correction, color enhancement, or convergence termination conditions. 根据权利要求1所述的方法,其中,根据所述目标亮度和所述目标色温中的至少一个,对与所述待调整灯组对应的灯光图层进行后处理,包括:The method according to claim 1, wherein post-processing the light layer corresponding to the light group to be adjusted according to at least one of the target brightness and the target color temperature comprises: 根据所述目标亮度和所述目标色温中的至少一个,对与所述待调整灯组对应的初始灯光图层进行后处理;或Post-processing the initial light layer corresponding to the light group to be adjusted according to at least one of the target brightness and the target color temperature; or 根据所述目标亮度和所述目标色温中的至少一个,对与所述待调整灯组对应的、经过至少一次后处理的灯光图层进行后处理。 According to at least one of the target brightness and the target color temperature, post-process the light layer corresponding to the light group to be adjusted and which has been post-processed at least once. 根据权利要求1所述的方法,其中,基于与所述至少一个灯组分别对应的灯光图层,得到所述待渲染场景的所述目标图像,包括:The method according to claim 1, wherein obtaining the target image of the scene to be rendered based on the light layers respectively corresponding to the at least one light group comprises: 在所述至少一个灯组为多个灯组的情况下,叠加与所述多个灯组分别对应的灯光图层。In the case that the at least one light group is a plurality of light groups, light layers respectively corresponding to the plurality of light groups are superimposed. 根据权利要求5所述的方法,其中,叠加与所述多个灯组分别对应的灯光图层,包括:The method according to claim 5, wherein superimposing light layers corresponding to the plurality of light groups respectively comprises: 使用归一化方法进行色温叠加计算。Use the normalization method to perform color temperature superposition calculations. 根据权利要求6所述的方法,其中,所述色温叠加计算方法包括:The method according to claim 6, wherein the color temperature superposition calculation method comprises: 每个灯光图层乘以其亮度调节因数和色温调节权重。Each light layer is multiplied by its brightness adjustment factor and color temperature adjustment weight. 根据权利要求1所述的方法,其中:所述后处理包括:自动曝光、白平衡,或色调映射中的至少一个,其中,所述色调映射包括莱因哈德方法。The method of claim 1, wherein the post-processing comprises at least one of automatic exposure, white balance, or tone mapping, wherein the tone mapping comprises a Reinhard method. 根据权利要求1所述的方法,其中,获取所述待渲染场景的所述待调整灯组的所述灯光参数,包括:The method according to claim 1, wherein obtaining the lighting parameters of the light group to be adjusted of the scene to be rendered comprises: 依据被选定的灯光点,确定所述待调整灯组。The light group to be adjusted is determined according to the selected light point. 根据权利要求9所述的方法,还包括:The method according to claim 9, further comprising: 获取相机参数和所述待调整灯组的世界坐标;Obtaining camera parameters and the world coordinates of the light group to be adjusted; 依据所述相机参数,将所述待调整灯组的世界坐标转换为在二维图像上的坐标;以及According to the camera parameters, converting the world coordinates of the light group to be adjusted into coordinates on the two-dimensional image; and 根据所述在二维图像上的坐标,呈现所述灯光点。The light point is presented according to the coordinates on the two-dimensional image. 根据权利要求9所述的方法,还包括:The method according to claim 9, further comprising: 通过提示圈提示用户选择所述灯光点;以及Prompting the user to select the light point through a prompt circle; and 响应于所述灯光点被选择,确定与所述待调整灯组对应的灯光 图层。In response to the light point being selected, determining the light corresponding to the light group to be adjusted Layer. 根据权利要求1所述的方法,其中,所述灯光参数包括亮度、色温,或颜色中的至少一个。The method according to claim 1, wherein the lighting parameter comprises at least one of brightness, color temperature, or color. 一种照明模拟中的渲染方法,应用于服务器,包括:A rendering method in lighting simulation, applied to a server, comprising: 根据渲染流程参数,针对待渲染场景执行渲染计算,以得到图层数据;其中,所述待渲染场景与至少一个灯组相关联,所述图层数据包括与所述至少一个灯组分别对应的初始灯光图层;以及According to the rendering process parameters, rendering calculation is performed for the scene to be rendered to obtain layer data; wherein the scene to be rendered is associated with at least one light group, and the layer data includes initial light layers corresponding to the at least one light group respectively; and 将所述图层数据传输给终端;Transmitting the layer data to a terminal; 其中,所述服务器在针对所述待渲染场景执行渲染计算的过程中,不执行后处理。Wherein, the server does not perform post-processing during the process of performing rendering calculation on the scene to be rendered. 根据权利要求13所述的方法,还包括:The method according to claim 13, further comprising: 获取所述渲染流程参数;其中,所述渲染流程参数包括:溢色修正、高光修正、色彩增强,或收敛终止条件中的至少一个。Acquire the rendering process parameters; wherein the rendering process parameters include: overflow correction, highlight correction, color enhancement, or at least one of convergence termination conditions. 根据权利要求13所述的方法,在将所述图层数据传输给所述终端之前,还包括:The method according to claim 13, before transmitting the layer data to the terminal, further comprising: 采用降低图片占用空间的编码方法对所述图层数据进行编码。The layer data is encoded using an encoding method that reduces the space occupied by the image. 一种用于照明模拟中的渲染的装置,设置在终端中,包括:A rendering device for lighting simulation, arranged in a terminal, comprising: 获取单元,被配置为获取待渲染场景的待调整灯组的灯光参数;其中,所述待渲染场景与至少一个灯组相关联,所述至少一个灯组包括所述待调整灯组;以及an acquisition unit, configured to acquire light parameters of a light group to be adjusted of a scene to be rendered; wherein the scene to be rendered is associated with at least one light group, and the at least one light group includes the light group to be adjusted; and 处理单元,被配置为根据所述灯光参数,确定与所述待调整灯组对应的灯光图层的目标图像参数;其中,所述目标图像参数包括目标亮度和目标色温中的至少一个;根据所述目标亮度和所述目标色温中的至少一个,对与所述待调整灯组对应的灯光图层进行后处理;其中,在所述终端中包括与所述待渲染场景对应的图层数据,所述图层 数据包括与所述至少一个灯组分别对应的初始灯光图层;以及基于与所述至少一个灯组分别对应的灯光图层,得到所述待渲染场景的目标图像。The processing unit is configured to determine the target image parameters of the light layer corresponding to the light group to be adjusted according to the light parameters; wherein the target image parameters include at least one of a target brightness and a target color temperature; and post-process the light layer corresponding to the light group to be adjusted according to at least one of the target brightness and the target color temperature; wherein the terminal includes layer data corresponding to the scene to be rendered, and the layer The data includes initial light layers respectively corresponding to the at least one light group; and based on the light layers respectively corresponding to the at least one light group, a target image of the scene to be rendered is obtained. 一种用于照明模拟中的渲染的装置,设置在服务器中,包括:A device for rendering in lighting simulation, arranged in a server, comprising: 渲染单元,被配置为根据渲染流程参数,针对待渲染场景执行渲染计算,以得到图层数据;其中,所述待渲染场景与至少一个灯组相关联,所述图层数据包括与所述至少一个灯组分别对应的初始灯光图层;以及A rendering unit, configured to perform rendering calculations on a scene to be rendered according to rendering process parameters to obtain layer data; wherein the scene to be rendered is associated with at least one light group, and the layer data includes initial light layers corresponding to the at least one light group respectively; and 传输单元,被配置为将所述图层数据传输给终端;A transmission unit, configured to transmit the layer data to a terminal; 其中,所述渲染单元在针对所述待渲染场景执行渲染计算的过程中,不执行后处理。Wherein, the rendering unit does not perform post-processing during the process of performing rendering calculation on the scene to be rendered. 一种用于照明模拟中的渲染的系统,包括:A system for rendering in lighting simulation, comprising: 服务器,被配置为根据渲染流程参数,针对待渲染场景执行渲染计算,以得到图层数据;其中,所述待渲染场景与至少一个灯组相关联,所述图层数据包括与所述至少一个灯组分别对应的初始灯光图层;以及将所述图层数据传输给终端设备;其中,所述服务器在针对所述待渲染场景执行渲染计算的过程中,不执行后处理;以及The server is configured to perform rendering calculations on a scene to be rendered according to rendering process parameters to obtain layer data; wherein the scene to be rendered is associated with at least one light group, and the layer data includes initial light layers corresponding to the at least one light group; and transmit the layer data to a terminal device; wherein the server does not perform post-processing during the process of performing rendering calculations on the scene to be rendered; and 所述终端设备,被配置为获取所述待渲染场景的待调整灯组的灯光参数;其中,所述待调整灯组包括在所述至少一个灯组中;根据所述灯光参数,确定与所述待调整灯组对应的灯光图层的目标图像参数;其中,所述目标图像参数包括目标亮度和目标色温中的至少一个;根据所述目标亮度和所述目标色温中的至少一个,对与所述待调整灯组对应的灯光图层进行后处理;以及基于与所述至少一个灯组分别对应的灯光图层,得到所述待渲染场景的目标图像。The terminal device is configured to obtain lighting parameters of the light group to be adjusted of the scene to be rendered; wherein the light group to be adjusted is included in the at least one light group; according to the lighting parameters, determine the target image parameters of the light layer corresponding to the light group to be adjusted; wherein the target image parameters include at least one of a target brightness and a target color temperature; according to at least one of the target brightness and the target color temperature, post-process the light layer corresponding to the light group to be adjusted; and obtain the target image of the scene to be rendered based on the light layers respectively corresponding to the at least one light group. 一种电子设备,包括:An electronic device, comprising: 至少一个处理器;以及at least one processor; and 与所述至少一个处理器通信连接的存储器; a memory communicatively coupled to the at least one processor; 其中,所述存储器存储有能够被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,使得所述至少一个处理器执行根据权利要求1-15中任一项所述的照明模拟中的渲染方法。The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor executes the rendering method in the lighting simulation according to any one of claims 1-15. 一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使计算机执行根据权利要求1-15中任一项所述的照明模拟中的渲染方法。A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the rendering method in lighting simulation according to any one of claims 1-15. 一种照明模拟中的具有自发光材质的灯具模型的情景互动方法,包括:A scenario interaction method for a lamp model with a self-luminous material in a lighting simulation, comprising: 获取具有自发光材质的灯具模型的数据;Get the data of the lamp model with self-illuminating material; 将具有自发光材质的灯具模型的数据转换为能够用于图层分离的通用格式数据;Convert the data of the lamp model with self-illuminating materials into a common format that can be used for layer separation; 从所述通用格式数据中将每个灯具模型和与所述灯具模型对应的IES分离到单个图层,以得到多个单独灯具模型图层;其中,灯具模型包括单个灯具模型,和/或多个灯具模型形成的灯具模型组;Separating each lamp model and the IES corresponding to the lamp model from the general format data into a single layer to obtain a plurality of separate lamp model layers; wherein the lamp model includes a single lamp model and/or a lamp model group formed by a plurality of lamp models; 获取待调整灯具模型的灯光参数;Get the lighting parameters of the lamp model to be adjusted; 根据所述灯光参数,对与所述待调整灯具模型对应的单独灯具模型图层进行渲染;以及Rendering a separate lamp model layer corresponding to the lamp model to be adjusted according to the lighting parameters; and 显示渲染结果以实现情景互动。Display rendering results for scene interaction. 根据权利要求21所述的方法,其中,从所述通用格式数据中将每个灯具模型分离到单个图层,包括:The method of claim 21, wherein separating each luminaire model into a single layer from the common format data comprises: 从所述通用格式数据中筛选灯具模型图层;Filtering a lamp model layer from the general format data; 其中,从所述通用格式数据中筛选所述灯具模型图层,包括:The step of selecting the lamp model layer from the general format data includes: 在所述灯具模型为无贴图的纯色灯具模型的情况下,提取所述灯具模型的物体名称、所述灯具模型的位置信息、所述灯具模型的材质信息、所述灯具模型的自发光属性,或所述灯具模型的漫反射属性中的至少一个;以及In the case where the lamp model is a solid color lamp model without a texture, extracting at least one of an object name of the lamp model, location information of the lamp model, material information of the lamp model, a self-luminous property of the lamp model, or a diffuse reflection property of the lamp model; and 在所述灯具模型带有贴图的情况下,提取所述灯具模型的物体 名称、所述灯具模型的位置信息、所述灯具模型的材质信息、所述灯具模型的自发光属性、所述灯具模型的贴图的信息,或所述灯具模型的漫反射属性中的至少一个;In the case where the lamp model has a texture, extract the object of the lamp model at least one of the name, the location information of the lamp model, the material information of the lamp model, the self-luminous property of the lamp model, the texture information of the lamp model, or the diffuse reflection property of the lamp model; 其中,自发光属性包括灯光颜色和/或灯光强度。The self-illumination properties include light color and/or light intensity. 根据权利要求21所述的方法,还包括:The method according to claim 21, further comprising: 添加所述灯具模型的开/关灯逻辑;以及Adding the on/off logic of the lamp model; and 根据所述开/关灯逻辑,在渲染过程中呈现所述灯具模型的开/关灯效果;According to the light on/off logic, presenting the light on/off effect of the lamp model during rendering; 其中,根据所述开/关灯逻辑,在渲染过程中呈现所述灯具模型的开/关灯效果,包括:According to the light on/off logic, presenting the light on/off effect of the lamp model in the rendering process includes: 在渲染单独灯具模型图层的情况下,读取所述灯具模型的自发光属性;以及In the case of rendering a separate lamp model layer, reading the self-illumination property of the lamp model; and 在渲染其它图层的情况下,读取所述灯具模型的漫反射属性。When rendering other layers, read the diffuse properties of the lamp model. 根据权利要求23所述的方法,其中,在所述通用格式数据为lightmesh数据的情况下,根据所述开/关灯逻辑,在渲染过程中呈现所述灯具模型的开/关灯效果,包括:The method according to claim 23, wherein, when the general format data is lightmesh data, presenting the light on/off effect of the lamp model in the rendering process according to the light on/off logic comprises: 将单独灯具模型的lightmesh数据对应的尺寸放大设定的倍数并保留自发光属性,以使得在渲染单独灯具模型图层的情况下能够读取单独灯具模型的自发光属性,以实现开灯效果的展示;以及Enlarge the size of the lightmesh data of the individual lamp model by a set multiple and retain the self-luminous property, so that the self-luminous property of the individual lamp model can be read when rendering the individual lamp model layer, so as to achieve the display of the lighting effect; and 保留单独灯具模型的漫反射属性,以使得在渲染其它图层的情况下能够读取单独灯具模型的漫反射属性,以实现关灯效果的展示。The diffuse reflection properties of a separate lamp model are retained so that the diffuse reflection properties of a separate lamp model can be read when rendering other layers, thereby achieving the display of the light-off effect. 根据权利要求23所述的方法,其中,在所述通用格式数据为vraymtl数据的情况下,根据所述开/关灯逻辑,在渲染过程中呈现所述灯具模型的开/关灯效果,包括:The method according to claim 23, wherein, when the general format data is vraymtl data, presenting the on/off light effect of the lamp model in the rendering process according to the on/off light logic comprises: 在单独灯具模型的vraymtl数据包括自发光属性值,并在渲染单独灯具模型图层的情况下,读取单独灯具模型的自发光属性值,以实现开灯效果的展示;以及 When the vraymtl data of the individual lamp model includes the self-luminous attribute value, and when rendering the individual lamp model layer, the self-luminous attribute value of the individual lamp model is read to achieve the display of the lighting effect; and 在渲染其它图层的情况下,读取单独灯具模型的漫反射属性,以实现关灯效果的展示。 When rendering other layers, read the diffuse properties of a separate lamp model to achieve the effect of turning off the light.
PCT/CN2023/103299 2022-09-28 2023-06-28 Rendering method, apparatus and system, electronic device, and storage medium Ceased WO2024066559A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202211187133.5 2022-09-28
CN202211187133.5A CN115526972A (en) 2022-09-28 2022-09-28 Scene interaction effect rendering method and system in lighting simulation
CN202211254298.XA CN115661326A (en) 2022-10-13 2022-10-13 Scene interaction method for single lamp and lamp model with self-luminous material in illumination simulation
CN202211254298.X 2022-10-13

Publications (1)

Publication Number Publication Date
WO2024066559A1 true WO2024066559A1 (en) 2024-04-04

Family

ID=90475879

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/103299 Ceased WO2024066559A1 (en) 2022-09-28 2023-06-28 Rendering method, apparatus and system, electronic device, and storage medium

Country Status (1)

Country Link
WO (1) WO2024066559A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118470148A (en) * 2024-05-21 2024-08-09 湖南芒果融创科技有限公司 Scene map generation system
CN118627177A (en) * 2024-07-16 2024-09-10 浙江汉宇设计有限公司 A garden lighting design method and system
CN119155860A (en) * 2024-11-05 2024-12-17 广东驰玖照明有限公司 Line lamp color conversion control method and device, lamp and medium
CN120707723A (en) * 2025-06-17 2025-09-26 阿坝藏族羌族自治州全域旅游研究所 A WEB data processing method based on collaborative rendering

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111915712A (en) * 2020-08-28 2020-11-10 网易(杭州)网络有限公司 Illumination rendering method and device, computer readable medium and electronic equipment
US20210243870A1 (en) * 2018-02-27 2021-08-05 Signify Holding B.V. Rendering a dynamic light scene based on one or more light settings
CN114241116A (en) * 2021-12-21 2022-03-25 杭州群核信息技术有限公司 A method, device, electronic device and medium for real-time preview of lighting effects
CN115526972A (en) * 2022-09-28 2022-12-27 杭州群核信息技术有限公司 Scene interaction effect rendering method and system in lighting simulation
CN115661326A (en) * 2022-10-13 2023-01-31 杭州群核信息技术有限公司 Scene interaction method for single lamp and lamp model with self-luminous material in illumination simulation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210243870A1 (en) * 2018-02-27 2021-08-05 Signify Holding B.V. Rendering a dynamic light scene based on one or more light settings
CN111915712A (en) * 2020-08-28 2020-11-10 网易(杭州)网络有限公司 Illumination rendering method and device, computer readable medium and electronic equipment
CN114241116A (en) * 2021-12-21 2022-03-25 杭州群核信息技术有限公司 A method, device, electronic device and medium for real-time preview of lighting effects
CN115526972A (en) * 2022-09-28 2022-12-27 杭州群核信息技术有限公司 Scene interaction effect rendering method and system in lighting simulation
CN115661326A (en) * 2022-10-13 2023-01-31 杭州群核信息技术有限公司 Scene interaction method for single lamp and lamp model with self-luminous material in illumination simulation

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118470148A (en) * 2024-05-21 2024-08-09 湖南芒果融创科技有限公司 Scene map generation system
CN118627177A (en) * 2024-07-16 2024-09-10 浙江汉宇设计有限公司 A garden lighting design method and system
CN119155860A (en) * 2024-11-05 2024-12-17 广东驰玖照明有限公司 Line lamp color conversion control method and device, lamp and medium
CN120707723A (en) * 2025-06-17 2025-09-26 阿坝藏族羌族自治州全域旅游研究所 A WEB data processing method based on collaborative rendering

Similar Documents

Publication Publication Date Title
WO2024066559A1 (en) Rendering method, apparatus and system, electronic device, and storage medium
CN112116692B (en) Model rendering method, device and equipment
CN112328345B (en) Method, apparatus, electronic device and readable storage medium for determining theme colors
US12493402B2 (en) Performant configuration user interface
US12159087B2 (en) Session collaboration system
CN115526972A (en) Scene interaction effect rendering method and system in lighting simulation
WO2019101005A1 (en) Pixel compensation method and apparatus, and terminal device
KR102798092B1 (en) High dynamic range image format with low dynamic range compatibility
CN115100337A (en) A full-body portrait video re-lighting method and device based on convolutional neural network
WO2024096931A1 (en) High dynamic range image format with low dynamic range compatibility
US20250336147A1 (en) Lighting Rendering in Virtual Scenes
CN105654925B (en) High dynamic range images processing method and system
CN113870099B (en) Picture color conversion method, device, equipment and readable storage medium
CN119693251B (en) Image processing method, device, electronic device, storage medium and program product
CN120692708A (en) Film and television filter lighting effect application method, device, equipment and medium
CN116453470B (en) Image display method, device, electronic device and computer readable storage medium
WO2024198719A1 (en) Data processing method and apparatus, computer device, computer-readable storage medium, and computer program product
CN117788352A (en) Image processing method, system and electronic equipment
CN115775215A (en) Image processing method, device, electronic device and storage medium
CN117152171A (en) Image processing methods, devices, equipment, storage media and program products
WO2021155688A1 (en) Picture processing method and device, storage medium, and electronic apparatus
CN118096982B (en) Construction method and system of fault inversion training platform
CN116309160B (en) Image resolution restoration method, device, equipment and storage medium
CN118608436A (en) Image processing method, electronic device and readable storage medium
WO2019158129A1 (en) Method and device for augmented reality visual element display

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23869807

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 23869807

Country of ref document: EP

Kind code of ref document: A1