Movatterモバイル変換


[0]ホーム

URL:


CN116206039B - Reflection texture complement method, device, equipment and storage medium - Google Patents

Reflection texture complement method, device, equipment and storage medium

Info

Publication number
CN116206039B
CN116206039BCN202310045387.1ACN202310045387ACN116206039BCN 116206039 BCN116206039 BCN 116206039BCN 202310045387 ACN202310045387 ACN 202310045387ACN 116206039 BCN116206039 BCN 116206039B
Authority
CN
China
Prior art keywords
texture
reflection
main camera
sky
refl
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
CN202310045387.1A
Other languages
Chinese (zh)
Other versions
CN116206039A (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.)
Guangdong Quxuan Network Co ltd
Original Assignee
Guangdong Quxuan 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 Guangdong Quxuan Network Co ltdfiledCriticalGuangdong Quxuan Network Co ltd
Priority to CN202310045387.1ApriorityCriticalpatent/CN116206039B/en
Publication of CN116206039ApublicationCriticalpatent/CN116206039A/en
Application grantedgrantedCritical
Publication of CN116206039BpublicationCriticalpatent/CN116206039B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The application discloses a reflection texture complement method, a device, equipment and a storage medium, wherein the method comprises the steps of generating a reflection texture from an image acquired by a main camera based on a screen space plane reflection technology; the method comprises the steps of rotating the direction of a main camera to a reflection direction, enabling the original direction and the reflection direction of the main camera to be mirror images based on a reflection plane, vertically overturning a picture of the main camera, enabling the main camera to render a space box once, rendering an acquired image to a texture to obtain a sky texture in the reflection direction, mixing the reflection texture and the sky texture to obtain a full back reflection texture, and solving the inherent defect that reflection content outside a screen cannot be acquired by using a screen space plane reflection technology, and the visual effect is poor due to incomplete reflection texture.

Description

Reflection texture complement method, device, equipment and storage medium
Technical Field
The present application relates to the field of electronic game rendering technologies, and in particular, to a method, an apparatus, a device, and a storage medium for complementing reflective textures.
Background
With the continuous progress of the machine performance of the mobile terminal, the mobile terminal game is continuously developed, the image quality competition is changed into white heating, the plane reflection is a picture effect which is widely used in PC and host computer platform games, the mobile terminal game is also indispensable, and the mobile terminal game is very suitable for representing visual effects such as smooth surfaces, mirror surfaces, water surface reflection and the like.
Because of the limited machine performance of mobile platforms, it is very suitable to select a screen space planar reflection technique to achieve the reflective visual effect of mobile-end games, which is adopted by many games. The screen space plane reflection technology is essentially that a reflection texture is generated according to a screen image, and then the texture is acquired by a shader and reflection content is drawn, so that the performance is balanced and stable.
However, screen space planar reflection techniques have their own limitations. Since the offscreen content is not known, imperfections in the reflective texture are unavoidable, which results in poor reflection at certain viewing angles. In practical application, the incomplete part of the reflection texture is often a sky part in a scene, more than one time of sampling can be performed on a sky box in the scene in a shader, and the sampling result is mixed with the reflection texture generated by the screen space plane reflection technology to complement the reflection content, but the result of sampling the sky box is not a real reflection result, and the mixed visual effect is poor.
Disclosure of Invention
The application provides a reflection texture complement method, a device, equipment and a storage medium, which are used for solving the inherent defect that reflection textures are incomplete and poor in visual effect caused by the fact that reflection content outside a screen cannot be acquired by using a screen space plane reflection technology, and the technical problem that the effect is poor when a sky box sampling result is adopted for repairing the reflection textures.
In view of this, a first aspect of the present application provides a reflective texture complement method, including:
generating a reflective texture from an image acquired by a primary camera based on a screen space planar reflection technique;
Rotating the orientation of the primary camera to a reflective orientation, the primary orientation and the reflective orientation of the primary camera being mirrored based on a reflection plane;
vertically turning over the picture of the main camera, enabling the main camera to render a space box once, and rendering the acquired image to a texture to obtain a sky texture in a reflecting direction;
and mixing the reflection texture and the sky texture to obtain a complement back reflection texture.
Optionally, the vertically flipping the frame of the main camera includes:
multiplying the projection matrix of the main camera by a preset parameter matrix to realize vertical overturning of the picture of the main camera, wherein the preset parameter matrix is that
Optionally, the method further comprises:
and restoring the orientation and projection matrix of the main camera.
Optionally, the mixing the reflection texture and the sky texture to obtain a complementary reflection texture includes:
Mixing the reflection texture and the sky texture through the A channel to obtain a complement back reflection texture, wherein the mixing process is as follows:
refl.rgb=lerp(reflSkybox.rgb,refl.rgb,refl.a);
Where refl.rgb is the color of the reflection texture, refl.a is the value of the reflection texture a channel, reflskybox.rgb is the color of the sky texture, and lerp () is a linear interpolation function.
A second aspect of the present application provides a reflective texture complement apparatus comprising:
a reflection texture generation unit for generating a reflection texture from an image acquired by the main camera based on a screen space plane reflection technique;
A rotation unit for rotating the orientation of the main camera to a reflection orientation, the primary orientation and the reflection orientation of the main camera being mirrored based on a reflection plane;
The sky texture generation unit is used for vertically overturning the picture of the main camera, enabling the main camera to render a space box once, and rendering the acquired image to textures to obtain sky textures in the reflecting direction;
and the texture mixing unit is used for mixing the reflection texture and the sky texture to obtain a complement back reflection texture.
Optionally, the sky texture generating unit is specifically configured to:
multiplying the projection matrix of the main camera by a preset parameter matrix to realize vertical overturning of the picture of the main camera, wherein the preset parameter matrix is that
And rendering the primary space box by the main camera, and rendering the acquired image to the texture to obtain the sky texture in the reflecting direction.
Optionally, the apparatus further includes:
and the restoring unit is used for restoring the orientation and the projection matrix of the main camera.
Optionally, the texture mixing unit is specifically configured to:
Mixing the reflection texture and the sky texture through the A channel to obtain a complement back reflection texture, wherein the mixing process is as follows:
refl.rgb=lerp(reflSkybox.rgb,refl.rgb,refl.a);
Where refl.rgb is the color of the reflection texture, refl.a is the value of the reflection texture a channel, reflskybox.rgb is the color of the sky texture, and lerp () is a linear interpolation function.
A third aspect of the application provides a reflective texture complement apparatus, the apparatus comprising a processor and a memory;
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to execute the reflective texture complement method of any one of the first aspect according to instructions in the program code.
A fourth aspect of the application provides a computer readable storage medium storing program code which when executed by a processor implements the reflective texture complement method of any one of the first aspects.
From the above technical scheme, the application has the following advantages:
The application provides a reflection texture complement method which comprises the steps of generating a reflection texture from an image acquired by a main camera based on a screen space plane reflection technology, rotating the direction of the main camera to the reflection direction, enabling the original direction and the reflection direction of the main camera to be mirror images based on the reflection plane, vertically overturning the picture of the main camera, enabling the main camera to render a space box once, enabling the acquired image to be rendered to the texture to obtain the sky texture in the reflection direction, and mixing the reflection texture and the sky texture to obtain the complement back reflection texture.
According to the application, after the reflection texture is generated based on the screen space plane reflection technology, the main camera is rotated to the reflection orientation, and the picture of the main camera is vertically turned over, so that the main camera renders a space box once, the acquired image is rendered to the texture to obtain the sky texture in the reflection direction, the sky texture in the reflection direction is rendered by using the reflection camera, the real reflection result is obtained, the mixed visual effect is good, the inherent defect that the reflection texture is incomplete and the visual effect is poor due to the fact that the reflection content outside the screen cannot be acquired by using the screen space plane reflection technology is improved, and the technical problem that the effect is poor due to the fact that the sky box sampling result is adopted to repair the reflection texture is solved.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the application, and that other drawings can be obtained from these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for complementing reflective texture according to an embodiment of the present application;
fig. 2 is a schematic view of a main camera according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a reflective texture complement device according to an embodiment of the present application.
Detailed Description
The application provides a reflection texture complement method, a device, equipment and a storage medium, which are used for solving the inherent defect that reflection textures are incomplete and poor in visual effect caused by the fact that reflection content outside a screen cannot be acquired by using a screen space plane reflection technology, and the technical problem that the effect is poor when a sky box sampling result is adopted for repairing the reflection textures.
In order to make the present application better understood by those skilled in the art, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Because of the limited machine performance of mobile platforms, it is very suitable to select a screen space planar reflection technique to achieve the reflective visual effect of mobile-end games, which is adopted by many games. The screen space plane reflection technology is essentially that a reflection texture is generated according to a screen image, and then the texture is acquired by a shader and reflection content is drawn, so that the performance is balanced and stable. However, screen space planar reflection techniques have their own limitations. Since the offscreen content is not known, imperfections in the reflective texture are unavoidable, which results in poor reflection at certain viewing angles. In practice, the incomplete part of the reflective texture is often part of the sky in the scene. In order to improve the problem, the application provides a reflection texture complement method, which aims to complement the sky part content missing in the reflection texture generated by a screen space plane reflection technology, so as to optimize the visual effect.
For easy understanding, referring to fig. 1, an embodiment of the present application provides a reflection texture complement method, which is implemented based on a Unity engine, and includes:
step 101, generating a reflection texture from an image acquired by a main camera based on a screen space plane reflection technique.
The method comprises the steps of obtaining a screen image under the current direction of a current main camera through a game, and then rendering the screen image obtained by the current main camera to textures based on a screen space plane reflection technology to generate reflection textures. The screen space plane reflection technology belongs to the prior art, and a specific generation process of the reflection texture is not repeated here.
Step 102, the main camera is rotated to a reflection orientation, and the original orientation and the reflection orientation of the main camera are mirrored based on a reflection plane.
The current orientation of the main camera of the game is rotated to a reflective orientation, wherein the primary orientation and the reflective orientation of the main camera are mirrored based on a reflective plane, see fig. 2. This approach is similar to that of a reflex camera, but does not require adjustment of the position of the main camera, since here only the content of the space box needs to be rendered, while the camera is always in the center of the space box.
And 103, vertically turning over the picture of the main camera, enabling the main camera to render the space box once, and rendering the acquired image to the texture to obtain the sky texture in the reflecting direction.
The picture of the main camera is flipped vertically after the main camera is rotated in the direction of the main camera by multiplying the projection matrix of the main camera by a preset parameter matrixThe vertical overturning of the picture of the main camera is realized.
After the picture of the main camera is vertically turned over, the main camera renders a space box once, an image currently acquired by the main camera is acquired, the image is rendered to a texture, and the sky texture in the reflecting direction is obtained. The sky texture obtained at this time is a true reflection result.
Further, after the sky texture is acquired, the main camera orientation and projection matrix are restored.
And 104, mixing the reflection texture and the sky texture to obtain the complement back reflection texture.
After the sky texture is acquired, it is necessary to determine how the sky texture and the reflection texture generated by the screen space plane reflection technique are mixed. Embodiments of the present application find that the a-channel of the reflection texture identifies where the texture has actual reflection content, and thus the reflection texture and sky texture can be mixed by the a-channel. The closer to 1 (i.e., the whiter) the a channel tends to draw the content of the reflection texture, and the closer to 0 (i.e., the darker) the sky texture tends to draw the content of the sky texture. The embodiment of the application adopts an interpolation mode to mix the reflection texture and the sky texture, and specifically comprises the following steps:
refl.rgb=lerp(reflSkybox.rgb,refl.rgb,refl.a);
Where refl.rgb is the color of the reflection texture, refl.a is the value of the reflection texture a channel, reflskybox.rgb is the color of the sky texture, and lerp () is a linear interpolation function.
After the sky texture and the reflection texture are mixed, the reflection content is drawn through a coloring device of a relevant scene object, and the effect after the sky texture is complemented is more attractive than the original effect through comparison.
The performance consumption and visual performance of the screen space plane reflection technology are balanced, the performance consumption of the reflection camera is high, and the visual performance is good. The embodiment of the application optimizes and complements the distortion part in the reflection texture generated by the screen space plane reflection technology by applying the thought of a reflection camera within the acceptable range of performance consumption, optimizes the visual effect, has higher controllability for developers, can adjust the rendering efficiency, allows the developers to balance the image quality expression precision and the performance consumption, and regulates the resolution and the sky box special effect when the sky texture is rendered, so that the visual effect and the rendering efficiency are balanced compared with a space box which is sampled more once in a shader. Because the sky box tone of most game scenes is simple, the reflection texture is not required to be very fine, and the resolution of rendering the sky texture can be completely reduced, so that the rendering time is reduced. Through tests, when the resolution of the sky texture is reduced to 0.04 times of the original resolution, the visual effect of plane reflection is still quite good, the GPU time consumption for rendering the sky texture is 18% -30% of that for rendering the rhodiola rosea empty box, and the time consumption in a reasonable range is increased to replace the great improvement of the plane reflection effect.
In the embodiment of the application, after the reflective texture is generated based on the screen space plane reflection technology, the main camera is rotated to the reflective orientation, and the picture of the main camera is vertically turned over, so that the main camera renders a space box once, the acquired image is rendered to the texture to obtain the sky texture in the reflective direction, the sky texture in the reflective direction is rendered by using the reflective camera, the real reflective result is obtained, the mixed visual effect is good, the inherent defect that the visual effect is poor due to incomplete reflective texture can be improved, and the technical problem that the effect is poor due to the adoption of the sky box sampling result to repair the reflective texture is solved.
The foregoing is an embodiment of a reflective texture filling method provided by the present application, and the following is an embodiment of a reflective texture filling device provided by the present application.
Referring to fig. 3, a reflective texture complement apparatus provided in an embodiment of the present application includes:
a reflection texture generation unit for generating a reflection texture from an image acquired by the main camera based on a screen space plane reflection technique;
A rotation unit for rotating an orientation of the main camera to a reflection orientation, the original orientation and the reflection orientation of the main camera being mirrored based on a reflection plane;
The sky texture generation unit is used for vertically overturning the picture of the main camera, enabling the main camera to render a space box once, and rendering the acquired image to textures to obtain sky textures in the reflecting direction;
and the texture mixing unit is used for mixing the reflection texture and the sky texture to obtain the complement back reflection texture.
In the embodiment of the application, the reflection texture generation unit acquires the screen image under the current orientation of the current main camera through the game, and then renders the screen image acquired by the current main camera to the texture based on the screen space plane reflection technology to generate the reflection texture. The screen space plane reflection technology belongs to the prior art, and a specific generation process of the reflection texture is not repeated here.
The rotation unit rotates the orientation of the main camera to a reflective orientation, wherein the primary orientation and the reflective orientation of the main camera are mirrored based on a reflection plane. The sky texture generating unit multiplies the projection matrix of the main camera by a preset parameter matrix to realize the vertical overturn of the picture of the main camera, wherein the preset parameter matrix is thatAnd rendering the space box once by the main camera, and rendering the acquired image to the texture to obtain the sky texture in the reflecting direction. The sky texture obtained at this time is a true reflection result.
As a further improvement, the device further comprises:
and the restoring unit is used for restoring the orientation and the projection matrix of the main camera. After the sky texture generation unit acquires the sky texture, the restoration unit restores the orientation and the projection matrix of the main camera.
After the sky texture is acquired, it is necessary to determine how the sky texture and the reflection texture generated by the screen space plane reflection technique are mixed. Embodiments of the present application find that the a-channel of the reflection texture identifies where the texture has actual reflection content, and thus the reflection texture and sky texture can be mixed by the a-channel. The closer to 1 (i.e., the whiter) the a channel tends to draw the content of the reflection texture, and the closer to 0 (i.e., the darker) the sky texture tends to draw the content of the sky texture. Therefore, the texture mixing unit mixes the reflection texture and the sky texture through the A channel to obtain the complementary back reflection texture, and the mixing process is as follows:
refl.rgb=lerp(reflSkybox.rgb,refl.rgb,refl.a);
Where refl.rgb is the color of the reflection texture, refl.a is the value of the reflection texture a channel, reflskybox.rgb is the color of the sky texture, and lerp () is a linear interpolation function.
In the embodiment of the application, after the reflective texture is generated based on the screen space plane reflection technology, the main camera is rotated to the reflective orientation, and the picture of the main camera is vertically turned over, so that the main camera renders a space box once, the acquired image is rendered to the texture to obtain the sky texture in the reflective direction, the sky texture in the reflective direction is rendered by using the reflective camera, the real reflective result is obtained, the mixed visual effect is good, the inherent defect that the visual effect is poor due to incomplete reflective texture can be improved, and the technical problem that the effect is poor due to the adoption of the sky box sampling result to repair the reflective texture is solved.
The embodiment of the application also provides a reflective texture complement device, which comprises a processor and a memory;
the memory is used for storing the program codes and transmitting the program codes to the processor;
The processor is configured to perform the reflective texture completion method of the foregoing method embodiments according to instructions in the program code.
The embodiment of the application also provides a computer readable storage medium, and the computer readable storage medium is used for storing program codes which are executed by a processor to realize the reflection texture complement method in the embodiment of the method.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus and units described above may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
The terms "first," "second," "third," "fourth," and the like in the description of the application and in the above figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented, for example, in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one (item)" means one or more, and "a plurality" means two or more. "and/or" is used to describe an association relationship of an associated object, and indicates that three relationships may exist, for example, "a and/or B" may indicate that only a exists, only B exists, and three cases of a and B exist simultaneously, where a and B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one of a, b or c may represent a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., 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 an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
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 of 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 integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for executing all or part of the steps of the method according to the embodiments of the present application by means of a computer device (which may be a personal computer, a server, or a network device, etc.). The storage medium includes various media capable of storing program codes, such as 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.
While the application has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that the foregoing embodiments may be modified or equivalents may be substituted for some of the features thereof, and that the modifications or substitutions do not depart from the spirit and scope of the embodiments of the application.

Claims (10)

Translated fromChinese
1.一种反射纹理补全方法,其特征在于,包括:1. A reflection texture completion method, comprising:基于屏幕空间平面反射技术从主摄像机获取的图像中生成反射纹理;Generate reflection texture from the image acquired by the main camera based on screen space planar reflection technology;将所述主摄像机的朝向旋转到反射朝向,所述主摄像机的原朝向和反射朝向基于反射平面成镜像;Rotating the orientation of the main camera to a reflected orientation, wherein the original orientation and the reflected orientation of the main camera are mirror images based on a reflection plane;竖直翻转所述主摄像机的画面,并让所述主摄像机渲染一次天空盒,将获取的图像渲染到纹理,得到反射方向上的天空纹理;Flipping the main camera's image vertically, and having the main camera render a skybox once, rendering the acquired image to a texture to obtain a sky texture in the reflection direction;将所述反射纹理和所述天空纹理进行混合,得到补全后反射纹理。The reflection texture and the sky texture are mixed to obtain a completed reflection texture.2.根据权利要求1所述的反射纹理补全方法,其特征在于,所述竖直翻转所述主摄像机的画面,包括:2. The reflection texture completion method according to claim 1, wherein the vertically flipping the image of the main camera comprises:将所述主摄像机的投影矩阵乘以预置参数矩阵,实现竖直翻转所述主摄像机的画面,所述预置参数矩阵为Multiply the projection matrix of the main camera by the preset parameter matrix to vertically flip the image of the main camera. The preset parameter matrix is3.根据权利要求2所述的反射纹理补全方法,其特征在于,所述方法还包括:3. The reflective texture completion method according to claim 2, further comprising:恢复所述主摄像机的朝向和投影矩阵。Restore the main camera's orientation and projection matrix.4.根据权利要求1所述的反射纹理补全方法,其特征在于,所述将所述反射纹理和所述天空纹理进行混合,得到补全后反射纹理,包括:4. The method for completing reflection texture according to claim 1, wherein the step of mixing the reflection texture and the sky texture to obtain the completed reflection texture comprises:通过A通道混合所述反射纹理和所述天空纹理,得到补全后反射纹理,混合过程为:The reflection texture and the sky texture are mixed through the A channel to obtain the completed reflection texture. The mixing process is:refl.rgb=lerp(reflSkybox.rgb,refl.rgb,refl.a);refl.rgb=lerp(reflSkybox.rgb,refl.rgb,refl.a);式中,refl.rgb为反射纹理的颜色,refl.a为反射纹理A通道的值,reflSkybox.rgb为天空纹理的颜色,lerp()为线性插值函数。Where refl.rgb is the color of the reflection texture, refl.a is the value of the A channel of the reflection texture, reflSkybox.rgb is the color of the sky texture, and lerp() is the linear interpolation function.5.一种反射纹理补全装置,其特征在于,包括:5. A reflective texture completion device, comprising:反射纹理生成单元,用于基于屏幕空间平面反射技术从主摄像机获取的图像中生成反射纹理;a reflection texture generation unit, configured to generate a reflection texture from an image acquired from a main camera based on a screen space planar reflection technique;旋转单元,用于将所述主摄像机的朝向旋转到反射朝向,所述主摄像机的原朝向和反射朝向基于反射平面成镜像;a rotation unit, configured to rotate the orientation of the main camera to a reflected orientation, wherein the original orientation and the reflected orientation of the main camera are mirror images based on a reflection plane;天空纹理生成单元,用于竖直翻转所述主摄像机的画面,并让所述主摄像机渲染一次天空盒,将获取的图像渲染到纹理,得到反射方向上的天空纹理;A sky texture generation unit, configured to vertically flip the image of the main camera, and allow the main camera to render a sky box once, rendering the acquired image to a texture to obtain a sky texture in a reflection direction;纹理混合单元,用于将所述反射纹理和所述天空纹理进行混合,得到补全后反射纹理。The texture mixing unit is used to mix the reflection texture and the sky texture to obtain a completed reflection texture.6.根据权利要求5所述的反射纹理补全装置,其特征在于,所述天空纹理生成单元,具体用于:6. The reflective texture completion device according to claim 5, wherein the sky texture generation unit is specifically configured to:将所述主摄像机的投影矩阵乘以预置参数矩阵,实现竖直翻转所述主摄像机的画面,所述预置参数矩阵为Multiply the projection matrix of the main camera by the preset parameter matrix to vertically flip the image of the main camera. The preset parameter matrix is让所述主摄像机渲染一次天空盒,将获取的图像渲染到纹理,得到反射方向上的天空纹理。The main camera is made to render a sky box once, and the acquired image is rendered into a texture to obtain a sky texture in a reflection direction.7.根据权利要求6所述的反射纹理补全装置,其特征在于,所述装置还包括:7. The reflective texture completion device according to claim 6, further comprising:恢复单元,用于恢复所述主摄像机的朝向和投影矩阵。A restoration unit is used to restore the orientation and projection matrix of the main camera.8.根据权利要求6所述的反射纹理补全装置,其特征在于,所述纹理混合单元,具体用于:8. The reflective texture completion device according to claim 6, wherein the texture mixing unit is specifically configured to:通过A通道混合所述反射纹理和所述天空纹理,得到补全后反射纹理,混合过程为:The reflection texture and the sky texture are mixed through the A channel to obtain the completed reflection texture. The mixing process is:refl.rgb=lerp(reflSkybox.rgb,refl.rgb,refl.a);refl.rgb=lerp(reflSkybox.rgb,refl.rgb,refl.a);式中,refl.rgb为反射纹理的颜色,refl.a为反射纹理A通道的值,reflSkybox.rgb为天空纹理的颜色,lerp()为线性插值函数。Where refl.rgb is the color of the reflection texture, refl.a is the value of the A channel of the reflection texture, reflSkybox.rgb is the color of the sky texture, and lerp() is the linear interpolation function.9.一种反射纹理补全设备,其特征在于,所述设备包括处理器以及存储器;9. A reflective texture completion device, characterized in that the device includes a processor and a memory;所述存储器用于存储程序代码,并将所述程序代码传输给所述处理器;The memory is used to store program code and transmit the program code to the processor;所述处理器用于根据所述程序代码中的指令执行权利要求1-4任一项所述的反射纹理补全方法。The processor is configured to execute the reflection texture completion method according to any one of claims 1 to 4 according to instructions in the program code.10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储程序代码,所述程序代码被处理器执行时实现权利要求1-4任一项所述的反射纹理补全方法。10. A computer-readable storage medium, characterized in that the computer-readable storage medium is used to store program code, and when the program code is executed by a processor, it implements the reflection texture completion method according to any one of claims 1 to 4.
CN202310045387.1A2023-01-302023-01-30Reflection texture complement method, device, equipment and storage mediumActiveCN116206039B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202310045387.1ACN116206039B (en)2023-01-302023-01-30Reflection texture complement method, device, equipment and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202310045387.1ACN116206039B (en)2023-01-302023-01-30Reflection texture complement method, device, equipment and storage medium

Publications (2)

Publication NumberPublication Date
CN116206039A CN116206039A (en)2023-06-02
CN116206039Btrue CN116206039B (en)2025-08-01

Family

ID=86514069

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202310045387.1AActiveCN116206039B (en)2023-01-302023-01-30Reflection texture complement method, device, equipment and storage medium

Country Status (1)

CountryLink
CN (1)CN116206039B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113223110A (en)*2021-05-312021-08-06北京字跳网络技术有限公司Picture rendering method, device, equipment and medium
CN114241111A (en)*2021-11-262022-03-25阿里巴巴新加坡控股有限公司 Method, apparatus, electronic device and medium for rendering the sky in a map

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20170287196A1 (en)*2016-04-012017-10-05Microsoft Technology Licensing, LlcGenerating photorealistic sky in computer generated animation
CN110163945B (en)*2019-05-252022-11-29北京工业大学Water surface simulation method in real-time rendering
CN112967390B (en)*2019-11-302022-02-25北京城市网邻信息技术有限公司Scene switching method and device and storage medium
US11684852B2 (en)*2021-05-042023-06-27Sony Interactive Entertainment Inc.Create and remaster computer simulation skyboxes
CN114663615B (en)*2022-03-302025-08-08阿里巴巴(中国)有限公司 Electronic map display method and device, and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113223110A (en)*2021-05-312021-08-06北京字跳网络技术有限公司Picture rendering method, device, equipment and medium
CN114241111A (en)*2021-11-262022-03-25阿里巴巴新加坡控股有限公司 Method, apparatus, electronic device and medium for rendering the sky in a map

Also Published As

Publication numberPublication date
CN116206039A (en)2023-06-02

Similar Documents

PublicationPublication DateTitle
Bimber et al.Enabling view-dependent stereoscopic projection in real environments
US9508185B2 (en)Texturing in graphics hardware
TWI244050B (en)Recirculating shade tree blender for a graphics system
US11544818B2 (en)Enhancing high-resolution images with data from low-resolution images
US20200342634A1 (en)Texture interpolation using neural networks
US9610501B2 (en)Delivery of projections for rendering
Zhou et al.Accurate depth of field simulation in real time
US7995060B2 (en)Multiple artistic look rendering methods and apparatus
CN111161392A (en)Video generation method and device and computer system
WO2021135320A1 (en)Video generation method and apparatus, and computer system
FR2735253A1 (en) SYNCHRONIZATION OF DATA BETWEEN SEVERAL ASYNCHRONOUS DATA RETURN DEVICES
KR20220017470A (en) Create a face texture map using a single color image and depth information
KR20190122246A (en) Image processing methods and devices, storage media and electronic devices
WO2022063260A1 (en)Rendering method and apparatus, and device
CN116206039B (en)Reflection texture complement method, device, equipment and storage medium
JP2022158959A (en)Three dimensional (3d) digital model surface rendering and conversion
CN116664752B (en)Method, system and storage medium for realizing panoramic display based on patterned illumination
EP1027682A1 (en)Method and apparatus for rapidly rendering an image in response to three-dimensional graphics data in a data rate limited environment
Ikkala et al.DDISH-GI: Dynamic Distributed Spherical Harmonics Global Illumination
Li et al.Online Accelerated Rendering of Visual Hulls in Real Scenes.
Ahmed et al.Projector primary-based optimization for superimposed projection mappings
NZ544937A (en)Improved paint projection method and apparatus
Garcia et al.Coherent Mark‐based Stylization of 3D Scenes at the Compositing Stage
LaukkanenPost-processing In video games
ZiaSeen Description: Visualising and crafting data in mixed realities

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp