Method, apparatus, storage medium, and electronic device for rendering silhouette light

By obtaining and adjusting the light source direction information and color information in the game scene, rendering silhouette light, the problem of high cost and low flexibility in the existing technology is solved, and flexible rendering is achieved in the dark edge area of the virtual object, improving the effect of virtual reality.

CN114820915BActive Publication Date: 2025-08-01NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210529822.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-16
Publication Date
2025-08-01
Estimated Expiration
2042-05-16

AI Technical Summary

Technical Problem

The method of rendering silhouette light in the prior art is costly and has low flexibility, making it difficult to maintain a good silhouette light effect when a virtual character or object rotates.

Method used

By obtaining the direction information of the target light source in the observation space, determining the distribution position and color information of the silhouette light, using this information to render the silhouette light, including changing the direction of the light source and adjusting the color intensity, ensuring that the silhouette light appears in the dark edge area of the virtual object.

Benefits of technology

It realizes the flexibility of rendering silhouette light at low cost, ensuring that silhouette light is displayed in the dark edge area of the virtual object, adapting to changes in rotational viewing angles, and improving the virtual reality experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114820915B_ABST
    Figure CN114820915B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, storage medium and electronic device for rendering silhouette light. The method includes: obtaining first direction information of a target light source in an observation space, where the target light source is the main light source used in a game scene, and the first direction information is used to determine the light-receiving direction of a virtual object in the game scene in the observation space; obtaining second direction information to be rendered based on a target component of the first direction information, where the second direction information is used to determine the appearance direction of the silhouette light to be rendered in the observation space, so as to obtain the distribution position of the silhouette light on the virtual object; determining color information to be rendered, where the color information is used to preset the color intensity and color tendency of the silhouette light; and rendering the silhouette light by using the second direction information and the color information. The present invention solves the technical problems of high cost and low flexibility in the method for rendering silhouette light in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular, to a method, apparatus, storage medium, and electronic device for rendering silhouette light. Background Art

[0002] In a virtual game scene, adding a silhouette light effect to a virtual character or object can enhance the three-dimensional sense of the virtual character or object and enrich the levels of the picture. The methods for adding a silhouette light effect in related technologies mainly include: First, directly adding a light source for illuminating the dark edge area of the virtual character or object; Second, brightening the dark edge area of the normal direction of the model when making the model of the virtual character or object. However, the first method has a high rendering cost; the second method has low flexibility, and the silhouette light effect is poor when the virtual character, object, or virtual camera view rotates.

[0003] In view of the above problems, no effective solution has been proposed yet.

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

[0005] Embodiments of the present invention provide a method, apparatus, storage medium, and electronic device for rendering silhouette light, so as to at least solve the technical problems of high cost and low flexibility in the method for rendering silhouette light in related technologies.

[0006] According to one aspect of the embodiments of the present invention, a method for rendering silhouette light is provided, including:

[0007] Obtaining first direction information of a target light source in the viewing space, where the target light source is the main light source used in the game scene, and the first direction information is used to determine the light-receiving direction of the virtual object in the game scene in the viewing space; obtaining second direction information to be rendered based on a target component of the first direction information, where the second direction information is used to determine the appearance direction of the silhouette light to be rendered in the viewing space, so as to obtain the distribution position of the silhouette light on the virtual object; determining the color information to be rendered, where the color information is used to preset the color intensity and color tendency of the silhouette light; and rendering the silhouette light by using the second direction information and the color information.

[0008] Optionally, obtaining first direction information of a target light source in the viewing space includes: obtaining third direction information of the target light source in the world space, where the third direction information is used to determine the light-receiving direction of the virtual object in the world space; and performing a viewing transformation on the third direction information to obtain the first direction information.

[0009] Optionally, the target component is the first horizontal component. Obtaining the second direction information based on the target component of the first direction information includes: obtaining the second orientation of the second horizontal component based on the first orientation of the first horizontal component, where the second horizontal component is the horizontal component of the second direction information; determining the second direction information according to the second orientation.

[0010] Optionally, obtaining the second orientation of the second horizontal component based on the first orientation of the first horizontal component includes: comparing the first orientation with the second orientation; in response to the first orientation being opposite to the second orientation, controlling the second orientation to remain unchanged; in response to the first orientation being the same as the second orientation, adjusting the second orientation to the opposite direction.

[0011] Optionally, rendering the silhouette light by using the second direction information and the color information includes: determining the target normal orientation, where the target normal orientation is the normal orientation obtained by normalization in the viewing space in advance; calculating the target normal orientation, the second direction information and the color information to obtain a first calculation result; rendering the silhouette light according to the first calculation result.

[0012] Optionally, the method for rendering the silhouette light further includes: calculating the absolute value corresponding to the target component to obtain a second calculation result; adjusting the color intensity of the silhouette light based on the comparison result between the second calculation result and the color intensity parameter.

[0013] Optionally, the color intensity parameter includes: a first color intensity and a second color intensity, and the first color intensity is less than the second color intensity. Adjusting the color intensity based on the comparison result between the second calculation result and the color intensity parameter includes: in response to determining through the comparison result that the second calculation result is greater than the first color intensity and less than the second color intensity, controlling the color intensity to gradually weaken; in response to determining through the comparison result that the second calculation result is less than or equal to the first color intensity, controlling the color intensity to disappear.

[0014] Optionally, the value of the first color intensity and the value of the second color intensity are both within a preset value range, and the value of the first color intensity and the value of the second color intensity are custom-configured according to the appearance time of the silhouette light corresponding to different rendering styles.

[0015] According to another aspect of the embodiments of the present invention, there is also provided an apparatus for rendering a silhouette light, including:

[0016] A first acquisition module, configured to acquire first direction information of a target light source in an observation space, where the target light source is a main light source used in a game scene, and the first direction information is used to determine the light-receiving direction of a virtual object in the game scene in the observation space; a second acquisition module, configured to acquire second direction information to be rendered based on a target component of the first direction information, where the second direction information is used to determine the appearance direction of a silhouette light to be rendered in the observation space, so as to obtain the distribution position of the silhouette light on the virtual object; a determination module, configured to determine color information to be rendered, where the color information is used to preset the color intensity and color tendency of the silhouette light; a rendering module, configured to render the silhouette light by using the second direction information and the color information.

[0017] Optionally, the above-mentioned first acquisition module is further configured to: acquire third direction information of the target light source in a world space, where the third direction information is used to determine the light-receiving direction of the virtual object in the world space; perform an observation transformation on the third direction information to obtain the first direction information.

[0018] Optionally, the target component is a first horizontal component, and the above-mentioned second acquisition module is further configured to: acquire a second orientation of a second horizontal component based on a first orientation of the first horizontal component, where the second horizontal component is a horizontal component of the second direction information; determine the second direction information according to the second orientation.

[0019] Optionally, the above-mentioned second acquisition module is further configured to: compare the first orientation with the second orientation; in response to the first orientation being opposite to the second orientation, control the second orientation to remain unchanged; in response to the first orientation being the same as the second orientation, adjust the second orientation to the opposite direction.

[0020] Optionally, the above-mentioned rendering module is further configured to: determine a target normal orientation, where the target normal orientation is a normal orientation obtained by normalization processing in the observation space in advance; perform calculations on the target normal orientation, the second direction information, and the color information to obtain a first calculation result; render the silhouette light according to the first calculation result.

[0021] Optionally, the apparatus for rendering the silhouette light further includes: an adjustment module, configured to calculate the absolute value corresponding to the target component to obtain a second calculation result; adjust the color intensity of the silhouette light based on a comparison result between the second calculation result and a color intensity parameter.

[0022] Optionally, the color intensity parameter includes: a first color intensity and a second color intensity, and the first color intensity is less than the second color intensity. The above-mentioned adjustment module is further configured to: in response to determining through the comparison result that the second calculation result is greater than the first color intensity and less than the second color intensity, control the color intensity to gradually weaken; in response to determining through the comparison result that the second calculation result is less than or equal to the first color intensity, control the color intensity to disappear.

[0023] According to another aspect of the embodiments of the present invention, a non-volatile storage medium is further provided. A computer program is stored in the storage medium. Wherein, the computer program is configured to execute the method for rendering a silhouette light in any one of the above when running.

[0024] According to another aspect of the embodiments of the present invention, an electronic device is further provided, including: a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for rendering a silhouette light in any one of the above.

[0025] In at least some embodiments of the present invention, first, obtain the first direction information of the target light source in the viewing space. Wherein, the target light source is the main light source used in the game scene, and the first direction information is used to determine the light-receiving direction of the virtual object in the game scene in the viewing space. And obtain the second direction information to be rendered based on the target component of the first direction information. Wherein, the second direction information is used to determine the appearance direction of the silhouette light to be rendered in the viewing space, so as to obtain the distribution position of the silhouette light on the virtual object. By determining the color information to be rendered, where the color information is used to preset the color intensity and color tendency of the silhouette light, and use the second direction information and the color information to render the silhouette light, the purpose of rendering the corresponding silhouette light effect based on the direction of the main light source of the game scene is achieved. Thus, the technical effect of improving the flexibility of rendering the silhouette light in the game scene at a low cost is realized. Furthermore, the technical problem of high cost and low flexibility in the method of rendering the silhouette light in the related art is solved. Description of the Drawings

[0026] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:

[0027] Figure 1 is the hardware structure block diagram of a mobile terminal for a method of rendering a silhouette light according to an embodiment of the present invention;

[0028] Figure 2 is the flowchart of a method of rendering a silhouette light according to one embodiment of the present invention;

[0029] Figure 3 is a schematic diagram of an optional display of a virtual character in a virtual scene according to an embodiment of the present invention;

[0030] Figure 4 is the structure block diagram of a device for rendering a silhouette light according to one embodiment of the present invention;

[0031] Figure 5 is the structure block diagram of an optional device for rendering a silhouette light according to an embodiment of the present invention. Detailed implementation manners

[0032] In order to enable those skilled in the art of the present technology to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned accompanying drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0034] According to one embodiment of the present invention, an embodiment of a method for rendering silhouette light is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.

[0035] The method for rendering silhouette light in one embodiment of the present invention can run on a terminal device or a server. The terminal device can be a local terminal device. When the method for rendering silhouette light runs on the server, the method can be implemented and executed based on a cloud interaction system, where the cloud interaction system includes a server and client devices.

[0036] In an optional embodiment, various cloud applications can be run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a gaming method based on cloud computing. In the cloud game operation mode, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the silhouette light rendering method are completed on the cloud game server. The role of the client device is to receive and send data and present the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, TV, computer, PDA, etc.; but the terminal device for information processing is the cloud game server in the cloud. When playing the game, the player operates the client device to send operation instructions to the cloud game server. The cloud game server runs the game according to the operation instructions, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.

[0037] In an optional embodiment, 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 present the game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, conventionally downloading and installing the game program through an electronic device and running it. The local terminal device can provide the graphical user interface to the player in various ways, for example, it can be rendered and displayed on the terminal display, or provided to the player through holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present the graphical user interface, the graphical user interface including the game screen, and the processor is used to run the game, generate the graphical user interface, and control the display of the graphical user interface on the display screen.

[0038] In one possible implementation, an embodiment of the present invention provides a method for rendering silhouette light, providing a graphical user interface through a terminal device, wherein the terminal device can be the local terminal device mentioned above, or the client device in the cloud interaction system mentioned above.

[0039] Taking a mobile terminal running in a local terminal device as an example, the mobile terminal can be a smart phone (such as an Android phone, iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, abbreviated as MID), a PAD, a game console and other terminal devices. Figure 1 1 is a hardware structure block diagram of a mobile terminal for rendering silhouette light according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one processor 102 is shown (the processor 102 may include, but is not limited to, a processing device such as a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microcontroller unit (MCU), a field programmable gate array (FPGA), a neural network processor (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data. Optionally, the above mobile terminal may further include a transmission device 106 for communication functions, an input / output device 108, and a display device 110. Those of ordinary skill in the art can understand that Figure 1 The structure shown is only illustrative and does not limit the structure of the above mobile terminal. For example, the mobile terminal may further include more or fewer components than Figure 1 shown therein, or have a different configuration from Figure 1 that shown.

[0040] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the method of rendering a silhouette light in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above method of rendering a silhouette light. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0041] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one instance, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0042] The input in the input / output device 108 can come from multiple Human Interface Devices (HIDs). For example: keyboards and mice, gamepads, other dedicated game controllers (such as: steering wheels, fishing rods, dance pads, remote controls, etc.). In addition to providing input functions, some HIDs can also provide output functions. For example: force feedback and vibration of gamepads, audio output of controllers, etc.

[0043] The display device 110 can be, for example, a Head-Up Display (HUD), a touchscreen Liquid Crystal Display (LCD), and a touch display (also known as a "touchscreen" or "touch display screen"). The LCD enables the user to interact with the user interface of the mobile terminal. In some embodiments, the above-mentioned mobile terminal has a Graphical User Interface (GUI), and the user can perform human-computer interaction with the GUI through finger contacts and / or gestures on the touch-sensitive surface. The human-computer interaction function here optionally includes the following interactions: creating web pages, drawing, word processing, creating electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music, and / or web browsing, etc. The executable instructions for performing the above human-computer interaction functions are configured / stored in a computer program product or readable storage medium executable by one or more processors.

[0044] In this embodiment, a method for rendering silhouette light running on the above-mentioned mobile terminal is provided. Figure 2 It is a flowchart of a method for rendering silhouette light according to an embodiment of the present invention, as Figure 2 shown, and the method includes the following steps:

[0045] Step S21, obtaining first direction information of a target light source in the viewing space, where the target light source is the main light source used in the game scene, and the first direction information is used to determine the light-receiving direction of virtual objects in the game scene in the viewing space;

[0046] The above-mentioned target light source can be the main light source used in the game scene. The main light source is a virtual light source in the virtual scene, which is used to illuminate the virtual character to enhance the display effect of virtual objects in the virtual scene. The above-mentioned virtual objects can be virtual characters, virtual objects, etc. In an actual application scenario, the direction of the main light source can be determined by the real-time (Time of Day, TOD) weather system in the game scene, or can be pre-specified by the art designer according to the actual scene requirements.

[0047] The above first direction information can be used to determine the light-receiving direction of a virtual object in the viewing space of a game scene. Obtaining the first direction information of a target light source in the viewing space may include obtaining the illumination direction of a main light source in the viewing space, and based on this illumination direction, the light-receiving direction of the virtual object illuminated by the main light source in the viewing space can be determined.

[0048] Specifically, for other method steps included in obtaining the first direction information of a target light source in the viewing space, reference can also be made to the further introduction of the embodiments of the present invention below, which will not be elaborated here.

[0049] Step S22: Obtain the second direction information to be rendered based on the target component of the first direction information, where the second direction information is used to determine the appearance direction of the silhouette light to be rendered in the viewing space, so as to obtain the distribution position of the silhouette light on the virtual object;

[0050] The above target component may be the horizontal component of the first direction information. For example: when the virtual camera view direction is the positive direction of the Z axis, the horizontal component may be the X component used to represent the left and right directions in the virtual camera's field of view.

[0051] It should be noted that the above first direction information is usually direction information after normalization processing, that is, usually the value range of the X component is [-1, 1].

[0052] The silhouette light to be rendered above can be used to illuminate the dark edge area of the virtual object on the basis of the main light source. The second direction information to be rendered can be used to determine the appearance direction of the silhouette light to be rendered in the viewing space. According to this appearance direction, the distribution position of the silhouette light on the virtual object can be further obtained. For example, if the appearance direction of the silhouette light to be rendered in the viewing space is to the right, it can be determined that the position where the silhouette light is distributed on the corresponding virtual character model is the dark edge area on the right side of the model.

[0053] Specifically, for other method steps included in determining the second direction information to be rendered based on the target component of the first direction information, reference can also be made to the further introduction of the embodiments of the present invention below, which will not be elaborated here.

[0054] Step S23: Determine the color information to be rendered, where the color information is used to preset the color intensity and color tendency of the silhouette light;

[0055] The color information to be rendered above may be multiple parameter information preset by technicians. The color information to be rendered can be used to preset the color intensity and color tendency of the silhouette light to be rendered.

[0056] For example: by presetting the RGB parameter values of the silhouette light to be rendered, the color intensity and color tendency of the silhouette light can be directly determined.

[0057] For another example, parameters such as the brightness, color level, and saturation of the silhouette light to be rendered are preset to specify the color intensity of the silhouette light, and parameters such as the color and color temperature of the silhouette light to be rendered are preset to specify the color tendency of the silhouette light.

[0058] Step S24, rendering the silhouette light by using the second direction information and the color information.

[0059] By using the above-mentioned second direction information to be rendered and the above-mentioned color information to be rendered, a rendering operation can be performed to obtain the silhouette light on the corresponding virtual object, thereby improving the display effect of the virtual object.

[0060] Optionally, common 3D model rendering software can be used to perform the above-mentioned rendering operation, such as: Maya, 3Dmax, Rhino, C4D, etc.

[0061] Specifically, other method steps included in rendering the silhouette light by using the second direction information and the color information can also refer to the further introduction of the embodiments of the present invention in the following text, which will not be elaborated here.

[0062] In at least some embodiments of the present invention, first, the first direction information of the target light source in the viewing space is obtained, where the target light source is the main light source used in the game scene, and the first direction information is used to determine the light-receiving direction of the virtual object in the game scene in the viewing space, and the second direction information to be rendered is obtained based on the target component of the first direction information, where the second direction information is used to determine the appearance direction of the silhouette light to be rendered in the viewing space to obtain the distribution position of the silhouette light on the virtual object. By determining the color information to be rendered, where the color information is used to preset the color intensity and color tendency of the silhouette light, and rendering the silhouette light by using the second direction information and the color information, the purpose of rendering the corresponding silhouette light effect based on the direction of the main light source in the game scene is achieved, thereby realizing the technical effect of improving the flexibility of rendering the silhouette light in the game scene at a low cost, and further solving the technical problems of high cost and low flexibility in the method of rendering the silhouette light in the related art.

[0063] The above method of this embodiment will be further introduced below.

[0064] Optionally, in step S21, obtaining the first direction information of the target light source in the viewing space may include the following execution steps:

[0065] Step S211, obtaining the third direction information of the target light source in the world space, where the third direction information is used to determine the light-receiving direction of the virtual object in the world space;

[0066] Step S212, perform an observation transformation on the third-direction information to obtain the first-direction information.

[0067] The above-mentioned target light source can be the main light source used in the game scene. The above-mentioned third-direction information can be used to determine the light-receiving direction of the virtual object in the world space. Obtaining the third-direction information of the target light source in the world space can include obtaining the illumination direction of the main light source in the world space, and based on this illumination direction, the light-receiving direction of the virtual object illuminated by the main light source in the world space can be determined.

[0068] Performing an observation transformation on the third-direction information of the above-mentioned target light source can be to transform the third-direction information of the target light source in the world space into the first-direction information of the target light source in the observation space.

[0069] Figure 3 It is a schematic diagram of an optional method for displaying a virtual character in a virtual scene according to an embodiment of the present invention. As Figure 3 shown, to display the virtual character A in the virtual scene, the preset rendering engine is used to add the main light source MainLight to the virtual character A. Obtain the direction vector of the main light source MainLight in the world space from the preset rendering engine, denoted as MainLightDirInWorldSpace. Calculate the direction vector MainLightDirInCameraSpace of the main light source MainLight in the observation space according to the following formula (1):

[0070] MainLightDirInCameraSpace

[0071] = transform(MainLightDirInWorldSpace, MatrixWorldToView) Formula (1)

[0072] In the above formula (1), MatrixWorldToView represents the transformation matrix from the world space to the observation space. This transformation matrix can be given by the preset rendering engine or specified by a technician according to the actual application scenario.

[0073] It should be noted that when the preset rendering engine used can directly provide the direction vector of the main light source MainLight in the observation space, the above conversion operation is not required, and the direction vector of the main light source MainLight in the observation space can be directly obtained for subsequent operations.

[0074] Optionally, in step S22, when the target component is the first horizontal component, obtaining the second-direction information based on the target component of the first-direction information may include the following execution steps:

[0075] Step S221: Obtain the second orientation of the second horizontal component based on the first orientation of the first horizontal component, where the second horizontal component is the horizontal component of the second direction information.

[0076] Step S222: Determine the second direction information according to the second orientation.

[0077] In the above optional embodiment, the target component is the first horizontal component, which is the horizontal component of the first direction information. The first direction information can be used to determine the light receiving direction of the virtual object in the viewing space in the game scene.

[0078] The above second direction information is the direction information corresponding to the silhouette light to be rendered, which can be used to determine the appearance direction of the silhouette light to be rendered in the viewing space. The above second horizontal component can be the horizontal component of the second direction information.

[0079] Based on the first orientation of the above first horizontal component, the second orientation of the second horizontal component can be obtained. The first orientation can be used to represent the orientation of the main light source in the viewing space in the direction corresponding to the first horizontal component. The second orientation can be used to represent the orientation of the silhouette light to be rendered in the viewing space in the direction corresponding to the second horizontal component. According to the second orientation, the above second direction information can be determined.

[0080] Optionally, in step S221, obtaining the second orientation of the second horizontal component based on the first orientation of the first horizontal component may include the following execution steps:

[0081] Step S2211: Compare the first orientation with the second orientation;

[0082] Step S2212: In response to the first orientation being opposite to the second orientation, control the second orientation to remain unchanged;

[0083] Step S2213: In response to the first orientation being the same as the second orientation, adjust the second orientation to the opposite direction.

[0084] The above first orientation can be used to represent the orientation of the main light source in the viewing space in the direction corresponding to the first horizontal component. The above second orientation can be used to represent the orientation of the silhouette light to be rendered in the viewing space in the direction corresponding to the second horizontal component. Comparing the first orientation with the second orientation may be to compare and determine whether the first orientation is the same as or opposite to the second orientation.

[0085] According to the comparison result of the first orientation and the second orientation, perform an optional adjustment to make the first orientation opposite to the second orientation. Specifically, when the above first orientation is opposite to the above second orientation, the second orientation can be controlled to remain unchanged. When the above first orientation is the same as the above second orientation, the second orientation can be controlled to be adjusted to the opposite direction.

[0086] Still as Figure 3 shown, in the viewing space of the virtual scene, with the direction of the virtual camera view as the positive direction of the z-axis. At this time, the x-axis represents the left-right direction in the virtual camera's field of view, the y-axis represents the up-down direction in the virtual camera's field of view, and the z-axis represents the depth direction in the virtual camera's field of view. Determine the x-component of the direction vector MainLightDirInCameraSpace of the main light source MainLight in the viewing space (equivalent to the above-mentioned first horizontal component), denoted as MainLightDirInCameraSpace.x (the value may be positive or negative. In this example, it is specified that the x-component is positive when it points to the right and negative when it points to the left). When the art designer creates the virtual character A, an initial silhouette light direction vector is specified for the virtual character A, denoted as SilhouetteLightDir. Obtain the x-component of this initial silhouette light direction vector (equivalent to the above-mentioned second horizontal component), denoted as SilhouetteLightDir.x.

[0087] The values of the x-component MainLightDirInCameraSpace.x of the main light source MainLight in the viewing space and the x-component SilhouetteLightDir.x of the initial silhouette light in the viewing space may both be positive or negative. In this example, it is specified that the x-component is positive when it points to the right and negative when it points to the left. By judging the positive or negative value of MainLightDirInCameraSpace.x, the distribution range of the silhouette light on the virtual character A can be controlled.

[0088] Specifically, when the x-component of the initial silhouette light in the viewing space points to the right, that is, SilhouetteLightDir.x ≥ 0: If the x-component of the main light source in the viewing space points to the left, that is, MainLightDirInCameraSpace.x < 0, it means that the initial silhouette light is in the dark edge area of the virtual character A, and SilhouetteLightDir.x remains unchanged; If the x-component of the main light source in the viewing space points to the right, that is, MainLightDirInCameraSpace.x ≥ 0, it means that the initial silhouette light is in the bright area of the virtual character A, then take the opposite of SilhouetteLightDir.x, that is, SilhouetteLightDir.x = SilhouetteLightDir.x × (-1).

[0089] Specifically, when the x-direction component of the initial silhouette light in the viewing space faces left, i.e., SilhouetteLightDir.x < 0: If the x-direction component of the main light source in the viewing space faces right, i.e., MainLightDirInCameraSpace.x ≥ 0, it indicates that the initial silhouette light is in the dark edge area of virtual character A, and SilhouetteLightDir.x remains unchanged; If the x-direction component of the main light source in the viewing space faces left, i.e., MainLightDirInCameraSpace.x < 0, it indicates that the initial silhouette light is in the bright area of virtual character A, then take the opposite of SilhouetteLightDir.x, i.e., SilhouetteLightDir.x = SilhouetteLightDir.x × (-1).

[0090] According to the x-direction component SilhouetteLightDir.x of the adjusted silhouette light in the viewing space, the direction vector SilhouetteLightDir of the final silhouette light to be rendered in the viewing space can be determined (equivalent to the above second direction information).

[0091] Optionally, in step S24, rendering the silhouette light using the second direction information and color information may include the following execution steps:

[0092] Step S241, determine the target normal direction, where the target normal direction is the normal direction obtained by pre-normalizing in the viewing space;

[0093] Step S242, calculate the target normal direction, the second direction information, and the color information to obtain a first calculation result;

[0094] Step S243, render the silhouette light based on the first calculation result.

[0095] The above target normal direction is the normal direction obtained by pre-normalizing in the viewing space. The normalization process can be an operation of cross-multiplying multiple normal directions in the viewing space to obtain the normalized normal direction.

[0096] Based on the above target normal direction, the second direction information corresponding to the silhouette light to be rendered, and the color information corresponding to the silhouette light to be rendered, calculations can be performed to obtain the above first calculation result. This first calculation result can be used for rendering to obtain the silhouette light of the virtual object.

[0097] Still as Figure 3As shown, when creating the virtual character A, the art designer can set multiple color parameters for the virtual character to control the rendering effect of the silhouette light. For example, the art designer can preset an RGB three-dimensional vector to control the color intensity and color tendency of the silhouette light, denoted as ColorSet (equivalent to the above color information).

[0098] Still as Figure 3 As shown, when creating the virtual character A, the art designer can also, according to the actual application scenario (such as the game scene type, virtual object type, virtual object pose, virtual object placement position, etc.), specify a three-dimensional vector as the normalized normal orientation in the viewing space for the virtual character through normalization processing, denoted as NormalInCameraSpace (equivalent to the above target normal orientation).

[0099] Still as Figure 3 As shown, in the viewing space, based on the direction vector SilhouetteLightDir of the silhouette light to be rendered corresponding to the virtual character A (equivalent to the above second direction information), the RGB three-dimensional vector ColorSet (equivalent to the above color information), and the normalized normal orientation NormalInCameraSpace (equivalent to the above target normal orientation), the silhouette light rendering parameter ColorSilhouetteLight (equivalent to the above first calculation result) can be calculated as follows in formula (2):

[0100] ColorSilhouetteLight =

[0101] ColorSet × dot(NormalInCameraSpace, SilhouetteLightDir) Formula (2)

[0102] In the above formula (2), the dot(D1, D2) function represents the dot product of two three-dimensional vectors D1 and D2, here representing the dot product of NormalInCameraSpace and SilhouetteLightDir.

[0103] Based on the silhouette light rendering parameter ColorSilhouetteLight (equivalent to the above first calculation result) for rendering, the silhouette light corresponding to the virtual character A can be obtained.

[0104] Optionally, the method for rendering the silhouette light may further include the following execution steps:

[0105] Step S25, calculate the absolute value of the target component to obtain a second calculation result;

[0106] Step S26 , adjusting the color intensity of the silhouette light based on a comparison result between the second calculation result and the color intensity parameter.

[0107] In the aforementioned optional embodiment, the target component may be the horizontal component of the first direction information of the primary light source in the observation space. The absolute value of this target component is calculated to obtain the aforementioned second calculation result. This second calculation result can be used to represent the relative angular relationship between the direction of the primary light source in the observation space and the direction of the virtual camera's viewing angle. The situation where the direction of the primary light source in the observation space is collinear with the direction of the virtual camera's viewing angle (including angles of 0 degrees and 180 degrees) is generally referred to as "forward lighting the virtual object."

[0108] The comparison result can be obtained by comparing the second calculation result with the color intensity parameter. Based on the comparison result of the second calculation result and the color intensity parameter, the color intensity of the silhouette light can be adjusted.

[0109] Optionally, in step S26, the color intensity parameter includes: a first color intensity and a second color intensity, and the first color intensity is less than the second color intensity. Adjusting the color intensity based on a comparison result between the second calculation result and the color intensity parameter may include the following steps:

[0110] Step S261, in response to determining through the comparison result that the second calculation result is greater than the first color intensity and the second calculation result is less than the second color intensity, controlling the color intensity to gradually weaken;

[0111] Step S262 : In response to determining through the comparison result that the second calculation result is less than or equal to the first color intensity, controlling the color intensity to disappear.

[0112] The color intensity parameters may include a first color intensity and a second color intensity. The first color intensity may be used to determine when the color intensity of the silhouette light completely disappears. The second color intensity may be used to determine when the color intensity of the silhouette light begins to weaken. The first color intensity may be less than the second color intensity.

[0113] The second calculation result can be used to represent the relative angle between the direction of the main light source and the direction of the virtual camera's viewing angle in the observation space. Based on the second calculation result, it can be determined whether the main light source is illuminating the virtual object in the forward direction.

[0114] Compare the above second calculation result with the first color intensity and the second color intensity: When it is determined that the second calculation result is greater than the first color intensity and the second calculation result is less than the second color intensity, it indicates that the direction of the main light source in the viewing space is close enough to the virtual camera viewing direction to affect the silhouette light effect but cannot be regarded as the main light source illuminating the virtual object directly. At this time, control the color intensity of the silhouette light to gradually weaken; When it is determined that the second calculation result is less than or equal to the first color intensity, it indicates that the direction of the main light source in the viewing space and the virtual camera viewing direction can be regarded as the main light source illuminating the virtual object directly. At this time, control the color intensity to disappear.

[0115] Optionally, in the above method of rendering silhouette light, the value of the first color intensity and the value of the second color intensity are both within a preset value range, and the value of the first color intensity and the value of the second color intensity are custom-configured according to the appearance timing of the silhouette light corresponding to different rendering styles.

[0116] The above first color intensity can be used to determine the timing when the color intensity of the silhouette light completely disappears. The above second color intensity can be used to determine the timing when the color intensity of the silhouette light starts to weaken. The first color intensity is less than the second color intensity, and the value of the first color intensity and the value of the second color intensity are both within a preset value range. The preset value range can be specified in advance by the art designer according to the requirements of the actual application scenario.

[0117] Within the above preset value range, the value of the first color intensity and the value of the second color intensity are custom-configured according to the appearance timing of the silhouette light corresponding to different rendering styles.

[0118] Still taking the rendering of silhouette light for virtual character A as an example, assume that the front of the virtual character always faces the negative z-axis direction (i.e., opposite to the virtual camera viewing direction). When viewing the virtual character A with a horizontal rotation perspective around the y-axis, if the viewing direction changes near the positive z-axis direction or the negative z-axis direction, since the direction of the main light source is consistent with the virtual camera viewing direction, at this time, the x-direction component MainLightDirInCameraSpace.x of the direction vector MainLightDirInCameraSpace of the main light source varies near 0 (can be positive or negative). At this time, the main light source approximately illuminates the virtual character A directly, and there is no dark edge area on the left or right. Therefore, the silhouette light of the virtual character A should be controlled to fade or disappear to enhance virtual reality and optimize the rendering effect.

[0119] Specifically, the art designers can preset two thresholds and their value ranges according to the actual application scenarios (such as game scene types, virtual object types, virtual object postures, virtual object placement positions, etc.). Here, the two thresholds are ForwardIntensitySet01 (used to determine the timing when the color intensity of the silhouette light completely disappears, equivalent to the above-mentioned first color intensity) and ForwardIntensitySet02 (used to determine the timing when the color intensity of the silhouette light begins to weaken, equivalent to the above-mentioned second color intensity). The two thresholds satisfy the following relationship: 0 < ForwardIntensitySet01 < ForwardIntensitySet02 < 1.

[0120] Specifically, calculate the absolute value of MainLightDirInCameraSpace.x and denote it as parameter h, and monitor the value of this parameter h in real time. During the process when h gradually decreases towards 0: when h starts to be less than ForwardIntensitySet02 and still greater than ForwardIntensitySet01, control the color intensity of the silhouette light of virtual character A to weaken; when h starts to be less than ForwardIntensitySet01, it is considered that the main light is shining on virtual character A from the front, and control the color intensity of the silhouette light of virtual character A to disappear (that is, control the color intensity of the silhouette light to be 0).

[0121] Optionally, in the above example, the two thresholds ForwardIntensitySet01 and ForwardIntensitySet02 preset by the art designers can be flexibly valued according to (such as game scene types, virtual object types, virtual object postures, virtual object placement positions, etc.). For example: for a specified type of virtual object, relatively small values can be specified for ForwardIntensitySet01 and ForwardIntensitySet02 to control the silhouette light to appear more frequently under a horizontally rotating camera; for another specified type of virtual object, relatively large values can be specified for ForwardIntensitySet01 and ForwardIntensitySet02 to control the silhouette light to appear less frequently under a horizontally rotating camera.

[0122] It is easy to notice that through the method provided by the present invention, when rendering the silhouette light effect of a virtual object, the direction and intensity of the silhouette light can be flexibly determined according to the viewing direction, so that the silhouette light always appears in the dark edge area of the virtual object, solving the problem that the distribution direction of the silhouette light of the virtual object rendered in the related art is fixed, improving the rendering effect of the silhouette light, and further enhancing the user experience.

[0123] It is easy to note that, through the method provided by the present invention, while ensuring that the silhouette light always appears in the dark edge area of the virtual object, the effect of the gradual change of the silhouette light of the virtual object under the rotating perspective can be achieved, further enhancing virtual reality and improving the user experience.

[0124] It is easy to note that, compared with the method provided by the related art, the method for rendering the silhouette light provided by the present invention can flexibly render the silhouette light effect without adding an additional light source, which is beneficial for application in the actual scene.

[0125] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation manner. Based on such an 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. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention.

[0126] In this embodiment, a device for rendering the silhouette light is also provided. The device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0127] Figure 4 is a structural block diagram of a device for rendering the silhouette light according to an embodiment of the present invention. As Figure 4 shown, the device includes: a first acquisition module 401, configured to acquire first direction information of a target light source in the observation space, where the target light source is the main light source used in the game scene, and the first direction information is used to determine the light-receiving direction of the virtual object in the game scene in the observation space; a second acquisition module 402, configured to acquire second direction information to be rendered based on a target component of the first direction information, where the second direction information is used to determine the appearance direction of the silhouette light to be rendered in the observation space, so as to obtain the distribution position of the silhouette light on the virtual object; a determination module 403, configured to determine the color information to be rendered, where the color information is used to preset the color intensity and color tendency of the silhouette light; and a rendering module 404, configured to render the silhouette light by using the second direction information and the color information.

[0128] Optionally, the above-mentioned first acquisition module 401 is further configured to: acquire third direction information of a target light source in world space, where the third direction information is used to determine the light-receiving direction of a virtual object in world space; perform an observation transformation on the third direction information to obtain first direction information.

[0129] Optionally, the target component is the first horizontal component, and the above-mentioned second acquisition module 402 is further configured to: acquire the second orientation of the second horizontal component based on the first orientation of the first horizontal component, where the second horizontal component is the horizontal component of the second direction information; determine the second direction information according to the second orientation.

[0130] Optionally, the above-mentioned second acquisition module 402 is further configured to: compare the first orientation with the second orientation; in response to the first orientation being opposite to the second orientation, control the second orientation to remain unchanged; in response to the first orientation being the same as the second orientation, adjust the second orientation to the opposite direction.

[0131] Optionally, the above-mentioned rendering module 404 is further configured to: determine a target normal orientation, where the target normal orientation is a normal orientation obtained by normalization in the observation space in advance; calculate a first calculation result based on the target normal orientation, the second direction information, and color information; render a silhouette light according to the first calculation result.

[0132] Optionally, Figure 5 is a structural block diagram of an optional device for rendering a silhouette light according to an embodiment of the present invention. As Figure 5 shown, in addition to including all the modules shown Figure 4 shown, the device further includes: an adjustment module 405, configured to calculate an absolute value corresponding to a target component to obtain a second calculation result; adjust the color intensity of the silhouette light based on a comparison result between the second calculation result and a color intensity parameter.

[0133] Optionally, the color intensity parameter includes: a first color intensity and a second color intensity, and the first color intensity is less than the second color intensity. The above-mentioned adjustment module 405 is further configured to: in response to determining through the comparison result that the second calculation result is greater than the first color intensity and less than the second color intensity, control the color intensity to gradually weaken; in response to determining through the comparison result that the second calculation result is less than or equal to the first color intensity, control the color intensity to disappear.

[0134] It should be noted that the above-mentioned various modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: all the above-mentioned modules are located in the same processor; or, the above-mentioned various modules are separately located in different processors in any combination form.

[0135] An embodiment of the present invention further provides a non-volatile storage medium, in which a computer program is stored, and the computer program is configured to execute the steps in any one of the above method embodiments when running.

[0136] Optionally, in this embodiment, the above non-volatile storage medium may be configured to store a computer program for executing the following steps:

[0137] S1. Obtain first direction information of a target light source in an observation space, where the target light source is the main light source used in a game scene, and the first direction information is used to determine the light-receiving direction of a virtual object in the game scene in the observation space;

[0138] S2. Obtain second direction information to be rendered based on a target component of the first direction information, where the second direction information is used to determine the appearance direction of a silhouette light to be rendered in the observation space, so as to obtain the distribution position of the silhouette light on the virtual object;

[0139] S3. Determine color information to be rendered, where the color information is used to preset the color intensity and color tendency of the silhouette light;

[0140] S4. Render the silhouette light by using the second direction information and the color information.

[0141] Optionally, in this embodiment, the above storage medium may include but is not limited to: various media such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disc that can store a computer program.

[0142] An embodiment of the present invention further provides an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

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

[0144] Optionally, in this embodiment, the above processor may be configured to execute the following steps through a computer program:

[0145] S1. Obtain first direction information of a target light source in an observation space, where the target light source is the main light source used in a game scene, and the first direction information is used to determine the light-receiving direction of a virtual object in the game scene in the observation space;

[0146] S2. Obtain the second direction information to be rendered for the target component based on the first direction information, where the second direction information is used to determine the appearance direction of the silhouette light to be rendered in the viewing space, so as to obtain the distribution position of the silhouette light on the virtual object;

[0147] S3. Determine the color information to be rendered, where the color information is used to preset the color intensity and color tendency of the silhouette light;

[0148] S4. Render the silhouette light by using the second direction information and the color information.

[0149] Optionally, for specific examples in this embodiment, reference can be made to the examples described in the above embodiments and optional implementation manners, and details are not described herein again.

[0150] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.

[0151] In the above embodiments of the present invention, the descriptions of the various embodiments have their own emphases. For parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0152] In several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces. The indirect coupling or communication connection of units or modules can be in an electrical or other form.

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

[0154] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0155] When the integrated unit is implemented in the form of 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 this 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 for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), mobile hard disks, magnetic disks, or optical discs.

[0156] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present invention.

Claims

1. A method for rendering silhouette light, characterized in that, Including: Obtain first direction information of a target light source in an observation space, where the target light source is a main light source used in a game scene, and the first direction information is used to determine the light-receiving direction of a virtual object in the game scene in the observation space; Obtain a second orientation of a second horizontal component based on a first orientation of a target component of the first direction information, where the target component is a first horizontal component, and the second horizontal component is a horizontal component of second direction information; Obtain second direction information to be rendered based on the second orientation, where the second direction information is used to determine the appearance direction of a silhouette light to be rendered in the observation space, so as to obtain the distribution position of the silhouette light on the virtual object; Determine color information to be rendered, where the color information is used to preset the color intensity and color tendency of the silhouette light; Perform calculations on a target normal orientation, the second direction information, and the color information to obtain a first calculation result, where the target normal orientation is a normal orientation obtained by normalization in the observation space in advance; Render the silhouette light according to the first calculation result.

2. The method according to claim 1, wherein Obtaining the first direction information of the target light source in the observation space includes: Obtain third direction information of the target light source in world space, where the third direction information is used to determine the light-receiving direction of the virtual object in the world space; Perform an observation transformation on the third direction information to obtain the first direction information.

3. The method according to claim 1, wherein Obtaining the second orientation of the second horizontal component based on the first orientation of the target component of the first direction information includes: Compare the first orientation with the second orientation; In response to the first orientation being opposite to the second orientation, control the second orientation to remain unchanged; In response to the first orientation being the same as the second orientation, adjust the second orientation to the opposite direction.

4. The method according to claim 1, characterized in that The method further includes: Calculate the absolute value corresponding to the target component to obtain a second calculation result; Adjust the color intensity of the silhouette light based on the comparison result between the second calculation result and a color intensity parameter.

5. The method according to claim 4, wherein The color intensity parameter includes: a first color intensity and a second color intensity, and the first color intensity is less than the second color intensity. Adjusting the color intensity based on the comparison result between the second calculation result and the color intensity parameter includes: In response to determining through the comparison result that the second calculation result is greater than the first color intensity and the second calculation result is less than the second color intensity, control the color intensity to gradually weaken; In response to determining through the comparison result that the second calculation result is less than or equal to the first color intensity, control the color intensity to disappear.

6. The method according to claim 5, characterized in that, The value of the first color intensity and the value of the second color intensity are both within a preset value range, and the value of the first color intensity and the value of the second color intensity are custom-configured according to the appearance timing of the silhouette light corresponding to different rendering styles.

7. A device for rendering silhouette light, characterized in that Including: A first acquisition module, configured to acquire first direction information of a target light source in an observation space, where the target light source is a main light source used in a game scene, and the first direction information is used to determine a light-receiving direction of a virtual object in the game scene in the observation space; A second acquisition module, configured to acquire a second orientation of a second horizontal component based on a first orientation of a target component of the first direction information, where the target component is a first horizontal component, and the second horizontal component is a horizontal component of second direction information; acquire second direction information to be rendered based on the second orientation, where the second direction information is used to determine an appearance direction of a silhouette light to be rendered in the observation space, so as to obtain a distribution position of the silhouette light on the virtual object; A determination module, configured to determine color information to be rendered, where the color information is used to preset a color intensity and a color tendency of the silhouette light; A rendering module, configured to calculate a first calculation result based on a target normal orientation, the second direction information, and the color information, where the target normal orientation is a normal orientation obtained by normalization in the observation space in advance; render the silhouette light according to the first calculation result.

8. A computer-readable storage medium, characterized in that, A computer program is stored in the storage medium, where the computer program is configured to execute the method for rendering a silhouette light according to any one of claims 1 to 6 when running.

9. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for rendering a silhouette light according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Object rendering method and device thereof, storage medium and electronic equipment

    CN113648652A

  • Rendering images for non-standard display devices

    US20210407174A1