WO2022193614A1 - 水波特效生成方法及装置、存储介质、计算机设备 - Google Patents

水波特效生成方法及装置、存储介质、计算机设备 Download PDF

Info

Publication number
WO2022193614A1
WO2022193614A1 PCT/CN2021/121446 CN2021121446W WO2022193614A1 WO 2022193614 A1 WO2022193614 A1 WO 2022193614A1 CN 2021121446 W CN2021121446 W CN 2021121446W WO 2022193614 A1 WO2022193614 A1 WO 2022193614A1
Authority
WO
WIPO (PCT)
Prior art keywords
disturbance
preset
target
map
channel
Prior art date
Application number
PCT/CN2021/121446
Other languages
English (en)
French (fr)
Inventor
郭帆
Original Assignee
完美世界(北京)软件科技发展有限公司
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 完美世界(北京)软件科技发展有限公司 filed Critical 完美世界(北京)软件科技发展有限公司
Publication of WO2022193614A1 publication Critical patent/WO2022193614A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • 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/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/603D [Three Dimensional] animation of natural phenomena, e.g. rain, snow, water or plants
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program

Definitions

  • the present invention relates to the field of computer technology, and in particular, to a method and device for generating water wave special effects, a storage medium and computer equipment.
  • water ripples are generally rendered by directly simulating a wave function on the screen, and a water wave effect is achieved by stacking multiple layers.
  • This method of rendering water ripples through functions has low artistic controllability, and it is difficult to balance the effect and calculation cost. If you want to obtain a more complex water ripple effect, you need to superimpose multiple functions, which is expensive and requires high equipment. Not friendly enough to players.
  • a method for generating water wave special effects comprising:
  • the target disturbance channel includes an R channel and a G channel;
  • the display area UV of the virtual scene is rendered based on the target disturbance channel, so that disturbance special effects are attached to the display area.
  • a device for generating water wave special effects comprising:
  • a disturbance map generation module configured to obtain a preset disturbance effect map corresponding to the virtual scene of the water wave effect to be generated, perform sampling offset on the preset disturbance effect map, and determine a plurality of target disturbance maps;
  • a perturbation channel sampling module for sampling the target perturbation channel of the target perturbation map, wherein the target perturbation channel includes an R channel and a G channel;
  • a disturbance special effect generation module configured to render the display area UV of the virtual scene based on the target disturbance channel, so that disturbance special effects are attached to the display area.
  • a computer-readable medium on which computer programs/instructions are stored, and when the computer programs/instructions are executed by a processor, implement the steps of the above-mentioned method for generating water wave effects.
  • a computer device/equipment/system comprising a memory, a processor, and a computer program/instruction stored in the memory, the processor implements the above-mentioned water wave when executing the computer program/instruction The steps of the effect generation method.
  • a computer program product comprising computer programs/instructions, when the computer programs/instructions are executed by a processor, the steps of the above-mentioned method for generating water wave effects are implemented.
  • a computer device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, the processor implementing the above-mentioned water wave when executing the program The steps of the effect generation method.
  • the present invention provides a water wave special effect generation method and device, storage medium, and computer equipment, using a pre-drawn preset disturbance special effect map corresponding to the virtual scene of the water wave special effect to be generated.
  • the texture is sampled and offset to obtain multiple target perturbation texture data matching the texture, so as to sample the RG channel of the target perturbation texture data, and render the screen UV corresponding to the virtual scene to render the virtual scene with perturbation special effects. disturbance.
  • the embodiment of the present application does not need to perform real-time calculations, has lower running overhead, lower requirements on device performance, can meet the game requirements of more players, and can be customized by artists.
  • FIG. 1 shows a schematic flowchart of a method for generating water wave special effects provided by an embodiment of the present application
  • FIG. 2 shows a schematic flowchart of another method for generating water wave special effects provided by an embodiment of the present application
  • FIG. 3 shows a schematic diagram of a water wave special effect effect without adding a mask provided by an embodiment of the present application
  • FIG. 4 shows a schematic diagram of a water wave special effect effect by adding a mask according to an embodiment of the present application
  • FIG. 5 shows another schematic diagram of the water wave special effect effect of adding a mask provided by an embodiment of the present application
  • FIG. 6 shows a schematic structural diagram of a water wave special effect generating device provided by an embodiment of the present application
  • FIG. 7 shows a schematic diagram of a computer apparatus/equipment/system provided by an embodiment of the present application.
  • FIG. 8 shows a block diagram of a computer program product provided by an embodiment of the present application.
  • a method for generating water wave special effects is provided in this embodiment, as shown in FIG. 1 , the method includes:
  • Step 101 Obtain a preset disturbance special effect map corresponding to the virtual scene of the water wave special effect to be generated, perform sampling offset on the preset disturbance effect map, and determine multiple target disturbance maps;
  • the embodiments of the present application can be applied in the field of games, and can be run on a game client to generate in-game special effects. Of course, they can also be used in the field of animation production to generate animation special effects.
  • the virtual scenes may specifically include game world scenes, animation scene. Taking a virtual scene applied in the field of games as an example, in this embodiment of the present application, the virtual scene includes an area where special effects need to be generated, such as a water moor that needs to generate water ripple effects. Make disturbance normal maps in the waterbore area where special effects are generated. Artists can pre-produce multiple disturbance normal maps to express the water wave texture of the waterbore area, and use them as preset disturbance special effects maps. When generating special effects, they can be combined with the virtual scene.
  • a preset disturbance special effect map is selected according to the actual needs of the special effect area to be generated in the virtual scene, or a preset disturbance special effect map is randomly selected.
  • the special effect area to be generated is a water pool area, then select a The preset disturbance special effect map corresponding to Shuibo, and then sample and offset this preset disturbance effect map to obtain multiple sets of target disturbance maps, so as to use one preset disturbance effect map to obtain multiple preset disturbance maps.
  • the effect of the perturbation map related to the effect map is
  • the target disturbance map may be obtained by performing translation, rotation, etc. on a preset disturbance special effect map.
  • the preset disturbance special effect map includes a two-dimensional normal map.
  • Step 101 may specifically include : According to multiple preset offset directions and their corresponding preset offset speeds, sample and offset the preset disturbance special effect maps respectively, and obtain multiple disturbance maps corresponding to each preset offset direction. component, wherein the preset offset direction includes four directions formed by diagonal lines of the preset disturbance special effect map; the target disturbance map is determined based on the disturbance map component corresponding to each preset offset direction.
  • the preset disturbance effect map is a two-dimensional normal map, and the specific shape can be a rectangle, and the preset offset direction is two lines of the rectangle.
  • the diagonal lines form four directions. It should be noted that the four directions are only an example of the embodiments of the present application. Those skilled in the art can also set preset offset directions according to actual needs. In addition, in addition to the preset offset directions In addition to the direction, the game producer should also set a preset offset speed corresponding to each preset offset direction.
  • the preset offset speed corresponding to different preset offset directions can be the same or different, and then according to the preset offset
  • the direction and the corresponding preset offset speed control the preset perturbation effect texture offset, and the offset results are sampled at the same time interval to obtain multiple sets of perturbation texture components in each preset offset direction.
  • the perturbation map components corresponding to different preset offset directions of the sampling time are weighted and summed to make the UV movement look richer.
  • two or more preset offset directions are preferably set in this embodiment of the present application, and the speeds in different directions are preferably different, so as to reduce the tiling feeling of the special effect and improve the expressiveness of the special effect.
  • Step 102 sampling the target disturbance channel of the target disturbance map, wherein the target disturbance channel includes an R channel and a G channel;
  • Step 103 rendering the display area UV of the virtual scene based on the target disturbance channel, so that the display area is accompanied by disturbance special effects.
  • the RG channel corresponding to each group of target disturbance maps is sampled separately, and the RG channel of each target disturbance map obtained by sampling is used as the target disturbance channel, and finally the target disturbance channels corresponding to multiple target disturbance maps are used to render the virtual scene.
  • Display the area UV add the RG channel of the target disturbance map to the screen UV, thereby disturbing the screen, and use the RG channel component of the normal map with multi-directional sampling offset to simulate the real water wave rendering, without the need for real-time calculation through functions,
  • the operation efficiency is higher, the operation cost is small, the performance requirements of the device are lower, and it is more friendly to the players, and the special effects are also very rich. Art controllability, improve game effects, and improve game playability.
  • a preset disturbance special effect map drawn in advance and corresponding to the virtual scene of the water wave special effect to be generated is used, and multiple target disturbance maps matching the map are obtained by sampling and offsetting the map.
  • Data so as to sample the RG channel of the target perturbation map data, and render the screen UV corresponding to the virtual scene, so as to render the virtual scene with perturbation special effects, and realize the perturbation of the screen.
  • the embodiment of the present application does not need to perform real-time calculations, has lower running overhead, lower requirements on device performance, can meet the game requirements of more players, and can be customized by artists.
  • Different styles of perturbation special effects maps to enrich special effects improve the art controllability of game special effects, improve game playability, and enable players to get a better game experience.
  • FIG. 2 shows another method for generating water wave effects provided by the embodiment of the present application, as shown in FIG. 1 . Based on the method shown, caustics effects and mask effects are added, and the method includes:
  • Step 201 Acquire a preset disturbance special effect map corresponding to the virtual scene where the water wave effect is to be generated, perform sampling offset on the preset disturbance effect map, and determine multiple target disturbance maps.
  • Step 202 Sampling a target disturbance channel corresponding to the target disturbance map, wherein the target disturbance channel includes an R channel and a G channel.
  • Step 203 Render the display area UV of the virtual scene based on the target disturbance channel, so that the display area is accompanied by disturbance special effects.
  • a preset disturbance special effect map customized by the artist is used to perform sampling offset and target disturbance channel acquisition, so as to render the UV of the display area of the virtual scene, so that the display area is accompanied by disturbance special effects , such as with water ripple effects.
  • Step 204 Acquire a preset caustics effect map corresponding to the virtual scene, and sample multiple groups of target caustics channels corresponding to the preset caustics effect map, wherein the preset caustics effect map is a three-dimensional map.
  • Step 205 Adjust the caustics color corresponding to the target caustics channel according to the color data of the display area; and/or call a preset color function to adjust the caustics color corresponding to the target caustics channel.
  • Step 206 rendering the display area UV based on the target caustics channel, so that the display area is accompanied by caustics special effects.
  • a caustics effect may also be added to the screen space to enhance the realism of the special effects.
  • the preset caustics effect map is a 3D map.
  • a 64*64*64 3D map is used to simulate the effect of continuous change of caustics
  • 64* A 64*64 3D texture is equivalent to a texture with a resolution of 512.
  • the required temporary memory space is very small, and because it is a tiled texture, the details are also very rich. It is used as a texture for generating after-effects on mobile phones. It is suitable in terms of effect, memory usage and running overhead.
  • the 3D map is static, it stores 64 kinds of changes.
  • the ordinary normal map is two-dimensional and can only be tiled or disturbed.
  • a 64*64 map has very few details, but it is multiplied by one Dimension 64 pieces of 64*64 details, the saved dynamic effects are very rich, and the effect of caustics special effects can be guaranteed.
  • the caustics color is sampled according to the preset caustics effect 3D map, that is, the target caustics channel is obtained by sampling, and then the screen space rendering result is obtained, that is, the display area rendering result obtained in step 203, and the target caustics channel is used to render the display.
  • Step 205 some additional processing can also be performed on the focal color. Since the caustics is a solid color, the color of the caustics special effect map may be separated from the virtual scene. Therefore, the focal color can be processed. Specifically, you can The caustics color can be adjusted according to the color data of the display area after the perturbation effect rendering, or the caustics color can be adjusted by using the preset color function. Control to enhance the controllability of caustics color, improve the rendering effect of caustics effects, and increase the realism of water wave effects.
  • the 3D caustics map is used for rendering to obtain a similar caustics effect.
  • the 3D caustics map is used to simulate rich details and excessive Smooth dynamic caustics effect, very low performance consumption and low system overhead, which can meet the gaming needs of players of more models.
  • step 204 "obtaining the preset caustics special effect map corresponding to the virtual scene" specifically includes: acquiring the rendering memory information corresponding to the client , and select the preset caustics special effect map according to the rendering memory size of the client.
  • information such as the size of the rendering memory corresponding to the game client device, the special effect fineness data set by the player, the device processing capability data and other information are read, so as to determine the maximum dimension of the caustics special effect map according to the above information, and according to the maximum dimension Select a matching preset caustics effect map to achieve the purpose of taking into account equipment overhead and caustics effect.
  • Step 207 Acquire a preset mask image corresponding to the virtual scene, and add the preset mask image in the display area; or,
  • Step 208 calling a preset distance function to construct a gradient field matching the display area, and adding the gradient field in the display area; in response to the mask area control instruction, use a preset smooth step function to adjust the gradient Gradient region of the field.
  • the UV in the screen space is offset, and the screen edge and the area without the disturbance effect will be torn to a certain extent.
  • the screen space that is, the display area, adds a mask to cover the edge of the screen, and makes a certain transition between the disturbed area and the undisturbed area to avoid visual tearing.
  • the preset mask image drawn by the artist in advance can be used, or the mask image can be drawn by calling a function from the computer.
  • FIG. 3 shows an effect diagram provided by an embodiment of the present application without adding a mask.
  • step 207 as shown in Fig.
  • a preset mask image drawn by the artist in advance is obtained, and the preset mask image is added in the display area to cover the edge of the screen, and the artist can draw a grayscale image as required
  • the image can be customized into regular or irregular shapes, and the mask image drawn by drawing is highly artistic.
  • the preset distance function is called to construct a gradient field matching the screen space, and the gradient field is added to the screen space to save textures and improve accuracy, for example, Distance(Screen Position,(0.5 ,0.5)) function to build a two-dimensional circular gradient field.
  • the size of the gradient area of the gradient field can also be adjusted by the function.
  • the maximum and minimum parameters of the smooth step function are used to control the gradient area.
  • the determined mask image does not need to be sampled, and the image accuracy is high and the transition effect is better.
  • the display area after adding the mask will increase the gradient effect from the edge to the center, and the picture will be more textured like images of fantasy, dream, or memory.
  • the RG channel of the perturbed normal map is used, and the four-direction sampling offset is used to simulate the real special effect rendering, which can improve the operation efficiency and ensure the richness of the special effect effect, which is convenient and convenient. Artists can achieve a variety of different styles of special effects by customizing textures.
  • the 3D caustics map is used to simulate the dynamic caustics effect with rich details and excessive smoothness, which reduces the system performance consumption.
  • it can provide a variety of mask images to distinguish the water wave area and the normal area, and cooperate with high-degree-of-freedom parameter adjustment to meet the diverse needs of art and planning.
  • an embodiment of the present application provides a device for generating water wave special effects. As shown in FIG. 6 , the device includes:
  • a disturbance map generation module configured to obtain a preset disturbance effect map corresponding to the virtual scene of the water wave effect to be generated, perform sampling offset on the preset disturbance effect map, and determine a plurality of target disturbance maps;
  • a perturbation channel sampling module for sampling the target perturbation channel of the target perturbation map, wherein the target perturbation channel includes an R channel and a G channel;
  • a disturbance special effect generation module configured to render the display area UV of the virtual scene based on the target disturbance channel, so that disturbance special effects are attached to the display area.
  • the preset disturbance special effect map includes a two-dimensional normal map; the disturbance map generation module determines multiple target disturbance maps, and is specifically used for:
  • the preset offset directions include four directions formed by the diagonal lines of the preset disturbance special effect map;
  • the target disturbance map is determined based on disturbance map components corresponding to each preset offset direction.
  • the device further includes:
  • a caustics channel sampling module configured to acquire a preset caustics special effect map corresponding to the virtual scene after rendering the display area UV of the virtual scene based on the target disturbance channel, and sample the preset caustics effect map Corresponding groups of target caustics channels, wherein the preset caustics special effect map is a three-dimensional map;
  • a caustics special effect generation module configured to render the display area UV based on the target caustics channel, so that the display area is accompanied by caustics special effects.
  • the device further includes:
  • a caustics color adjustment module configured to adjust the caustics color corresponding to the target caustics channel according to the color data of the display area before rendering the display area based on the target caustics channel; and/or, The preset color function is called to adjust the caustics color corresponding to the target caustics channel.
  • the caustics channel sampling module is specifically used for:
  • the device further includes:
  • a first mask generation module configured to acquire a preset mask image corresponding to the virtual scene after rendering the display area of the virtual scene based on the target disturbance channel, and add the display area to the display area Preset mask image.
  • the device further includes:
  • the second mask generation module is configured to, after rendering the display area of the virtual scene based on the target disturbance channel, call a preset distance function to construct a gradient field matching the display area, and create a gradient field matching the display area in the display area. adding the gradient field; and adjusting the gradient area of the gradient field by using a preset smooth step function in response to the mask area control instruction.
  • an embodiment of the present application further provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned FIGS. 1 to 2 are implemented.
  • the technical solution of the present application can be embodied in the form of a software product, and the software product can be stored in a non-volatile storage medium (which may be CD-ROM, U disk, mobile hard disk, etc.), including several The instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in various implementation scenarios of this application.
  • a computer device which may be a personal computer, a server, or a network device, etc.
  • an embodiment of the present application further provides a computer device, which may specifically be a personal computer, a server, a network equipment, etc., the computer equipment includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to implement the above-mentioned methods for generating water wave effects as shown in FIG. 1 to FIG. 2 .
  • the computer device may further include a user interface, a network interface, a camera, a radio frequency (Radio Frequency, RF) circuit, a sensor, an audio circuit, a WI-FI module, and the like.
  • the user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, and the like.
  • Optional network interfaces may include standard wired interfaces, wireless interfaces (such as Bluetooth interfaces, WI-FI interfaces), and the like.
  • a computer device does not constitute a limitation on the computer device, and may include more or less components, or combine some components, or arrange different components.
  • the storage medium may also include an operating system and a network communication module.
  • An operating system is a program that manages and saves the hardware and software resources of computer equipment, supports the operation of information processing programs and other software and/or programs.
  • the network communication module is used to realize the communication between various components inside the storage medium, as well as the communication with other hardware and software in the physical device.
  • the preset perturbation effect map corresponding to the virtual scene of the special effect is obtained by sampling and offsetting the texture to obtain multiple target perturbation map data matching the texture, so as to sample the RG channel of the target perturbation map data, and render the screen UV corresponding to the virtual scene.
  • the perturbation of the screen is realized.
  • the embodiment of the present application does not need to perform real-time calculations, has lower running overhead, lower requirements on device performance, can meet the game requirements of more players, and can be customized by artists.
  • Different styles of perturbation special effects maps to enrich special effects, improve the art controllability of game special effects, improve game playability, and enable players to get a better game experience.
  • the accompanying drawing is only a schematic diagram of a preferred implementation scenario, and the modules or processes in the accompanying drawing are not necessarily necessary to implement the present application.
  • the modules in the device in the implementation scenario may be distributed in the device in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the implementation scenario with corresponding changes.
  • the modules of the above implementation scenarios may be combined into one module, or may be further split into multiple sub-modules.
  • Various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof.
  • a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in a computer device according to embodiments of the present invention.
  • DSP digital signal processor
  • the present invention can also be implemented as a program/instruction (eg, computer program/instruction and computer program product) for an apparatus or apparatus for performing some or all of the methods described herein.
  • Such programs/instructions implementing the present invention may be stored on a computer readable medium, or may exist in the form of one or more signals, such signals may be downloaded from an Internet website, or provided on a carrier signal, or in any form Available in other formats.
  • Computer-readable media includes both persistent and non-permanent, removable and non-removable media, and storage of information may be implemented by any method or technology.
  • Information may be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridges, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices.
  • PRAM phase-change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • ROM read only memory
  • EEPROM Electrically Erasable Programm
  • FIG. 7 schematically shows a computer device/device/system that can implement a method for generating water wave effects according to the present invention, the computer device/device/system including a processor 710 and a computer-readable medium in the form of a memory 720 .
  • Memory 720 is an example of a computer-readable medium having storage space 730 for storing computer programs/instructions 731 .
  • the computer program/instruction 731 is executed by the processor 710, each step in the method for generating a water wave effect described above can be implemented.
  • Figure 8 schematically shows a block diagram of a computer program product implementing the method according to the invention.
  • the computer program product includes a computer program/instructions 810 that, when executed by a processor such as the processor 710 shown in FIG. 7, can implement a water wave effect generation as described above steps in the method.

Landscapes

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

Abstract

本发明公开了一种水波特效生成方法及装置、存储介质、计算机设备,该方法包括:获取待生成水波特效的虚拟场景对应的预设扰动特效贴图,对所述预设扰动特效贴图进行采样偏移,确定多个目标扰动贴图;采样所述目标扰动贴图对应的目标扰动通道,其中,所述目标扰动通道包括R通道和G通道;基于所述目标扰动通道渲染所述虚拟场景的展示区域UV,以使所述展示区域附带有扰动特效。本申请不需要调用函数即时演算,运行开销较小,对设备性能要求低,能满足更多玩家的游戏需求,并且美术人员可以定制不同风格的扰动特效贴图,以丰富特效效果,提升了游戏特效的美术可控性,提升了游戏可玩性,使玩家获得更好的游戏体验。

Description

水波特效生成方法及装置、存储介质、计算机设备
交叉引用
本申请要求2021年3月19日递交的、申请号为“202110297519.0”、发明名称为“水波特效生成方法及装置、存储介质、计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及计算机技术领域,尤其是涉及到一种水波特效生成方法及装置、存储介质、计算机设备。
背景技术
随着游戏的不断发展,玩家对游戏的画面要求也越来越高。在制作游戏的虚拟场景时,为了使虚拟场景能够更富表现力,对于一些场景内特殊物品、景观需要添加特效,例如湖水水波的动态特效,以表现出水波涟漪的效果。
现有技术中,一般是采用直接在屏幕上模拟wave函数渲染水波纹,通过叠加多层来达到水波效果。这种通过函数渲染水波纹的方式美术可控性较低,并且效果和计算开销难以平衡,想要获得比较复杂的水波纹效果就需要叠加多次函数,开销较大,对设备要求较高,对玩家不够友好。
目前,游戏开发人员正在努力探索一种能够在控制开销的前提下提高特效表现力的方法。
发明内容
本发明提出以下技术方案以克服或者至少部分地解决或者减缓上述问题:
根据本发明的一个方面,提供了一种水波特效生成方法,包括:
获取待生成水波特效的虚拟场景对应的预设扰动特效贴图,对所述预设扰动特效贴图进行采样偏移,确定多个目标扰动贴图;
采样所述目标扰动贴图对应的目标扰动通道,其中,所述目标扰动通道包括R通道和G通道;
基于所述目标扰动通道渲染所述虚拟场景的展示区域UV,以使所述展示区域附带有扰动特效。
根据本发明的另一个方面,提供了一种水波特效生成装置,包括:
扰动贴图生成模块,用于获取待生成水波特效的虚拟场景对应的预设扰动特效贴图,对所述预设扰动特效贴图进行采样偏移,确定多个目标扰动贴图;
扰动通道采样模块,用于采样所述目标扰动贴图的目标扰动通道,其中,所述目标扰动通道包括R通道和G通道;
扰动特效生成模块,用于基于所述目标扰动通道渲染所述虚拟场景的展示区域UV,以使所述展示区域附带有扰动特效。
根据本发明的再一个方面,提供了一种计算机可读介质,其上存储有计算机程序/指令,所述计算机程序/指令被处理器执行时实现上述水波特效生成方法的步骤。
根据本发明的再一个方面,提供了一种计算机装置/设备/系统,包括存储器、处理器及存储在存储器上的计算机程序/指令,所述处理器执行所述计算机程序/指令时实现上述水波特效生成方法的步骤。
根据本发明的再一个方面,提供了一种计算机程序产品,包括计算机程序/指令,所述计算机程序/指令被处理器执行时实现上述水波特效生成方法的步骤。
根据本发明的又一个方面,提供了一种计算机设备,包括存储介质、处理器及存储在存储介质上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述水波特效生成方法的步骤。
借由上述技术方案,本发明提供的一种水波特效生成方法及装置、存储介质、计算机设备,利用一张事先绘制好的与待生成水波特效的虚拟场景对应的预设扰动特效贴图,通过对贴图进行采样偏移得到与该贴图匹配的多个目标扰动贴图数据,从而采样目标扰动贴图数据的RG通道,渲染虚拟场景对应的屏幕UV,以渲染得到附带有扰动特效 的虚拟场景,实现对屏幕的扰动。本申请实施例相比于现有技术通过函数模拟特效的方式来说,不需要进行即时演算,运行开销较小,对设备性能要求低,能满足更多玩家的游戏需求,并且美术人员可以定制不同风格的扰动特效贴图,以丰富特效效果,提升了游戏特效的美术可控性,提升了游戏可玩性,使玩家获得更好的游戏体验。
附图说明
通过阅读下文优选实施方式的详细描述,本发明的上述及各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。在附图中:
图1示出了本申请实施例提供的一种水波特效生成方法的流程示意图;
图2示出了本申请实施例提供的另一种水波特效生成方法的流程示意图;
图3示出了本申请实施例提供的一种未添加遮罩的水波特效效果示意图;
图4示出了本申请实施例提供的一种添加遮罩的水波特效效果示意图;
图5示出了本申请实施例提供的另一种添加遮罩的水波特效效果示意图;
图6示出了本申请实施例提供的一种水波特效生成装置的结构示意图;
图7示出了本申请实施例提供的一种计算机装置/设备/系统的示意图;
图8示出了本申请实施例提供的一种计算机程序产品的框图。
具体实施方式
下面结合附图和具体的实施方式对本发明作进一步的描述。以下描述仅为说明本发明的基本原理而并非对其进行限制。
在本实施例中提供了一种水波特效生成方法,如图1所示,该方法包括:
步骤101,获取待生成水波特效的虚拟场景对应的预设扰动特效贴 图,对所述预设扰动特效贴图进行采样偏移,确定多个目标扰动贴图;
本申请实施例可以应用于游戏领域中具体可以运行于游戏客户端,用于生成游戏内特效,当然也可以用于动画制作领域中,用于生成动画特效,虚拟场景具体可以包括游戏世界场景、动画场景。以应用于游戏领域的虚拟场景为例,本申请实施例中,虚拟场景中包括需要生成特效的区域,例如需要生成水波纹特效的水泊,美术人员可以根据美术表现需要,针对虚拟场景中需要生成特效的水泊区域制作扰动法线贴图,美术人员可以预先制作出多张扰动法线贴图以表现水泊区域的水波纹理,并作为预设扰动特效贴图,在生成特效时可以结合虚拟场景的实际需要从多张预设扰动特效贴图中选择其中的一张,提高生成特效的美术可控性。在该实施例中,根据虚拟场景待生成特效区域的实际需求选择一张预设扰动特效贴图,或随机选择一张预设扰动特效贴图,例如待生成特效区域为水泊区域,那么选择一张与水泊对应的预设扰动特效贴图,而后对这张预设扰动特效贴图进行采样偏移处理得到多组目标扰动贴图,以实现利用一张预设扰动特效贴图得到多张与该预设扰动特效贴图相关的扰动贴图的效果。
在本申请实施例中,目标扰动贴图可以通过对预设扰动特效贴图进行平移、旋转等方式处理得到,可选地,所述预设扰动特效贴图包括二维法线贴图,步骤101具体可以包括:按照多个预设偏移方向及其各自对应的预设偏移速度,分别对所述预设扰动特效贴图进行采样偏移,得到与每个预设偏移方向各自对应的多个扰动贴图分量,其中,所述预设偏移方向包括所述预设扰动特效贴图的对角线形成的四个方向;基于各预设偏移方向对应的扰动贴图分量,确定所述目标扰动贴图。
在上述实施例中,以对预设扰动特效贴图进行四方向平移采样为例,预设扰动特效贴图为二维法线贴图,具体形状可以为矩形,预设偏移方向为该矩形的两条对角线构成四个方向,需要说明的是,四个方向仅为本申请实施例的一种示例,本领域技术人员也可以根据实际需求设置预设偏移方向,另外,除预设偏移方向外,游戏制作人员还应设置与每个预设偏移方向对应的预设偏移速度,不同预设偏移方向对应的预设偏移速度可以相同也可以不同,进而按照预设偏移方向和对应的预设偏移速度控制预设扰动特效贴图偏移,并按相同的时间间 隔对偏移结果进行采样,得到每个预设偏移方向上的多组扰动贴图分量,进一步对相同采样时间的不同预设偏移方向对应的扰动贴图分量进行加权求和,使得UV移动看起来效果更加丰富。另外,本申请实施例预设偏移方向优选设置两个或两个以上,不同方向上的速度最好不同,以使特效减少平铺感,提升特效表现力。
步骤102,采样所述目标扰动贴图的目标扰动通道,其中,所述目标扰动通道包括R通道和G通道;
步骤103,基于所述目标扰动通道渲染所述虚拟场景的展示区域UV,以使所述展示区域附带有扰动特效。
进一步,分别对每组目标扰动贴图对应的RG通道进行采样,将采样得到的每个目标扰动贴图的RG通道作为目标扰动通道,最后利用多个目标扰动贴图对应的目标扰动通道渲染虚拟场景中的展示区域UV,将目标扰动贴图的RG通道加到屏幕UV上,从而扰动屏幕,采用法线贴图的RG通道分量配合多方向采样偏移来模拟真实的水波渲染,不需要通过函数进行即时演算,运行效率更高,运行开销小,对设备性能要求较低,对玩家更友好,并且特效效果也很丰富,美术人员可以通过定制扰动特效贴图来实现不同风格的水波特效效果,提高了游戏特效的美术可控性,提升游戏效果,提升游戏可玩性。
通过应用本实施例的技术方案,利用一张事先绘制好的与待生成水波特效的虚拟场景对应的预设扰动特效贴图,通过对贴图进行采样偏移得到与该贴图匹配的多个目标扰动贴图数据,从而采样目标扰动贴图数据的RG通道,渲染虚拟场景对应的屏幕UV,以渲染得到附带有扰动特效的虚拟场景,实现对屏幕的扰动。本申请实施例相比于现有技术通过函数模拟特效的方式来说,不需要进行即时演算,运行开销较小,对设备性能要求低,能满足更多玩家的游戏需求,并且美术人员可以定制不同风格的扰动特效贴图,以丰富特效效果,提升了游戏特效的美术可控性,提升了游戏可玩性,使玩家获得更好的游戏体验。
进一步的,作为上述实施例具体实施方式的细化和扩展,为了完整说明本实施例的具体实施过程,图2示出了本申请实施例提供的另一种水波特效生成方法,在如图1所示的方法基础上增加了焦散特效、遮罩特效,该方法包括:
步骤201,获取待生成水波特效的虚拟场景对应的预设扰动特效贴图,对所述预设扰动特效贴图进行采样偏移,确定多个目标扰动贴图。
步骤202,采样所述目标扰动贴图对应的目标扰动通道,其中,所述目标扰动通道包括R通道和G通道。
步骤203,基于所述目标扰动通道渲染所述虚拟场景的展示区域UV,以使所述展示区域附带有扰动特效。
在步骤201至步骤203中,利用一张美术人员预先定制的预设扰动特效贴图进行采样偏移、目标扰动通道获取,从而对虚拟场景的展示区域UV进行渲染,以使展示区域附带有扰动特效,例如附带有水波纹特效。
步骤204,获取所述虚拟场景对应的预设焦散特效贴图,采样所述预设焦散特效贴图对应的多组目标焦散通道,其中,所述预设焦散特效贴图为三维贴图。
步骤205,按照所述展示区域的颜色数据,调节所述目标焦散通道对应的焦散颜色;和/或,调用预设颜色函数,调节所述目标焦散通道对应的焦散颜色。
步骤206,基于所述目标焦散通道渲染所述展示区域UV,以使所述展示区域附带有焦散特效。
在步骤204至步骤206中,对于例如水波等特效类型来说,还可以对屏幕空间增加焦散效果,以增强特效的真实感。具体通过利用预设焦散特效贴图进行渲染的方式,预设焦散特效贴图为三维贴图,例如,采用一张利用64*64*64的三维贴图,来模拟焦散连续变化的效果,64*64*64的三维贴图相当于512分辨率的一张贴图,所需的暂用内存空间很小,而且由于是平铺的贴图,所以细节也很丰富,在手机上作为生成后效特效的贴图无论从效果还是内存占用、运行开销上都很适合。三维贴图虽然是静态的,但是储存了64种变化,普通的法线贴图是二维的,只能够平铺或者扰动,比如64*64的贴图,它的细节就非常少,但是再乘上一个维度64张64*64的细节,保存的动态效果就非常丰富了,可以保证焦散特效的效果。具体地,根据预设焦散特效三维贴图采样出焦散的颜色即采样得到目标焦散通道,然后获得屏幕空间渲染的结果即步骤203得出的展示区域渲染结果,利用目标焦散通道渲染展示区域UV,把这两者叠加在一起,使得虚拟场景的展示区域 附带有焦散特效,表现出折射效果。另外,在步骤205中,还可以对焦散颜色做了一些额外的处理,由于焦散是纯色的,导致焦散特效贴图颜色可能会和虚拟场景比较分离,因此可以对焦散颜色进行处理,具体可以按扰动特效渲染后的展示区域的颜色数据调节焦散颜色,也可以利用预设颜色函数对焦散颜色进行调节,例如利用屏幕空间的渲染结果与焦散颜色相乘,调用hue函数来对焦散颜色进行控制,以增强焦散颜色的可控性,提升焦散特效的渲染效果,增加水波特效真实感。与现有技术中通过高昂的运算来计算焦散颜色数据的方式相比,通过三维焦散贴图进行渲染以得到效果相似的焦散效果,本实施例通过三维焦散贴图模拟出细节丰富并且过度平滑的动态焦散效果,并且性能消耗非常低,系统开销小,能够满足更多机型的玩家的游戏需求。
在本申请实施例中,为平衡系统开销和特效表现力,可选地,步骤204中“获取所述虚拟场景对应的预设焦散特效贴图”,具体包括:获取客户端对应的渲染内存信息,并根据所述客户端的渲染内存大小选择所述预设焦散特效贴图。
在上述实施例中,读取游戏客户端设备对应的渲染内存大小、玩家设置的特效精细度数据、设备处理能力数据等信息,从而根据上述信息确定焦散特效贴图的最大维度,并依据最大维度选择一张匹配的预设焦散特效贴图,从而实现兼顾设备开销以及焦散特效效果的目的。
步骤207,获取所述虚拟场景对应的预设遮罩图像,并在所述展示区域中添加所述预设遮罩图像;或者,
步骤208,调用预设距离函数构建与所述展示区域匹配的渐变场,并在所述展示区域中添加所述渐变场;响应于遮罩区域控制指令,利用预设平滑阶梯函数调节所述渐变场的渐变区域。
本申请实施例中,由于添加了扰动效果,屏幕空间UV产生了偏移,屏幕边缘与未添加扰动效果的区域会有一定的撕裂,为避免撕裂影响虚拟场景的视觉效果,还可以在屏幕空间即展示区域内添加遮罩,以遮住屏幕边缘,对扰动区域和未扰动区域作一定的过渡,避免视觉上的撕裂。具体可以利用美术人员事先绘制的预设遮罩图像,也可以通过计算机调用函数绘制遮罩图像。如图3示出了本申请实施例提供的一种不添加遮罩的效果图。在步骤207中,如图4所示,获取美术人员事先绘制的预设遮罩图像,并在展示区域添加该预设遮罩图像, 遮盖屏幕边缘,美术人员可以根据需要绘制一张灰度图作为预设遮罩图像,图像可以自定义为规则或不规则的形状,通过绘制的遮罩图像美术化程度较高。而在步骤208中,如图5所示,调用预设距离函数构建与屏幕空间匹配的渐变场,并将渐变场添加到屏幕空间中,节省贴图并提高精度,例如Distance(Screen Position,(0.5,0.5))函数来构建二维圆形渐变场,另外,渐变场的渐变区域大小还可以通过函数进行调节,例如使用smooth step函数的最大值和最小值两个参数来控制渐变区域,通过计算确定的遮罩图像无需进行采样,并且图像精度高,过渡效果较好。添加遮罩后的展示区域会增加边缘至中心的渐变效果,画面更富有类似幻境、梦境、或回忆这类图像的质感,通过添加合适的遮罩,即使对屏幕空间的扰动偏移值较大,也可以在遮罩的过渡下,在玩家视觉上可以减弱周围撕裂效果。
通过应用本实施例的技术方案,其一,采用扰动法线图的RG通道,配合四方向采样偏移,来模拟真实的特效渲染,提高运行效率的同时,能够保证特效效果的丰富程度,方便美术人员通过定制贴图来实现各种不同风格的特效效果。其二,利用三维焦散贴图,模拟出细节丰富并且过度平滑的动态焦散效果,降低系统性能消耗。其三,可以提供多样化的遮罩图像,来区分水波区域和正常区域,配合高自由度的参数调节满足美术和策划的多样需求。
进一步的,作为图1方法的具体实现,本申请实施例提供了一种水波特效生成装置,如图6所示,该装置包括:
扰动贴图生成模块,用于获取待生成水波特效的虚拟场景对应的预设扰动特效贴图,对所述预设扰动特效贴图进行采样偏移,确定多个目标扰动贴图;
扰动通道采样模块,用于采样所述目标扰动贴图的目标扰动通道,其中,所述目标扰动通道包括R通道和G通道;
扰动特效生成模块,用于基于所述目标扰动通道渲染所述虚拟场景的展示区域UV,以使所述展示区域附带有扰动特效。
在具体的应用场景中,可选地,所述预设扰动特效贴图包括二维法线贴图;所述扰动贴图生成模块,确定多个目标扰动贴图,具体用于:
按照多个预设偏移方向及其各自对应的预设偏移速度,分别对所 述预设扰动特效贴图进行采样偏移,得到与每个预设偏移方向各自对应的多个扰动贴图分量,其中,所述预设偏移方向包括所述预设扰动特效贴图的对角线形成的四个方向;
基于各预设偏移方向对应的扰动贴图分量,确定所述目标扰动贴图。
在具体的应用场景中,可选地,所述装置还包括:
焦散通道采样模块,用于所述基于所述目标扰动通道渲染所述虚拟场景的展示区域UV之后,获取所述虚拟场景对应的预设焦散特效贴图,采样所述预设焦散特效贴图对应的多组目标焦散通道,其中,所述预设焦散特效贴图为三维贴图;
焦散特效生成模块,用于基于所述目标焦散通道渲染所述展示区域UV,以使所述展示区域附带有焦散特效。
在具体的应用场景中,可选地,所述装置还包括:
焦散颜色调节模块,用于所述基于所述目标焦散通道渲染所述展示区域之前,按照所述展示区域的颜色数据,调节所述目标焦散通道对应的焦散颜色;和/或,调用预设颜色函数,调节所述目标焦散通道对应的焦散颜色。
在具体的应用场景中,可选地,所述焦散通道采样模块,具体用于:
获取客户端对应的渲染内存信息,并根据所述客户端的渲染内存大小选择所述预设焦散特效贴图。
在具体的应用场景中,可选地,所述装置还包括:
第一遮罩生成模块,用于所述基于所述目标扰动通道渲染所述虚拟场景的展示区域之后,获取所述虚拟场景对应的预设遮罩图像,并在所述展示区域中添加所述预设遮罩图像。
在具体的应用场景中,可选地,所述装置还包括:
第二遮罩生成模块,用于所述基于所述目标扰动通道渲染所述虚拟场景的展示区域之后,调用预设距离函数构建与所述展示区域匹配的渐变场,并在所述展示区域中添加所述渐变场;响应于遮罩区域控制指令,利用预设平滑阶梯函数调节所述渐变场的渐变区域。
需要说明的是,本申请实施例提供的一种水波特效生成装置所涉及各功能单元的其他相应描述,可以参考图1至图2方法中的对应描 述,在此不再赘述。
基于上述如图1至图2所示方法,相应的,本申请实施例还提供了一种存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述如图1至图2所示的水波特效生成方法。
基于这样的理解,本申请的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施场景所述的方法。
基于上述如图1至图2所示的方法,以及图6所示的虚拟装置实施例,为了实现上述目的,本申请实施例还提供了一种计算机设备,具体可以为个人计算机、服务器、网络设备等,该计算机设备包括存储介质和处理器;存储介质,用于存储计算机程序;处理器,用于执行计算机程序以实现上述如图1至图2所示的水波特效生成方法。
可选地,该计算机设备还可以包括用户接口、网络接口、摄像头、射频(Radio Frequency,RF)电路,传感器、音频电路、WI-FI模块等等。用户接口可以包括显示屏(Display)、输入单元比如键盘(Keyboard)等,可选用户接口还可以包括USB接口、读卡器接口等。网络接口可选的可以包括标准的有线接口、无线接口(如蓝牙接口、WI-FI接口)等。
本领域技术人员可以理解,本实施例提供的一种计算机设备结构并不构成对该计算机设备的限定,可以包括更多或更少的部件,或者组合某些部件,或者不同的部件布置。
存储介质中还可以包括操作系统、网络通信模块。操作系统是管理和保存计算机设备硬件和软件资源的程序,支持信息处理程序以及其它软件和/或程序的运行。网络通信模块用于实现存储介质内部各组件之间的通信,以及与该实体设备中其它硬件和软件之间通信。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本申请可以借助软件加必要的通用硬件平台的方式来实现,也可以通过硬件实现利用一张事先绘制好的与待生成水波特效的虚拟场景对应的预设扰动特效贴图,通过对贴图进行采样偏移得到与该贴图匹配的多个目标扰动贴图数据,从而采样目标扰动贴图数据的RG通道,渲 染虚拟场景对应的屏幕UV,以渲染得到附带有扰动特效的虚拟场景,实现对屏幕的扰动。本申请实施例相比于现有技术通过函数模拟特效的方式来说,不需要进行即时演算,运行开销较小,对设备性能要求低,能满足更多玩家的游戏需求,并且美术人员可以定制不同风格的扰动特效贴图,以丰富特效效果,提升了游戏特效的美术可控性,提升了游戏可玩性,使玩家获得更好的游戏体验。
本领域技术人员可以理解附图只是一个优选实施场景的示意图,附图中的模块或流程并不一定是实施本申请所必须的。本领域技术人员可以理解实施场景中的装置中的模块可以按照实施场景描述进行分布于实施场景的装置中,也可以进行相应变化位于不同于本实施场景的一个或多个装置中。上述实施场景的模块可以合并为一个模块,也可以进一步拆分成多个子模块。
上述本申请序号仅仅为了描述,不代表实施场景的优劣。以上公开的仅为本申请的几个具体实施场景,但是,本申请并非局限于此,任何本领域的技术人员能思之的变化都应落入本申请的保护范围。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的计算机设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置的程序/指令(例如,计算机程序/指令和计算机程序产品)。这样的实现本发明的程序/指令可以存储在计算机可读介质上,或者可以一个或者多个信号的形式存在,这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘 (DVD)或其他光学存储、磁盒式磁带、磁盘存储、量子存储器、基于石墨烯的存储介质或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。
图7示意性地示出了可以实现根据本发明的一种水波特效生成方法的计算机装置/设备/系统,该计算机装置/设备/系统包括处理器710和以存储器720形式的计算机可读介质。存储器720是计算机可读介质的一个示例,其具有用于存储计算机程序/指令731的存储空间730。当所述计算机程序/指令731由处理器710执行时,可实现上文所描述的一种水波特效生成方法中的各个步骤。
图8示意性地示出了实现根据本发明的方法的计算机程序产品的框图。所述计算机程序产品包括计算机程序/指令810,当所述计算机程序/指令810被诸如图7所示的处理器710之类的处理器执行时,可实现上文所描述的一种水波特效生成方法中的各个步骤。
上文对本说明书特定实施例进行了描述,其与其它实施例一并涵盖于所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定遵循示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可行的或者有利的。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
应可理解,以上所述实施例仅为举例说明本发明之目的而并非对本发明进行限制。在不脱离本发明基本精神及特性的前提下,本领域技术人员还可以通过其他方式来实施本发明。本发明的范围当以后附的权利要求为准,凡在本说明书一个或多个实施例的精神和原则之内所做的任何修改、等同替换、改进等,皆应涵盖其中。

Claims (11)

  1. 一种水波特效生成方法,其特征在于,包括:
    获取待生成水波特效的虚拟场景对应的预设扰动特效贴图,对所述预设扰动特效贴图进行采样偏移,确定多个目标扰动贴图;
    采样所述目标扰动贴图对应的目标扰动通道,其中,所述目标扰动通道包括R通道和G通道;
    基于所述目标扰动通道渲染所述虚拟场景的展示区域UV,以使所述展示区域附带有扰动特效。
  2. 根据权利要求1所述的方法,其特征在于,所述预设扰动特效贴图包括二维法线贴图;所述对所述预设扰动特效贴图进行采样偏移,确定多个目标扰动贴图,具体包括:
    按照多个预设偏移方向及其各自对应的预设偏移速度,分别对所述预设扰动特效贴图进行采样偏移,得到与每个预设偏移方向各自对应的多个扰动贴图分量,其中,所述预设偏移方向包括所述预设扰动特效贴图的对角线形成的四个方向;
    基于各预设偏移方向对应的扰动贴图分量,确定所述目标扰动贴图。
  3. 根据权利要求1所述的方法,其特征在于,所述基于所述目标扰动通道渲染所述虚拟场景的展示区域UV之后,所述方法还包括:
    获取所述虚拟场景对应的预设焦散特效贴图,采样所述预设焦散特效贴图对应的多组目标焦散通道,其中,所述预设焦散特效贴图为三维贴图;
    基于所述目标焦散通道渲染所述展示区域UV,以使所述展示区域附带有焦散特效。
  4. 根据权利要求3所述的方法,其特征在于,所述基于所述目标焦散通道渲染所述展示区域之前,所述方法还包括:
    按照所述展示区域的颜色数据,调节所述目标焦散通道对应的焦散颜色;和/或,
    调用预设颜色函数,调节所述目标焦散通道对应的焦散颜色。
  5. 根据权利要求3所述的方法,其特征在于,所述获取所述虚拟场景对应的预设焦散特效贴图,具体包括:
    获取客户端对应的渲染内存信息,并根据所述客户端的渲染内存大小选择所述预设焦散特效贴图。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述基于所述目标扰动通道渲染所述虚拟场景的展示区域之后,所述方法还包括:
    获取所述虚拟场景对应的预设遮罩图像,并在所述展示区域中添加所述预设遮罩图像。
  7. 根据权利要求1至5中任一项所述的方法,其特征在于,所述基于所述目标扰动通道渲染所述虚拟场景的展示区域之后,所述方法还包括:
    调用预设距离函数构建与所述展示区域匹配的渐变场,并在所述展示区域中添加所述渐变场;
    响应于遮罩区域控制指令,利用预设平滑阶梯函数调节所述渐变场的渐变区域。
  8. 一种水波特效生成装置,其特征在于,包括:
    扰动贴图生成模块,用于获取待生成水波特效的虚拟场景对应的预设扰动特效贴图,对所述预设扰动特效贴图进行采样偏移,确定多个目标扰动贴图;
    扰动通道采样模块,用于采样所述目标扰动贴图的目标扰动通道,其中,所述目标扰动通道包括R通道和G通道;
    扰动特效生成模块,用于基于所述目标扰动通道渲染所述虚拟场景的展示区域UV,以使所述展示区域附带有扰动特效。
  9. 一种计算机装置/设备/系统,包括存储器、处理器及存储在存储器上的计算机程序/指令,所述处理器执行所述计算机程序/指令时实现根据权利要求1-7中任一项所述的方法中的步骤。
  10. 一种计算机可读介质,其上存储有计算机程序/指令,所述计算机程序/指令被处理器执行时实现根据权利要求1-7中任一项所述的方法中的步骤。
  11. 一种计算机程序产品,包括计算机程序/指令,所述计算机程序/指令被处理器执行时实现根据权利要求1-7中任一项所述的方法中的步骤。
PCT/CN2021/121446 2021-03-19 2021-09-28 水波特效生成方法及装置、存储介质、计算机设备 WO2022193614A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110297519.0 2021-03-19
CN202110297519.0A CN112967367B (zh) 2021-03-19 2021-03-19 水波特效生成方法及装置、存储介质、计算机设备

Publications (1)

Publication Number Publication Date
WO2022193614A1 true WO2022193614A1 (zh) 2022-09-22

Family

ID=76279482

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/121446 WO2022193614A1 (zh) 2021-03-19 2021-09-28 水波特效生成方法及装置、存储介质、计算机设备

Country Status (2)

Country Link
CN (1) CN112967367B (zh)
WO (1) WO2022193614A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112967367B (zh) * 2021-03-19 2022-04-08 完美世界(北京)软件科技发展有限公司 水波特效生成方法及装置、存储介质、计算机设备
CN113457137B (zh) * 2021-06-30 2022-05-17 完美世界(北京)软件科技发展有限公司 游戏场景生成方法、装置、计算机设备及可读存储介质
CN113450443B (zh) * 2021-07-08 2023-03-24 网易(杭州)网络有限公司 海面模型的渲染方法和装置
CN116342784B (zh) * 2023-05-25 2023-07-21 湖南马栏山视频先进技术研究院有限公司 大场景水体交互的实时渲染方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107886562A (zh) * 2017-12-05 2018-04-06 北京像素软件科技股份有限公司 水面渲染方法、装置及可读存储介质
CN111467805A (zh) * 2020-05-11 2020-07-31 网易(杭州)网络有限公司 虚拟场景动态变化的实现方法及装置、介质及电子设备
CN111986303A (zh) * 2020-09-09 2020-11-24 网易(杭州)网络有限公司 流体渲染方法、装置、存储介质及终端设备
CN112241993A (zh) * 2020-11-30 2021-01-19 成都完美时空网络技术有限公司 游戏图像处理方法、装置及电子设备
CN112967367A (zh) * 2021-03-19 2021-06-15 完美世界(北京)软件科技发展有限公司 水波特效生成方法及装置、存储介质、计算机设备

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170045809A (ko) * 2015-10-20 2017-04-28 삼성전자주식회사 커스틱을 표현하는 방법 및 장치

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107886562A (zh) * 2017-12-05 2018-04-06 北京像素软件科技股份有限公司 水面渲染方法、装置及可读存储介质
CN111467805A (zh) * 2020-05-11 2020-07-31 网易(杭州)网络有限公司 虚拟场景动态变化的实现方法及装置、介质及电子设备
CN111986303A (zh) * 2020-09-09 2020-11-24 网易(杭州)网络有限公司 流体渲染方法、装置、存储介质及终端设备
CN112241993A (zh) * 2020-11-30 2021-01-19 成都完美时空网络技术有限公司 游戏图像处理方法、装置及电子设备
CN112967367A (zh) * 2021-03-19 2021-06-15 完美世界(北京)软件科技发展有限公司 水波特效生成方法及装置、存储介质、计算机设备

Also Published As

Publication number Publication date
CN112967367B (zh) 2022-04-08
CN112967367A (zh) 2021-06-15

Similar Documents

Publication Publication Date Title
WO2022193614A1 (zh) 水波特效生成方法及装置、存储介质、计算机设备
Lin et al. Virtual geographic environments: a primer
CN108959392B (zh) 在3d模型上展示富文本的方法、装置及设备
US7019742B2 (en) Dynamic 2D imposters of 3D graphic objects
CN105913471B (zh) 图片处理的方法和装置
Madhav Game programming algorithms and techniques: a platform-agnostic approach
CN112135161A (zh) 虚拟礼物的动效展示方法及装置、存储介质及电子设备
US20230290043A1 (en) Picture generation method and apparatus, device, and medium
US20100315421A1 (en) Generating fog effects in a simulated environment
CN113885829B (zh) 一种音效展示方法及终端设备
JPH11175748A (ja) 画像生成装置及び情報記憶媒体
WO2017174006A1 (zh) 图片处理的方法和装置
CN106730842A (zh) 一种游戏动画显示方法和装置
WO2023151211A1 (zh) 模型防穿插方法及装置、电子设备、存储介质
Swalwell Classic gaming
KR101951225B1 (ko) 물리엔진을 사용하지 않는 리얼타임 렌더링 오브젝트 표현 방법 및 시스템
JP2006323512A (ja) 画像生成システム、プログラム及び情報記憶媒体
CN115830210A (zh) 虚拟对象的渲染方法、装置、电子设备及存储介质
CN112587915B (zh) 光照效果呈现方法、装置、存储介质及计算机设备
CN112274932B (zh) 游戏资源数据处理方法及装置、存储介质、计算机设备
CN113885828A (zh) 一种音效展示方法及终端设备
JP4637199B2 (ja) 画像処理装置、画像処理方法、ならびに、プログラム
Zhang Conflict and Blending between Traditional Film and Television Art and New Digital Media Based on 3D Virtual Technology
Lou The LOST: An Attempt to Combine Film and Game
WO2024077492A1 (zh) 播放界面的显示方法、装置、设备、介质及程序产品

Legal Events

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

Ref document number: 21931189

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21931189

Country of ref document: EP

Kind code of ref document: A1