CN112215938A - Method and device for generating reflected illumination data in game and computer equipment - Google Patents

Method and device for generating reflected illumination data in game and computer equipment Download PDF

Info

Publication number
CN112215938A
CN112215938A CN202011100884.XA CN202011100884A CN112215938A CN 112215938 A CN112215938 A CN 112215938A CN 202011100884 A CN202011100884 A CN 202011100884A CN 112215938 A CN112215938 A CN 112215938A
Authority
CN
China
Prior art keywords
reflection
self
light source
point light
game
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.)
Granted
Application number
CN202011100884.XA
Other languages
Chinese (zh)
Other versions
CN112215938B (en
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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202011100884.XA priority Critical patent/CN112215938B/en
Publication of CN112215938A publication Critical patent/CN112215938A/en
Application granted granted Critical
Publication of CN112215938B publication Critical patent/CN112215938B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Graphics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

The application provides a method and a device for generating reflected illumination data in a game and computer equipment, relates to the technical field of games, and solves the technical problem that performance consumption is large during game running so that the running efficiency of the game is influenced. The game scene of the game comprises an original point light source and a PBR material model; the method comprises the following steps: setting a self-luminous object in a game scene, wherein the self-luminous object is used for simulating an original point light source; arranging a local reflection probe at a preset position in a game scene, wherein the local reflection probe is used for acquiring reflection data of light received from a self-luminous object; and baking the PBR material model within the action range of the local reflection probe based on the reflection data to obtain the reflection illumination data of the original point light source acting on the PBR material model.

Description

Method and device for generating reflected illumination data in game and computer equipment
Technical Field
The present application relates to the field of game technologies, and in particular, to a method and an apparatus for generating reflected light data in a game, and a computer device.
Background
When a game engine is used to make a game scene, a real-time point light source is usually used to illuminate a local dark part in the game scene, so as to show the texture of an object in the dark part, especially the texture of a metal smooth object. The method is similar to lighting in the movie shooting process, and for dark parts in movie scenes, the texture of objects in the dark parts is reflected by supplementing real-time light sources.
However, the operation of the real-time point light source is relatively high in performance consumption during the game running process. Therefore, although the existing method can show a high-quality illumination effect, the performance consumption is easy to be large in the game running process, and the game running efficiency is influenced.
Disclosure of Invention
The invention aims to provide a method and a device for generating reflected illumination data in a game and computer equipment, so as to solve the technical problem that the performance consumption is high during the operation of the game, and the operation efficiency of the game is influenced.
In a first aspect, an embodiment of the present application provides a method for generating reflected illumination data in a game, where a game scene of the game includes an original point light source and a physical-Based Rendering (PBR) material model; the method comprises the following steps:
setting a self-luminous object in the game scene, wherein the self-luminous object is used for simulating the original point light source;
setting a local reflection probe at a preset position in the game scene, wherein the local reflection probe is used for collecting reflection data of light received by the self-luminous object;
baking the PBR material model within the action range of the local reflection probe based on the reflection data to obtain the reflection illumination data of the original point light source acting on the PBR material model.
In one possible implementation, the method further comprises:
collecting point light source illumination data of the original point light source;
and baking based on the reflected illumination data and the point light source illumination data to obtain an integral illumination map.
In one possible implementation, the number of the PBR material models is plural; and at least one local reflection probe is arranged at the preset position of each PBR material model.
In one possible implementation, a plurality of the partial reflection probes are arranged at preset positions of each PBR material model; the plurality of partial reflection probes corresponding to each PBR material model correspond to different reflection priorities;
the step of baking the PBR material model within the action range of the local reflection probe based on the reflection data to obtain the reflection illumination data of the original point light source acting on the PBR material model comprises the following steps:
determining a target local reflection probe according to the sequence of the reflection priorities;
and baking the PBR material model within the action range of the target local reflection probe based on target reflection data corresponding to the target local reflection probe to obtain reflection illumination data of the original point light source acting on the PBR material model.
In one possible implementation, the partial reflection probe is disposed above the PBR material model.
In one possible implementation, the partially reflective probe is placed at a central location on top of the PBR material model or at a location determined according to an input operation.
In one possible implementation, the parameters of the partially reflective probe include a reflected light intensity parameter.
In one possible implementation, the label of the self-luminous object is set to an edit-only display mode.
In one possible implementation, the parameters of the self-luminous object include any one or more of:
self-luminous intensity parameter, self-luminous color parameter, self-luminous angle parameter and collected reflection data.
In one possible implementation, the self-luminous objects are arranged at any position on the space line segment; the space line segment is a line segment formed between the original point light source and the local reflection probe.
In one possible implementation, the self-luminous objects are disposed at the original point light source.
In one possible implementation, the self-luminous objects are disposed around the partially reflective probe.
In a second aspect, a device for generating reflected light data in a game is provided, wherein a game scene of the game comprises an original point light source and a PBR material model; the device comprises:
a first setting module, configured to set a self-luminous object in the game scene, where the self-luminous object is used to simulate the original point light source;
a second setting module, configured to set a local reflection probe at a preset position in the game scene, where the local reflection probe is used to collect reflection data of light received from the self-luminous object;
and the baking module is used for baking the PBR material model within the action range of the local reflection probe based on the reflection data to obtain the reflection illumination data of the original point light source acting on the PBR material model.
In a third aspect, an embodiment of the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program executable on the processor, and the processor implements the method of the first aspect when executing the computer program.
In a fourth aspect, this embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to perform the method of the first aspect.
The embodiment of the application brings the following beneficial effects:
the embodiment of the application provides a method, a device and a computer device for generating reflected illumination data in a game, which can set a self-luminous object for simulating an original point light source in a game scene, set a local reflection probe for collecting reflection data of self-luminous object light at a preset position in the game scene, and then bake a PBR material model in an action range of the local reflection probe based on the reflection data so as to obtain the reflected illumination data of the original point light source acting on the PBR material model, in the scheme, the self-luminous object for simulating the original point light source and the local reflection probe for collecting the reflection data of the self-luminous object light are set, so that the reflection data of light generated by a simulation body of the original point light source on the PBR material model can be collected to embody a more real reflection effect, the reflection data are baked to the reflection illumination data, the reflection illumination data can be directly used when the game runs, real-time calculation is not needed, and performance consumption can be saved, so that the consumption of the game running is reduced while a real reflection effect is restored, and the technical problem that the performance consumption is large and the game running efficiency is influenced when the game runs is solved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the detailed description of the present application or the technical solutions in the prior art, the drawings needed to be used in the detailed description of the present application or the prior art description will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a method for generating reflected light data in a game according to an embodiment of the present disclosure;
FIG. 2 is a diagram illustrating an example of a self-luminous object disposed in a method for generating reflected light data in a game according to an embodiment of the present disclosure;
fig. 3 is an example of a local reflection probe provided in the method for generating reflected illumination data in a game according to the embodiment of the present application;
fig. 4 is an example of setting an original point light source in the method for generating reflected light data in a game according to the embodiment of the present application;
FIG. 5 is a diagram illustrating an example of the effect of real-time illumination;
FIG. 6 shows an example of an effect using only the bake light;
fig. 7 is an example of an effect exhibited by using a method for generating reflected light data in a game according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a device for generating reflected light data in a game;
fig. 9 shows a schematic structural diagram of a computer device provided in an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "comprising" and "having," and any variations thereof, as referred to in the embodiments of the present application, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the game engine, the light sources may be divided into real-time light (real time) and baking light (cake). Wherein the real-time light is split into pixel-based and vertex-based. The illumination operation effect based on the pixels is closer to reality. The vertex-based illumination calculation is less expensive, but depends on the number of vertices, and therefore the illumination calculation is not fine enough and does not represent texture well. In summary, all the shadows of real-time light are real-time operation, so the effect is real, but the consumption is large.
The baking light is to bake the illumination information into an illumination map (lightmap), so that the calculation consumption is low, but the illumination map can only record illumination brightness change based on a model, and cannot present highlight change of material normal map details.
When a game engine is used to make a scene, a small number of real-time point light sources are sometimes used to illuminate a part to express the texture of a dark part, especially the texture of a metal or a smooth part. However, the real-time light source is relatively expensive to calculate, and it is difficult to represent the texture of the object in the dark portion by using another scheme instead of the real-time light source without substantially affecting the illumination expression effect.
Although the partially reflective probe may serve this purpose, if in a dark environment, the partially reflective probe should be adapted to the dark effect of the environment, otherwise the objects in the scene affected by the partially reflective probe may be out of the environment. If the subjective treatment is carried out, like the lighting of a movie, the real-time light source is used for lighting the texture of an object by supplementing the light source in the dark part. However, the real-time light source has high performance consumption, which is not favorable for optimizing the efficiency of game operation, and especially for platforms of terminals such as mobile phones, the efficiency optimization is more important.
At present, a real-time point light source can be used for supplementing light to a dark part, so that a model made of the PBR material can generate real highlight reaction which accords with texture under real-time light. For example, in general pipeline rendering, the number of real-time point light sources received by an object is four, and if the requirement for efficiency optimization is small, at most one real-time point light source can be received, even the real-time point light source is not used, so that the performance consumption is saved.
The existing method can embody the illumination realization effect with higher quality, and can achieve the required effect by real-time light distribution like film lighting. The method for utilizing the real-time point light source has strong controllability, intuitive effect and higher quality. However, the game is very expensive to run, and the use of real-time point light sources is limited, so that the appearance of the scene is greatly reduced. Even though the custom reflection map of the conventional local reflection probe can also simulate the light source to a certain extent, the cost for finding a proper reflection map is high, the method is difficult to adapt to the environment of each game scene, and the modification cost of the reflection map is high.
Based on this, the embodiment of the application provides a method and a device for generating reflected illumination data in a game and a computer device, and the technical problem that performance consumption is large during game running so that the running efficiency of the game is affected can be solved through the method.
Embodiments of the present invention are further described below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a method for generating reflected light data in a game according to an embodiment of the present application. The game scene of the game comprises an original point light source and a PBR material model. As shown in fig. 1, the method includes:
in step S110, a self-luminous object is set in the game scene.
Wherein the self-luminous object is used for simulating an original point light source. It should be noted that the Point Light source (Point Light) in the embodiment of the present application is a Light source that diverges from one Point to four sides in the game engine, for example, a Point Light source object such as a lamp and a candle in a game scene. The self-luminous object (fake light) in the embodiment of the present application is a self-luminous material object for simulating the point light source (i.e. the original point light source).
In practical applications, in order to make the self-luminous object more approximate to the original effect of the original point light source, the self-luminous object needs to be disposed at an appropriate angle and position. For example, as shown in FIG. 2, the placement and placement of self-illuminating objects may be determined by the computer device according to parameters or operations configured by the game designer. Furthermore, the loudness and color of the self-lighting object may also depend on the real-time light effect of the original point source to be simulated.
And step S120, setting a local reflection probe at a preset position in a game scene.
Wherein the partial reflection probe is used for collecting reflection data of light received from the light-emitting object. The partial reflection probe (reflection probe) can be understood as a reflection sphere used for simulating environmental reflection in a game engine, and can collect reflected light data of the surrounding environment in real time, and reflected light data can be obtained by baking the surrounding environment.
It should be noted that the PBR material in the PBR material model refers to a material that can implement the whole rendering algorithm or process close to the physical reality, and can also be understood as a material of the surface of an object that can interact with light in the real world. Illustratively, there are two cases after the lamp light irradiates the surface of the object, reflection or refraction of the lamp light which continues to advance. For example, in the case of a conductor, i.e., a metal, the reflectivity is generally high, so that most of the light bounces back in the form of specular reflection, and a small portion of the light is completely absorbed after being refracted. The reflection data of light in the embodiment of the present application refers to the reflection data generated after the light is irradiated to the PBR material model with metal smooth texture.
For example, the computer device may provide a local reflection probe on an object (e.g., a certain PBR material model) that is locally affected by the original point light source. For example, as shown in FIG. 3, the computer device may set a new blank partial reflection probe at a specified location in the game scene based on the position of the partial reflection probe set by the game designer and its parameters. To facilitate the subsequent baking process, the partial reflection probe may also be set to a bake (bake) mode.
In this step, the computer device may set one or more local reflection probes in the game scene, and the local reflection probes may affect the model within a certain range around the local reflection probes.
And S130, baking the PBR material model in the action range of the local reflection probe based on the reflection data to obtain the reflection illumination data of the original point light source acting on the PBR material model.
The baking in the embodiment of the present application refers to baking an illumination map of a game scene in advance before the game is run by using an illumination map (Lightmap) technology based on the calculated illumination, and the illumination map baked in advance can be directly used when the game is run. The illumination map can record illumination brightness change based on the model, and highlight change of material normal map details can be presented.
In this step, the computer device performs baking based on the reflection data of the light collected by the partial reflection probe in step S120, so as to realize the reflection data generated by the self-luminous object light collected by the partial reflection probe, and simulate the reflection effect of the original point light source on the PBR material model. For example, a highlight effect representing the texture of the model is generated at a position corresponding to the model affected by the local reflection probe, and the metallic texture of the metal in the dark part and the smooth object can be more remarkably represented by the highlight generated similarly to the influence of the point light source.
Through setting up the self-luminous object that is used for simulating original pointolite to and set up the local reflection probe that is used for gathering the reflection data to self-luminous object light, can gather the reflection data of the light that the analog body of original pointolite produced to PBR material model, in order to embody comparatively real reflection effect, bake this reflection data to reflection illumination data in, can directly use this reflection illumination data when the game operation, need not real-time calculation, can save the consumption of performance, thereby realized reducing the consumption of game operation when comparatively real reflection effect restores.
The above steps are described in detail below.
In some embodiments, the self-illumination of the original point light source can be realized in a baking mode, and the performance consumption of game running is further reduced. As an example, the method may further comprise the steps of:
step a), collecting point light source illumination data of an original point light source;
and b), baking based on the reflected illumination data and the point light source illumination data to obtain an integral illumination map.
For example, as shown in fig. 4, the original point light source is also set to a baking (bake) mode, that is, the original point light source originally used for real-time operation is set to a baking mode, so that when the global illumination map is baked, the self-illumination data of the original point light source can be collected on the illumination map. The original real-time point light source is baked instead, and then local brightness can be illuminated through the illumination map.
In the embodiment of the application, the whole game scene needs to be baked, so that the original point light source data is collected by the illumination map, the self-luminous object is collected by the local reflection probe, the lightness of the object in the action range is influenced by the real-time light instead of the local reflection probe, the two functions take effect together, and the illumination and reflection effects of the real-time point light source are simulated.
The illumination and reflection effects of the real-time point light source can be simulated under the conditions of low operation consumption and low cost by combining the baking of the original point light source with the baking of the reflection data, the efficiency is optimized, meanwhile, the requirements of the art can be met, and the efficiency and the effects are met.
For example, as shown in fig. 5, conventional real-time computing illumination can embody the light source and the metal texture effect under real-time light, but the performance consumption is large; as shown in fig. 6, the metallic texture effect of the local reflected light cannot be expressed under the baking light only by the baking light; as shown in fig. 7, according to the method provided by the embodiment of the present application, a self-luminous object is used as a pseudo light source, reflected light generated by the self-luminous object is collected by using a local partial reflection probe on a model, and reflected light data of the local reflection probe and illumination data of an original point light source are baked, so that illumination and reflection effects of the point light source can be increased, and the performance consumption can be greatly reduced.
In some embodiments, multiple partial reflection probes may be placed on several PBR material models that require reflection effects. As an example, the number of PBR material models is plural; and at least one local reflection probe is arranged at the preset position of each PBR material model.
Through a plurality of partial reflection probes, the PBR material model with the reflection effect is enabled to generate the reflection effect, the generation position of the partial reflection effect in the whole game scene can be set according to the game requirement, and the reflection effect is enabled to be more flexible.
Based on this, different levels of partial reflection probes can be utilized to achieve the creation or absence of certain reflection effects. As an example, a plurality of partial reflection probes are arranged at preset positions of each PBR material model; a plurality of local reflection probes corresponding to each PBR material model correspond to different reflection priorities; the step S130 may include the following steps:
step c), determining a target local reflection probe according to the sequence of the reflection priorities;
and d), baking the PBR material model within the action range of the target local reflection probe based on the target reflection data corresponding to the target local reflection probe to obtain the reflection illumination data of the original point light source acting on the PBR material model.
For step c) above, the reflection priorities of the plurality of partial reflection probes are, for example, 0 (lowest priority), 1, 2, and 3 (highest priority), respectively. And determining the partial reflection probes needing to generate the reflection effect according to the priority of the reflection priorities (namely the priority of the reflection priorities), namely preferentially determining to use the partial reflection probes of the 3 level (namely the target partial reflection probes) and not using the partial reflection probes of the 0 level, the 1 level and the 2 level.
For the step c), baking may be performed based on the target reflection data corresponding to the reflection data of the 3-level partial reflection probe (i.e., the target partial reflection probe), for example, after the step c).
In addition, the priority of the partial reflection probe can be set in the position setting process. For example, a local reflection probe is set for a model which is locally affected by an original point light source, and the priority of the local reflection probe is increased, that is, the import priority of the local reflection probe is set to be increased (the increase is defaulted to 0), and the specific priority level to be increased may depend on the number of surrounding local reflection probes and the display priority thereof.
In the embodiment of the application, the plurality of partial reflection probes can be nested in a plurality of layers according to levels, whether the partial reflection probes generate reflection influence on the PBR material model or not is set according to the priority levels, for example, the high-priority partial reflection probes cover the low-priority partial reflection probes, and therefore the reflection effect can be set more flexibly according to the regional requirement.
In some embodiments, the location of the partially reflective probe may be directly above the PBR material model. As one example, a partial reflection probe is placed on top of the PBR material model. The computer equipment can place the local reflection probe according to the position through the position on the PBR material model, so that the reflection data acquired by the local reflection probe more conforms to the actual condition of the PBR material model.
Based on this, the preset position of the partial reflection probe can be determined manually or according to a default position. As an example, the partial reflection probe is placed at a central position above the PBR material model or at a position determined according to the input operation. The preset position of the partial reflection probe can be flexibly set through manual input operation or system default of the central position of the PBR material model and other modes.
In some embodiments, the reflection intensity of the partial reflection probe may also adjust the setting. As one example, the parameters of the partial reflection probe include a reflected light intensity parameter. The reflection intensity of the local reflection probe can be adjusted and set more flexibly according to the requirement through the reflection light intensity parameter of the local reflection probe.
Of course, the setting can be flexibly adjusted in the aspects of the intensity and the color of the self-luminous object and the like. As an example, the parameters of the self-luminous object include any one or more of: self-luminous intensity parameter, self-luminous color parameter, self-luminous angle parameter and collected reflection data.
The self-luminous object can be closer to the original point light source effect by adjusting the specific self-luminous parameters of the self-luminous object, the angle, the intensity, the color and the like of reflected highlight generated by the self-luminous object can be changed along with the adjustment of the self-luminous object, and the reflection effect is updated by quickly baking the local partial reflection probe.
In some embodiments, the self-illuminating objects may be used only for the baking process of the illumination pattern, and need not be loaded while the game is running. As one example, the label of the self-luminous object is set to the edit-only display mode. For example, a label (tag) of a self-luminous object is set to be displayed only at the time of editing (editorOnly), and a special layer (layer) can be set for the self-luminous object, so that the self-luminous object can be accurately controlled to be collected only by a required partial reflection probe.
In some embodiments, the position of the self-illuminating object can be set in terms of the direction of the original point source relative to the partially reflective probe, which can also depend on the angle at which highlight is desired to appear. As one example, the self-luminous objects are disposed at arbitrary positions on the spatial line segment; the spatial line segment is a line segment formed between the original point light source and the local reflection probe. The self-luminous object is arranged on the line segment formed between the original point light source and the local reflection probe, so that the highlight angle of the reflected light is more appropriate, and the reflection highlight effect is more vividly displayed.
Of course, the self-luminous objects can be arranged at other more specific exact positions. As one example, a self-luminous object is disposed at an original point light source. The positions of the self-luminous object and the original point light source are kept consistent, so that the highlight effect of the reflected light can better accord with the position of the actually simulated original point light source.
As another example, the self-luminous objects are disposed around the local reflection probe, for example, when one self-luminous object is placed in the spatial line segment closer to the local reflection probe, the local reflection probe can more efficiently collect the reflection data generated by the self-luminous object.
Fig. 8 provides a schematic structural diagram of a generation apparatus of reflected light data in a game. The game scene of the game comprises an original point light source and a PBR material model. As shown in fig. 8, the apparatus 800 for generating in-game reflected light data includes:
a first setting module 801, configured to set a self-luminous object in the game scene, where the self-luminous object is used to simulate the original point light source;
a second setting module 802, configured to set a local reflection probe at a preset position in the game scene, where the local reflection probe is configured to collect reflection data of light received from the self-luminous object;
a baking module 803, configured to bake the PBR material model within the action range of the local reflection probe based on the reflection data, so as to obtain reflection illumination data of the original point light source acting on the PBR material model.
In some embodiments, the apparatus further comprises:
the acquisition module is used for acquiring point light source illumination data of the original point light source;
the baking module is further used for baking based on the reflected illumination data and the point light source illumination data to obtain an integral illumination map.
In some embodiments, the number of PBR material models is plural; and at least one local reflection probe is arranged at the preset position of each PBR material model.
In some embodiments, a plurality of the partial reflection probes are arranged at preset positions of each PBR material model; the plurality of partial reflection probes corresponding to each PBR material model correspond to different reflection priorities; the baking module 803 is specifically configured to:
determining a target local reflection probe according to the sequence of the reflection priorities;
and baking the PBR material model within the action range of the target local reflection probe based on target reflection data corresponding to the target local reflection probe to obtain reflection illumination data of the original point light source acting on the PBR material model.
In some embodiments, the partial reflection probe is disposed above the PBR material model.
In some embodiments, the partially reflective probe is placed at a central location or at a location determined by an input operation on the PBR material model.
In some embodiments, the parameters of the partial reflection probe include a reflected light intensity parameter.
In some embodiments, the label of the self-luminous object is set to the edit-only display mode.
In some embodiments, the parameters of the self-illuminating object include any one or more of: self-luminous intensity parameter, self-luminous color parameter, self-luminous angle parameter and collected reflection data.
In some embodiments, the self-luminous objects are disposed at arbitrary positions on the spatial line segment; the spatial line segment is a line segment formed between the original point light source and the local reflection probe.
In some embodiments, the self-luminous objects are disposed at the original point light source.
In some embodiments, self-illuminating objects are disposed around the partially reflective probe.
The device for generating reflected light data in a game provided by the embodiment of the application has the same technical characteristics as the method for generating reflected light data in a game provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
As shown in fig. 9, an embodiment of the present application provides a computer apparatus 900, including: a processor 901, a memory 902 and a bus, wherein the memory 902 stores machine-readable instructions executable by the processor 901, when the computer device is operated, the processor 901 communicates with the memory 902 through the bus, and the processor 901 executes the machine-readable instructions to execute the steps of the method for generating reflected light illumination data in the game.
Specifically, the memory 902 and the processor 901 can be general-purpose memory and processor, which are not limited to specific embodiments, and when the processor 901 runs a computer program stored in the memory 902, the method for generating the reflected light illumination data in the game can be executed.
The processor 901 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 901. The Processor 901 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 902, and the processor 901 reads the information in the memory 902, and completes the steps of the above method in combination with the hardware thereof.
Corresponding to the method for generating reflected light data in the game, an embodiment of the present application further provides a computer-readable storage medium, where machine executable instructions are stored in the computer-readable storage medium, and when the computer executable instructions are called and executed by a processor, the computer executable instructions cause the processor to execute the steps of the method for generating reflected light data in the game.
The generating device of the reflected illumination data in the game provided by the embodiment of the application can be specific hardware on the device, or software or firmware installed on the device, and the like. The device provided by the embodiment of the present application has the same implementation principle and technical effect as the foregoing method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiments where no part of the device embodiments is mentioned. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
For another example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method for generating the reflected illumination data in the game according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the scope of the embodiments of the present application. Are intended to be covered by the scope of the present application.

Claims (15)

1. A method for generating reflected illumination data in a game is characterized in that a game scene of the game comprises an original point light source and a PBR material model; the method comprises the following steps:
setting a self-luminous object in the game scene, wherein the self-luminous object is used for simulating the original point light source;
setting a local reflection probe at a preset position in the game scene, wherein the local reflection probe is used for collecting reflection data of light received by the self-luminous object;
baking the PBR material model within the action range of the local reflection probe based on the reflection data to obtain the reflection illumination data of the original point light source acting on the PBR material model.
2. The method of claim 1, further comprising:
collecting point light source illumination data of the original point light source;
and baking based on the reflected illumination data and the point light source illumination data to obtain an integral illumination map.
3. The method of claim 1, wherein the number of the PBR material models is plural; and at least one local reflection probe is arranged at the preset position of each PBR material model.
4. The method according to claim 3, wherein a plurality of said partial reflection probes are provided in a predetermined orientation of each of said PBR material models; the plurality of partial reflection probes corresponding to each PBR material model correspond to different reflection priorities;
the step of baking the PBR material model within the action range of the local reflection probe based on the reflection data to obtain the reflection illumination data of the original point light source acting on the PBR material model comprises the following steps:
determining a target local reflection probe according to the sequence of the reflection priorities;
and baking the PBR material model within the action range of the target local reflection probe based on target reflection data corresponding to the target local reflection probe to obtain reflection illumination data of the original point light source acting on the PBR material model.
5. The method of claim 1, wherein the partially reflective probe is placed on top of the PBR material model.
6. The method of claim 5, wherein the partially reflective probe is placed at a central location on the PBR material model or at a location determined according to an input operation.
7. The method of claim 1, wherein the parameters of the localized reflection probe comprise a reflected light intensity parameter.
8. The method according to claim 1, wherein the label of the self-luminous object is set to an edit-only display mode.
9. The method of claim 1, wherein the parameters of the self-luminescent object include any one or more of:
self-luminous intensity parameter, self-luminous color parameter, self-luminous angle parameter and collected reflection data.
10. The method of claim 1, wherein the self-luminous objects are disposed at arbitrary positions on the spatial line segment; the space line segment is a line segment formed between the original point light source and the local reflection probe.
11. The method of claim 1, wherein the self-luminous object is disposed at the original point light source.
12. The method of claim 1, wherein the self-illuminating objects are disposed around the partially reflective probe.
13. A generation device of reflected illumination data in a game is characterized in that a game scene of the game comprises an original point light source and a PBR material model; the device comprises:
a first setting module, configured to set a self-luminous object in the game scene, where the self-luminous object is used to simulate the original point light source;
a second setting module, configured to set a local reflection probe at a preset position in the game scene, where the local reflection probe is used to collect reflection data of light received from the self-luminous object;
and the baking module is used for baking the PBR material model within the action range of the local reflection probe based on the reflection data to obtain the reflection illumination data of the original point light source acting on the PBR material model.
14. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1 to 12 when executing the computer program.
15. A computer readable storage medium having stored thereon computer executable instructions which, when invoked and executed by a processor, cause the processor to execute the method of any of claims 1 to 12.
CN202011100884.XA 2020-10-14 2020-10-14 Method and device for generating reflected illumination data in game and computer equipment Active CN112215938B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011100884.XA CN112215938B (en) 2020-10-14 2020-10-14 Method and device for generating reflected illumination data in game and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011100884.XA CN112215938B (en) 2020-10-14 2020-10-14 Method and device for generating reflected illumination data in game and computer equipment

Publications (2)

Publication Number Publication Date
CN112215938A true CN112215938A (en) 2021-01-12
CN112215938B CN112215938B (en) 2024-02-23

Family

ID=74052779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011100884.XA Active CN112215938B (en) 2020-10-14 2020-10-14 Method and device for generating reflected illumination data in game and computer equipment

Country Status (1)

Country Link
CN (1) CN112215938B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113332714A (en) * 2021-06-29 2021-09-03 天津亚克互动科技有限公司 Light supplementing method and device for game model, storage medium and computer equipment
CN115082611A (en) * 2022-08-18 2022-09-20 腾讯科技(深圳)有限公司 Illumination rendering method, apparatus, device and medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070236485A1 (en) * 2006-03-31 2007-10-11 Microsoft Corporation Object Illumination in a Virtual Environment
CN102590103A (en) * 2012-02-29 2012-07-18 翟学智 Near-infrared detector for meat and detection method thereof
CN103995700A (en) * 2014-05-14 2014-08-20 无锡梵天信息技术股份有限公司 Method for achieving global illumination of 3D game engine
WO2018028669A1 (en) * 2016-08-12 2018-02-15 腾讯科技(深圳)有限公司 Illumination processing method in 3d scenario, terminal, server, and storage medium
CN107909641A (en) * 2017-10-26 2018-04-13 广州市雷军游乐设备有限公司 One kind bakees rendering intent, device, terminal device and storage medium
US20180180550A1 (en) * 2016-04-29 2018-06-28 Synaptive Medical (Barbados) Inc. Multi-modal optical imaging system for tissue analysis
CN108236783A (en) * 2018-01-09 2018-07-03 网易(杭州)网络有限公司 The method, apparatus of illumination simulation, terminal device and storage medium in scene of game
CN108986194A (en) * 2018-07-24 2018-12-11 合肥爱玩动漫有限公司 A kind of scene of game rendering method
CN109712226A (en) * 2018-12-10 2019-05-03 网易(杭州)网络有限公司 The see-through model rendering method and device of virtual reality
CN110193193A (en) * 2019-06-10 2019-09-03 网易(杭州)网络有限公司 The rendering method and device of scene of game
US20190362539A1 (en) * 2018-05-22 2019-11-28 Apple Inc. Environment Synthesis for Lighting An Object
CN110599574A (en) * 2019-09-17 2019-12-20 网易(杭州)网络有限公司 Rendering method and device of game scene and electronic equipment
US20200005525A1 (en) * 2018-06-29 2020-01-02 Baobab Studios Inc. Systems and methods for generating dynamic real-time high-quality lighting for digital animation

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070236485A1 (en) * 2006-03-31 2007-10-11 Microsoft Corporation Object Illumination in a Virtual Environment
CN102590103A (en) * 2012-02-29 2012-07-18 翟学智 Near-infrared detector for meat and detection method thereof
CN103995700A (en) * 2014-05-14 2014-08-20 无锡梵天信息技术股份有限公司 Method for achieving global illumination of 3D game engine
US20180180550A1 (en) * 2016-04-29 2018-06-28 Synaptive Medical (Barbados) Inc. Multi-modal optical imaging system for tissue analysis
WO2018028669A1 (en) * 2016-08-12 2018-02-15 腾讯科技(深圳)有限公司 Illumination processing method in 3d scenario, terminal, server, and storage medium
CN107909641A (en) * 2017-10-26 2018-04-13 广州市雷军游乐设备有限公司 One kind bakees rendering intent, device, terminal device and storage medium
CN108236783A (en) * 2018-01-09 2018-07-03 网易(杭州)网络有限公司 The method, apparatus of illumination simulation, terminal device and storage medium in scene of game
US20190362539A1 (en) * 2018-05-22 2019-11-28 Apple Inc. Environment Synthesis for Lighting An Object
US20200005525A1 (en) * 2018-06-29 2020-01-02 Baobab Studios Inc. Systems and methods for generating dynamic real-time high-quality lighting for digital animation
CN108986194A (en) * 2018-07-24 2018-12-11 合肥爱玩动漫有限公司 A kind of scene of game rendering method
CN109712226A (en) * 2018-12-10 2019-05-03 网易(杭州)网络有限公司 The see-through model rendering method and device of virtual reality
CN110193193A (en) * 2019-06-10 2019-09-03 网易(杭州)网络有限公司 The rendering method and device of scene of game
CN110599574A (en) * 2019-09-17 2019-12-20 网易(杭州)网络有限公司 Rendering method and device of game scene and electronic equipment

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
FENG: "Unity中Reflection Probe反射探针使用解析", HTTPS://GWB.TENCENT.COM/COMMUNITY/DETAIL/126758, pages 1 - 5 *
KERRY: "写给美术看的Unity全局光照技术(理论篇)", HTTP://NEWS.16P.COM/865317.HTML, pages 1 - 14 *
王贞东;马小虎;潘志庚;: "复杂环境光源下虚实融合光照实时计算", 中国图象图形学报, no. 10 *
肖世龙;张甜田;毛容;: "茶思维模式下VR技术对校史馆场景开发研究", 福建茶叶, no. 08 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113332714A (en) * 2021-06-29 2021-09-03 天津亚克互动科技有限公司 Light supplementing method and device for game model, storage medium and computer equipment
CN115082611A (en) * 2022-08-18 2022-09-20 腾讯科技(深圳)有限公司 Illumination rendering method, apparatus, device and medium
CN115082611B (en) * 2022-08-18 2022-11-11 腾讯科技(深圳)有限公司 Illumination rendering method, apparatus, device and medium

Also Published As

Publication number Publication date
CN112215938B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
US11127198B2 (en) Graphics processing using directional representations of lighting at probe positions within a scene
CN111420404B (en) Method and device for rendering objects in game, electronic equipment and storage medium
US8189003B2 (en) System and method for rendering computer graphics utilizing a shadow illuminator
CN112215938A (en) Method and device for generating reflected illumination data in game and computer equipment
CN112215934A (en) Rendering method and device of game model, storage medium and electronic device
US11386613B2 (en) Methods and systems for using dynamic lightmaps to present 3D graphics
CN113457137B (en) Game scene generation method and device, computer equipment and readable storage medium
CN109712226A (en) The see-through model rendering method and device of virtual reality
CN112489179B (en) Target model processing method and device, storage medium and computer equipment
CN112153303B (en) Visual data processing method and device, image processing equipment and storage medium
CN114638950A (en) Method and equipment for drawing virtual object shadow
CN111803942A (en) Soft shadow generation method and device, electronic equipment and storage medium
CN113332714B (en) Light supplementing method and device for game model, storage medium and computer equipment
CN111489430A (en) Game shadow data processing method and device and game equipment
CN113610955A (en) Object rendering method and device and shader
CN113888398A (en) Hair rendering method and device and electronic equipment
CN111402385B (en) Model processing method and device, electronic equipment and storage medium
US20070190502A1 (en) System and method for creating a simulation of a terrain that includes simulated illumination effects
CN115761105A (en) Illumination rendering method and device, electronic equipment and storage medium
CN112446944B (en) Method and system for simulating real environment light in AR scene
CN112819929A (en) Water surface rendering method and device, electronic equipment and storage medium
CN113313798B (en) Cloud picture manufacturing method and device, storage medium and computer equipment
CN111767046B (en) Shader code multiplexing method and terminal
CN111738967B (en) Model generation method and apparatus, storage medium, and electronic apparatus
CN114241115A (en) Illumination rendering method and device of multipoint light source, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant