Method and device for rendering self-luminous of virtual model, storage medium and electronic device

CN115375829BActive Publication Date: 2026-09-08NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210860047.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-21
Publication Date
2026-09-08
Estimated Expiration
2042-07-21

AI Technical Summary

Technical Problem

[0006]本发明实施例提供了一种虚拟模型的自发光渲染方法、装置、存储介质及电子装置,以至少解决相关技术中基于额外摆放的贴图进行自发光流动渲染的方法其控制精度低、渲染稳定性差的技术问题

Benefits of technology

[0027] In at least some embodiments of the present invention, by acquiring a first texture, a second texture, and a third texture corresponding to the self-illuminating region of the target virtual model, wherein the first texture is a self-illuminating texture of the self-illuminating region, the second texture is a grayscale texture of the self-illuminating flow direction of the self-illuminating region, and the third texture is a noise texture of the self-illuminating region, and by determining a first parameter based on the first texture and a second parameter based on the second and third textures, wherein the first parameter is the initial self-illuminating parameter of the self-illuminating region and the second parameter is the noise parameter of the self-illuminating region, and further rendering the self-illuminating region according to the first and second parameters, the purpose of rendering self-illuminating flow based on the self-illuminating texture, grayscale texture, and noise texture of the self-illuminating region on the target virtual model is achieved. This achieves the technical effect of improving the control accuracy and rendering stability of self-illuminating flow without the need for additional texture placement, thereby solving the technical problems of low control accuracy and poor rendering stability of self-illuminating flow rendering methods based on additional texture placement in related technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115375829B_ABST
    Figure CN115375829B_ABST
Patent Text Reader

Abstract

The application discloses a self-luminous rendering method and device of a virtual model, a storage medium and an electronic device. The method comprises the following steps: obtaining a first map, a second map and a third map corresponding to a self-luminous area of a target virtual model, wherein the first map is a self-luminous map of the self-luminous area, the second map is a gray map of a self-luminous flow direction of the self-luminous area, and the third map is a noise map of the self-luminous area; determining a first parameter based on the first map, and determining a second parameter based on the second map and the third map, wherein the first parameter is an initial self-luminous parameter of the self-luminous area, and the second parameter is a noise parameter of the self-luminous area; and rendering the self-luminous area according to the first parameter and the second parameter. The application solves the technical problems of low control precision and poor rendering stability of the method for self-luminous flow rendering based on an additional placed map in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically, to a method, apparatus, storage medium, and electronic device for rendering a virtual model with self-illumination. Background Technology

[0002] Self-illuminating rendering refers to a rendering method that keeps the color parameters of the surface materials of a virtual model within the High-Dynamic Range (HDR). Self-illuminating rendering is one of the important methods for achieving special effects on virtual models (such as virtual characters and virtual props) in virtual scenes. With the development of computer technology and the improvement of user aesthetics, the static self-illuminating effects obtained by traditional self-illuminating rendering methods are difficult to meet the artistic needs of application scenarios. Therefore, technicians in related fields are constantly trying various self-illuminating flow rendering methods.

[0003] The self-illuminating flow rendering methods provided by related technologies mainly involve placing an additional set of model UV maps in the direction of self-illumination flow, determining the direction of self-illumination flow through shaders, and associating this direction with the model's self-illumination maps to control the self-illumination flow. However, this method has drawbacks: it relies on the model's polygon count and the placement of the model's UV maps, which may lead to low accuracy of self-illumination flow and poor rendering effects; the additional UV maps result in high device resource consumption, high system complexity, and poor stability; and it is difficult to produce artwork.

[0004] There is currently no effective solution to the above problems.

[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] This invention provides a method, apparatus, storage medium, and electronic device for self-illuminating rendering of virtual models, to at least solve the technical problems of low control precision and poor rendering stability in related technologies that rely on additionally placed textures for self-illuminating flow rendering.

[0007] According to one aspect of the present invention, a self-illuminating rendering method for a virtual model is provided, comprising:

[0008] Obtain the first, second, and third textures corresponding to the self-illuminating region of the target virtual model, wherein the first texture is the self-illuminating texture of the self-illuminating region, the second texture is the grayscale texture of the self-illuminating region in the direction of self-illumination flow, and the third texture is the noise texture of the self-illuminating region; determine a first parameter based on the first texture, and determine a second parameter based on the second and third textures, wherein the first parameter is the initial self-illuminating parameter of the self-illuminating region, and the second parameter is the noise parameter of the self-illuminating region; render the self-illuminating region according to the first and second parameters.

[0009] Optionally, determining the first parameter based on the first texture includes: sampling the first texture using an initial texture sampling method to obtain the first parameter.

[0010] Optionally, determining the second parameter based on the second and third textures includes: sampling the second texture using an initial texture sampling method to obtain the third parameter, wherein the third parameter is the self-illumination flow parameter of the self-illuminating region; determining the target texture sampling method based on the third parameter; and sampling the third texture using the target texture sampling method to obtain the second parameter.

[0011] Optionally, determining the target texture sampling method based on the third parameter includes: obtaining a fourth parameter, wherein the fourth parameter is used to control the displacement of the self-illuminating flow in the self-illuminating region; adjusting the third parameter using the fourth parameter to obtain the adjustment result; and determining the target texture sampling method based on the adjustment result.

[0012] Optionally, rendering the self-illuminating region based on the first parameter and the second parameter includes: performing a multiplication operation on the first parameter and the second parameter to obtain the self-illuminating color of the self-illuminating region; and rendering the self-illuminating color through the rendering pipeline.

[0013] Optionally, obtaining the second texture corresponding to the self-illuminating region of the target virtual model includes: drawing the self-illuminating flow direction of the self-illuminating region to obtain self-illuminating flow information; and baking the self-illuminating flow information to obtain the second texture.

[0014] Optionally, drawing the self-illuminating flow direction of the self-illuminating region to obtain self-illuminating flow information includes: determining a first gray value and a second gray value based on the self-illuminating flow direction of the self-illuminating region, wherein the first gray value is used to determine the starting point of the self-illuminating flow direction and the second gray value is used to determine the ending point of the self-illuminating flow direction; using the first gray value and the second gray value, controlling the brush to perform linear drawing to obtain self-illuminating flow information.

[0015] Optionally, the self-illuminating rendering method for the virtual model described above further includes one of the following: storing the first texture and the second texture independently; storing the second texture in the transparency channel of the first texture.

[0016] According to another aspect of the present invention, a self-illuminating rendering apparatus for a virtual model is also provided, comprising:

[0017] The acquisition module is used to acquire a first texture, a second texture, and a third texture corresponding to the self-illuminating region of the target virtual model. The first texture is the self-illuminating texture of the self-illuminating region, the second texture is a grayscale texture showing the self-illuminating flow direction of the self-illuminating region, and the third texture is a noise texture of the self-illuminating region. The determination module is used to determine a first parameter based on the first texture and a second parameter based on the second and third textures. The first parameter is the initial self-illuminating parameter of the self-illuminating region, and the second parameter is the noise parameter of the self-illuminating region. The rendering module is used to render the self-illuminating region according to the first and second parameters.

[0018] Optionally, the aforementioned determining module is further configured to: sample the first texture using an initial texture sampling method to obtain the first parameter.

[0019] Optionally, the aforementioned determining module is further configured to: sample the second texture using an initial texture sampling method to obtain a third parameter, wherein the third parameter is the self-illumination flow parameter of the self-illuminating region; determine the target texture sampling method based on the third parameter; and sample the third texture using the target texture sampling method to obtain the second parameter.

[0020] Optionally, the aforementioned determining module is further configured to: obtain a fourth parameter, wherein the fourth parameter is used to control the displacement of the self-illuminating flow in the self-illuminating region; adjust the third parameter using the fourth parameter to obtain an adjustment result; and determine the target texture sampling method based on the adjustment result.

[0021] Optionally, the rendering module described above is further configured to: perform a multiplication operation on the first parameter and the second parameter to obtain the self-illuminating color of the self-illuminating region; and render the self-illuminating color through the rendering pipeline.

[0022] Optionally, the acquisition module described above is further configured to: draw the self-illumination flow direction of the self-illuminating region to obtain self-illumination flow information; and bake the self-illumination flow information to obtain a second texture.

[0023] Optionally, the acquisition module described above is further configured to: determine a first grayscale value and a second grayscale value based on the self-illuminating flow direction of the self-illuminating region, wherein the first grayscale value is used to determine the starting point of the self-illuminating flow direction and the second grayscale value is used to determine the ending point of the self-illuminating flow direction; and use the first grayscale value and the second grayscale value to control the brush to perform linear drawing to obtain the self-illuminating flow information.

[0024] Optionally, the self-illuminating rendering device for the virtual model further includes: a storage module for independently storing the first texture and the second texture; or for storing the second texture into the transparency channel of the first texture.

[0025] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute the self-illuminating rendering method of the virtual model in any of the above embodiments when running.

[0026] According to another aspect of the present invention, an electronic device is also provided, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the self-illuminating rendering method of the virtual model in any of the preceding embodiments.

[0027] In at least some embodiments of the present invention, by acquiring a first texture, a second texture, and a third texture corresponding to the self-illuminating region of the target virtual model, wherein the first texture is a self-illuminating texture of the self-illuminating region, the second texture is a grayscale texture of the self-illuminating flow direction of the self-illuminating region, and the third texture is a noise texture of the self-illuminating region, and by determining a first parameter based on the first texture and a second parameter based on the second and third textures, wherein the first parameter is the initial self-illuminating parameter of the self-illuminating region and the second parameter is the noise parameter of the self-illuminating region, and further rendering the self-illuminating region according to the first and second parameters, the purpose of rendering self-illuminating flow based on the self-illuminating texture, grayscale texture, and noise texture of the self-illuminating region on the target virtual model is achieved. This achieves the technical effect of improving the control accuracy and rendering stability of self-illuminating flow without the need for additional texture placement, thereby solving the technical problems of low control accuracy and poor rendering stability of self-illuminating flow rendering methods based on additional texture placement in related technologies. Attached Figure Description

[0028] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:

[0029] Figure 1 This is a hardware structure block diagram of a mobile terminal for a self-illuminating rendering method of a virtual model according to an embodiment of the present invention.

[0030] Figure 2 This is a flowchart of a self-illuminating rendering method for a virtual model according to an embodiment of the present invention;

[0031] Figure 3 This is a schematic diagram of an optional self-illuminating rendering process according to an embodiment of the present invention;

[0032] Figure 4 This is a schematic diagram of an optional self-illuminating flow direction drawing process according to an embodiment of the present invention;

[0033] Figure 5 This is a schematic diagram of an optional noise information map according to an embodiment of the present invention;

[0034] Figure 6 This is a schematic diagram of an optional self-illuminating rendering result according to an embodiment of the present invention;

[0035] Figure 7 This is a structural block diagram of a self-illuminating rendering device for a virtual model according to an embodiment of the present invention;

[0036] Figure 8 This is a structural block diagram of an optional self-illuminating rendering device for a virtual model according to an embodiment of the present invention;

[0037] Figure 9 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0038] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0039] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0040] According to one embodiment of the present invention, an embodiment of a self-illuminating rendering method for a virtual model is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0041] In one embodiment of the present invention, the self-illuminating rendering method for virtual models can run on a terminal device or a server. The terminal device can be a local terminal device. When the self-illuminating rendering method for virtual models runs on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and client devices.

[0042] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program and the game screen presentation are separated. The storage and execution of the virtual model's self-illuminating rendering method are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, the terminal device for information processing is the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses the game screen and other data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.

[0043] In an alternative implementation, the terminal device can be a local terminal device. Taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, conventionally downloading, installing, and running the game program via an electronic device. The local terminal device can provide the graphical user interface to the player in various ways, such as rendering it on the terminal's display screen, or providing it to the player through holographic projection. For example, the local terminal device can include a display screen for displaying the graphical user interface, which includes game screens, and a processor for running the game, generating the graphical user interface, and controlling the display of the graphical user interface on the display screen.

[0044] In one possible implementation, this invention provides a self-illuminating rendering method for a virtual model, which provides a graphical user interface through a terminal device. The terminal device can be either the aforementioned local terminal device or a client device in the aforementioned cloud interaction system.

[0045] Taking a mobile terminal running on a local terminal device as an example, the mobile terminal can be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet Device (MID), a PAD, a game console, and other terminal devices. Figure 1 This is a hardware structure block diagram of a mobile terminal for a self-illuminating rendering method of a virtual model according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a central processing unit (CPU), graphics processing unit (GPU), digital signal processing (DSP) chip, microprocessor (MCU), programmable logic device (FPGA), neural network processor (NPU), tensor processor (TPU), artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data are also shown. Optionally, the mobile terminal may further include a transmission device 106 for communication functions, an input / output device 108, and a display device 110. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0046] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the self-illuminating rendering method for virtual models in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the aforementioned self-illuminating rendering method for virtual models. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0047] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0048] The inputs in input / output device 108 can come from multiple human interface devices (HIDs). Examples include keyboards and mice, gamepads, and other dedicated game controllers (such as steering wheels, fishing rods, dance mats, and remote controls). Some HIDs, in addition to providing input functions, can also provide output functions, such as force feedback and vibration from gamepads, and audio output from controllers.

[0049] Display device 110 may be, for example, a head-up display (HUD), a touchscreen liquid crystal display (LCD), and a touch display (also referred to as a "touchscreen" or "touch display"). The LCD allows a user to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), which allows the user to interact with the GUI via finger contact and / or gestures on a touch-sensitive surface. Optional human-computer interaction functions include: creating web pages, drawing, word processing, creating electronic documents, playing games, video conferencing, instant messaging, sending and receiving emails, a call interface, playing digital video, playing digital music, and / or web browsing, etc. Executable instructions for performing the above human-computer interaction functions are configured / stored in one or more processor-executable computer program products or computer-readable storage media.

[0050] In one embodiment of the present invention, the self-illuminating rendering method for virtual models can run on a local terminal device or a server. When the self-illuminating rendering method for virtual models runs on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.

[0051] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program and the game screen presentation are separated. The storage and execution of the virtual model's self-illuminating rendering method are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, the information processing is performed by the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses the game screen and other data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.

[0052] In an optional implementation, taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface (GUI), i.e., conventionally by downloading, installing, and running the game program via an electronic device. The local terminal device can provide the GUI to the player in various ways, such as rendering it on the terminal's display screen or providing it to the player via holographic projection. For example, the local terminal device can include a display screen for displaying the GUI, which includes game screens, and a processor for running the game, generating the GUI, and controlling the display of the GUI on the display screen.

[0053] In one possible implementation, this invention provides a self-illuminating rendering method for a virtual model, which provides a graphical user interface through a terminal device. The terminal device can be either the aforementioned local terminal device or a client device in the aforementioned cloud interaction system. Figure 2 This is a flowchart of a self-illuminating rendering method for a virtual model according to an embodiment of the present invention, such as... Figure 2 As shown, the method includes the following steps:

[0054] Step S21: Obtain the first texture, second texture and third texture corresponding to the self-illuminating area of ​​the target virtual model, wherein the first texture is the self-illuminating texture of the self-illuminating area, the second texture is the grayscale texture of the self-illuminating flow direction of the self-illuminating area, and the third texture is the noise texture of the self-illuminating area.

[0055] The aforementioned target virtual model can be a virtual object in a virtual game scene that requires rendering a self-illuminating effect. For example, the target virtual model can be a virtual character (including the virtual character's body, accessories, and special effects, etc.), virtual props, etc.

[0056] The aforementioned self-illuminating area can be part or all of the surface of the target virtual model, and this part or all of the area needs to be rendered with a self-illuminating effect.

[0057] The first texture corresponding to the aforementioned self-illuminating region is the self-illuminating texture of that region, which is used to determine the static self-illuminating effect of the region. This self-illuminating region allows for the identification of the self-illuminating area on the surface of the target virtual model, and enables individual control over the self-illuminating color of that region, unaffected by ambient light.

[0058] The second texture corresponding to the aforementioned self-illuminating region is a grayscale texture of the self-illuminating flow direction of the self-illuminating region. The grayscale information contained in the grayscale texture is used to determine the self-illuminating flow direction of the self-illuminating region.

[0059] The third texture corresponding to the self-illuminating area is a noise texture of that self-illuminating area. The noise information contained in the noise texture is used to determine the random effect of the self-illuminating flow within the self-illuminating area.

[0060] Specifically, obtaining the first, second, and third textures corresponding to the self-illuminating regions of the target virtual model also includes other methods and steps, which can be referred to in the further description of the embodiments of the present invention below, and will not be repeated here.

[0061] Step S22: Determine the first parameter based on the first texture, and determine the second parameter based on the second and third textures, wherein the first parameter is the initial self-illumination parameter of the self-illuminating region, and the second parameter is the noise parameter of the self-illuminating region;

[0062] The first parameter is determined based on the first texture. Specifically, the initial self-illumination parameters of the self-illuminating region are determined based on the self-illuminating texture corresponding to the self-illuminating region of the target virtual model. These initial self-illumination parameters are used to render the self-illuminating region.

[0063] The second parameter is determined based on the second and third textures mentioned above. Specifically, the noise parameter of the self-illuminating region is determined based on the grayscale texture and noise texture corresponding to the self-illuminating region of the target virtual model. This noise parameter is used to render the self-illuminating region.

[0064] Specifically, determining the first parameter based on the first texture and determining the second parameter based on the second and third textures also includes other methods and steps, which can be referred to in the further description of the embodiments of the present invention below, and will not be repeated here.

[0065] Step S23: Render the self-illuminating region according to the first parameter and the second parameter.

[0066] The self-illuminating region is rendered based on the first parameter and the second parameter mentioned above. Specifically, the self-illuminating region is rendered based on the initial self-illumination parameters and noise parameters of the self-illuminating region.

[0067] Specifically, rendering the self-illuminating region according to the first parameter and the second parameter also includes other methods and steps, which can be referred to in the further description of the embodiments of the present invention below, and will not be repeated here.

[0068] In at least some embodiments of the present invention, by acquiring a first texture, a second texture, and a third texture corresponding to the self-illuminating region of the target virtual model, wherein the first texture is a self-illuminating texture of the self-illuminating region, the second texture is a grayscale texture of the self-illuminating flow direction of the self-illuminating region, and the third texture is a noise texture of the self-illuminating region, and by determining a first parameter based on the first texture and a second parameter based on the second and third textures, wherein the first parameter is the initial self-illuminating parameter of the self-illuminating region and the second parameter is the noise parameter of the self-illuminating region, and further rendering the self-illuminating region according to the first and second parameters, the purpose of rendering self-illuminating flow based on the self-illuminating texture, grayscale texture, and noise texture of the self-illuminating region on the target virtual model is achieved. This achieves the technical effect of improving the control accuracy and rendering stability of self-illuminating flow without the need for additional texture placement, thereby solving the technical problems of low control accuracy and poor rendering stability of self-illuminating flow rendering methods based on additional texture placement in related technologies.

[0069] The method described in this embodiment will be further explained below.

[0070] Optionally, in step S22, determining the first parameter based on the first texture may include the following steps:

[0071] Step S221: Sample the first texture using the initial texture sampling method to obtain the first parameters.

[0072] The initial texture sampling method described above can be based on sampling from the UV map of the target virtual model. By sampling the initial self-illumination map of the self-illuminating region based on the UV map of the target virtual model, the initial self-illumination parameters of the self-illuminating region can be obtained.

[0073] Optionally, in step S22, determining the second parameter based on the second and third textures may include the following steps:

[0074] Step S222: The second texture is sampled using the initial texture sampling method to obtain the third parameter, wherein the third parameter is the self-illumination flow parameter of the self-illuminating region;

[0075] Step S223: Determine the target texture sampling method based on the third parameter;

[0076] Step S224: Sample the third texture using the target texture sampling method to obtain the second parameter.

[0077] By sampling the grayscale map of the self-illuminating region's self-illuminating flow direction from the UV map of the target virtual model, the self-illuminating flow parameters of that region can be obtained. Based on these parameters, the self-illuminating flow map can be determined.

[0078] The aforementioned target texture sampling method can be based on sampling of a self-illuminating flow map determined by self-illuminating flow parameters. By sampling the noise map of the self-illuminating region based on this self-illuminating flow map, the noise parameters of the self-illuminating region can be obtained.

[0079] Optionally, in step S223, determining the target texture sampling method based on the third parameter may include the following steps:

[0080] Step S2231: Obtain the fourth parameter, wherein the fourth parameter is used to control the displacement of the self-luminous flow in the self-luminous region;

[0081] Step S2232: Adjust the third parameter using the fourth parameter to obtain the adjustment result;

[0082] Step S2233: Determine the target texture sampling method based on the adjustment results.

[0083] The fourth parameter mentioned above is the displacement control parameter for the self-illuminating flow in the self-illuminating region. This fourth parameter can be specified in advance by the technician or input in real time during the rendering process.

[0084] Specifically, the displacement control parameters may include time control parameters and speed control parameters. The time control parameters are used to control the timing information of the self-illuminating flow rendering (including start and stop times, stage times, etc.), and the speed control parameters are used to control the rendering speed of the self-illuminating flow rendering. By controlling the time and speed of the self-illuminating flow rendering, the displacement of the self-illuminating flow rendering can be controlled.

[0085] Using the fourth parameter, the third parameter is adjusted to obtain the adjustment result. This adjustment result is the self-illuminating flow parameter after adjustment of the displacement control parameter and the velocity control parameter. Based on this adjustment result, the target texture sampling method is determined to be sampling based on the self-illuminating flow map determined by the self-illuminating flow parameter.

[0086] Optionally, in step S23, rendering the self-illuminating region according to the first parameter and the second parameter may include the following steps:

[0087] Step S231: Perform a multiplication operation on the first parameter and the second parameter to obtain the self-emitting color of the self-emitting region;

[0088] Step S232: Render the self-illuminating color using the rendering pipeline.

[0089] By multiplying the first parameter and the second parameter mentioned above, the self-illuminating color of the self-illuminating region can be obtained. This multiplication operation can be an algorithm pre-specified by an engineer, and the self-illuminating color can be a color parameter used to render the self-illuminating region. Through the rendering pipeline, this self-illuminating color can be rendered, thereby obtaining the self-illuminating effect of the target virtual model.

[0090] Optionally, by bringing the self-illuminating color parameters into the HDR range, virtual scene images can achieve a greater dynamic range of exposure than ordinary digital images, thereby allowing players to perceive more obvious differences in scene brightness.

[0091] Optionally, in step S21, obtaining the second texture corresponding to the self-illuminating region of the target virtual model may include the following steps:

[0092] Step S211: Draw the self-luminous flow direction of the self-luminous region to obtain self-luminous flow information;

[0093] Step S212: Bake the self-illuminating flow information to obtain the second texture.

[0094] The direction of the self-emitting flow in the self-emitting region is drawn to obtain self-emitting flow information. This self-emitting flow information can be grayscale information. Baking this self-emitting flow information yields a grayscale texture of the self-emitting region (equivalent to the second texture mentioned above).

[0095] Optionally, in step S211, drawing the self-emission flow direction of the self-emission region to obtain self-emission flow information may include the following steps:

[0096] Step S2111: Determine a first gray value and a second gray value based on the self-emitting flow direction of the self-emitting region, wherein the first gray value is used to determine the starting point of the self-emitting flow direction and the second gray value is used to determine the ending point of the self-emitting flow direction.

[0097] Step S2112: Using the first grayscale value and the second grayscale value, control the brush to perform linear drawing to obtain self-illuminating flow information.

[0098] The direction of the self-emitting light flow in the aforementioned self-emitting area can be a direction pre-specified by technicians according to the needs of the scene. Based on the direction of the self-emitting light flow in this self-emitting area, the aforementioned first grayscale value and the aforementioned second grayscale value can be determined. The first grayscale value can be used to determine the starting point of the self-emitting light flow direction, and the second grayscale value can be used to determine the ending point of the self-emitting light flow direction.

[0099] Using the first and second grayscale values ​​mentioned above, the brush can be controlled to perform linear drawing, thereby obtaining the aforementioned self-illuminating flow information. Specifically, the brush is controlled to draw linearly from the starting point to the ending point of the self-illuminating flow, and the resulting drawing can be used as the aforementioned self-illuminating flow information. This self-illuminating flow information includes the direction information of the self-illuminating flow.

[0100] Optionally, the above-described self-illuminating rendering method for virtual models may further include one of the following execution steps:

[0101] Step S24: Store the first texture and the second texture independently, respectively;

[0102] Step S25: Store the second texture in the transparency channel of the first texture.

[0103] The self-illuminating texture (equivalent to the first texture) and grayscale texture (equivalent to the second texture) of the self-illuminating area can be stored independently. During rendering, the self-illuminating texture and the grayscale texture are read separately to render the self-illuminating area.

[0104] The grayscale texture of the self-illuminating region (equivalent to the second texture) can also be stored in the transparency channel of the self-illuminating texture (equivalent to the first texture). During rendering, the self-illuminating texture containing the grayscale texture is read to render the self-illuminating region.

[0105] Figure 3 This is a schematic diagram of an optional self-illuminating rendering process according to an embodiment of the present invention. Taking the self-illuminating rendering of the legs of a virtual character A as an example, this self-illuminating rendering process is based on the Shader language and implemented using the Unity game engine and Blender model design software. Figure 3 As shown, the self-illuminating rendering process includes the following steps:

[0106] Step E31: Draw the self-illumination flow direction of the model in the model making software;

[0107] Step E32: Bake the drawn grayscale image and import it into the engine;

[0108] Step E33: Sample the grayscale information image and use the sampling result as a one-dimensional noise image;

[0109] Step E34: Control the self-illuminating movement by controlling the parameters of the one-dimensional noise map;

[0110] Step E35: Multiply the processed noise parameters by the self-illuminating map, and input the calculation result into the rendering pipeline for rendering.

[0111] Specifically, in step E31, the direction of the self-illumination flow of the legs of the virtual character A is drawn using Blender software. Figure 4 This is a schematic diagram of an optional self-illuminating flow direction drawing process according to an embodiment of the present invention, such as... Figure 4 As shown, in Blender software, a gradient brush can be used to draw the self-illuminating flow direction from a point with a gray value of 0 (starting point H0) to a point with a gray value of 1 (ending point H1), and the drawing result is used as the self-illuminating flow information.

[0112] Optionally, during the drawing process in the direction of self-illumination flow, the gradient brush can be linear, that is, as... Figure 4 As shown, on the self-illuminating flow path drawn between H0 and H1, the grayscale value changes linearly between 0 and 1.

[0113] It's important to note that during the self-illuminating flow direction drawing process, to maintain the continuity of the self-illumination on the legs of the virtual character A, the parameters (such as thickness, slope, etc.), range, and algorithm of the gradient brush in Blender can be controlled to ensure that the gradient brush draws continuously within the drawing area of ​​the virtual character A's legs (meaning that the corresponding grayscale range should be continuous across the continuous drawing area on the surface of the virtual character A's legs). The gradient brush slope can refer to the drawing rate of the gradient brush between 0 and 1. The gradient brush algorithm can be a linear algorithm or a gamma algorithm, etc. The gradient brush range refers to the range of grayscale values ​​associated with the brush drawing order.

[0114] It should be noted that during the process of rendering the self-illuminating flow direction of the legs of virtual character A, the grayscale map covers the rendering area corresponding to the legs of virtual character A. Therefore, the rendering of the self-illuminating flow direction does not affect other areas on the surface of virtual character A.

[0115] Specifically, in step E32, the self-illuminating flow information obtained in step E31 is baked into a texture to obtain a grayscale texture P2 (equivalent to the second texture mentioned above). This grayscale texture P2 is then imported into the Unity game engine.

[0116] It should be noted that the baked grayscale map can be stored separately in the storage space so that the grayscale map (or self-illuminating flow information) can be flexibly replaced and modified later; or it can be stored in the transparency channel of the self-illuminating map of the virtual character A's legs to save the workload of one map sampling in the subsequent rendering process.

[0117] Specifically, in step E33, the UV texture P1 of the virtual character A's leg model is sampled to obtain the initial self-emission parameter, denoted as emission (equivalent to the first parameter mentioned above); the grayscale texture P2 is sampled using the UV texture P1 of the virtual character A's leg model (equivalent to the first texture mentioned above) to obtain the self-emission flow parameter, denoted as emissionFlow (equivalent to the third parameter mentioned above); then, the preset one-dimensional noise texture P3 (equivalent to the third texture mentioned above) is sampled using the self-emission flow parameter emissionFlow to obtain the noise parameter, denoted as noise (equivalent to the second parameter mentioned above).

[0118] It should be noted that the aforementioned preset one-dimensional noise map P4 can be a pre-processed noise map, where pre-processing includes: fade-in processing and fade-out processing, etc.

[0119] Figure 5 This is a schematic diagram of an optional noise information map according to an embodiment of the present invention, such as... Figure 5 As shown, the information carried in the noise information graph P5 is the aforementioned noise parameter. Figure 5 The point with a gray value of 0 corresponding to the left edge of the center (the starting point of the self-illuminating flow). Figure 5 The point with a gray value of 1 corresponding to the right edge of the center (the endpoint of the self-illuminating flow).

[0120] Still as Figure 5 As shown, the self-illuminating pulse effect on the legs of virtual character A can be achieved by moving the noise infographic P5. By modifying or replacing the noise infographic P5, the self-illuminating effect on the legs of virtual character A can be adjusted (such as the gradient of appearance and disappearance, the noise distribution pattern, the pulse coverage range, etc.).

[0121] Specifically, in step E34, the displacement of the noise information graph P5 is controlled by controlling the displacement control parameters (including the time control parameter Time and the speed control parameter speed), thereby achieving a self-illuminating flow effect.

[0122] Optionally, the time control parameter Time can control the automatic flow of the self-illumination on the legs of the virtual character A according to a specified time rule, and the speed control parameter speed can control the speed at which the self-illumination on the legs of the virtual character A flows automatically.

[0123] The method for adjusting the emission flow parameter corresponding to the noise information map P5 using the time control parameter Time and the speed control parameter speed can be shown in the following formula (1):

[0124] emissoonFlow=emissoonFlow+Time×Speed ​​Formula (1)

[0125] In formula (1), emissionFlow on the right side of the equation represents the self-luminous flow parameter before adjustment, and emissionFlow on the left side of the equation represents the self-luminous flow parameter after adjustment.

[0126] Specifically, in step E35, the noise parameter is multiplied by the initial self-emission parameter and input into the rendering pipeline for rendering, which can obtain the self-emission flow effect of the legs of the virtual character A.

[0127] Figure 6 This is a schematic diagram of an optional self-illuminating rendering result according to an embodiment of the present invention, such as... Figure 6 As shown, by performing self-illuminating flow rendering using the method provided in this embodiment of the invention, the following can be obtained: Figure 6 The virtual model shown has a self-illuminating effect.

[0128] The self-illuminating rendering method provided by this invention can realize the flowing effect of self-illumination of virtual models, thereby enhancing the dynamic sense of the virtual scene corresponding to the virtual model and improving the user experience.

[0129] The self-illuminating rendering method provided by this invention can also use Bloom technology. Bloom technology can reproduce the imaging of a real-world camera and can be used for computer image effects in video games, demonstrations, and high dynamic range rendering. Image effects generated by Bloom (such as stripes, feathers, etc.) can extend from the edges of bright areas into the computer image, producing a strong sense of light illusion, making the scene effect difficult for the camera or the player's naked eye to capture.

[0130] It is worth noting that the beneficial effect of the method provided by the present invention is that it can achieve the self-illuminating flow effect of virtual models without the need for additional texture placement, thereby avoiding the dependence of self-illuminating flow rendering on the number of faces of the model itself, and improving the control accuracy and rendering stability of self-illuminating flow.

[0131] It is noteworthy that the key technical point of the method provided by this invention is as follows: First, the self-illuminating flow information of the model is directly drawn in the model making software, wherein the self-illuminating flow information is determined by a grayscale texture; then, the self-illuminating flow direction determined by the self-illuminating flow information is drawn on the model using a gradient brush to obtain the drawing result; the drawing result is imported into a preset game engine, and the drawing result is used as a UV map for noise map sampling in the shader of the game engine to obtain the sampling result; and self-illuminating rendering is performed based on the sampling result.

[0132] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0133] This embodiment also provides a self-illuminating rendering apparatus for a virtual model, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0134] Figure 7 This is a structural block diagram of a self-illuminating rendering device for a virtual model according to an embodiment of the present invention, such as... Figure 7 As shown, the device includes: an acquisition module 71, used to acquire a first texture, a second texture, and a third texture corresponding to the self-illuminating region of the target virtual model, wherein the first texture is a self-illuminating texture of the self-illuminating region, the second texture is a grayscale texture of the self-illuminating region's self-illuminating flow direction, and the third texture is a noise texture of the self-illuminating region; a determination module 72, used to determine a first parameter based on the first texture, and to determine a second parameter based on the second and third textures, wherein the first parameter is an initial self-illuminating parameter of the self-illuminating region, and the second parameter is a noise parameter of the self-illuminating region; and a rendering module 73, used to render the self-illuminating region according to the first and second parameters.

[0135] Optionally, the aforementioned determining module 72 is further configured to: sample the first texture using an initial texture sampling method to obtain the first parameter.

[0136] Optionally, the determining module 72 is further configured to: sample the second texture using an initial texture sampling method to obtain a third parameter, wherein the third parameter is the self-illumination flow parameter of the self-illuminating region; determine the target texture sampling method based on the third parameter; and sample the third texture using the target texture sampling method to obtain the second parameter.

[0137] Optionally, the determining module 72 is further configured to: obtain a fourth parameter, wherein the fourth parameter is used to control the displacement of the self-illuminating flow in the self-illuminating region; adjust the third parameter using the fourth parameter to obtain an adjustment result; and determine the target texture sampling method based on the adjustment result.

[0138] Optionally, the rendering module 73 described above is further configured to: perform a multiplication operation on the first parameter and the second parameter to obtain the self-illuminating color of the self-illuminating region; and render the self-illuminating color through the rendering pipeline.

[0139] Optionally, the acquisition module 71 is further configured to: draw the self-illumination flow direction of the self-illuminating region to obtain self-illumination flow information; and bake the self-illumination flow information to obtain a second texture.

[0140] Optionally, the acquisition module 71 is further configured to: determine a first gray value and a second gray value based on the self-illuminating flow direction of the self-illuminating region, wherein the first gray value is used to determine the starting point of the self-illuminating flow direction and the second gray value is used to determine the ending point of the self-illuminating flow direction; and control the brush to perform linear drawing using the first gray value and the second gray value to obtain the self-illuminating flow information.

[0141] Optionally, Figure 8 This is a structural block diagram of an optional self-illuminating rendering apparatus for a virtual model according to an embodiment of the present invention, such as... Figure 8 As shown, the device includes, in addition to Figure 7 In addition to all the modules shown, it also includes: a storage module 74, used to independently store the first texture and the second texture respectively; or used to store the second texture into the transparency channel of the first texture.

[0142] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0143] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.

[0144] Optionally, in this embodiment, the computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0145] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.

[0146] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: obtaining a first texture, a second texture, and a third texture corresponding to the self-illuminating region of the target virtual model, wherein the first texture is a self-illuminating texture of the self-illuminating region, the second texture is a grayscale texture of the self-illuminating region's self-illuminating flow direction, and the third texture is a noise texture of the self-illuminating region; determining a first parameter based on the first texture, and determining a second parameter based on the second and third textures, wherein the first parameter is an initial self-illuminating parameter of the self-illuminating region, and the second parameter is a noise parameter of the self-illuminating region; and rendering the self-illuminating region according to the first and second parameters.

[0147] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: sampling the first texture using an initial texture sampling method to obtain a first parameter.

[0148] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: sampling the second texture map using an initial texture sampling method to obtain a third parameter, wherein the third parameter is a self-illuminating flow parameter of the self-illuminating region; determining a target texture sampling method based on the third parameter; and sampling the third texture map using the target texture sampling method to obtain the second parameter.

[0149] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: obtaining a fourth parameter, wherein the fourth parameter is used to control the displacement of the self-illuminating flow in the self-illuminating region; adjusting the third parameter using the fourth parameter to obtain an adjustment result; and determining the target texture sampling method based on the adjustment result.

[0150] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: multiplying the first parameter and the second parameter to obtain the self-illuminating color of the self-illuminating region; and rendering the self-illuminating color through the rendering pipeline.

[0151] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: drawing the self-illuminating flow direction of the self-illuminating region to obtain self-illuminating flow information; baking the self-illuminating flow information to obtain a second texture.

[0152] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: determining a first grayscale value and a second grayscale value based on the self-illuminating flow direction of the self-illuminating region, wherein the first grayscale value is used to determine the starting point of the self-illuminating flow direction and the second grayscale value is used to determine the ending point of the self-illuminating flow direction; using the first grayscale value and the second grayscale value, controlling the brush to perform linear drawing to obtain self-illuminating flow information.

[0153] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: storing the first texture and the second texture independently, respectively; storing the second texture into the transparency channel of the first texture.

[0154] This embodiment of the computer-readable storage medium provides a technical solution for a self-illuminating rendering method for a virtual model. By acquiring a first texture, a second texture, and a third texture corresponding to the self-illuminating region of the target virtual model, wherein the first texture is a self-illuminating texture of the self-illuminating region, the second texture is a grayscale texture of the self-illuminating flow direction of the self-illuminating region, and the third texture is a noise texture of the self-illuminating region, and by determining a first parameter based on the first texture and a second parameter based on the second and third textures, wherein the first parameter is an initial self-illuminating parameter of the self-illuminating region and the second parameter is a noise parameter of the self-illuminating region, and further rendering the self-illuminating region according to the first and second parameters, the purpose of self-illuminating flow rendering based on the self-illuminating texture, grayscale texture, and noise texture of the self-illuminating region on the target virtual model is achieved. This achieves the technical effect of improving the control accuracy and rendering stability of self-illuminating flow without the need for additional texture placement, thereby solving the technical problems of low control accuracy and poor rendering stability in related technologies that rely on additionally placed textures for self-illuminating flow rendering.

[0155] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (such as a CD-ROM, USB flash drive, portable hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the method according to the embodiments of the present invention.

[0156] In exemplary embodiments of the present invention, a computer-readable storage medium stores a program product capable of implementing the methods described above in this embodiment. In some possible implementations, various aspects of the embodiments of the present invention can also be implemented as a program product comprising program code, which, when run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this embodiment according to various exemplary embodiments of the present invention.

[0157] According to embodiments of the present invention, a program product for implementing the above-described method may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In the embodiments of the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0158] The aforementioned program product may take the form of any combination of one or more computer-readable media. Such computer-readable storage media may be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (not exhaustive) of computer-readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0159] It should be noted that the program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0160] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0161] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0162] Optionally, the processor may also be configured to perform the following steps via a computer program: acquiring a first texture, a second texture, and a third texture corresponding to the self-illuminating region of the target virtual model, wherein the first texture is a self-illuminating texture of the self-illuminating region, the second texture is a grayscale texture of the self-illuminating flow direction of the self-illuminating region, and the third texture is a noise texture of the self-illuminating region; determining a first parameter based on the first texture, and determining a second parameter based on the second and third textures, wherein the first parameter is the initial self-illuminating parameter of the self-illuminating region, and the second parameter is the noise parameter of the self-illuminating region; and rendering the self-illuminating region according to the first and second parameters.

[0163] Optionally, the processor described above can also be configured to perform the following steps via a computer program: sampling the first texture using an initial texture sampling method to obtain the first parameters.

[0164] Optionally, the processor may also be configured to perform the following steps via a computer program: sampling the second texture using an initial texture sampling method to obtain a third parameter, wherein the third parameter is the self-illumination flow parameter of the self-illuminating region; determining the target texture sampling method based on the third parameter; and sampling the third texture using the target texture sampling method to obtain the second parameter.

[0165] Optionally, the processor may also be configured to perform the following steps via a computer program: obtaining a fourth parameter, wherein the fourth parameter is used to control the displacement of the self-illuminating flow in the self-illuminating region; adjusting the third parameter using the fourth parameter to obtain the adjustment result; and determining the target texture sampling method based on the adjustment result.

[0166] Optionally, the processor described above can also be configured to perform the following steps via a computer program: multiplying the first parameter and the second parameter to obtain the self-illuminating color of the self-illuminating region; and rendering the self-illuminating color through the rendering pipeline.

[0167] Optionally, the processor may also be configured to perform the following steps via a computer program: drawing the self-illuminating flow direction of the self-illuminating region to obtain self-illuminating flow information; and baking the self-illuminating flow information to obtain a second texture.

[0168] Optionally, the processor may also be configured to perform the following steps via a computer program: determining a first grayscale value and a second grayscale value based on the self-illuminating flow direction of the self-illuminating region, wherein the first grayscale value is used to determine the starting point of the self-illuminating flow direction and the second grayscale value is used to determine the ending point of the self-illuminating flow direction; using the first grayscale value and the second grayscale value, controlling the brush to perform linear drawing to obtain self-illuminating flow information.

[0169] Optionally, the processor may also be configured to perform the following steps via a computer program: storing the first texture and the second texture independently; storing the second texture in the transparency channel of the first texture.

[0170] In the electronic device of this embodiment, a technical solution for a self-illuminating rendering method for a virtual model is provided. By acquiring a first texture, a second texture, and a third texture corresponding to the self-illuminating region of the target virtual model, wherein the first texture is a self-illuminating texture of the self-illuminating region, the second texture is a grayscale texture of the self-illuminating flow direction of the self-illuminating region, and the third texture is a noise texture of the self-illuminating region, and by determining a first parameter based on the first texture and a second parameter based on the second and third textures, wherein the first parameter is an initial self-illuminating parameter of the self-illuminating region and the second parameter is a noise parameter of the self-illuminating region, and further rendering the self-illuminating region according to the first and second parameters, the purpose of self-illuminating flow rendering based on the self-illuminating texture, grayscale texture, and noise texture of the self-illuminating region on the target virtual model is achieved. This achieves the technical effect of improving the control accuracy and rendering stability of self-illuminating flow without the need for additional texture placement, thereby solving the technical problems of low control accuracy and poor rendering stability in related technologies that rely on additionally placed textures for self-illuminating flow rendering.

[0171] Figure 9 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Figure 9 As shown, the electronic device 900 is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0172] like Figure 9 As shown, the electronic device 900 is presented in the form of a general-purpose computing device. The components of the electronic device 900 may include, but are not limited to: at least one processor 910, at least one memory 920, a bus 930 connecting different system components (including memory 920 and processor 910), and a display 940.

[0173] The memory 920 stores program code that can be executed by the processor 910, causing the processor 910 to perform the steps described in the method section of the present invention, according to various exemplary embodiments of the present invention.

[0174] The memory 920 may include a readable medium in the form of volatile memory cells, such as random access memory (RAM) 9201 and / or cache memory 9202, and may further include read-only memory (ROM) 9203, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.

[0175] In some instances, memory 920 may also include a program / utility 9204 having a set (at least one) of program modules 9205, including but not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Memory 920 may further include memory remotely located relative to processor 910, which can be connected to electronic device 900 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0176] Bus 930 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, peripheral bus, graphics acceleration port, processor 910, or a local bus using any of the various bus structures.

[0177] The display 940 may be, for example, a touchscreen liquid crystal display (LCD) that allows a user to interact with the user interface of the electronic device 900.

[0178] Optionally, the electronic device 900 can also communicate with one or more external devices 1400 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 900, and / or any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via the input / output (I / O) interface 950. Furthermore, the electronic device 900 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via a network adapter 960. Figure 9 As shown, network adapter 960 communicates with other modules of electronic device 900 via bus 930. It should be understood that, although... Figure 9 As not shown in the diagram, other hardware and / or software modules may be used in conjunction with electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0179] The aforementioned electronic device 900 may also include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply, and / or a camera.

[0180] Those skilled in the art will understand that Figure 9The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device 900 may also include components that are more... Figure 9 The more or fewer components shown, or having the same Figure 9 Different configurations are shown. The memory 920 can be used to store computer programs and corresponding data, such as the computer program and corresponding data corresponding to the self-illuminating rendering method for virtual models in this embodiment of the invention. The processor 910 executes various functional applications and data processing by running the computer program stored in the memory 920, thereby implementing the aforementioned self-illuminating rendering method for virtual models.

[0181] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0182] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0183] In the several embodiments provided by this invention, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection can be through some interfaces; the indirect coupling or communication connection of units or modules can be electrical or other forms.

[0184] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0185] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0186] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0187] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A self-illuminating rendering method for a virtual model, characterized in that, include: Obtain the first texture, second texture, and third texture corresponding to the self-illuminating region of the target virtual model, wherein the first texture is the self-illuminating texture of the self-illuminating region, the second texture is the grayscale texture of the self-illuminating flow direction of the self-illuminating region, and the third texture is the noise texture of the self-illuminating region. A first parameter is determined based on the first texture, and a second parameter is determined based on the second texture and the third texture, wherein the first parameter is the initial self-illumination parameter of the self-illuminating region, and the second parameter is the noise parameter of the self-illuminating region; The self-illuminating region is rendered according to the first parameter and the second parameter; The determination of the second parameter based on the second texture and the third texture includes: sampling the second texture using an initial texture sampling method to obtain a third parameter, wherein the third parameter is the self-illumination flow parameter of the self-illuminating region; determining a target texture sampling method based on the third parameter; and sampling the third texture using the target texture sampling method to obtain the second parameter.

2. The self-illuminating rendering method according to claim 1, characterized in that, Determining the first parameter based on the first texture includes: The first texture is sampled using an initial texture sampling method to obtain the first parameter.

3. The self-illuminating rendering method according to claim 1, characterized in that, Determining the target texture sampling method based on the third parameter includes: Obtain a fourth parameter, wherein the fourth parameter is used to control the displacement of the self-luminous flow in the self-luminous region; The third parameter is adjusted using the fourth parameter to obtain the adjustment result; The target texture sampling method is determined based on the adjustment results.

4. The self-illuminating rendering method according to claim 1, characterized in that, Rendering the self-illuminating region based on the first parameter and the second parameter includes: The self-illuminating color of the self-illuminating region is obtained by multiplying the first parameter and the second parameter. The self-illuminating color is rendered using the rendering pipeline.

5. The self-illuminating rendering method according to claim 1, characterized in that, Obtaining the second texture corresponding to the self-illuminating region of the target virtual model includes: The self-luminescence flow direction of the self-luminescent region is plotted to obtain self-luminescence flow information; The self-illuminating flow information is baked to obtain the second texture.

6. The self-illuminating rendering method according to claim 5, characterized in that, The self-luminescence flow direction of the self-luminescent region is plotted to obtain the self-luminescence flow information, including: A first gray value and a second gray value are determined based on the self-luminous flow direction of the self-luminous region, wherein the first gray value is used to determine the starting point of the self-luminous flow direction, and the second gray value is used to determine the ending point of the self-luminous flow direction. Using the first grayscale value and the second grayscale value, the brush is controlled to perform linear drawing to obtain the self-illuminating flow information.

7. The self-illuminating rendering method according to claim 5, characterized in that, The self-illuminating rendering method also includes one of the following: The first texture and the second texture are stored independently, respectively. Store the second texture into the transparency channel of the first texture.

8. A self-illuminating rendering device for a virtual model, characterized in that, include: The acquisition module is used to acquire a first texture, a second texture, and a third texture corresponding to the self-illuminating region of the target virtual model, wherein the first texture is the self-illuminating texture of the self-illuminating region, the second texture is the grayscale texture of the self-illuminating region in the direction of self-illumination flow, and the third texture is the noise texture of the self-illuminating region. The determining module is configured to determine a first parameter based on the first texture and a second parameter based on the second and third textures, wherein the first parameter is an initial self-illumination parameter of the self-illuminating region, and the second parameter is a noise parameter of the self-illuminating region. Determining the second parameter based on the second and third textures includes: sampling the second texture using an initial texture sampling method to obtain a third parameter, wherein the third parameter is a self-illumination flow parameter of the self-illuminating region; determining a target texture sampling method based on the third parameter; and sampling the third texture using the target texture sampling method to obtain the second parameter. The rendering module is used to render the self-illuminating region according to the first parameter and the second parameter.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute, when run by a processor, the self-illuminating rendering method of the virtual model as described in any one of claims 1 to 7.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the self-illuminating rendering method for the virtual model as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Virtual model rendering method and device thereof

    CN112419465A