CN112215938B - 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
CN112215938B
CN112215938B CN202011100884.XA CN202011100884A CN112215938B CN 112215938 B CN112215938 B CN 112215938B CN 202011100884 A CN202011100884 A CN 202011100884A CN 112215938 B CN112215938 B CN 112215938B
Authority
CN
China
Prior art keywords
reflection
self
probe
light source
material model
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.)
Active
Application number
CN202011100884.XA
Other languages
Chinese (zh)
Other versions
CN112215938A (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

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

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 high during game running so as to influence game running efficiency. 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 the game scene, wherein the self-luminous object is used for simulating an original point light source; setting a local reflection probe at a preset position in a game scene, wherein the local reflection probe is used for collecting reflection data of light received by 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 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 invention relates to the field of game technologies, and in particular, to a method and an apparatus for generating reflected illumination data in a game, and a computer device.
Background
When a game engine is used for manufacturing a game scene, a real-time point light source is generally adopted to shine local dark parts in the game scene, so that the texture of an object at the dark parts, particularly the texture of a metal smooth object, is shown. The method is similar to lighting in the film shooting process, and for dim parts in a film scene, the texture of the dim part objects is reflected by supplementing a real-time light source.
However, during game play, the operation of real-time point sources is relatively high in performance consumption. Therefore, the existing method can show a high-quality illumination effect, and is easy to cause high performance consumption in the game running process, so that 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 game operation, and the game operation efficiency is affected.
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;
and baking the PBR material model within the action range of the local reflection probe based on the reflection data to obtain 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 overall illumination map.
In one possible implementation, the number of PBR material models is a plurality; at least one local reflection probe is arranged at a preset position of each PBR material model.
In one possible implementation, the preset azimuth of each PBR material model is provided with a plurality of the local reflection probes; the local 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 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 the 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 partially reflective probe is disposed above the PBR material model.
In one possible implementation, the partially reflective probe is disposed at a central position above the PBR material model or at a position determined according to an input operation.
In one possible implementation, the parameters of the partially reflective probe include reflected light intensity parameters.
In one possible implementation, the tag of the self-luminous object is set to the edit-time display mode only.
In one possible implementation, the parameters of the self-luminous object include any one or more of the following:
the method comprises the steps of collecting reflection data, namely self-luminous intensity parameters, self-luminous color parameters, self-luminous angle parameters and self-luminous angle parameters.
In one possible implementation, the self-luminous object is disposed at an arbitrary position on a 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 object is disposed at the original point light source.
In one possible implementation, the self-luminous object is disposed around the partial-reflection probe.
In a second aspect, a generating device of reflected illumination 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:
the first setting module is used for setting a self-luminous object in the game scene, and the self-luminous object is used for simulating the original point light source;
the second setting module is used for setting a local reflection probe at a preset position in the game scene, and the local reflection probe is used for collecting reflection data of the light received by 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 reflection illumination data of the original point light source acting on the PBR material model.
In a third aspect, embodiments of the present application further provide a computer device, including a memory, and a processor, where the memory stores a computer program that can be executed by the processor, and the processor executes the method according to the first aspect.
In a fourth aspect, embodiments of the present application further provide a computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to perform the method of the first aspect described above.
The embodiment of the application brings the following beneficial effects:
according to the method, the device and the computer equipment for generating the reflection illumination data in the game, the self-luminous object used for simulating the original point light source can be arranged in the game scene, the local reflection probe used for collecting the reflection data of the self-luminous object light is arranged at the preset position in the game scene, then the PBR material model in the action range of the local reflection probe can be baked based on the reflection data, and further the reflection illumination data of the original point light source acting on the PBR material model is obtained.
In order to make the above 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 embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a method for generating reflected illumination data in a game according to an embodiment of the present application;
fig. 2 is a schematic diagram of an example of a self-luminous object in the method for generating reflected illumination data in a game according to the embodiment of the present application;
FIG. 3 is an example of setting a local reflection probe 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 illumination data in a game according to the embodiment of the present application;
FIG. 5 is an example of the effect exhibited by a prior art real-time computing illumination;
FIG. 6 shows an example of the effect exhibited by the baking lamp light alone;
FIG. 7 is an example of the effects exhibited by the method for generating in-game reflected illumination data provided by embodiments of the present application;
FIG. 8 provides a schematic structural diagram of a device for generating reflected illumination data in a game;
fig. 9 shows a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The terms "comprising" and "having" and any variations thereof, as used in the embodiments of the present application, are intended to cover non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed but may optionally include other steps or elements not listed or inherent to such process, method, article, or apparatus.
In the game engine, the light sources may be classified into real time light (real time) and baking light (rake). Wherein real-time light is divided into pixel-based and vertex-based. The illumination operation effect based on the pixels is more real. Illumination operation based on vertices consumes less power, but is not fine enough and does not perform a good appearance of texture because it depends on the number of vertices. In the comprehensive view, the light and shadow of the real-time light are all calculated in real time, so that the effect is real, but the consumption is larger.
Baking light is to bake illumination information into an illumination map (lightmap), so that operation consumption is small, but the illumination map can only record illumination brightness change based on a model, and highlight change of material normal map details cannot be presented.
When a game engine is used to make a scene, a small amount of real-time point light sources are sometimes used to locally shine, so as to represent the texture of dark objects, especially the texture of metal and smooth objects. However, the operation of the real-time light source is relatively high in consumption, and it is difficult to replace the real-time light source with other schemes to represent the texture of the dark portion without substantially affecting the illumination effect.
While the partially reflective probe may be used to this effect, if in a relatively dark environment, the partially reflective probe should be adapted to the darker effect of the environment, otherwise objects in the scene affected by the partially reflective probe will be removed from the environment. If subjective processing is performed, like film lighting, real-time lighting is used to supplement the light source in the dark to make the texture of the object. However, the real-time light source has larger performance consumption, is unfavorable for optimizing the efficiency of game operation, and is more important for platforms of terminals such as mobile phones.
At present, a real-time point light source can be utilized to supplement light to the dark part, so that a model made of PBR material can generate real high-light response conforming to texture under real-time light. For example, in general pipeline rendering, the number of real-time point light sources accepted by one object is four, and if the requirement of efficiency optimization is small, one real-time point light source can be accepted at most, even the real-time point light source is not used, so that performance consumption is saved.
The existing method can show the high-quality illumination realization effect, and can realize the required effect by real-time light removal similar to film polishing. The method for utilizing the real-time point light source has strong controllability, visual effect and higher quality. However, the consumption of game play is large, and once the use of real-time point light sources is limited, the texture of the scene is greatly reduced. Even though the custom reflection map of the conventional local reflection probe can simulate the light source to a certain extent, the cost for finding a proper reflection map is high, the reflection map is difficult to adapt to the environment of each game scene, and the modification cost of the reflection map is also high.
Based on the above, the embodiment of the application provides a method and a device for generating reflected illumination data in a game and computer equipment.
Embodiments of the present invention are further described below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a method for generating reflected illumination 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:
step S110, a self-luminous object is set in the game scene.
Wherein, self-luminous object is used for simulating original point light source. It should be noted that, point Light (pointlight) in the embodiments of the present application is a Light source that diverges from one Point to the periphery in a game engine, for example, a Light fixture, a candle, or the like in a game scene. In the embodiment of the present application, the self-luminous object (fake light) 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 similar to the original effect of the original point light source, the self-luminous object needs to be disposed at a proper angle and position. For example, as shown in FIG. 2, for placement and setting of self-luminous objects, the computer device may be determined according to parameters or operations configured by the game designer. Furthermore, the loudness color of the self-illuminating object may also depend on the real-time light effect of the original point source to be emulated.
Step S120, setting a local reflection probe at a preset position in the game scene.
The local reflection probe is used for collecting reflection data of light received by the self-luminous object. For a partial reflection probe (reflection probe), it can be understood as a reflection sphere in a game engine for simulating environmental reflection, which can collect reflection light data of the surrounding environment in real time, and can obtain reflection illumination data by baking the surrounding environment.
It should be noted that, the PBR material in the PBR material model refers to a material capable of implementing the whole rendering algorithm or process close to physical reality, and may also be understood as a material of an object surface capable of interacting with light in the real world. Illustratively, there are two situations where the light impinges on the surface of the object, either reflecting or continuing to refract. For example, for conductors, i.e. metals, the reflectivity is generally high, so that most of the light will bounce back in specular reflection and a small fraction will be completely absorbed after refraction. The reflection data of light in the embodiment of the present application refers to reflection data generated after light irradiates the PBR material model with smooth texture.
For example, the computer device may set a local partial reflection probe on an object (e.g., a PBR material model) that is locally affected by the original point source. For example, as shown in FIG. 3, the computer device may set a new blank partial reflection probe at a designated location in the game scene based on the position of the partial reflection probe and its parameters set by the game designer. The partial reflection probe may also be set to a baking (rake) mode in order to facilitate a subsequent baking process.
In this step, the computer device may set one or more local reflection probes in the game scene, and the local reflection probes can influence the model within a certain range around the local reflection probes.
Step S130, baking the PBR material model within the action range of the local reflection probe based on the reflection data to obtain reflection illumination data of the original point light source acting on the PBR material model.
Baking in the embodiment of the application refers to baking in advance the illumination map of the game scene before the game running by utilizing the illumination map (Lightmap) technology based on the calculated illumination, and the illumination map baked in advance can be directly used during the game running. The illumination map can record illumination brightness change based on a 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 local reflection probe in step S120, so as to implement the reflection data generated by the self-luminous object light collected by the local 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 the corresponding position of the model affected by the local reflection probe, and the metallic texture of the metal and the smooth object in the dark part can be more clearly represented by the highlight similar to the one generated by 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 simulation body of original pointolite produced to the PBR material model to embody comparatively true reflection effect, again will reflect data and bake in the reflection illumination data, can directly use this reflection illumination data when the recreation is operated, need not real-time calculation, can save the consumption of performance, thereby realized reducing the consumption of recreation operation when reducing comparatively true reflection effect.
The above steps are described in detail below.
In some embodiments, the self illumination of the original point light source can also be realized by baking, so that 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 overall illumination map.
As shown in fig. 4, the original point light source is also set to a baking (rake) 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. After the original real-time point light source is baked, the local brightness can be illuminated through the illumination map.
In this application embodiment, needs to bake whole recreation scene, makes original pointolite data by the illumination drawing gather, and self-luminous object is gathered by local reflection probe to this replaces the lightness of real-time light influence within-range article, and both play a role jointly, simulate the illumination and the reflection effect of real-time pointolite.
Through the baking of combining the original point light source with the baking of the reflection data, the illumination and reflection effects of the real-time point light source can be simulated under the conditions of lower running consumption and lower cost, the requirements of art can be met while the efficiency is optimized, and the efficiency and effects are met.
For example, as shown in fig. 5, conventional real-time computing illumination can embody a light source and a metal texture effect under real-time light, but has a large performance consumption; as shown in fig. 6, only the baking light is used, and the metallic effect of the partially reflected light cannot be shown under the baking light; as shown in fig. 7, by using the self-luminous object as a false light source and using the local reflection probe on the model to collect the reflected light generated by the self-luminous object, the reflected light data of the local reflection probe and the illumination data of the original point light source are baked, so that the illumination and reflection effects of the point light source can be increased, and the performance consumption is greatly reduced.
In some embodiments, multiple local reflection probes may be placed on several PBR material models that require reflection effects. As one example, the number of PBR material models is a plurality; at least one local reflection probe is arranged at the preset azimuth of each PBR material model.
Through a plurality of partial reflection probes, the PBR material model with the reflection effect is required to generate the reflection effect, and the generation position of the partial reflection effect in the whole game scene can be set according to the game requirement, so that the reflection effect is more flexible.
Based on this, the different levels of the partially reflective probe can be used to achieve the creation or absence of certain reflective effects. As an example, the preset azimuth of each PBR material model is provided with a plurality of local reflection probes; the plurality of local reflection probes corresponding to each PBR material model correspond to different reflection priorities; the step S130 may include the steps of:
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 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 exemplified as level 0 (lowest priority), level 1, level 2, and level 3 (highest priority), respectively. The local reflection probes with the reflection effect are determined according to the priority order of the reflection priority (namely the priority order of the reflection priority), namely the local reflection probes with the 3 levels (namely the target local reflection probes) are determined to be used preferentially, and the local reflection probes with the 0 level, the 1 level and the 2 level are not used first.
For step c) above, for example, baking may be performed based on the target reflection data corresponding to the reflection data of the stage 3 partial reflection probe (i.e., the target partial reflection probe) after step c) above.
In addition, the priority thereof may also be set in the position setting process of the partial reflection probe. For example, a local reflection probe is set to a model whose local area is originally affected by the original point light source, and the priority of this local reflection probe is increased, that is, the priority setting of the local reflection probe is increased (default to 0 before increasing), and the specific increased priority level may depend on the number of surrounding local reflection probes and the priority of display thereof.
In this embodiment of the present application, a plurality of local reflection probes may be nested through the multilayer of level, and whether the local reflection probe produces reflection influence to the PBR material model is set up to the priority level, for example, the high priority local reflection probe covers the low priority local reflection probe to realize setting up the reflection effect more nimble according to regional needs.
In some embodiments, the location of the partially reflective probe may be disposed directly above the PBR material model. As an example, the local reflection probe is arranged on top of the PBR material model. The computer equipment can put the local reflection probe according to the position above the PBR material model, so that the reflection data collected by the local reflection probe more accords with the actual situation 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 disposed at a central position on the PBR material model or a position determined according to an input operation. The preset position of the local reflection probe can be flexibly set by means of manual input operation or default of a system of the central position of the PBR material model and the like.
In some embodiments, the reflection intensity of the partially reflective probe may also be adjusted. As one example, the parameters of the partially reflective probe include reflected light intensity parameters. The reflection intensity of the local reflection probe can be flexibly adjusted and set according to the needs through the reflection light intensity parameter of the local reflection probe.
Of course, the setting can be flexibly adjusted in terms of the intensity, color and the like of the self-luminous object. As one example, the parameters of the self-luminous object include any one or more of the following: the method comprises the steps of collecting reflection data, namely self-luminous intensity parameters, self-luminous color parameters, self-luminous angle parameters and self-luminous angle parameters.
The self-luminous object can be more similar to the original point light source effect by adjusting specific self-luminous parameters of the self-luminous object, and the angle, intensity, color and the like of reflected high light 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 reflection probe.
In some embodiments, the self-luminous object may be used only for the baking process of the light map, without loading while the game is running. As one example, the tag of the self-luminous object is set to the edit-time display mode only. For example, a tag (tag) of a self-luminous object is set to be displayed only when editing (editor only), 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 needed local reflection probe.
In some embodiments, the position of the self-illuminating object may be set in the direction of the original point source relative to the partially reflective probe, which may also depend on the angle at which the highlights are desired to appear. As one example, the self-luminous object is disposed at an arbitrary 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. By arranging the self-luminous object on the line segment formed between the original point light source and the local reflection probe, the high light angle of the reflected light can be more appropriate, so that the reflected high light effect can be more vividly displayed.
Of course, the self-luminous object may also be arranged in other more specific exact positions. As one example, a self-luminous object is provided at an original point light source. The position of the self-luminous object is consistent with that of the original point light source, so that the high light effect of the reflected light can be more consistent with that of the original point light source in actual simulation.
As another example, the self-luminous object is disposed around the local reflection probe, for example, a self-luminous object is placed at a position closer to the local reflection probe in the above-mentioned space line segment, so that 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 device for generating reflected illumination 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 reflected light data in a game 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 used to collect reflection data of light received by the self-luminous object;
and a baking module 803, configured to bake the PBR material model within the range of action 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 also used for baking based on the reflected illumination data and the point light source illumination data to obtain an overall illumination map.
In some embodiments, the number of PBR material models is a plurality; at least one local reflection probe is arranged at a preset position of each PBR material model.
In some embodiments, the preset orientation of each PBR material model is provided with a plurality of the local reflection probes; the local reflection probes corresponding to each PBR material model correspond to different reflection priorities; the baking module 803 is specifically for:
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 the 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 partially reflective probe is disposed above the PBR material model.
In some embodiments, the partially reflective probe is positioned at a central location above the PBR material model or at a location determined according to an input operation.
In some embodiments, the parameters of the partially reflective probe include reflected light intensity parameters.
In some embodiments, the tag of the self-luminous object is set to the edit-time display mode only.
In some embodiments, the parameters of the self-luminous object include any one or more of: the method comprises the steps of collecting reflection data, namely self-luminous intensity parameters, self-luminous color parameters, self-luminous angle parameters and self-luminous angle parameters.
In some embodiments, the self-luminous object is disposed at any position 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.
In some embodiments, the self-illuminating object is disposed at the original point light source.
In some embodiments, self-illuminating objects are disposed around the partially reflective probe.
The device for generating the reflected illumination data in the game provided by the embodiment of the application has the same technical characteristics as the method for generating the reflected illumination data in the 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, a computer device 900 provided in an embodiment of the present application includes: a processor 901, a memory 902 and a bus, said memory 902 storing machine readable instructions executable by said processor 901, said processor 901 communicating with said memory 902 via the bus when the computer device is running, said processor 901 executing said machine readable instructions to perform the steps of the method of generating reflected light data in a game as described above.
Specifically, the above-described memory 902 and processor 901 can be general-purpose memories and processors, and are not particularly limited herein, and when the processor 901 runs a computer program stored in the memory 902, the above-described method of generating reflected light data in a game can be executed.
Processor 901 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 901 or instructions in the form of software. The processor 901 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but may also be a digital signal processor (Digital Signal Processing, DSP for short), application specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA for short), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks 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 a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 902, and the processor 901 reads information in the memory 902 and performs the steps of the above method in combination with its hardware.
Corresponding to the method for generating reflected light data in the game, the embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores machine executable instructions, and the computer executable instructions, when being called and executed by a processor, 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 equipment or software or firmware installed on the equipment. The device provided in the embodiments of the present application has the same implementation principle and technical effects as those of the foregoing method embodiments, and for a brief description, reference may be made to corresponding matters in the foregoing method embodiments where the device embodiment section is not mentioned. It will be clear to those skilled in the art that, for convenience and brevity, the specific operation of the system, apparatus and unit described above may refer to the corresponding process in the above method embodiment, which is not described in detail herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
As 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 units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments provided in the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in 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 may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method for generating reflected illumination data in a game as described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It should be noted that: like reference numerals and letters in the following figures denote like items, and thus once an item is defined in one figure, no further definition or explanation of it is required in the following figures, and furthermore, 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 foregoing examples are merely specific embodiments of the present application, and are not intended to limit the scope of the present application, but the present application is not limited thereto, and those skilled in the art will appreciate that while the foregoing examples are described in detail, the present application is not limited thereto. Any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or make equivalent substitutions for some of the technical features within the technical scope of the disclosure of the present application; such modifications, changes or substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application. Are intended to be encompassed within the scope of this application.

Claims (13)

1. The method for generating the reflection illumination data in the 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;
the number of the PBR material models is multiple; a plurality of local reflection probes are arranged in a preset direction of each PBR material model; the local reflection probes corresponding to each PBR material model correspond to different reflection priorities;
the multiple local reflection probes are nested through multiple layers of levels, and the high-priority local reflection probe covers the low-priority local reflection probe;
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 the 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.
2. The method according to claim 1, wherein 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 overall illumination map.
3. The method of claim 1, wherein the partially reflective probe is disposed on top of the PBR material model.
4. A method according to claim 3, wherein the partially reflecting probe is arranged at a central position above the PBR material model or at a position determined according to an input operation.
5. The method of claim 1, wherein the parameters of the partially reflective probe comprise reflected light intensity parameters.
6. The method according to claim 1, wherein the tag of the self-luminous object is set to an edit-only display mode.
7. The method of claim 1, wherein the parameters of the self-luminous object include any one or more of:
the method comprises the steps of collecting reflection data, namely self-luminous intensity parameters, self-luminous color parameters, self-luminous angle parameters and self-luminous angle parameters.
8. The method of claim 1, wherein the self-luminous object is disposed at an arbitrary position on a space line segment; the space line segment is a line segment formed between the original point light source and the local reflection probe.
9. The method of claim 1, wherein the self-illuminating object is disposed at the original point light source.
10. The method of claim 1, wherein the self-illuminating object is disposed around the partially reflective probe.
11. The device for generating the reflection illumination data in the 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:
the first setting module is used for setting a self-luminous object in the game scene, and the self-luminous object is used for simulating the original point light source;
the second setting module is used for setting a local reflection probe at a preset position in the game scene, and the local reflection probe is used for collecting reflection data of the light received by the self-luminous object;
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 reflection illumination data of the original point light source acting on the PBR material model;
the number of the PBR material models is multiple; at least one local reflection probe is arranged in a preset position of each PBR material model; a plurality of local reflection probes are arranged in a preset direction of each PBR material model; the local reflection probes corresponding to each PBR material model correspond to different reflection priorities; the multiple local reflection probes are nested through multiple layers of levels, and the high-priority local reflection probe covers the low-priority local reflection probe; the baking module is specifically used for:
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 the 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.
12. A computer device comprising a memory, a processor, the memory having stored therein a computer program executable on the processor, characterized in that the processor, when executing the computer program, implements the steps of the method of any of the preceding claims 1 to 10.
13. 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 any one of claims 1 to 10.
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 CN112215938A (en) 2021-01-12
CN112215938B true 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)

Families Citing this family (2)

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

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
CN110599574A (en) * 2019-09-17 2019-12-20 网易(杭州)网络有限公司 Rendering method and device of game scene and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8139059B2 (en) * 2006-03-31 2012-03-20 Microsoft Corporation Object illumination in a virtual environment
US10768114B2 (en) * 2016-04-29 2020-09-08 Synaptive Medical (Barbados) Inc. Multi-modal optical imaging system for tissue analysis
US11694392B2 (en) * 2018-05-22 2023-07-04 Apple Inc. Environment synthesis for lighting an object
US11605198B2 (en) * 2018-06-29 2023-03-14 Baobab Studios Inc. Systems and methods for generating dynamic real-time high-quality lighting for digital animation

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
CN110599574A (en) * 2019-09-17 2019-12-20 网易(杭州)网络有限公司 Rendering method and device of game scene and electronic equipment

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
Kerry.写给美术看的Unity全局光照技术(理论篇).http://news.16p.com/865317.html.2020,第1-14页. *
Unity中Reflection Probe反射探针使用解析;feng;https://gwb.tencent.com/community/detail/126758;第1-5页 *
写给美术看的Unity全局光照技术(理论篇);Kerry;http://news.16p.com/865317.html;第1-14页 *
复杂环境光源下虚实融合光照实时计算;王贞东;马小虎;潘志庚;;中国图象图形学报(第10期);全文 *
王贞东 ; 马小虎 ; 潘志庚 ; .复杂环境光源下虚实融合光照实时计算.中国图象图形学报.2009,(第10期),全文. *
茶思维模式下VR技术对校史馆场景开发研究;肖世龙;张甜田;毛容;;福建茶叶(第08期);全文 *

Also Published As

Publication number Publication date
CN112215938A (en) 2021-01-12

Similar Documents

Publication Publication Date Title
US11682158B2 (en) Foveated rendering
US11734879B2 (en) Graphics processing using directional representations of lighting at probe positions within a scene
CN110599574B (en) Game scene rendering method and device and electronic equipment
US11494970B2 (en) Importance sampling for determining a light map
US7583264B2 (en) Apparatus and program for image generation
CN112215938B (en) Method and device for generating reflected illumination data in game and computer equipment
US8189003B2 (en) System and method for rendering computer graphics utilizing a shadow illuminator
JP2010505164A (en) Pixel color determination method and image processing system in ray tracing image processing system
US11386613B2 (en) Methods and systems for using dynamic lightmaps to present 3D graphics
US6441820B2 (en) Pseudo area lights
CN109712226A (en) The see-through model rendering method and device of virtual reality
CN112819941A (en) Method, device, equipment and computer-readable storage medium for rendering water surface
CN111760277A (en) Illumination rendering method and device
CN108280887B (en) Shadow map determination method and device
CN112819929B (en) Water surface rendering method and device, electronic equipment and storage medium
CN112465941B (en) Volume cloud processing method and device, electronic equipment and storage medium
CN113610955A (en) Object rendering method and device and shader
CN113888398A (en) Hair rendering method and device and electronic equipment
CN117671104A (en) Rendering method, rendering device, electronic equipment and computer readable storage medium
CN114913281A (en) Model processing method and device
CN114119836A (en) Rendering method, rendering device, electronic equipment and readable storage medium
CN114937103A (en) Model rendering method and device for dynamic effect, electronic equipment and storage medium
CN116524102A (en) Cartoon second-order direct illumination rendering method, device and system
CN115845369A (en) Cartoon style rendering method and device, electronic 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