WO2023098583A1 - 一种渲染方法及其相关设备 - Google Patents

一种渲染方法及其相关设备 Download PDF

Info

Publication number
WO2023098583A1
WO2023098583A1 PCT/CN2022/134296 CN2022134296W WO2023098583A1 WO 2023098583 A1 WO2023098583 A1 WO 2023098583A1 CN 2022134296 W CN2022134296 W CN 2022134296W WO 2023098583 A1 WO2023098583 A1 WO 2023098583A1
Authority
WO
WIPO (PCT)
Prior art keywords
irradiance map
map
irradiance
rendering
pixel
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/CN2022/134296
Other languages
English (en)
French (fr)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co 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
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to EP22900387.6A priority Critical patent/EP4421746A4/en
Priority to US18/714,396 priority patent/US20250259378A1/en
Publication of WO2023098583A1 publication Critical patent/WO2023098583A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/00—Three-dimensional [3D] image rendering
    • G06T15/50—Lighting effects
    • G06T15/506—Illumination models
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/00—Three-dimensional [3D] image rendering
    • G06T15/04—Texture mapping
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/00—Three-dimensional [3D] image rendering
    • G06T15/06—Ray-tracing
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/00—Three-dimensional [3D] image rendering
    • G06T15/50—Lighting effects
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/00—Three-dimensional [3D] image rendering
    • G06T15/50—Lighting effects
    • G06T15/60—Shadow generation
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00—Geometric image transformations in the plane of the image
    • G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2215/00—Indexing scheme for image rendering
    • G06T2215/12—Shadow map, environment map

Definitions

  • the present application relates to the field of computers, in particular to a rendering method and related equipment.
  • the scene lighting information can be cached to the corresponding texture through offline baking, etc., and the global illumination result can be obtained by directly searching for the texture at runtime for interpolation and fast calculation, but There will be light leaks in the scene due to ignoring the visibility item.
  • the existing global illumination technology requires either a high-performance platform such as a computer or a host computer for dynamic global illumination, or it needs to be baked in advance to meet the low computing power requirements of the terminal device. Therefore, there is an urgent need for a global illumination that can be implemented on the terminal device. lighting technology.
  • the present application provides a rendering method, the method is applied to a terminal device, and the method includes:
  • rendering refers to the process of drawing 3D (3-dimension) data stored in the form of text binary or the like into an image.
  • a virtual scene can also be called a space scene, and refers to a virtual space, such as an indoor virtual space, a virtual store virtual space, and the like. There may be light sources as well as objects in the space scene. Objects can be set differently according to different virtual spaces.
  • the texture information of the light probes adjacent to each pixel in the first irradiance map can be obtained, and the Texture information is weighted based on interpolation.
  • the lighting effect at each position in space can be regarded as the superposition of the lighting effect of each surrounding luminous point at that point. Therefore, after obtaining the lighting conditions at each light probe position in the space, in order to obtain the lighting conditions on the target object (that is, the target position) in the space, you can first obtain the lighting conditions of several light probes near the target position Then, using these light probes as light sources, calculate the diffuse reflection of the light beams emitted by these light probes at the target position, and then obtain the light information of the target position, that is, the first irradiance The pixel value of each pixel in the degree map.
  • the second irradiance map is the same as the resolution required by the rendering result of the virtual scene, and the second irradiance map
  • the illuminance map is used for indirect light rendering of the virtual scene.
  • the aspect ratio of the first irradiance map is consistent with the aspect ratio of the second irradiance map, and the number of pixels in the first irradiance map is less than the The number of pixels in the second irradiance map.
  • the method further includes: acquiring direct light source information in the virtual scene; performing shadow mapping on the virtual scene according to the direct light source information by means of a shadow map. Illumination calculations are performed to obtain a third irradiance map, and the third irradiance map is used for direct light rendering of the virtual scene.
  • the direct light shading of the intersection point can be calculated in the form of shadow map, and the intersection point is converted to the viewing angle of the light source, and its depth value is compared with the depth value of the shadow map, so as to judge the intersection point and the light source visibility.
  • indirect lighting and direct lighting can be superimposed as the final composite output.
  • direct light shading is performed by using a shadow map instead of the original ray tracing method.
  • the overhead of direct light calculation is reduced, the update speed of the probe is faster, and the application can be run in real time.
  • the upsampling the first irradiance map to obtain the second irradiance map includes:
  • Upsampling is performed on the first irradiance map by using a neighborhood search algorithm to obtain a second irradiance map.
  • a neighborhood search method can be used to find the closest value for the original coloring point to reduce aliasing.
  • the first irradiance map includes a plurality of first pixel points (for example, can be determined based on a table lookup based on uv coordinates), and the second irradiance map includes second pixel points,
  • the position of the second pixel corresponds to the target pixel on the first irradiance map, the target pixel is adjacent to the plurality of first pixels, and in the neighborhood search algorithm , when upsampling the first irradiance map, it may specifically be based on the existence of a first pixel in the plurality of first pixels whose similarity with the target pixel is greater than a threshold, and according to the similarity
  • the first pixel point greater than the threshold value is obtained to obtain the second pixel point; based on the fact that there is no first pixel point in the plurality of first pixel points whose similarity with the target pixel point is greater than the threshold value, the plurality of An average value is calculated on the first pixel to obtain the second pixel.
  • the first irradiance map may be used to perform indirect light shading on the pixels of the original resolution by using a neighborhood search strategy.
  • the pixels within a certain range around the corresponding point of the first irradiance map can be used as candidate values, and judged by normal, distance and other conditions. If the threshold condition is met, the indirect illumination can be directly selected and calculated ; otherwise take the average value of the points in the range to calculate indirect lighting.
  • the method also includes:
  • the neighborhood search algorithm is used to perform anti-aliasing on the first irradiance map.
  • the performing illumination calculation on the virtual scene according to the texture information of the illumination probe includes: obtaining the illumination probe adjacent to each pixel in the first irradiance map Texture information of the needle; weight-based interpolation is performed on the texture information of the adjacent light probes.
  • the present application provides a rendering device, the device is applied to a terminal device, and the device includes:
  • An acquisition module configured to acquire texture information of light probes in the virtual scene to be rendered
  • An irradiance map calculation module configured to perform illumination calculation on the virtual scene according to the texture information of the light probe to obtain a first irradiance map, wherein the resolution of the first irradiance map is lower than The resolution required for the rendering result of the virtual scene;
  • An upsampling module configured to upsample the first irradiance map to obtain a second irradiance map, the resolution of which is the same as that required by the rendering result of the virtual scene , the second irradiance map is used for indirect light rendering of the virtual scene.
  • the aspect ratio of the first irradiance map is consistent with the aspect ratio of the second irradiance map, and the number of pixels in the first irradiance map is less than the The number of pixels in the second irradiance map.
  • the acquisition module is also used to:
  • the irradiance map calculation module is also used for:
  • the illumination calculation is performed on the virtual scene by means of a shadow map to obtain a third irradiance map, and the third irradiance map is used to perform the virtual scene direct light rendering.
  • the upsampling module is specifically used for:
  • Upsampling is performed on the first irradiance map by using a neighborhood search algorithm to obtain a second irradiance map.
  • the first irradiance map includes a plurality of first pixels
  • the second irradiance map includes second pixels
  • the second pixels correspond in position to the The target pixel on the first irradiance map
  • the target pixel is adjacent to the plurality of first pixels
  • the upsampling module is specifically used for:
  • the second pixel is obtained based on the presence of a first pixel whose similarity with the target pixel is greater than a threshold among the plurality of first pixels, and according to the first pixel whose similarity is greater than a threshold.
  • the upsampling module is specifically used for:
  • the neighborhood search algorithm is used to perform anti-aliasing on the first irradiance map.
  • the irradiance map calculation module is specifically used for:
  • Weight-based interpolation is performed on the texture information of the adjacent light probes.
  • the present application provides a terminal device, the terminal device includes a processor and a memory, and the processor obtains the code stored in the memory to execute any one of the first aspect and its optional implementation manners kind.
  • the present application provides a non-volatile computer-readable storage medium
  • the non-volatile computer-readable storage medium contains computer instructions for performing any of the above-mentioned first aspect and its optional implementations The rendering method described.
  • the present application further provides a computer program product, including codes, used to implement the rendering method described in any one of the first aspect and optional implementations thereof when the codes are executed.
  • a chip is provided, and the chip includes a processor configured to perform part or all of the operations in the method described in the first aspect above.
  • the present application provides a rendering method, the method is applied to a terminal device, and the method includes: acquiring texture information of light probes in a virtual scene to be rendered; The scene performs illumination calculation to obtain a first irradiance map, wherein the resolution of the first irradiance map is lower than the resolution required by the rendering result of the virtual scene; Upsampling to obtain a second irradiance map, the second irradiance map is the same as the resolution required by the rendering result of the virtual scene, and the second irradiance map is used to perform the virtual scene indirect light rendering.
  • performing coloring calculations at the original resolution at the original resolution will cause a large calculation load, which cannot meet the computing power requirements of the mobile terminal, making the application unable to run smoothly.
  • by rendering a reduced-resolution irradiance map (the first irradiance map)
  • the calculation cost can be reduced, and the application can run in real time under the premise of having the effect of global illumination.
  • Fig. 1 is the structural representation of the electronic device provided by the present application.
  • FIG. 2 is a schematic structural diagram of the electronic device provided by the present application.
  • FIG. 3 is a schematic flowchart of the rendering method provided in this embodiment
  • Figure 4 is a schematic diagram of an illumination probe provided in this embodiment
  • FIG. 5 is a schematic diagram of a reduced-resolution radiosity map provided in this embodiment.
  • FIG. 6 is a schematic flowchart of the rendering method provided in this embodiment.
  • FIG. 7 is a schematic flowchart of the rendering method provided in this embodiment.
  • FIG. 8 is a schematic flow chart of the rendering method provided by the present application.
  • FIG. 9 is a schematic structural diagram of a rendering device provided in this embodiment.
  • FIG. 10 is a schematic structural diagram of a terminal device provided by the present application.
  • Ray tracing is a special rendering algorithm in 3D computer graphics. This technology traces the light emitted from the virtual camera, calculates the process of light propagation in the rendered scene, and finally displays the mathematical model of the rendered scene. This method can achieve a more realistic rendering effect.
  • Diffuse Refers to the reflection properties of the surface of the object. Light is emitted from the surface of the object after being scattered inside the object, presenting a viewpoint-independent property.
  • Specular Refers to the surface reflection properties of an object. The part of the light that hits the surface of the object and is directly reflected by the object is related to the viewpoint.
  • Radiance Radiant flux per unit solid angle per unit projected area.
  • Irradiance Radiant flux per unit area.
  • Direct illumination Only consider the lighting effect of direct light sources on the scene.
  • Global illumination In addition to the influence of the direct light source on the scene lighting, it also considers the mutual lighting influence of other objects in the scene, which is closer to the realistic lighting effect.
  • Shadow map (shadow map, SM): It refers to starting from the perspective of the light source in order to achieve the shadow effect in direct lighting.
  • Virtual point light (virtual point light, VPL): It is an algorithm to realize global illumination. First, the part of the scene illuminated by direct light is constructed into a virtual point light source (VPL), and then for each pixel of the image, the scene is collected The VP Ls contribute to its illumination to achieve the global illumination effect.
  • VPL virtual point light source
  • Reflective shadow map It is an algorithm to realize global illumination. The algorithm assumes that all reflectors in the scene are diffuse materials, and first generates a shadow map with a given resolution as the secondary light source of the scene. ; Second, for each imaging pixel, calculate the illumination contribution of the secondary light source to the pixel according to the distance, discovery direction, etc.
  • Probe also known as probe, is a data structure that caches scene lighting information. The coloring of shading points can be queried from probe and corresponding interpolation calculations are performed to obtain indirect lighting. Generally, Suitable for static lighting scenes.
  • Light map Cut the surface of the static object into blocks and expand it into the texture space; pre-calculate the coloring of the light source on the surface texture of the object in the static scene, and store the result as a "light map" for later use.
  • light map Cut the surface of the static object into blocks and expand it into the texture space; pre-calculate the coloring of the light source on the surface texture of the object in the static scene, and store the result as a "light map" for later use.
  • Dynamic diffuse global illumination is a solution to realize global illumination of dynamic light sources and dynamic objects.
  • DDGI Dynamic diffuse global illumination
  • the rendering method provided by the embodiment of the present application can be applied to a terminal device (also referred to as an electronic device), and a terminal device can also be referred to as a user equipment (user equipment, UE) or an electronic device.
  • Equipment can be deployed on land, including indoor or outdoor, handheld or vehicle-mounted; it can also be deployed on water (such as ships, etc.); it can also be deployed in the air (such as aircraft, balloons and satellites, etc.).
  • Electronic devices can be mobile phones, tablet computers (pads), wearable devices with wireless communication functions (such as smart watches), position trackers with positioning functions, computers with wireless transceiver functions, virtual reality (virtual reality) , VR) equipment, augmented reality (augmented reality, AR) equipment, wireless equipment in a smart home (smart home), etc., which are not limited in this application.
  • virtual reality virtual reality
  • VR virtual reality
  • AR augmented reality
  • wireless equipment in a smart home smart home
  • the aforementioned electronic devices and the chips that can be disposed in the aforementioned electronic devices are collectively referred to as electronic devices.
  • Electronic devices in this application may include, but are not limited to: smart mobile phones, televisions, tablet computers, wristbands, head-mounted display devices (Head Mount Display, HMD), augmented reality (augmented reality, AR) devices, mixed reality (mixed reality, MR) equipment, cellular phone (cellular phone), smart phone (smart phone), personal digital assistant (personal digital assistant, PDA), tablet computer, vehicle electronic equipment, laptop computer (laptop computer), personal computer (personal computer, PC), monitoring equipment, robots, vehicle-mounted terminals, self-driving vehicles, etc.
  • HMD head-mounted display devices
  • augmented reality augmented reality, AR
  • mixed reality mixed reality
  • MR mixed reality
  • cellular phone cellular phone
  • smart phone smart phone
  • PDA personal digital assistant
  • tablet computer vehicle electronic equipment
  • laptop computer laptop computer
  • personal computer personal computer
  • monitoring equipment robots
  • robots vehicle-mounted terminals
  • self-driving vehicles etc.
  • FIG. 1 a specific structure is taken as an example below to illustrate the structure of the electronic device provided in this application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM) card interface 195 and the like.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, motion sensor 180N, etc.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input and output
  • subscriber identity module subscriber identity module
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL).
  • processor 110 may include multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flashlight, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 100 .
  • the I2S interface can be used for audio communication.
  • processor 110 may include multiple sets of I2S buses.
  • the processor 110 can be coupled with the audio module 170 through an I2S bus to realize communication between the processor 110 and the audio module 170.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.
  • the PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is generally used to connect the processor 110 and the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc.
  • the processor 110 communicates with the camera 193 through the CSI interface to realize the shooting function of the electronic device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to realize the display function of the electronic device 100 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193 , the display screen 194 , the wireless communication module 160 , the audio module 170 , the sensor module 180 and so on.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules shown in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 can receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also supply power to the electronic device through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be disposed in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be set in the same device.
  • the wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves and radiate them through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is passed to the application processor after being processed by the baseband processor.
  • the application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100.
  • System global navigation satellite system, GNSS
  • frequency modulation frequency modulation, FM
  • near field communication technology near field communication, NFC
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include but not limited to: the fifth generation mobile communication technology (5th-Generation, 5G) system, the global system for mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA) ), long term evolution (long term evolution, LTE), bluetooth (bluetooth), global navigation satellite system (the global navigation satellite system, GNSS), wireless fidelity (wireless fidelity, WiFi), near field communication (near field communication, NFC), FM (also called FM radio), Zigbee protocol (Zigbee), radio frequency identification technology (radio frequency identification, RFID) and/or infrared (infrared, IR) technology
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (satellite based augmentation systems, SBAS), etc.
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • Beidou navigation satellite system beidou navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device 100 may also include a wired communication module (not shown in FIG. 1 ), or the mobile communication module 150 or wireless communication module 160 here may be replaced by a wired communication module (not shown in FIG. output), the wired communication module can enable the electronic device to communicate with other devices through a wired network.
  • the wired network may include but not limited to one or more of the following: Optical Transport Network (OTN), Synchronous Digital Hierarchy (SDH), Passive Optical Network (PON), Ethernet network (Ethernet), or flexible Ethernet (flex Ethernet, FlexE), etc.
  • the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
  • the electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
  • the ISP is used for processing the data fed back by the camera 193 .
  • the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin color.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be located in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into image signals in standard RGB camera, YUV and other formats.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • Electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG moving picture experts group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
  • the internal memory 121 may be used to store computer-executable program codes including instructions.
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
  • the storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal.
  • the audio module 170 may also be used to encode and decode audio signals.
  • the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
  • Speaker 170A also referred to as a "horn" is used to convert audio electrical signals into sound signals.
  • Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the receiver 170B can be placed close to the human ear to receive the voice.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In some other embodiments, the electronic device 100 may be provided with two microphones 170C, which may also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions, etc.
  • the earphone interface 170D is used for connecting wired earphones.
  • the earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal.
  • the gyro sensor 180B can be used to determine the motion posture of the electronic device 100.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip leather case.
  • the electronic device 100 when the electronic device 100 is a clamshell machine, the electronic device 100 can detect opening and closing of the clamshell according to the magnetic sensor 180D.
  • the acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the distance sensor 180F is used to measure the distance.
  • the electronic device 100 may measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F for distance measurement to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the ambient light sensor 180L is used for sensing ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by the low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • the touch sensor 180K is also called “touch device”.
  • the touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation can be provided through the display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
  • the bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the human pulse and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined into a bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vibrating bone mass of the vocal part acquired by the bone conduction sensor 180M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
  • the motion sensor 180N can be used to detect moving objects within the range captured by the camera, and collect motion profiles or trajectory of the moving objects.
  • the motion sensor 180N can be an infrared sensor, a laser sensor, a dynamic vision sensor (dynamic vision sensor, DVS), etc.
  • the DVS can specifically include DAVIS (Dynamic and Active-pixel Vision Sensor), ATIS (Asynchronous Time-based Image Sensor ) or sensors such as CeleX sensors.
  • DAVIS Dynamic and Active-pixel Vision Sensor
  • ATIS Asynchronous Time-based Image Sensor
  • CeleX sensors CeleX sensors.
  • DVS draws lessons from the characteristics of biological vision, each pixel simulates a neuron, and independently responds to relative changes in light intensity (hereinafter referred to as "light intensity"). When the relative change of light intensity exceeds the threshold, the pixel will output an event signal, including the pixel's position, time stamp and feature information of light intensity.
  • the keys 190 include a power key, a volume key and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
  • the motor 191 can generate a vibrating reminder.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • touch operations applied to different applications may correspond to different vibration feedback effects.
  • the motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
  • the SIM card interface 195 is used for connecting a SIM card.
  • FIG. 2 is a block diagram illustrating a computing device 30 that may implement the techniques described in this disclosure.
  • the computing device 30 may be the rendering device in the embodiment of the present application, and is used to implement the rendering method in the embodiment of the present application.
  • Examples of the computing device 30 include but are not limited to wireless devices, mobile or cellular phones (including so-called smart phones), Personal digital assistants (PDAs), video game consoles including video displays, mobile video game devices, mobile video conferencing units, laptop computers, desktop computers, television set-top boxes, tablet computing devices, e-book readers, Fixed or mobile media players and more.
  • computing device 30 includes a central processing unit (CPU) 32 with CPU memory 34, a graphics processing unit (GPU) with GPU memory 38 and one or more shader units 40. ) 36, a display unit 42, a display buffer unit 44, a user interface unit 46 and a storage unit 48.
  • storage unit 48 may store GPU driver 50 with compiler 54 , GPU program 52 and natively compiled GPU program 56 .
  • CPU 32 examples include, but are not limited to, digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits.
  • DSPs digital signal processors
  • ASICs application specific integrated circuits
  • FPGAs field programmable logic arrays
  • CPU 32 and GPU 36 are illustrated as separate units in the example of FIG. 2, in some examples, CPU 32 and GPU 36 may be integrated into a single unit.
  • CPU 32 may execute one or more application programs. Examples of applications may include web browsers, email applications, spreadsheets, video games, audio and/or video capture, playback, or editing applications, or other applications that initiate the generation of image data to be presented via display unit 42 program.
  • CPU 32 includes CPU memory 34.
  • CPU memory 34 may represent on-chip storage or memory used when executing machine or object code.
  • CPU memories 34 may each include hardware memory registers capable of storing a fixed number of digital bits.
  • the CPU 32 may be able to read values from or write values to the native CPU memory 34 more rapidly than the memory unit 48 (which may be accessed, for example, via the system bus) or to the memory unit 48. into the value.
  • GPU 36 represents one or more special purpose processors for performing graphics operations. That is, for example, GPU 36 may be a dedicated hardware unit with fixed functionality and programmable components for rendering graphics and executing GPU applications. GPU 36 may also include a DSP, general purpose microprocessor, ASIC, FPGA, or other equivalent integrated or discrete logic circuits.
  • GPU 36 also includes GPU memory 38, which may represent on-chip storage or memory used when executing machine or object code.
  • GPU memories 38 may each include hardware memory registers capable of storing a fixed number of digital bits.
  • the GPU 36 may be able to read values from or write values to the native GPU memory 38 more rapidly than the storage unit 48 (which may be accessed, for example, via the system bus) or to the storage unit 48. into the value.
  • GPU 36 also includes shader unit 40.
  • shading unit 40 may be configured as a programmable pipeline of processing components.
  • shading unit 40 may be referred to as a "shader processor" or “unified shader,” and may perform geometry, vertex, pixel, or other shading operations to render graphics.
  • Shading unit 40 may include one or more components not specifically shown in FIG. 2 for clarity, such as components for fetching and decoding instructions, one or more arithmetic and logic units (ALUs) for performing arithmetic calculations ALU) and one or more memories, caches or registers.
  • ALUs arithmetic and logic units
  • Display unit 42 represents a unit capable of displaying video data, images, text or any other type of data.
  • the display unit 42 may include a liquid crystal display (liquid crystal display, LCD), a light emitting diode (light emitting diode, LED) display, an organic LED (organic light-emitting diode, OLED), an active matrix OLED (active-matrix organic light-emitting diode, AMOLED) display and so on.
  • Display buffer unit 44 represents a memory or storage device dedicated to storing data for display unit 42 for rendering images, such as photographs or video frames.
  • Display buffer unit 44 may represent a two-dimensional buffer containing multiple memory locations. The number of storage locations within display buffer unit 44 may be substantially similar to the number of pixels to be displayed on display unit 42 . For example, if display unit 42 is configured to include 640x480 pixels, display buffer unit 44 may include 640x480 storage locations.
  • Display buffer unit 44 may store the final pixel value for each of the pixels processed by GPU 36.
  • Display unit 42 may retrieve the final pixel values from display buffer unit 44 and display the final image based on the pixel values stored in display buffer unit 44 .
  • User interface unit 46 represents a unit that a user may use to interact with or otherwise interface to communicate with other units of computing device 30 (e.g., CPU 32). Examples of user interface unit 46 include, but are not limited to, trackballs, mice, keyboards, and other types of input devices. The user interface unit 46 may also be a touch screen and may be incorporated as part of the display unit 42 .
  • Storage unit 48 may include one or more computer-readable storage media. Examples of storage unit 48 include, but are not limited to, random access memory (RAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), CD-ROM or other optical disk storage, magnetic disk storage, or Other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer or processor.
  • RAM random access memory
  • ROM read only memory
  • EEPROM electrically erasable programmable read only memory
  • the memory unit 48 may contain instructions for causing the CPU 32 and/or the GPU 36 to execute the functions of the CPU 32 and the GPU 36 in the present invention.
  • storage unit 48 may be considered a non-transitory storage medium.
  • the term "non-transitory” may indicate that the storage medium is not embodied in a carrier wave or propagated signal. However, the term “non-transitory” should not be interpreted to mean that storage unit 48 is not removable.
  • storage unit 48 may be removed from computing device 30 and moved to another device.
  • a storage unit substantially similar to storage unit 48 may be inserted into computing device 30 .
  • non-transitory storage media may store data (e.g., in RAM) that may change over time.
  • the storage unit 48 stores a GPU driver 50 and a compiler 54 , a GPU program 52 and a natively compiled GPU program 56 .
  • GPU driver 50 represents a computer program or executable code that provides an interface to access GPU 36.
  • CPU 32 executes GPU driver 50 or portions thereof to interface with GPU 36, and for this reason GPU driver 50 is shown in the example of FIG. 2 as GPU driver 50 within CPU 32 marked with a dashed box.
  • GPU driver 50 may access programs executed by CPU 32 or other executable files, including GPU program 52.
  • GPU program 52 may comprise (eg, using an application programming interface (API)) code written in a high-level (HL) programming language.
  • API application programming interface
  • An example of an API includes Open Graphics Library (OpenGL).
  • OpenGL Open Graphics Library
  • an API consists of a predetermined standardized set of commands executed by associated hardware. The API command allows the user to instruct the hardware components of the GPU to execute commands without requiring the user to know the specific conditions of the hardware components.
  • GPU program 52 may call or otherwise incorporate one or more functions provided by GPU driver 50 .
  • the CPU 32 generally executes the program in which the GPU program 52 is embedded, and upon encountering the GPU program 52, passes the GPU program 52 to the GPU driver 50 (eg, in the form of a command stream).
  • CPU 32 executes GPU driver 50 to process GPU program 52 in this context.
  • GPU driver 50 may process GPU program 52 by compiling the GPU program into object or machine code executable by GPU 36. This object code is shown in the example of FIG. 2 as a natively compiled GPU program 56 .
  • compiler 54 may operate in real-time or near real-time to compile GPU program 52 during execution of the program in which GPU program 52 is embedded.
  • compiler 54 generally represents a module that condenses HL instructions defined in accordance with the HL programming language into LL instructions of a low-level (LL) programming language. After compilation, these LL instructions can be executed by a particular type of processor or other type of hardware such as FPGA, ASIC, etc. (including, for example, CPU 32 and GPU 36).
  • compiler 54 may receive GPU program 52 from CPU 32 while executing HL code that includes GPU program 52.
  • Compiler 54 may compile GPU program 52 into a natively compiled GPU program 56 conforming to the LL programming language.
  • Compiler 54 then outputs a natively compiled GPU program 56 containing LL instructions.
  • the GPU 36 generally receives a natively compiled GPU program 56 (as shown by the dashed box within the GPU 36 labeled "Natively Compiled GPU Program 56"), after which, in some instances, the GPU 36 immediately renders the image And the rendered portion of the image is output to display buffer unit 44 .
  • GPU 36 may generate a plurality of primitives to be displayed at display unit 42.
  • Primitives can contain one or more lines (including curves, splines, etc.), points, circles, ellipses, polygons (where a polygon is typically defined as a collection of one or more triangles), or any other two-dimensional (2D) primitive .
  • primary may also refer to three-dimensional (3D) primitives, such as cubes, cylinders, spheres, cones, pyramids, torus, and the like.
  • 3D three-dimensional
  • the term “primitive” refers to any geometric shape or element that is rendered by GPU 36 for display as an image (or frame in the context of video data) via display unit 42.
  • GPU 36 may transform the primitive or other state data for the primitive (e.g., which defines the texture, brightness, camera configuration, or other aspects of the primitive) by applying one or more model transformations (which may also be specified in the state data) into the so-called "world space". Once transformed, the GPU 36 may apply the effective camera's view transformation (which may also be specified in the state data defining the camera) to transform the coordinates of primitives and lights into camera or eye space. The GPU36 can also perform vertex shading to render the primitive's appearance in the view of any available light. GPU 36 may perform vertex shading in one or more of the aforementioned model, world, or view spaces (although vertex shading is typically performed in world space).
  • the GPU 36 can perform projection to project the image into (as an example) a unit cube with poles at (-1,-1,-1) and (1,1,1). This unit cube is often called the canonical view volume.
  • GPU 36 may perform clipping to remove any primitives that do not at least partially reside in the view volume. In other words, the GPU 36 can remove any primitives that are not within the camera frame.
  • the GPU 36 can then map the primitive's coordinates from the view volume to screen space, effectively reducing the primitive's 3D primitives to the screen's 2D coordinates.
  • GPU 36 may then rasterize the primitive. For example, GPU 36 can calculate and set the color of the pixels of the screen covered by the primitive. During rasterization, GPU 36 may apply any textures (where textures may include state data) associated with the primitive. GPU 36 may also perform Z-buffer algorithms (also known as depth testing) during rasterization to determine if any primitives and/or objects are obscured by any other objects. The Z-buffer algorithm orders the primitives according to their depth so that the GPU 36 knows the order in which to draw each primitive to the screen. GPU 36 outputs the rendered pixels to display buffer unit 44.
  • Z-buffer algorithms also known as depth testing
  • Display buffer unit 44 may temporarily store rendered pixels of a rendered image until the entire image has been rendered.
  • display buffer unit 44 may be considered an image frame buffer.
  • Display buffer unit 44 may then transmit the rendered image to be displayed on display unit 42 .
  • GPU 36 may output the rendered portion of the image directly to display unit 42 for display, rather than temporarily storing the image in display buffer unit 44 .
  • Display unit 42 may then display the images stored in display buffer unit 78 .
  • the scene lighting information can be cached to the corresponding texture through offline baking, etc., and the global illumination result can be obtained by directly searching for the texture at runtime for interpolation and fast calculation, but There will be light leaks in the scene due to ignoring the visibility item.
  • the existing global illumination technology requires either a high-performance platform such as a computer or a host computer for dynamic global illumination, or it needs to be baked in advance to meet the low computing power requirements of the terminal device. Therefore, there is an urgent need for a global illumination that can be implemented on the terminal device. lighting technology.
  • FIG. 3 is a schematic flowchart of a rendering method provided by this embodiment of the application. The method can be applied to the terminal shown in FIG. 1 and FIG. 2 In the device, as shown in Figure 3, the rendering method may include the following steps:
  • rendering refers to a process of rendering 3D (3-dimension) data stored in text binary or other ways into an image.
  • a virtual scene can also be called a space scene, and refers to a virtual space, such as an indoor virtual space, a virtual store virtual space, and the like. There may be light sources as well as objects in the space scene. Objects can be set differently according to different virtual spaces.
  • geometry processing can be performed before rendering is officially started, and the geometry processing stage can include but not limited to steps such as viewpoint transformation, vertex coloring, projection, clipping, and scene acceleration structure construction.
  • the user will select the rendering angle after setting up the rendering scene, which determines the content of the image in the final imaging, and also affects the contribution of the light source in the scene to the imaging; after the scene analysis is completed, obtain The scene's light source, material, acceleration structure of geometric data and other information are used for the calculation of indirect light.
  • the virtual scene can be loaded with model materials, which mainly involves two parts.
  • the first part is to add the model to be rendered to the scene, and the second part is to add the respective materials to the models in the scene. information and texture information.
  • parameters of light probes in the scene need to be initialized.
  • the light probe can be a variety of development engines, such as a tool in Unity, Unreal Engine (UE, Unreal Engine), etc., through which the light probe can capture and use the relevant information of light passing through the blank space of the scene .
  • Light Probes are similar to lightmaps commonly used in current rendering techniques in that they store "baked" information about the lighting in the scene. The difference is that lightmaps store lighting information about the surfaces that light hits in the scene, whereas light probes store information about the light passing through empty spaces in the scene.
  • a cube may be placed in advance in the virtual scene corresponding to the image frame to be displayed to mark the area where the light probe needs to be placed, and the light probe is placed in the area.
  • the virtual scene includes a virtual object.
  • the light probe can be placed in the area according to a preset density. The greater the density of the illumination probes, the closer the illumination effect obtained by the subsequent diffuse reflection calculation is to the real situation, but the amount of calculation will increase as the placement density increases. Users can, according to the processing capabilities of their processors, The density of the light probes is reasonably set by weighing the calculation capabilities of the light probes and their processors.
  • the illumination probes may be placed uniformly in the area marked by the cube, or non-uniformly placed in the area marked by the cube, which is not limited in the present application.
  • the illumination probes may be placed uniformly in the area marked by the cube, or non-uniformly placed in the area marked by the cube, which is not limited in the present application.
  • other polyhedrons can also be used to mark the area where the light probe is placed, and the present application does not limit this.
  • the diffuse reflection can be greatly reduced Computational complexity, reducing the requirements for processor computing power.
  • the probe may be judged according to the actual scene whether the probe needs to be updated for the frame of the virtual scene currently to be rendered, or the previous probe information should be used.
  • the rays emitted from each probe can be intersected with the scene acceleration structure, and the intersection points can be colored.
  • shading can include two parts: direct light and indirect light: the direct light shading of the intersection point can use the shadow map method to judge the visibility between the intersection point and the light source, so as to calculate the direct light of the current point; the indirect light shading of the intersection point can be used
  • the probe interpolation method weights the probes of the adjacent grids according to the distance to obtain the indirect lighting of the intersection. After that, the shading value of each intersection point and the texture information on the previous probe can be used to calculate the texture information on the probe by means of weighted average.
  • the probe in the indirect light calculation stage, can emit light and calculate the radiance of the intersection point.
  • each probe can emit multiple (for example, 144) rays, and then calculate the intersection point between the rays and the scene.
  • the probe texture information can be updated accordingly, and the weighted fusion can be performed according to the historical texture.
  • the light probe can randomly emit a specified number of rays within a 360° spatial range, for example, emit 144 rays , and perform ray tracing on all emitted rays to obtain the lighting information at the position of the light probe.
  • the basic principle is as follows: when the light emitted by the light probe hits the virtual object in the virtual scene, based on the optical principle, the emitted light will be diffusely reflected by the surface of the virtual object, and part of the diffusely reflected light beam will hit the virtual object.
  • each Texture information (or it can be called lighting information) at the position of each light probe.
  • the illumination information includes information on the irradiance of light at the position of the illumination probe, and may also include information on the direction of the light beam at the position of the illumination probe.
  • the lighting calculation can be performed on the virtual scene according to the texture information of the lighting probes to obtain the first irradiance stickers.
  • the texture information of the light probe probe can be used to calculate the indirect illumination of the imaging point.
  • a reduced-resolution irradiance map can be rendered according to the imaging resolution.
  • each pixel in the irradiance map can perform weighted interpolation by querying the texture information of the adjacent probe.
  • the resolution required for the rendering result of the virtual scene can be understood as the imaging resolution required by the virtual scene.
  • the texture information of the light probes adjacent to each pixel in the first irradiance map can be obtained, and the Texture information is weighted based on interpolation.
  • the lighting effect at each position in space can be regarded as the superposition of the lighting effect of each surrounding luminous point at that point. Therefore, after obtaining the lighting conditions at each light probe position in the space, in order to obtain the lighting conditions on the target object (that is, the target position) in the space, you can first obtain the lighting conditions of several light probes near the target position Then, using these light probes as light sources, calculate the diffuse reflection of the light beams emitted by these light probes at the target position, and then obtain the light information of the target position, that is, the first irradiance The pixel value of each pixel in the degree map.
  • the aspect ratio of the first irradiance map is different from that of the second irradiance map (the resolution of the second irradiance map and the resolution required by the rendering result of the virtual scene consistent) aspect ratios, the number of pixels in the first irradiance map is less than the number of pixels in the second irradiance map.
  • the aspect ratio of the first irradiance map is different from that of the second irradiance map (the resolution of the second irradiance map and the resolution required by the rendering result of the virtual scene consistent) aspect ratios, the number of pixels in the first irradiance map is less than the number of pixels in the second irradiance map.
  • a neighborhood search method can be used to find the closest value for the original coloring point to reduce aliasing.
  • the first irradiance map when upsampling the first irradiance map to obtain a second irradiance map, specifically, the first irradiance map can be calculated by using a neighborhood search algorithm The texture is upsampled to get a second irradiance map.
  • the first irradiance map includes a plurality of first pixel points (for example, can be determined based on a table lookup based on uv coordinates), and the second irradiance map includes second pixel points,
  • the position of the second pixel corresponds to the target pixel on the first irradiance map, the target pixel is adjacent to the plurality of first pixels, and in the neighborhood search algorithm , when upsampling the first irradiance map, it may specifically be based on the existence of a first pixel in the plurality of first pixels whose similarity with the target pixel is greater than a threshold, and according to the similarity
  • the first pixel point greater than the threshold value is obtained to obtain the second pixel point; based on the fact that there is no first pixel point in the plurality of first pixel points whose similarity with the target pixel point is greater than the threshold value, the plurality of An average value is calculated on the first pixel to obtain the second pixel.
  • the neighborhood search algorithm is used to perform anti-aliasing on the first irradiance map.
  • the first irradiance map may be used to perform indirect light shading on the pixels of the original resolution by using a neighborhood search strategy.
  • the pixels within a certain range around the corresponding point of the first irradiance map can be used as candidate values, and judged by normal, distance and other conditions. If the threshold condition is met, the indirect illumination can be directly selected and calculated ; otherwise take the average value of the points in the range to calculate indirect lighting.
  • the probe shading stage first reduce the resolution to generate an irradiance map, and then find the pixel value closest to the shading point in the irradiance map during the final imaging.
  • the texture information of multiple (for example, 8) probes adjacent to it may be queried to perform lighting calculation.
  • the final imaging resolution can be 2163*1080, and the irradiance map reduces the resolution by 2 times, so that only 1081*540 resolution images can be rendered.
  • the final imaging use the same uv coordinates on the irradiance map to look up the table. For the found pixels, it is necessary to perform a similar search on its adjacent elements to find the closest pixel for coloring.
  • multiple adjacent (for example, 4) pixels (-1, -1), (-1, 1), (1, -1), (1, 1) and their own (0, 0) Perform a similarity search to determine the similarity between the normal and depth values of the candidate pixels of the actual shading point, so as to select the closest pixel value. When all candidate pixels do not satisfy the condition, fall back to the case of averaging.
  • the purpose of the neighborhood search is to eliminate the aliasing problem caused by rendering the irradiance map with reduced resolution.
  • the direct light source information in the virtual scene may also be obtained; according to the direct light source information, the lighting calculation is performed on the virtual scene by means of a shadow map to obtain A third irradiance map, where the third irradiance map is used for direct light rendering of the virtual scene.
  • the direct light shading of the intersection point can be calculated in the form of shadow map, and the intersection point is converted to the viewing angle of the light source, and its depth value is compared with the depth value of the shadow map, so as to judge the intersection point and the light source visibility.
  • indirect lighting and direct lighting can be superimposed as the final composite output.
  • direct light shading is performed by using a shadow map instead of the original ray tracing method.
  • the overhead of direct light calculation is reduced, the update speed of the probe is faster, and the application can be run in real time.
  • the present application provides a rendering method, the method is applied to a terminal device, and the method includes: acquiring texture information of light probes in a virtual scene to be rendered; The scene performs illumination calculation to obtain a first irradiance map, wherein the resolution of the first irradiance map is lower than the resolution required by the rendering result of the virtual scene; Upsampling to obtain a second irradiance map, the second irradiance map is the same as the resolution required by the rendering result of the virtual scene, and the second irradiance map is used to perform the virtual scene indirect light rendering.
  • performing coloring calculations at the original resolution at the original resolution will cause a large calculation load, which cannot meet the computing power requirements of the mobile terminal, making the application unable to run smoothly.
  • by rendering a reduced-resolution irradiance map (the first irradiance map)
  • the calculation cost can be reduced, and the application can run in real time under the premise of having the effect of global illumination.
  • FIG. 6 is a schematic diagram of a system architecture diagram of an embodiment of the present application: wherein, the system architecture may include scene analysis (2001), geometry processing (2002), direct light calculation (2003), indirect light calculation (2004) And the output result (2005) module.
  • the scene analysis module 2001 can analyze data such as models, materials, and light sources of the scene;
  • the geometry processing stage 2002 includes steps such as viewpoint transformation, vertex coloring, projection, clipping, and scene acceleration structure construction, which are pre-steps.
  • Direct light calculation 2003 is to calculate the coloring effect of the original pipeline calculation light source on the scene.
  • Indirect light calculation stage 2004, can provide scene indirect light calculation through light probe, including two main modules:
  • Probe update stage 2041 Each emits a certain number of rays to intersect with the scene, and after obtaining the coloring information and distance information at the intersection, update the information on the corresponding probe;
  • Probe shading stage 2042 for each pixel in the final imaging stage.
  • the output result module 2005 can synthesize the direct light and the indirect light, and save the final rendering result.
  • the product implementation form of the embodiment of the present application is the program code contained in the rendering engine software.
  • the program code of the embodiment of the present application exists in the indirect light calculation stage of the rendering engine when it is running.
  • the program code of the embodiment of the present application runs the host memory and the GPU memory.
  • Fig. 7 shows the implementation form of the embodiment of the present application in the server and platform software, where the part indicated by the dotted line box is a newly added module of the embodiment of the present application on the basis of the existing platform software.
  • the embodiment of the present application adds three new stages: calculating intersection radiance by shadow map (3041), generating resolution irradiance map (3043), and performing indirect light calculation by neighborhood search (3044) ;
  • the final output stage (3051) the results of the direct light calculation (3031) and the indirect light calculation (3044) will be combined to perform lighting coloring synthesis, so as to achieve the effect of global illumination.
  • the innovative content of the embodiment of this application is mainly reflected in the indirect light calculation stage.
  • the core idea is to use shadow map instead of shadow ray for direct light shading in the probe update stage, and then render an irradiance map with reduced resolution in the probe shading stage, and use Neighborhood search is used to colorize indirect light and eliminate aliasing. Finally, the indirect light shading result is superimposed and output with direct light to achieve the effect of global illumination.
  • Shading includes two parts: direct light and indirect light: the direct light coloring of the intersection adopts the shadow map method, and the visibility between the intersection point and the light source is judged, so as to calculate the direct lighting of the current point; the indirect light coloring of the intersection adopts the probe interpolation method, The probes of adjacent grids are weighted according to the distance to obtain the indirect lighting of the intersection point. 2. Using the shading value of each intersection point and the texture information on the previous probe, calculate the texture information on the probe by means of weighted average. Use the texture information of the probe to calculate the indirect illumination of the imaging point. Mainly perform two key steps: 1. Render a reduced-resolution irradiance map according to the imaging resolution.
  • Each pixel of the irradiance map performs weighted interpolation by querying the texture information of adjacent probes.
  • an embodiment of the present application also provides a rendering device, the device is applied to a terminal device, and the device includes:
  • An acquisition module 901, configured to acquire texture information of light probes in the virtual scene to be rendered
  • the irradiance map calculation module 902 is configured to perform illumination calculation on the virtual scene according to the texture information of the light probe to obtain a first irradiance map, wherein the resolution of the first irradiance map is low The resolution required for the rendering result of the virtual scene;
  • An up-sampling module 903 configured to up-sample the first irradiance map to obtain a second irradiance map, the second irradiance map and the resolution required by the rendering result of the virtual scene Similarly, the second irradiance map is used for indirect light rendering of the virtual scene.
  • step 303 for the specific description of the up-sampling module 903, reference may be made to the description of step 303 in the foregoing embodiment, and details are not repeated here.
  • the aspect ratio of the first irradiance map is consistent with the aspect ratio of the second irradiance map, and the number of pixels in the first irradiance map is less than the The number of pixels in the second irradiance map.
  • the acquisition module is also used to:
  • the irradiance map calculation module is also used for:
  • the illumination calculation is performed on the virtual scene by means of a shadow map to obtain a third irradiance map, and the third irradiance map is used to perform the virtual scene direct light rendering.
  • the upsampling module is specifically used for:
  • Upsampling is performed on the first irradiance map by using a neighborhood search algorithm to obtain a second irradiance map.
  • the first irradiance map includes a plurality of first pixels
  • the second irradiance map includes second pixels
  • the second pixels correspond in position to the The target pixel on the first irradiance map
  • the target pixel is adjacent to the plurality of first pixels
  • the upsampling module is specifically used for:
  • the second pixel is obtained based on the presence of a first pixel whose similarity with the target pixel is greater than a threshold among the plurality of first pixels, and according to the first pixel whose similarity is greater than a threshold.
  • the upsampling module is specifically used for:
  • the neighborhood search algorithm is used to perform anti-aliasing on the first irradiance map.
  • the irradiance map calculation module is specifically used for:
  • Weight-based interpolation is performed on the texture information of the adjacent light probes.
  • FIG. 10 is a schematic structural diagram of a terminal device 1000 provided by the present application.
  • the terminal device includes a processor 1001 and a memory 1002, and the CPU is used to acquire the code to execute the steps in the embodiment described above in FIG. 3 .
  • the disclosed system, device and method can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or integrated. to another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or other network equipment, etc.) execute all or part of the steps of the method described in the embodiment of FIG. 2 of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本申请实施例公开了一种渲染方法,方法应用于终端设备,方法包括:获取待渲染的虚拟场景中光照探针的纹理信息;根据光照探针的纹理信息,对虚拟场景进行光照计算,得到第一辐照度贴图,其中第一辐照度贴图的分辨率低于虚拟场景的渲染结果所需的分辨率;对第一辐照度贴图进行上采样,以得到第二辐照度贴图,第二辐照度贴图与虚拟场景的渲染结果所需的分辨率相同,第二辐照度贴图用于进行虚拟场景的间接光渲染。本申请中,通过渲染一个降分辨率的辐照度贴图(第一辐照度贴图),可以降低计算开销,进而可以使得应用可以在拥有全局光照的效果的前提下,实时运行。

Description

一种渲染方法及其相关设备
本申请要求于2021年11月30日提交中国专利局、申请号为202111447462.4、发明名称为“一种渲染方法及其相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机领域,尤其涉及一种渲染方法及其相关设备。
背景技术
在图形学的渲染技术中,为了实现更为真实和逼真的渲染画面,无论是基于光栅化渲染和还是基于光线追踪的渲染技术,都需要将全局光照纳入考虑范围之内。实时性渲染中如何实现全局光照效果,一直是较为困难的问题。不同材质对全局光照的影响不同,由于漫反射(diffuse)材质表面会将光照信息均匀地进行散射,因此漫反射全局光照(diffuse global illumination,diffuse GI)是全局光照中影响最大的一个成分。由于diffuse材质的视点无关属性,因此对于静态光源场景,可以通过离线烘焙等方式,将场景光照信息缓存到对应的贴图上,在运行时的时候直接查找贴图进行插值快速计算得到全局光照结果,但是由于忽略可见性项,导致场景中会存在漏光现象。
现有的全局光照技术,对于动态全局照明要么需要计算机、主机等高性能平台,要么则需要提前烘焙以适应终端设备的低算力要求,因此,亟需一种可以在终端设备上实现的全局光照技术。
发明内容
第一方面,本申请提供了一种渲染方法,所述方法应用于终端设备,所述方法包括:
获取待渲染的虚拟场景中光照探针的纹理信息;其中,渲染是指将以文本二进制等方式存储的3D(3-dimension)数据绘制成图像的过程。虚拟场景也可以称之为空间场景,是指虚拟空间,如室内虚拟空间、卖场虚拟空间等。在该空间场景中可以具有光源以及物体。物体可以根据不同的虚拟空间设置不同的物体。
根据所述光照探针的纹理信息,对所述虚拟场景进行光照计算,得到第一辐照度贴图,其中所述第一辐照度贴图的分辨率低于所述虚拟场景的渲染结果所需的分辨率;
具体的,在计算得到第一辐照度贴图时,可以获取所述第一辐照度贴图中的每个像素相邻的光照探针的纹理信息,并对所述相邻的光照探针的纹理信息进行基于加权的插值。
基于物理光学原理可知,空间中每个位置处的光照效果,可以看作是周围每个发光点在该点的光照效果的叠加。因此,在获得了空间中每个光照探针位置处的光照情况后,要想获得空间中目标对象上(即目标位置)的光照情况,可以先获取该目标位置附近几个光照探针的光照信息,然后,将这几个光照探针作为光源,计算这几个光照探针所发射的光束在所述目标位置的漫反射,进而获得所述目标位置的光照信息,也就是第一辐照度贴图中的每个像素点的像素值。
对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图,所述第二辐照度贴图与所述虚拟场景的渲染结果所需的分辨率相同,所述第二辐照度贴图用于进行所述虚拟场景的间接光渲染。
为了能够得到虚拟场景的渲染结果所需的分辨率相同的辐照度贴图,需要对第一辐照度贴图进行上采样,以得到与所述虚拟场景的渲染结果所需的分辨率相同的第二辐照度贴图。
在现有的实现中,在原分辨率下进行原分辨率的着色计算,会造成较大计算负载,无法适应移动端的算力需求,使得应用无法流畅运行。本申请实施例中,通过渲染一个降分辨率的辐照度贴图(第一辐照度贴图),可以降低计算开销,进而可以使得应用可以在拥有全局光照的效果的前提下,实时运行。
在一种可能的实现中,所述第一辐照度贴图的长宽比与所述第二辐照度贴图的长宽比一致,所述第一辐照度贴图的像素点数量少于所述第二辐照度贴图的像素点数量。
在一种可能的实现中,所述方法还包括:获取所述虚拟场景中的直接光光源信息;根据所述直接光光源信息,通过阴影贴图(shadow map)的方式,对所述虚拟场景进行光照计算,得到第三辐照度贴图,所述第三辐照度贴图用于进行所述虚拟场景的直接光渲染。
本申请实施例中,交点的直接光着色可以采用shadow map的方式进行计算,将交点转换到光源所在视角下,并将其深度值与shadow map的深度值进行比较,以此判断交点与该光源的可见性。
在一种可能的实现中,可以将间接光照和直接光照进行叠加,作为最终合成输出。
通过上述方式,相比现有技术中对probe发射光线与场景的交点进行直接光着色时,需要再发射一根光线判断与光源的可见性,计算代价较高,不适合移动端算力。本申请实施例通过采用shadow map代替原先光线跟踪的方式来进行直接光着色。在保证原有画质的前提下,减少了直接光计算的开销,使得probe的更新速度更快,能使得应用实时运行。
在一种可能的实现中,所述对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图,包括:
通过邻域搜索算法,对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图。
由于第一辐照度贴图的分辨率小于所述虚拟场景的渲染结果所需的分辨率,如果直接基于第一辐照度贴图进行间接光渲染,会导致渲染结果出现走样现象。因此,本申请实施例中,可以采用邻域搜索的方式为原着色点找寻最接近的数值,减少走样现象。
在一种可能的实现中,所述第一辐照度贴图包括多个第一像素点(例如可以基于uv坐标进行查表确定的),所述第二辐照度贴图包括第二像素点,所述第二像素点在位置上对应于所述第一辐照度贴图上的目标像素点,所述目标像素点与所述多个第一像素点相邻,在所述通过邻域搜索算法,对所述第一辐照度贴图进行上采样时,具体可以基于所述多个第 一像素点中存在与所述目标像素点的相似度大于阈值的第一像素点,根据所述相似度大于阈值的第一像素点,得到所述第二像素点;基于所述多个第一像素点中不存在与所述目标像素点的相似度大于阈值的第一像素点,对所述多个第一像素点进行平均值计算,以得到所述第二像素点。
具体的,可以利用第一辐照度贴图,采用邻域搜索策略对原分辨率的像素进行间接光着色。在进行邻域搜索策略的实现中,可以在第一辐照度贴图对应点周围一定范围之内的像素作为候选值,通过法线、距离等条件进行判断,满足阈值条件则直接选中计算间接光照;否则取范围内点的平均值计算间接光照。
在一种可能的实现中,所述方法还包括:
基于所述多个第一像素点中不存在与所述目标像素点的相似度大于阈值的第一像素点,对所述多个第一像素点进行平均值计算,以得到所述第二像素点。
在一种可能的实现中,所述邻域搜索算法用于对所述第一辐照度贴图进行反走样。
在一种可能的实现中,所述根据所述光照探针的纹理信息,对所述虚拟场景进行光照计算,包括:获取所述第一辐照度贴图中的每个像素相邻的光照探针的纹理信息;对所述相邻的光照探针的纹理信息进行基于加权的插值。
第二方面,本申请提供了一种渲染装置,所述装置应用于终端设备,所述装置包括:
获取模块,用于获取待渲染的虚拟场景中光照探针的纹理信息;
辐照度贴图计算模块,用于根据所述光照探针的纹理信息,对所述虚拟场景进行光照计算,得到第一辐照度贴图,其中所述第一辐照度贴图的分辨率低于所述虚拟场景的渲染结果所需的分辨率;
上采样模块,用于对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图,所述第二辐照度贴图与所述虚拟场景的渲染结果所需的分辨率相同,所述第二辐照度贴图用于进行所述虚拟场景的间接光渲染。
在一种可能的实现中,所述第一辐照度贴图的长宽比与所述第二辐照度贴图的长宽比一致,所述第一辐照度贴图的像素点数量少于所述第二辐照度贴图的像素点数量。
在一种可能的实现中,所述获取模块,还用于:
获取所述虚拟场景中的直接光光源信息;
所述辐照度贴图计算模块,还用于:
根据所述直接光光源信息,通过阴影贴图(shadow map)的方式,对所述虚拟场景进行光照计算,得到第三辐照度贴图,所述第三辐照度贴图用于进行所述虚拟场景的直接光渲染。
在一种可能的实现中,所述上采样模块,具体用于:
通过邻域搜索算法,对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图。
在一种可能的实现中,所述第一辐照度贴图包括多个第一像素点,所述第二辐照度贴图包括第二像素点,所述第二像素点在位置上对应于所述第一辐照度贴图上的目标像素点,所述目标像素点与所述多个第一像素点相邻,所述上采样模块,具体用于:
基于所述多个第一像素点中存在与所述目标像素点的相似度大于阈值的第一像素点,根据所述相似度大于阈值的第一像素点,得到所述第二像素点。
在一种可能的实现中,所述上采样模块,具体用于:
基于所述多个第一像素点中不存在与所述目标像素点的相似度大于阈值的第一像素点,对所述多个第一像素点进行平均值计算,以得到所述第二像素点。
在一种可能的实现中,所述邻域搜索算法用于对所述第一辐照度贴图进行反走样。
在一种可能的实现中,所述辐照度贴图计算模块,具体用于:
获取所述第一辐照度贴图中的每个像素相邻的光照探针的纹理信息;
对所述相邻的光照探针的纹理信息进行基于加权的插值。
第三方面,本申请提供了一种终端设备,所述终端设备包括处理器和存储器,所述处理器获取存储器中存储的代码,以执行第一方面以及其可选的实现方式中的任意一种。
第四方面,本申请提供了一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质包含计算机指令用于执行上述第一方面及其可选的实现中任一所述的渲染方法。
第五方面,本申请还提供了一种计算机程序产品,包括代码,当所述代码被执行时,用于实现上述第一方面及其可选的实现中任一所述的渲染方法。
第六方面,提供了一种芯片,所述芯片包括处理器,所述处理器用于执行上述第一方面所描述的方法中的部分或全部操作。
本申请提供了一种渲染方法,所述方法应用于终端设备,所述方法包括:获取待渲染的虚拟场景中光照探针的纹理信息;根据所述光照探针的纹理信息,对所述虚拟场景进行光照计算,得到第一辐照度贴图,其中所述第一辐照度贴图的分辨率低于所述虚拟场景的渲染结果所需的分辨率;对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图,所述第二辐照度贴图与所述虚拟场景的渲染结果所需的分辨率相同,所述第二辐照度贴图用于进行所述虚拟场景的间接光渲染。在现有的实现中,在原分辨率下进行原分辨率的着色计算,会造成较大计算负载,无法适应移动端的算力需求,使得应用无法流畅运行。本申请实施例中,通过渲染一个降分辨率的辐照度贴图(第一辐照度贴图),可以降低计算开销,进而可以使得应用可以在拥有全局光照的效果的前提下,实时运行。
附图说明
图1为本申请提供的电子设备的结构示意;
图2为本申请提供的电子设备的结构示意;
图3为本实施例提供的渲染方法的流程示意;
图4为本实施例提供的一个光照探针示意;
图5为本实施例提供的一个降分辨率辐射度贴图的示意;
图6为本实施例提供的渲染方法的流程示意;
图7为本实施例提供的渲染方法的流程示意;
图8为本申请提供的渲染方法的流程示意;
图9为本实施例提供的一个渲染装置的结构示意;
图10为本申请提供的一种终端设备的结构示意。
具体实施方式
下面结合附图,对本申请的实施例进行描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或模块的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或模块,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或模块。在本申请中出现的对步骤进行的命名或者编号,并不意味着必须按照命名或者编号所指示的时间/逻辑先后顺序执行方法流程中的步骤,已经命名或者编号的流程步骤可以根据要实现的技术目的变更执行次序,只要能达到相同或者相类似的技术效果即可。
为了便于理解本申请的技术方案,首先对本申请涉及的概念做简要介绍。
光线追踪(ray tracing):是一种三维计算机图形学中的特殊渲染算法,该技术跟踪从虚拟相机发出的光线,计算光线在渲染场景中传播的过程,最终将渲染场景的数学模型显现出来,该方法能够实现更加逼真的渲染效果。
漫反射(diffuse):指的是物体表面反射属性,光在物体内部散射后从物体表面再发射出来,呈现视点无关的属性。
高光反射(specular):指的是物体表面反射属性,光打到物体表面后被物体直接反射的部分,与视点相关。
辐射率(radiance):每单位立体角每单位投射面积的辐射通量。
辐照度(irradiance):每单位面积的辐射通量。
直接光照(direct illumination):只考虑直接光源对场景的照明影响。
全局光照(global illumination):除了直接光源对场景照明的影响,也考虑场景中其他物体互相之间的照明影响,更接近现实照明效果。
阴影贴图(shadow map,SM):指的是为了实现直接光照中的阴影效果,以光源为视角出发。
虚拟点光源(virtual point light,VPL):是一种实现全局光照的算法,先将场景中被直接光照照亮的部分构造成虚拟点光源(VPL),然后对于成像的每个pixel,收集场景的VP Ls对其的光照贡献,达到全局照明效果。
反射阴影贴图(reflective shadow map,RSM):是一种实现全局光照的算法,算法假设场景中所有反射物都是diffuse材质,首先生成一张给定分辨率shadow map,作为场景的次级光源的;其次对于每个成像的pixel,根据距离、发现方向等计算次级光源对本pixel的光照贡献。
光照探针(light probe):probe又称为探针,是一种将场景光照信息进行缓存的数据结构,着色点的着色可以从probe进行查询并进行相应的插值计算,以得到间接光照,一般适用于静态光源场景。
光照贴图(light map):将静态物体表面切割成块,并展开到纹理空间;预先计算静态场景中光源对物体表面纹理的着色,并将结果存储成“光照贴图”中供以后使用。一般适用于静态场景的静态物体,而且适用于diffuse材质。
动态漫反射全局光照(dynamic diffuse global illumination,DDGI)是实现动态光源、动态物体的全局光照的方案。利用light probe的存储场景的间接光照信息,并采用光追手段动态进行更新,可以实现实时动态漫反射的全局照明效果。
接下来首先描述本申请的应用架构,本申请实施例提供的渲染方法可以应用于终端设备(也可以称之为电子设备),终端设备又可称之为用户设备(user equipment,UE)或者电子设备,可以部署在陆地上,包括室内或室外、手持或车载;也可以部署在水面上(如轮船等);还可以部署在空中(例如飞机、气球和卫星上等)。电子设备可以是手机(mobile phone)、平板电脑(pad)、具备无线通讯功能的可穿戴设备(如智能手表)、具有定位功能的位置追踪器、带无线收发功能的电脑、虚拟现实(virtual reality,VR)设备、增强现实(augmented real ity,AR)设备、智慧家庭(smart home)中的无线设备等,本申请对此不作限定。本申请中将前述电子设备及可设置于前述电子设备的芯片统称为电子设备。
本申请中的电子设备可以包括但不限于:智能移动电话、电视、平板电脑、手环、头戴显示设备(Head Mount Display,HMD)、增强现实(augmented reality,AR)设备,混合现实(mixed reality,MR)设备、蜂窝电话(cellular phone)、智能电话(smart phone)、个人数字助理(personal digital assistant,PDA)、平板型电脑、车载电子设备、膝上型电脑(laptop computer)、个人电脑(personal computer,PC)、监控设备、机器人、车载终端、自动驾驶车辆等。当然,在以下实施例中,对该电子设备的具体形式不作任何限制。
示例性地,参阅图1,下面以一个具体的结构为例,对本申请提供的电子设备的结构进行示例性说明。
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行 总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M,运动传感器180N等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的 通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括但不限于:第五代移动通信技术(5th-Generation,5G)系统,全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),蓝牙(bluetooth),全球导航卫星系统(the global navigation satellite system,GNSS),无线保真(wireless fidelity,WiFi),近距离无线通信(near field communication,NFC),FM(也可以称为调频广播), 紫蜂协议(Zigbee),射频识别技术(radio frequency identification,RFID)和/或红外(infrared,IR)技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)等。
在一些实施方式中,电子设备100也可以包括有线通信模块(图1中未示出),或者,此处的移动通信模块150或者无线通信模块160可以替换为有线通信模块(图1中未示出),该有线通信模块可以使电子设备通过有线网络与其他设备进行通信。该有线网络可以包括但不限于以下一项或者多项:光传送网(optical transport network,OTN)、同步数字体系(synchronous digital hierarchy,SDH)、无源光网络(passive optical network,PON)、以太网(Ethernet)、或灵活以太网(flex Ethernet,FlexE)等。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB摄像头,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频 编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。陀螺仪传感器 180B可以用于确定电子设备100的运动姿态。气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
运动传感器180N,可以用于对摄像头拍摄的范围内的运动物体进行检测,采集运动物体的运动轮廓或者运动轨迹等。例如,该运动传感器180N可以是红外传感器、激光传感器、动态视觉传感器(dynamic vision sensor,DVS)等,该DVS具体可以包括DAVIS(Dynamic and Active-pixel Vision Sensor)、ATIS(Asynchronous Time-based Image Sensor)或者CeleX传感器等传感器。DVS借鉴了生物视觉的特性,每个像素模拟一个神经元,独立地对光照 强度(以下简称“光强”)的相对变化做出响应。当光强的相对变化超过阈值时,像素会输出一个事件信号,包括像素的位置、时间戳以及光强的特征信息。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口195用于连接SIM卡。
接下来描述本申请实施例的一种系统架构示意。
图2是说明可以实施本发明中描述的技术的计算装置30的框图。计算装置30可以为本申请实施例中的渲染装置,用于实现本申请实施例中的渲染方法,计算装置30的实例包含但不限于无线装置、移动或蜂窝电话(包含所谓的智能手机)、个人数字助理(personal digital assistant,PDA)、包含视频显示器的视频游戏控制台、移动视频游戏装置、移动视频会议单元、膝上型计算机、台式计算机、电视机顶盒、平板计算装置、电子书阅读器、固定或移动媒体播放器等等。
在图2的实例中,计算装置30包含具有CPU存储器34的中央处理单元(central processing unit,CPU)32、具有GPU存储器38和一或多个着色单元40的图形处理单元(graphics processing unit,GPU)36、显示器单元42、显示器缓冲单元44、用户接口单元46和存储单元48。此外,存储单元48可以存储具有编译器54的GPU驱动器50、GPU程序52和本机编译的GPU程序56。
CPU 32的实例包含但不限于数字信号处理器(DSP)、通用微处理器、专用集成电路(ASIC)、现场可编程逻辑阵列(FPGA)或其它等效的集成或离散逻辑电路。虽然CPU 32和GPU 36在图2的实例中被说明成分开的单元,但是在一些实例中,CPU 32和GPU 36可以集成为单个单元。CPU 32可以执行一或多个应用程序。应用程序的实例可以包含网络浏览器、电子邮件应用程序、电子表格、视频游戏、音频和/或视频捕获、回放或编辑应用程序或其它起始有待经由显示器单元42呈现的图像数据的产生的应用程序。
在图2所示的实例中,CPU 32包含CPU存储器34。CPU存储器34可以表示在执行机器或对象代码时使用的芯片上存储设备或存储器。CPU存储器34可以各自包括能够存储固定数目个数字位的硬件存储器寄存器。CPU 32可以能够比从存储单元48(其可例如经由系统总线存取)读取值或者向存储单元48写入值更迅速地从本机CPU存储器34读取值或者向本机CPU存储器34写入值。
GPU 36表示用于执行图形操作的一或多个专用处理器。也就是说,举例来说,GPU 36可以是具有固定功能和用于渲染图形和执行GPU应用程序的可编程组件的专用硬件单元。 GPU 36还可包含DSP、通用微处理器、ASIC、FPGA或其它等效的集成或离散逻辑电路。
GPU 36还包含GPU存储器38,其可以表示在执行机器或对象代码时使用的芯片上存储设备或存储器。GPU存储器38可以各自包括能够存储固定数目个数字位的硬件存储器寄存器。GPU 36可以能够比从存储单元48(其可例如经由系统总线存取)读取值或者向存储单元48写入值更迅速地从本机GPU存储器38读取值或者向本机GPU存储器38写入值。
GPU 36还包含着色单元40。如下文更详细地描述,着色单元40可以配置成处理组件的可编程管线。在一些实例中,着色单元40可以称为“着色器处理器”或“统一着色器”,并且可以执行几何形状、顶点、像素或其它着色操作以渲染图形。着色单元40可以包含图2中为了清晰起见未具体展示的一或多个组件,例如用于取出和解码指令的组件、用于实行算术计算的一或多个算术逻辑单元(arithmetic and logic unit,ALU)和一或多个存储器、高速缓存或寄存器。
显示器单元42表示能够显示视频数据、图像、文本或任何其它类型的数据的单元。显示器单元42可以包含液晶显示器(liquid crystal display,LCD)、发光二极管(light emitting diode,LED)显示器、有机LED(organic light-emitting diode,OLED)、有源矩阵OLED(active-matrix organic light-emitting diode,AMOLED)显示器等等。
显示器缓冲单元44表示专用于为显示器单元42存储数据以供呈现图像(例如照片或视频帧)的存储器或存储装置。显示器缓冲单元44可以表示包含多个存储位置的二维缓冲器。显示器缓冲单元44内的存储位置的数目可以基本上类似于有待在显示器单元42上显示的像素的数目。举例来说,如果显示器单元42经配置以包含640x480个像素,那么显示器缓冲单元44可以包含640x480个存储位置。显示器缓冲单元44可以存储由GPU 36处理的像素中的每一个的最终像素值。显示器单元42可以从显示器缓冲单元44检索最终像素值,并且基于显示器缓冲单元44中存储的像素值显示最终图像。
用户接口单元46表示用户可以用来与计算装置30的其它单元(例如,CPU 32)交互或者以其它方式介接以与计算装置30的其它单元通信的单元。用户接口单元46的实例包含但不限于轨迹球、鼠标、键盘和其它类型的输入装置。用户接口单元46还可以是触摸屏,并且可以并入为显示器单元42的一部分。
存储单元48可以包括一或多个计算机可读存储媒体。存储单元48的实例包含但不限于随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、CD-ROM或其它光盘存储装置、磁盘存储装置或其它磁性存储装置、快闪存储器或可以用于以指令或数据结构的形式存储期望的程序代码并且可以由计算机或处理器存取的任何其它媒体。
在一些实例实施方案中,存储单元48可以包含使得CPU 32和/或GPU 36执行本发明中用于实现CPU 32和GPU 36的功能的指令。在一些实例中,存储单元48可以被视为非暂时性存储媒体。术语“非暂时性”可以指示存储媒体不是体现在载波或传播信号中。然而,术语“非暂时性”不应解释为意味着存储单元48是不能移动的。作为一个实例,存储单元48可以从计算装置30中移除,并且移动到另一装置。作为另一实例,基本上类似于存储单元48的存储单元可以插入到计算装置30中。在某些实例中,非暂时性存储媒体可以存储可能 随时间而改变的数据(例如,在RAM中)。
存储单元48存储GPU驱动器50和编译器54、GPU程序52和本机编译的GPU程序56。GPU驱动器50表示提供存取GPU 36的接口的计算机程序或可执行代码。CPU 32执行GPU驱动器50或其若干部分以与GPU 36连接,并且出于此原因,GPU驱动器50在图2的实例中展示为CPU 32内的用虚线框标记的GPU驱动器50。GPU驱动器50可以存取CPU 32执行的程序或其它可执行文件,包含GPU程序52。
GPU程序52可以包含(例如,使用应用程序编程接口(API))用高级(HL)编程语言编写的代码。API的实例包含开放图形库(OpenGL)。总地来说,API包含由相关联的硬件执行的预定的标准化的成组命令。API命令允许用户指令GPU的硬件组件执行命令,而无需用户知道硬件组件的具体情况。
GPU程序52可以调用或者以其它方式包含GPU驱动器50提供的一或多个功能。CPU 32总体上执行其中嵌入着GPU程序52的程序,并且在遇到GPU程序52后,即刻将GPU程序52传递给GPU驱动器50(例如,以命令流的形式)。CPU 32在这个上下文中执行GPU驱动器50以处理GPU程序52。举例来说,GPU驱动器50可以通过将GPU程序编译成GPU 36可执行的对象或机器代码而处理GPU程序52。这个对象代码在图2的实例中展示为本机编译的GPU程序56。
在一些实例中,编译器54可以实时或近实时地操作,以在执行其中嵌入着GPU程序52的程序期间编译GPU程序52。举例来说,编译器54总体上表示将根据HL编程语言定义的HL指令精简成低级(LL)编程语言的LL指令的模块。在编译之后,这些LL指令能够由特定类型的处理器或其它类型的硬件(例如FPGA、ASIC等等(包含例如CPU 32和GPU 36)来执行。
在图2的实例中,编译器54可以在执行包含GPU程序52的HL代码时从CPU 32接收GPU程序52。编译器54可以将GPU程序52编译成符合LL编程语言的本机编译的GPU程序56。编译器54接着输出包含LL指令的本机编译的GPU程序56。
GPU 36总体上接收本机编译的GPU程序56(如通过GPU 36内的虚线框标记的“本机编译的GPU程序56”所展示),在这之后,在一些例子中,GPU 36即刻渲染图像并且将图像的经渲染部分输出到显示器缓冲单元44。举例来说,GPU 36可以产生有待在显示器单元42处显示的多个基元。基元可以包含一或多条线(包含曲线、样条等)、点、圆、椭圆、多边形(其中通常将多边形定义为一或多个三角形的集合)或任何其它二维(2D)基元。术语“基元”还可以指代三维(3D)基元,例如立方体、圆柱体、球体、圆锥体、金字塔、圆环等等。总地来说,术语“基元”是指任何被GPU 36渲染以供经由显示器单元42作为图像(或在视频数据的上下文中的帧)显示的几何形状或要素。
GPU 36可以通过应用一或多个模型变换(其也可以在状态数据中指定)将基元或基元的其它状态数据(例如,其定义基元的纹理、亮度、相机配置或其它方面)变换成所谓的“世界空间”。一旦经过变换,GPU 36就可以应用有效相机的视图变换(其同样也可以在定义相机的状态数据中指定)以将基元和光的坐标变换到相机或眼睛空间中。GPU36还可以执行顶点着色以在任何有效光的视图中渲染基元的外观。GPU 36可以在上述模型、世界或视图空间中的一或多个中执行顶点着色(虽然顶点着色通常是在世界空间中执行的)。
一旦基元经过着色,GPU 36就可以执行投影以将图像投影到(作为一个实例)在(-1,-1,-1)和(1,1,1)处具有极点的单位立方体中。这个单位立方体通常称为典型视图体。在将模型从眼睛空间变换到典型视图体之后,GPU 36可以执行裁剪以移除任何不至少部分地驻留在视图体中的基元。换句话说,GPU 36可以移除任何不在相机帧内的基元。GPU 36可以接着将基元的坐标从视图体映射到屏幕空间,从而有效地将基元的3D基元精简成屏幕的2D坐标。
在给定用其相关联的着色数据定义基元的经变换和投影的顶点的情况下,GPU 36可以接着使基元光栅化。举例来说,GPU 36可以计算和设置基元所覆盖的屏幕的像素的颜色。在光栅化期间,GPU 36可以应用与基元相关联的任何纹理(其中纹理可以包括状态数据)。GPU 36还可以在光栅化期间执行Z缓冲器算法(也称为深度测试)以确定是否有任何基元和/或对象被任何其它对象遮蔽。Z缓冲器算法根据基元的深度将基元排序,使得GPU 36知道将每一基元绘制到屏幕上时的次序。GPU 36将经渲染的像素输出到显示器缓冲单元44。
显示器缓冲单元44可以暂时存储经渲染的图像的经渲染的像素,直到整个图像都被渲染了为止。在这个上下文中,可以将显示器缓冲单元44视为图像帧缓冲器。显示器缓冲单元44可以接着发射有待在显示器单元42上显示的经渲染的图像。在一些替代的实例中,GPU36可以将图像的经渲染的部分直接输出到显示器单元42以供显示,而不是将图像暂时存储在显示器缓冲单元44中。显示器单元42可以接着显示在显示器缓冲器单元78中存储的图像。
在图形学的渲染技术中,为了实现更为真实和逼真的渲染画面,无论是基于光栅化渲染和还是基于光线追踪的渲染技术,都需要将全局光照纳入考虑范围之内。实时性渲染中如何实现全局光照效果,一直是较为困难的问题。不同材质对全局光照的影响不同,由于漫反射(diffuse)材质表面会将光照信息均匀地进行散射,因此漫反射全局光照(diffuse global illumination,diffuse GI)是全局光照中影响最大的一个成分。由于diffuse材质的视点无关属性,因此对于静态光源场景,可以通过离线烘焙等方式,将场景光照信息缓存到对应的贴图上,在运行时的时候直接查找贴图进行插值快速计算得到全局光照结果,但是由于忽略可见性项,导致场景中会存在漏光现象。
现有的全局光照技术,对于动态全局照明要么需要计算机、主机等高性能平台,要么则需要提前烘焙以适应终端设备的低算力要求,因此,亟需一种可以在终端设备上实现的全局光照技术。
下面通过图3对本实施例提供的渲染方法的步骤进行详细说明,图3为本申请实施例提供的一种渲染方法的流程示意,所述方法可以应用于如图1和图2所示的终端设备中,如图3所示,该渲染方法可以包括以下步骤:
301、获取待渲染的虚拟场景中光照探针的纹理信息。
其中,渲染是指将以文本二进制等方式存储的3D(3-dimension)数据绘制成图像的过程。虚拟场景也可以称之为空间场景,是指虚拟空间,如室内虚拟空间、卖场虚拟空间等。在该空间场景中可以具有光源以及物体。物体可以根据不同的虚拟空间设置不同的物体。
在一种可能的实现中,在正式开始渲染前,可以进行几何处理,几何处理阶段可以包 括但不限于视点变换、顶点着色、投影、裁剪,场景加速结构构建等步骤。
具体的,正式开始渲染前,用户在设置完渲染场景,会选择渲染视角,该视角决定了最终成像时图像的内容,也会影响到场景中光源对成像时的贡献;场景解析完成后,获取场景的光源,材质,几何数据的加速结构等信息,用于间接光的计算。
在一种可能的实现中,可以对虚拟场景进行模型材质的加载,主要涉及两个部分,第一部分是将需要渲染的模型添加到场景中,第二部分是给场景中的模型添加各自的材质信息和纹理信息。
在一种可能的实现中,在间接光计算之前,需要对场景中的光照探针的参数进行初始化设置。
其中,所述光照探针可以是多种开发引擎,例如Unity、Unreal Engine(UE,虚幻引擎)等中的一种工具,通过光照探针可以捕获并使用穿过场景空白空间的光线的相关信息。光照探针与目前渲染技术中常使用的光照贴图类似,都储存了有关场景中的光照的“烘焙”信息。不同之处在于,光照贴图存储的是有关光线照射到场景中的表面的光照信息;而光照探针存储的是有关光线穿过场景中的空白空间的信息。
在一种可能的实现中,可以预先在待展示的图像帧所对应的虚拟场景中放置一个立方体来标记需要放置光照探针的区域,并在所述区域摆放光照探针。所述虚拟场景包括一个虚拟对象,在该虚拟场景放置一个立方体标记出光照探针所在的区域后,可以按照预设的密度在所述区域放置光照探针。所述光照探针的密度越大,后续进行漫反射计算所获得的光照效果越接近真实情况,但是运算量会随着放置密度的增加而增大,用户可以根据其所处理器的处理能力,权衡所述光照探针和其处理器的计算能力,合理设置所述光照探针的密度。
其中,所述光照探针可以被均匀放置在所述立方体所标记的区域,也可以非均匀地放置在所述立方体所标记的区域,本申请对此不做限制。当然,本领域技术人员可以理解,除了用立方体来标记所述光照探针放置的区域,还可以使用其他多面体来标记所述光照探针放置的区域,本申请对此也不做限制。
此外,当使用立方体标记所述光照探针的方式区域、所述光照探针均匀放置在所标记的区域时,对所述光照探针所发射的光线进行漫反射计算时,能够大大降低漫反射计算的复杂度、降低对处理器运算能力的要求。
在一种可能的实现中,可以根据实际场景判断,针对于当前待渲染的虚拟场景的帧需要对probe进行更新,还是沿用之前的probe信息。当需要probe更新时,可以从每个probe发射出的光线与场景加速结构进行求交,对交点进行着色。其中,着色可以包括直接光和间接光两部分:交点的直接光着色可以采用shadow map的方式,判断交点与光源之间可见性,以此计算当前点的直接光照;交点的间接光着色可以采用probe插值的方式,对邻近网格的probe根据距离进行加权计算,获得交点的间接光照。之后可以利用每个交点的着色值,以及之前的probe上的纹理信息,通过加权平均的方式,计算得到probe上的纹理信息。
在一种可能的实现中,示例性的,在间接光计算阶段,可以对probe进行发射光线并 计算交点的radiance。如图4所示,在本实施例中,每个probe可以发射多根(例如144根)光线,然后计算光线与场景的交点。计算完每根光线的radiance,可以据此更新probe纹理信息,根据历史纹理进行加权融合。
更具体的,以一个光照探针为例,可以借助开发引擎自带的光线追踪功能,可以使所述光照探针在360°的空间范围内随机发射指定数量的光线,例如,发射144条射线,并对所有发射的光线进行光线追踪,进而获得光照探针位置处的光照信息。其基本原理如下:当所述光照探针所发射的光线打到虚拟场景中的虚拟对象上,基于光学原理可知,所发射的光线会被虚拟对象的表面漫反射,漫反射的部分光束会打到光照探针的位置,因此,能够基于对当前帧中每个光照探针所发射的光线进行光线追踪,获取每个光照探针所发射的所有光线被虚拟场景中的物体漫反射时,每个光照探针位置处的纹理信息(或者可以称之为光照信息)。其中,所述光照信息,包括所述光照探针位置处的光的辐照度的信息,还可以包括所述光照探针位置处的光束的方向信息。
302、根据所述光照探针的纹理信息,对所述虚拟场景进行光照计算,得到第一辐照度贴图,其中所述第一辐照度贴图的分辨率低于所述虚拟场景的渲染结果所需的分辨率。
在一种可能的实现中,在获取到虚拟场景中多个光照探针的纹理信息之后,可以根据所述光照探针的纹理信息,对所述虚拟场景进行光照计算,得到第一辐照度贴图。
具体的,可以利用光照探针probe的纹理信息,计算成像点的间接光照。具体的,可以根据成像分辨率,渲染一张降分辨率的irradiance map。其中,irradiance map中的每个像素可以通过查询邻近的probe的纹理信息进行加权的插值。所述虚拟场景的渲染结果所需的分辨率可以理解为虚拟场景所要求的的成像分辨率。
在现有的实现中,在原分辨率下进行原分辨率的着色计算,会造成较大计算负载,无法适应移动端的算力需求,使得应用无法流畅运行。本申请实施例中,通过渲染一个降分辨率的辐照度贴图(第一辐照度贴图),可以降低计算开销,进而可以使得应用可以在拥有全局光照的效果的前提下,实时运行。
具体的,在计算得到第一辐照度贴图时,可以获取所述第一辐照度贴图中的每个像素相邻的光照探针的纹理信息,并对所述相邻的光照探针的纹理信息进行基于加权的插值。
基于物理光学原理可知,空间中每个位置处的光照效果,可以看作是周围每个发光点在该点的光照效果的叠加。因此,在获得了空间中每个光照探针位置处的光照情况后,要想获得空间中目标对象上(即目标位置)的光照情况,可以先获取该目标位置附近几个光照探针的光照信息,然后,将这几个光照探针作为光源,计算这几个光照探针所发射的光束在所述目标位置的漫反射,进而获得所述目标位置的光照信息,也就是第一辐照度贴图中的每个像素点的像素值。
在一种可能的实现中,所述第一辐照度贴图的长宽比与所述第二辐照度贴图(第二辐照度贴图的分辨率和虚拟场景的渲染结果所需的分辨率一致)的长宽比一致,所述第一辐照度贴图的像素点数量少于所述第二辐照度贴图的像素点数量。例如可以参照图5所示。
303、对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图,所述第二辐照度贴图与所述虚拟场景的渲染结果所需的分辨率相同,所述第二辐照度贴图用于进行所述虚拟 场景的间接光渲染。
为了能够得到虚拟场景的渲染结果所需的分辨率相同的辐照度贴图,需要对第一辐照度贴图进行上采样,以得到与所述虚拟场景的渲染结果所需的分辨率相同的第二辐照度贴图。
由于第一辐照度贴图的分辨率小于所述虚拟场景的渲染结果所需的分辨率,如果直接基于第一辐照度贴图进行间接光渲染,会导致渲染结果出现走样现象。因此,本申请实施例中,可以采用邻域搜索的方式为原着色点找寻最接近的数值,减少走样现象。
在一种可能的实现中,在所述对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图时,具体可以通过邻域搜索算法,对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图。
在一种可能的实现中,所述第一辐照度贴图包括多个第一像素点(例如可以基于uv坐标进行查表确定的),所述第二辐照度贴图包括第二像素点,所述第二像素点在位置上对应于所述第一辐照度贴图上的目标像素点,所述目标像素点与所述多个第一像素点相邻,在所述通过邻域搜索算法,对所述第一辐照度贴图进行上采样时,具体可以基于所述多个第一像素点中存在与所述目标像素点的相似度大于阈值的第一像素点,根据所述相似度大于阈值的第一像素点,得到所述第二像素点;基于所述多个第一像素点中不存在与所述目标像素点的相似度大于阈值的第一像素点,对所述多个第一像素点进行平均值计算,以得到所述第二像素点。
在一种可能的实现中,所述邻域搜索算法用于对所述第一辐照度贴图进行反走样。
具体的,可以利用第一辐照度贴图,采用邻域搜索策略对原分辨率的像素进行间接光着色。在进行邻域搜索策略的实现中,可以在第一辐照度贴图对应点周围一定范围之内的像素作为候选值,通过法线、距离等条件进行判断,满足阈值条件则直接选中计算间接光照;否则取范围内点的平均值计算间接光照。
在probe着色阶段,首先降分辨率生成irradiance map,然后在最终成像时,在irradiance map查找与着色点最接近的像素值。在本实施例中,对于着色点而言,可以会查询其相邻的多个(例如8个)probe的纹理信息进行光照计算。示例性的,最终成像分辨率可以为2163*1080,irradiance map降2倍分辨率,可以只渲染1081*540分辨率图像。最终成像时在irradiance map上用同样uv坐标进行查表,对于查找到的像素,需要对其相邻元素再进行相似搜索,找到最接近的像素进行着色。在本实施例中,将对相邻多个(例如4个)像素(-1,-1),(-1,1),(1,-1),(1,1)以及自己(0,0)执行相似搜索,判断实际着色点的候选像素的法线和深度值的相似度,以此选取最接近的像素点的值。当所有候选像素均不满足条件时,回退到求平均值的情况。邻域搜索的目的是为了消除降分辨率渲染irradiance map带来的走样问题。
在一种可能的实现中,还可以获取所述虚拟场景中的直接光光源信息;根据所述直接光光源信息,通过阴影贴图(shadow map)的方式,对所述虚拟场景进行光照计算,得到第三辐照度贴图,所述第三辐照度贴图用于进行所述虚拟场景的直接光渲染。
本申请实施例中,交点的直接光着色可以采用shadow map的方式进行计算,将交点转 换到光源所在视角下,并将其深度值与shadow map的深度值进行比较,以此判断交点与该光源的可见性。
在一种可能的实现中,可以将间接光照和直接光照进行叠加,作为最终合成输出。
通过上述方式,相比现有技术中对probe发射光线与场景的交点进行直接光着色时,需要再发射一根光线判断与光源的可见性,计算代价较高,不适合移动端算力。本申请实施例通过采用shadow map代替原先光线跟踪的方式来进行直接光着色。在保证原有画质的前提下,减少了直接光计算的开销,使得probe的更新速度更快,能使得应用实时运行。
本申请提供了一种渲染方法,所述方法应用于终端设备,所述方法包括:获取待渲染的虚拟场景中光照探针的纹理信息;根据所述光照探针的纹理信息,对所述虚拟场景进行光照计算,得到第一辐照度贴图,其中所述第一辐照度贴图的分辨率低于所述虚拟场景的渲染结果所需的分辨率;对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图,所述第二辐照度贴图与所述虚拟场景的渲染结果所需的分辨率相同,所述第二辐照度贴图用于进行所述虚拟场景的间接光渲染。在现有的实现中,在原分辨率下进行原分辨率的着色计算,会造成较大计算负载,无法适应移动端的算力需求,使得应用无法流畅运行。本申请实施例中,通过渲染一个降分辨率的辐照度贴图(第一辐照度贴图),可以降低计算开销,进而可以使得应用可以在拥有全局光照的效果的前提下,实时运行。
接下里从软件模块的角度,介绍本申请实施例的系统架构:
参照图6,图6是本申请实施例的一个系统架构图的示意:其中,系统架构可以包含场景解析(2001)、几何处理(2002)、直接光计算(2003)、间接光计算(2004)和输出结果(2005)模块。
场景解析模块2001可以解析场景的模型、材质、光源等数据;
几何处理阶段2002包括视点变换、顶点着色、投影、裁剪,场景加速结构构建等步骤,为前置步骤。
直接光计算2003,是计算原有管线计算光源对场景的着色影响。
间接光计算阶段2004,可以通过light probe的提供场景间接光计算,包括两个主要模块:
probe更新阶段2041:每个发射一定数量光线与场景求交,获得交点处得到着色信息和距离信息后,更新对应probe上的信息;
probe着色阶段2042:对每个最终成像阶段的像素。
输出结果模块2005可以将直接光和间接光合成后,保存最终渲染结果。
本申请实施例的产品实现形态,是包含在渲染引擎软件中的程序代码。以图7所示的系统框架为例,本申请实施例的程序代码存在于渲染引擎的运行时的间接光计算阶段。运行时,本申请实施例的程序代码运行主机内存和GPU内存。图7给出了本申请实施例在服务器及平台软件中的实现形态,其中虚线框所示部分为本申请实施例在现有平台软件基础上新增加的模块。在渲染引擎的间接光计算阶段,本申请实施例新增了利用shadow map计算交点radiance(3041)、生成将分辨率irradiance map(3043)以及采用邻域搜索进行间接光计算(3044)三个阶段;最终输出结果阶段(3051),会在结合直接光计算(3031)和间接光计算(3044)的结果,进行光照着色合成,从而实现全局光照的效果。
本申请实施例的创新内容主要体现在间接光计算阶段,其核心思想是在probe更新阶段使用shadow map代替shadow ray进行直接光着色,然后在probe着色阶段降分辨率渲染一张irradiance map,并采用邻域搜索的方式来进行间接光的着色,消除走样。最后将间接光着色结果与直接光进行叠加输出,达到全局照明的效果。
结合图8,详细阐述本申请实施例方法的一个具体实现:正式开始渲染前,用户在设置完渲染场景,会选择渲染视角,该视角决定了最终成像时图像的内容,也会影响到场景中光源对成像时的贡献;场景解析完成后,获取场景的光源,材质,几何数据的加速结构等信息,用于间接光的计算;在间接光计算之前,需要对场景中的probe参数进行初始化设置,应用根据实际场景判断,本次是否需要对probe进行更新,还是沿用之前的probe信息。当需要probe更新时,主要执行两个步骤:1、从每个probe发射出的光线与场景加速结构进行求交,对交点进行着色。着色包括直接光和间接光两部分:交点的直接光着色采用shadow map的方式,判断交点与光源之间可见性,以此计算当前点的直接光照;交点的间接光着色采用probe插值的方式,对邻近网格的probe根据距离进行加权计算,获得交点的间接光照。2、利用每个交点的着色值,以及之前的probe上的纹理信息,通过加权平均的方式,计算得到probe上的纹理信息。利用probe的纹理信息,计算成像点的间接光照。主要执行两个关键步骤:1、根据成像分辨率,渲染一张降分辨率的irradiance map。irradiance map每个像素通过查询邻近的probe的纹理信息进行加权的插值。2、利用irradiance map,采用邻域搜索策略对原分辨率的像素进行间接光着色。邻域搜索策略,在irradiance map对应点周围一定范围之内的像素作为候选值,通过法线、距离等条件进行判断,满足阈值条件则直接选中计算间接光照;否则取范围内点的平均值计算间接光照。将间接光照和直接光照进行叠加,作为最终合成输出。
参照图9,本申请实施例还提供了一种渲染装置,所述装置应用于终端设备,所述装置包括:
获取模块901,用于获取待渲染的虚拟场景中光照探针的纹理信息;
其中,关于获取模块901的具体描述可以参照上述实施例中步骤301的描述,这里不再赘述。
辐照度贴图计算模块902,用于根据所述光照探针的纹理信息,对所述虚拟场景进行光照计算,得到第一辐照度贴图,其中所述第一辐照度贴图的分辨率低于所述虚拟场景的渲染结果所需的分辨率;
其中,关于辐照度贴图计算模块902的具体描述可以参照上述实施例中步骤302的描述,这里不再赘述。
上采样模块903,用于对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图,所述第二辐照度贴图与所述虚拟场景的渲染结果所需的分辨率相同,所述第二辐照度贴图用于进行所述虚拟场景的间接光渲染。
其中,关于上采样模块903的具体描述可以参照上述实施例中步骤303的描述,这里不再赘述。
在一种可能的实现中,所述第一辐照度贴图的长宽比与所述第二辐照度贴图的长宽比一致,所述第一辐照度贴图的像素点数量少于所述第二辐照度贴图的像素点数量。
在一种可能的实现中,所述获取模块,还用于:
获取所述虚拟场景中的直接光光源信息;
所述辐照度贴图计算模块,还用于:
根据所述直接光光源信息,通过阴影贴图(shadow map)的方式,对所述虚拟场景进行光照计算,得到第三辐照度贴图,所述第三辐照度贴图用于进行所述虚拟场景的直接光渲染。
在一种可能的实现中,所述上采样模块,具体用于:
通过邻域搜索算法,对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图。
在一种可能的实现中,所述第一辐照度贴图包括多个第一像素点,所述第二辐照度贴图包括第二像素点,所述第二像素点在位置上对应于所述第一辐照度贴图上的目标像素点,所述目标像素点与所述多个第一像素点相邻,所述上采样模块,具体用于:
基于所述多个第一像素点中存在与所述目标像素点的相似度大于阈值的第一像素点,根据所述相似度大于阈值的第一像素点,得到所述第二像素点。
在一种可能的实现中,所述上采样模块,具体用于:
基于所述多个第一像素点中不存在与所述目标像素点的相似度大于阈值的第一像素点,对所述多个第一像素点进行平均值计算,以得到所述第二像素点。
在一种可能的实现中,所述邻域搜索算法用于对所述第一辐照度贴图进行反走样。
在一种可能的实现中,所述辐照度贴图计算模块,具体用于:
获取所述第一辐照度贴图中的每个像素相邻的光照探针的纹理信息;
对所述相邻的光照探针的纹理信息进行基于加权的插值。
参照图10,图10为本申请提供的一种终端设备1000的结构示意,如图10示出的那样,所述终端设备包括处理器1001和存储器1002,所述CPU用于获取所述存储器的代码以执行上述图3描述的实施例中的步骤。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者其他网络设备等)执行本申请图2实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (19)

  1. 一种渲染方法,其特征在于,所述方法应用于终端设备,所述方法包括:
    获取待渲染的虚拟场景中光照探针的纹理信息;
    根据所述光照探针的纹理信息,对所述虚拟场景进行光照计算,得到第一辐照度贴图,其中所述第一辐照度贴图的分辨率低于所述虚拟场景的渲染结果所需的分辨率;
    对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图,所述第二辐照度贴图与所述虚拟场景的渲染结果所需的分辨率相同,所述第二辐照度贴图用于进行所述虚拟场景的间接光渲染。
  2. 根据权利要求1所述的方法,其特征在于,所述第一辐照度贴图的长宽比与所述第二辐照度贴图的长宽比一致,所述第一辐照度贴图的像素点数量少于所述第二辐照度贴图的像素点数量。
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:
    获取所述虚拟场景中的直接光光源信息;
    根据所述直接光光源信息,通过阴影贴图(shadow map)的方式,对所述虚拟场景进行光照计算,得到第三辐照度贴图,所述第三辐照度贴图用于进行所述虚拟场景的直接光渲染。
  4. 根据权利要求1至3任一所述的方法,其特征在于,所述对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图,包括:
    通过邻域搜索算法,对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图。
  5. 根据权利要求4所述的方法,其特征在于,所述第一辐照度贴图包括多个第一像素点,所述第二辐照度贴图包括第二像素点,所述第二像素点在位置上对应于所述第一辐照度贴图上的目标像素点,所述目标像素点与所述多个第一像素点相邻,所述通过邻域搜索算法,对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图,包括:
    基于所述多个第一像素点中存在与所述目标像素点的相似度大于阈值的第一像素点,根据所述相似度大于阈值的第一像素点,得到所述第二像素点。
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    基于所述多个第一像素点中不存在与所述目标像素点的相似度大于阈值的第一像素点,对所述多个第一像素点进行平均值计算,以得到所述第二像素点。
  7. 根据权利要求4至6任一所述的方法,其特征在于,所述邻域搜索算法用于对所述第一辐照度贴图进行反走样。
  8. 根据权利要求1至7任一所述的方法,其特征在于,所述根据所述光照探针的纹理信息,对所述虚拟场景进行光照计算,包括:
    获取所述第一辐照度贴图中的每个像素相邻的光照探针的纹理信息;
    对所述相邻的光照探针的纹理信息进行基于加权的插值。
  9. 一种渲染装置,其特征在于,所述装置应用于终端设备,所述装置包括:
    获取模块,用于获取待渲染的虚拟场景中光照探针的纹理信息;
    辐照度贴图计算模块,用于根据所述光照探针的纹理信息,对所述虚拟场景进行光照计算,得到第一辐照度贴图,其中所述第一辐照度贴图的分辨率低于所述虚拟场景的渲染结果所需的分辨率;
    上采样模块,用于对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图,所述第二辐照度贴图与所述虚拟场景的渲染结果所需的分辨率相同,所述第二辐照度贴图用于进行所述虚拟场景的间接光渲染。
  10. 根据权利要求9所述的装置,其特征在于,所述第一辐照度贴图的长宽比与所述第二辐照度贴图的长宽比一致,所述第一辐照度贴图的像素点数量少于所述第二辐照度贴图的像素点数量。
  11. 根据权利要求9或10所述的装置,其特征在于,所述获取模块,还用于:
    获取所述虚拟场景中的直接光光源信息;
    所述辐照度贴图计算模块,还用于:
    根据所述直接光光源信息,通过阴影贴图(shadow map)的方式,对所述虚拟场景进行光照计算,得到第三辐照度贴图,所述第三辐照度贴图用于进行所述虚拟场景的直接光渲染。
  12. 根据权利要求9至11任一所述的装置,其特征在于,所述上采样模块,具体用于:
    通过邻域搜索算法,对所述第一辐照度贴图进行上采样,以得到第二辐照度贴图。
  13. 根据权利要求12所述的装置,其特征在于,所述第一辐照度贴图包括多个第一像素点,所述第二辐照度贴图包括第二像素点,所述第二像素点在位置上对应于所述第一辐照度贴图上的目标像素点,所述目标像素点与所述多个第一像素点相邻,所述上采样模块,具体用于:
    基于所述多个第一像素点中存在与所述目标像素点的相似度大于阈值的第一像素点,根据所述相似度大于阈值的第一像素点,得到所述第二像素点。
  14. 根据权利要求13所述的装置,其特征在于,所述上采样模块,具体用于:
    基于所述多个第一像素点中不存在与所述目标像素点的相似度大于阈值的第一像素点, 对所述多个第一像素点进行平均值计算,以得到所述第二像素点。
  15. 根据权利要求12至14任一所述的装置,其特征在于,所述邻域搜索算法用于对所述第一辐照度贴图进行反走样。
  16. 根据权利要求9至15任一所述的装置,其特征在于,所述辐照度贴图计算模块,具体用于:
    获取所述第一辐照度贴图中的每个像素相邻的光照探针的纹理信息;
    对所述相邻的光照探针的纹理信息进行基于加权的插值。
  17. 一种非易失性计算机可读存储介质,其特征在于,所述非易失性可读存储介质包含计算机指令,用于执行权利要求1至8任一所述的渲染方法。
  18. 一种运算设备,其特征在于,所述运算设备包括存储器和处理器,所述存储器中存储有代码,所述处理器用于获取所述代码,以执行权利要求1至8任一所述的渲染方法。
  19. 一种计算机程序产品,其特征在于,所述计算机程序产品包括代码,当所述代码被执行时,用于实现权利要求1至8任一所述的渲染方法。
PCT/CN2022/134296 2021-11-30 2022-11-25 一种渲染方法及其相关设备 Ceased WO2023098583A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP22900387.6A EP4421746A4 (en) 2021-11-30 2022-11-25 RENDERING METHOD AND ASSOCIATED DEVICE
US18/714,396 US20250259378A1 (en) 2021-11-30 2022-11-25 Rendering method and related device thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111447462.4 2021-11-30
CN202111447462.4A CN116206041A (zh) 2021-11-30 2021-11-30 一种渲染方法及其相关设备

Publications (1)

Publication Number Publication Date
WO2023098583A1 true WO2023098583A1 (zh) 2023-06-08

Family

ID=86513461

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/134296 Ceased WO2023098583A1 (zh) 2021-11-30 2022-11-25 一种渲染方法及其相关设备

Country Status (4)

Country Link
US (1) US20250259378A1 (zh)
EP (1) EP4421746A4 (zh)
CN (1) CN116206041A (zh)
WO (1) WO2023098583A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117745926A (zh) * 2023-11-29 2024-03-22 上海暖叠网络科技有限公司 一种全局光照渲染方法
CN118096985A (zh) * 2023-07-11 2024-05-28 北京艾尔飞康航空技术有限公司 虚拟森林场景实时渲染方法及装置
CN118587342A (zh) * 2024-08-01 2024-09-03 云基智慧工程股份有限公司 三维场景渲染方法、装置、设备及存储介质
CN119811261A (zh) * 2025-03-12 2025-04-11 深圳市彤兴电子有限公司 基于显示驱动芯片的高帧率渲染方法及系统

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117788677B (zh) * 2023-12-29 2024-09-13 摩尔线程智能科技(上海)有限责任公司 全局光照确定方法、装置及存储介质
CN117893670B (zh) * 2024-01-15 2024-10-18 联想新视界(北京)科技有限公司 一种实时全局光照渲染方法、装置及电子设备
CN121661223B (zh) * 2026-02-06 2026-04-17 湖南快乐阳光互动娱乐传媒有限公司 虚拟现实的动态渲染方法、系统、存储介质及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190272626A1 (en) * 2016-10-31 2019-09-05 Victoria Link Limited A rendering process and system
CN112263837A (zh) * 2020-11-16 2021-01-26 腾讯科技(深圳)有限公司 虚拟环境中的天气渲染方法、装置、设备及存储介质
CN112755535A (zh) * 2021-02-05 2021-05-07 腾讯科技(深圳)有限公司 光照渲染方法、装置、存储介质及计算机设备
CN113470153A (zh) * 2021-07-23 2021-10-01 腾讯科技(深圳)有限公司 虚拟场景的渲染方法、装置及电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190272626A1 (en) * 2016-10-31 2019-09-05 Victoria Link Limited A rendering process and system
CN112263837A (zh) * 2020-11-16 2021-01-26 腾讯科技(深圳)有限公司 虚拟环境中的天气渲染方法、装置、设备及存储介质
CN112755535A (zh) * 2021-02-05 2021-05-07 腾讯科技(深圳)有限公司 光照渲染方法、装置、存储介质及计算机设备
CN113470153A (zh) * 2021-07-23 2021-10-01 腾讯科技(深圳)有限公司 虚拟场景的渲染方法、装置及电子设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4421746A4

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118096985A (zh) * 2023-07-11 2024-05-28 北京艾尔飞康航空技术有限公司 虚拟森林场景实时渲染方法及装置
CN117745926A (zh) * 2023-11-29 2024-03-22 上海暖叠网络科技有限公司 一种全局光照渲染方法
CN118587342A (zh) * 2024-08-01 2024-09-03 云基智慧工程股份有限公司 三维场景渲染方法、装置、设备及存储介质
CN119811261A (zh) * 2025-03-12 2025-04-11 深圳市彤兴电子有限公司 基于显示驱动芯片的高帧率渲染方法及系统

Also Published As

Publication number Publication date
US20250259378A1 (en) 2025-08-14
EP4421746A4 (en) 2025-02-19
CN116206041A (zh) 2023-06-02
EP4421746A1 (en) 2024-08-28

Similar Documents

Publication Publication Date Title
CN111724293B (zh) 图像渲染方法及装置、电子设备
EP4421746A1 (en) Rendering method and related device thereof
CN112262563B (zh) 图像处理方法及电子设备
WO2020207202A1 (zh) 阴影渲染方法、装置、计算机设备及存储介质
US9576397B2 (en) Reducing latency in an augmented-reality display
US20240013432A1 (en) Image processing method and related device
CN114494547B (zh) 一种绘制命令处理方法及其相关设备
WO2023284715A1 (zh) 一种物体重建方法以及相关设备
WO2024183530A1 (zh) 渲染方法、渲染装置、设备和存储介质
WO2023066395A1 (zh) 一种应用运行方法以及相关设备
CN119299663B (zh) 一种摄像头检测方法及相关装置
CN118429173A (zh) 渲染方法、装置、电子设备以及计算机可读存储介质
US20250166121A1 (en) Image rendering method and apparatus
CN120268041B (zh) 一种基于渲染数据的场景识别方法及电子设备
CN121752339A (zh) 端云协同的渲染方法及相关装置
EP2706508B1 (en) Reducing latency in an augmented-reality display
CN117710786B (zh) 图像处理方法、图像处理模型的优化方法及相关设备
CN116934937A (zh) 一种数据处理方法及其相关设备
WO2025140290A1 (zh) 一种图形绘制方法及相关装置
WO2025140290A9 (zh) 一种图形绘制方法及相关装置
WO2025007570A1 (zh) 一种图像处理方法、装置及电子设备
CN117917682A (zh) 一种应用程序渲染的方法、系统以及电子设备
CN117812474A (zh) 生成星芒图像的方法及终端设备
CN120104221A (zh) 光影效果显示方法及电子设备
CN119450048A (zh) 运动矢量确定方法、芯片、电子设备和可读存储介质

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: 22900387

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022900387

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 18714396

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2022900387

Country of ref document: EP

Effective date: 20240521

NENP Non-entry into the national phase

Ref country code: DE

WWP Wipo information: published in national office

Ref document number: 18714396

Country of ref document: US