Game highlight production method and device

By obtaining the grayscale color value of the highlight object model and performing color value conversion and saturation adjustment, and combining the highlight brightness control parameters and lighting parameters for highlight rendering, the problem of low game highlight production efficiency in the existing technology is solved, and mobile High-end efficient rendering and diverse highlight effects.

CN117808956BActive Publication Date: 2024-09-17PERFECT WORLD INTERACTIVE ENTERTAINMENT (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311717645.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-14
Publication Date
2024-09-17
Estimated Expiration
2043-12-14

AI Technical Summary

Technical Problem

The existing game highlight production methods are inefficient, resulting in high computing performance consumption, and cannot effectively render diverse highlight effects on the mobile terminal.

Method used

By obtaining the grayscale color value of the highlight object model, perform color value conversion and saturation adjustment, and combine the highlight brightness control parameters and lighting parameters, perform highlight rendering to achieve a colorful effect and reduce system processing pressure.

Benefits of technology

It greatly reduces the calculation consumption of highlight color, reduces the system processing pressure of highlight rendering, meets the highlight rendering needs of mobile terminals, improves rendering efficiency, and achieves diversified highlight effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117808956B
    Figure CN117808956B
Patent Text Reader

Abstract

The present invention discloses a method and device for making game highlights, which relates to the field of game development technology, and mainly aims to solve the problem of poor production efficiency of existing game highlights. The method comprises: obtaining the grayscale color value of a highlight object model to be rendered highlight; performing color value conversion based on the grayscale color value to obtain a channel color value, and determining a color highlight value based on the channel color value and a highlight brightness control parameter; performing highlight rendering through the illumination parameters of the highlight object model and the color highlight value to obtain a game highlight on the highlight object model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of game development, and in particular to a method and device for producing game highlights. Background Art

[0002] During the game development process, in order to make the game characters more realistic, highlight effects need to be produced on the character skin, clothing, equipment, and props. Therefore, game highlights need to be produced.

[0003] At present, the existing game highlights are produced by calculating the highlight colors of character skin, clothing, equipment, and props through PBR lighting under the rendering pipeline. At this time, each time the highlight color is calculated, the highlight color needs to be weighted and averaged to obtain a multi-color highlight effect. However, calculating the highlight color multiple times requires a lot of computing performance, resulting in huge system processing pressure, and it is impossible to effectively render the highlight colors obtained based on a large number of calculations on the mobile terminal, making it impossible for game characters to show a variety of highlight effects. Summary of the invention

[0004] In view of this, the present invention provides a method and device for making game highlights, the main purpose of which is to solve the problem of poor efficiency in making existing game highlights.

[0005] According to one aspect of the present invention, a method for producing game highlights is provided, comprising:

[0006] Get the grayscale color value of the highlight object model to be rendered;

[0007] Performing color value conversion based on the grayscale color value to obtain a channel color value, and determining a color highlight value based on the channel color value and a highlight brightness control parameter;

[0008] Highlight rendering is performed through the illumination parameters of the highlight object model and the color highlight value to obtain the game highlight on the highlight object model.

[0009] Further, the color value conversion is performed based on the grayscale color value to obtain a channel color value, and the color highlight value is determined based on the channel color value and the highlight brightness control parameter, including:

[0010] Performing color value calculations on the grayscale color values ​​respectively by using a first hue function corresponding to a defined color model to obtain channel color values, wherein the channel color values ​​include an R channel color value, a G channel color value, and a B channel color value;

[0011] A vector product operation is performed on the channel color value and the highlight brightness control parameter to obtain a color highlight value.

[0012] Furthermore, the color value calculation is performed on the grayscale color value respectively by the hue function in the defined color model to obtain the channel color value, which includes:

[0013] defining the color model;

[0014] Calculating based on the first color value of the grayscale color value in the first hue function and the R channel operation relationship, and determining the R channel color value based on the difference between the calculated first operation result and the R color threshold;

[0015] Calculating based on the second color value of the grayscale color value in the first hue function and the G channel operation relationship, and determining the G channel color value based on the difference between the calculated second operation result and the G color threshold;

[0016] Calculating based on the third color value of the grayscale color value in the first hue function and the B channel operation relationship, and determining the B channel color value based on the difference between the calculated third operation result and the B color threshold;

[0017] Saturation adjustment is performed on the R channel color value, the G green channel color value, and the B channel color value to obtain the channel color value.

[0018] Furthermore, the step of obtaining the grayscale color value of the highlight object model to be rendered includes:

[0019] Obtaining a visible angle and a time variable of a highlight object model to be rendered highlight, wherein the visible angle is an angle between a normal direction of the highlight object model and a camera direction;

[0020] Calculate the R channel color value based on the second hue function of the defined color model, the visual angle, and the time variable;

[0021] The color value after saturation adjustment is performed on the R channel color value is determined as the grayscale color value.

[0022] Further, the calculating the R channel color value corresponding to the visible angle and the time variable based on the second hue function of the defined color model includes:

[0023] Extracting the integer part obtained by performing a first operation on the visible angle and the time variable, and the decimal part obtained by performing a second operation on the real time and the time variable based on the second hue function;

[0024] The R channel color value is obtained by performing numerical integration based on the integer part and the decimal part.

[0025] Furthermore, the method further comprises:

[0026] Extracting the normal vector of the highlight object model and the direction vector of the camera corresponding to the highlight to be rendered, and performing a fourth operation on the normal vector and the direction vector to obtain the visible angle;

[0027] The moving speed and the offset distance of the highlight object model are acquired, and a fifth operation is performed on the moving speed and the offset distance to obtain the time variable.

[0028] Furthermore, performing highlight rendering through the illumination parameters of the highlight object model and the color highlight value to obtain the game highlight on the highlight object model includes:

[0029] Under the condition of performing illumination rendering on the highlight object model, interpolation is performed based on the illumination parameters and the color highlight value, and highlight rendering is performed based on the illumination color value after difference, so as to obtain the game highlight.

[0030] According to another aspect of the present invention, a device for producing game highlights is provided, comprising:

[0031] An acquisition module, used to acquire the grayscale color value of the highlight object model to be rendered highlight;

[0032] A determination module, configured to perform color value conversion based on the grayscale color value to obtain a channel color value, and determine a color highlight value based on the channel color value and a highlight brightness control parameter;

[0033] A rendering module is used to perform highlight rendering through the illumination parameters of the highlight object model and the color highlight value to obtain the game highlight on the highlight object model.

[0034] Furthermore, the determining module includes:

[0035] A calculation unit, configured to perform color value calculations on the grayscale color values ​​respectively by using a first hue function corresponding to a defined color model to obtain channel color values, wherein the channel color values ​​include an R channel color value, a G channel color value, and a B channel color value;

[0036] The operation unit is used to perform a vector product operation on the channel color value and the highlight brightness control parameter to obtain a color highlight value.

[0037] Further, the calculation unit is used to define the color model; calculate based on the first color value of the grayscale color value in the first hue function and the R channel operation relationship, and determine the R channel color value based on the difference between the calculated first operation result and the R color threshold; calculate based on the second color value of the grayscale color value in the first hue function and the G channel operation relationship, and determine the G channel color value based on the difference between the calculated second operation result and the G color threshold; calculate based on the third color value of the grayscale color value in the first hue function and the B channel operation relationship, and determine the B channel color value based on the difference between the calculated third operation result and the B color threshold; adjust the saturation of the R channel color value, the G green channel color value, and the B channel color value to obtain the channel color value.

[0038] Furthermore, the acquisition module includes:

[0039] An acquisition unit, used to acquire a visible angle and a time variable of a highlight object model to be rendered highlight, wherein the visible angle is an angle between a normal direction of the highlight object model and a camera direction;

[0040] A calculation unit, configured to calculate an R channel color value based on a second hue function of a defined color model, the visual angle, and the time variable;

[0041] A determination unit is used to determine the color value after saturation adjustment of the R channel color value as the grayscale color value.

[0042] Furthermore, the calculation unit is used to extract the integer part obtained by performing a first operation on the visible angle and the time variable, and the decimal part obtained by performing a second operation on the real time and the time variable based on the second hue function; and perform numerical integration based on the integer part and the decimal part to obtain the R channel color value.

[0043] Furthermore, the device also includes:

[0044] An extraction module, used for extracting the normal vector of the highlight object model and the direction vector of the camera corresponding to the highlight to be rendered, and performing a fourth operation on the normal vector and the direction vector to obtain the visible angle;

[0045] The operation module is used to obtain the moving speed and the offset distance of the highlight object model, and perform a fifth operation on the moving speed and the offset distance to obtain the time variable.

[0046] Furthermore, the rendering module is specifically used to interpolate based on the lighting parameters and the color highlight value under the condition of performing lighting rendering on the highlight object model, and perform highlight rendering based on the difference lighting color value to obtain the game highlight.

[0047] According to another aspect of the present invention, a storage medium is provided, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute operations corresponding to the above-mentioned method for producing game highlights.

[0048] According to another aspect of the present invention, there is provided a terminal, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0049] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned method for making game highlights.

[0050] By means of the above technical solution, the technical solution provided by the embodiment of the present invention has at least the following advantages:

[0051] The present invention provides a method and device for producing game highlights. Compared with the prior art, the embodiments of the present invention obtain the grayscale color value of a highlight object model to be rendered with highlights; perform color value conversion based on the grayscale color value to obtain a channel color value, and determine a color highlight value based on the channel color value and a highlight brightness control parameter; perform highlight rendering through the illumination parameters of the highlight object model and the color highlight value to obtain a game highlight on the highlight object model, thereby achieving a colorful highlight display effect, greatly reducing the calculation consumption of the highlight color, reducing the system processing pressure of the highlight rendering, meeting the highlight rendering display requirements of the mobile terminal, thereby improving the high-efficiency rendering efficiency and achieving a variety of highlight effects.

[0052] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0054] Figure 1A flow chart of a method for producing game highlights provided by an embodiment of the present invention is shown;

[0055] Figure 2 A flow chart of another method for making game highlights provided by an embodiment of the present invention is shown;

[0056] Figure 3 A block diagram of a device for making game highlights provided by an embodiment of the present invention is shown;

[0057] Figure 4 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0058] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0059] The embodiment of the present invention provides a method for making game highlights, such as Figure 1 As shown, the method includes:

[0060] 101. Obtain the grayscale color value of the highlight object model to be rendered.

[0061] In the embodiment of the present invention, the current execution end as the execution subject for executing the game highlight production can be a terminal device or a server device. In the process of developing and producing games based on the game engine, a highlight object model that needs to be rendered with a highlight effect is selected to obtain the grayscale color value of this highlight model. Among them, the highlight object model can be a 3D model of a game character, character clothing, or character equipment. The grayscale color value is the color value of the highlight effect to be reflected by the highlight object model when the game player visually observes it. It can be determined based on the visual angle between the player and the model and the time variable, and the embodiment of the present invention does not make specific limitations.

[0062] 102. Perform color value conversion based on the grayscale color value to obtain a channel color value, and determine a color highlight value based on the channel color value and a highlight brightness control parameter.

[0063] In the embodiment of the present invention, since the obtained grayscale color value is expressed by a color value, such as the R channel color, in order to show the highlight of the colorful effect, the grayscale color value is converted into a color value to obtain a channel color value including the R channel color value, the G channel color value, and the B channel color value. Furthermore, the color highlight value is determined in combination with the channel color value and the pre-configured highlight brightness control parameter. At this time, the highlight brightness control parameter is used to characterize the parameter of the highlight display brightness, which can be configured based on the game scene or based on the type of device for rendering the highlight, and the embodiment of the present invention does not make specific limitations. For example, when the game scene is a dark and windy night, the highlight brightness control parameter on the character's armor is configured to be higher, and when the game scene is in the desert in the daytime, the highlight brightness control parameter on the character's armor is configured to be smaller, so as to show realistic highlight effects in different game scenes. In addition, the numerical range of the highlight brightness control parameter can be configured based on the parameter range requirements of different game engines, and can be configured through the lighting material, and the embodiment of the present invention does not make specific limitations.

[0064] 103. Perform highlight rendering using the illumination parameters of the highlight object model and the color highlight value to obtain game highlights on the highlight object model.

[0065] In an embodiment of the present invention, in order to save system computing consumption of highlight color, when performing highlight rendering, lighting rendering of the highlight object model is performed together with highlight rendering, that is, while lighting rendering is performed on the highlight object model, highlight rendering is performed according to the color highlight value to obtain a highlight effect on the highlight object model, which is not specifically limited in the embodiment of the present invention.

[0066] An embodiment of the present invention provides a method for producing game highlights. Compared with the prior art, the embodiment of the present invention obtains the grayscale color value of a highlight object model to be rendered with the highlight; performs color value conversion based on the grayscale color value to obtain a channel color value, and determines a color highlight value based on the channel color value and a highlight brightness control parameter; performs highlight rendering through the illumination parameters of the highlight object model and the color highlight value to obtain a game highlight on the highlight object model, thereby achieving a colorful highlight display effect, greatly reducing the computational consumption of the highlight color, reducing the system processing pressure of the highlight rendering, and meeting the highlight rendering display requirements of the mobile terminal, thereby improving the high-efficiency rendering efficiency and achieving a variety of highlight effects.

[0067] The embodiment of the present invention provides another method for making game highlights, such as Figure 2 As shown, the method includes:

[0068] 201. Obtain the visible angle and time variable of the highlight object model to be rendered.

[0069] In order to achieve a colorful highlight effect, when the current execution end obtains the grayscale color value, specifically, first obtains the visible angle and time variable of the highlight object model. The visible angle is the angle between the normal direction of the highlight object model and the camera direction, which can be calculated based on the dot product of the direction vector, and the time variable is the length of time that the highlight object model is visually visible to the game player, which can be determined based on the character's moving speed and moving distance, and the embodiment of the present invention does not make specific limitations.

[0070] In another embodiment of the present invention, for further definition and description, the steps further include:

[0071] Extracting the normal vector of the highlight object model and the direction vector of the camera corresponding to the highlight to be rendered, and performing a fourth operation on the normal vector and the direction vector to obtain the visible angle;

[0072] The moving speed and the offset distance of the highlight object model are acquired, and a fifth operation is performed on the moving speed and the offset distance to obtain the time variable.

[0073] In order to realize the calculation of grayscale color value based on visible angle and time variable to reduce the system computing power consumption, the current execution end extracts the normal vector of the highlight object model after determining the highlight object model, and determines the direction vector of the camera in the game scene. Among them, the normal vector can be determined based on the spatial coordinates of the highlight object model calculated by the game engine, and the direction vector can be determined based on the direction coordinates of the camera calculated by the game engine, which is not specifically limited in the embodiment of the present invention. In addition, when the normal vector and the direction vector are subjected to the fourth operation, the fourth operation can be a vector dot multiplication operation, so that the numerical result obtained by the dot multiplication operation is used as the visible angle. At the same time, when the current execution end calculates the time variable, it first determines the moving speed and offset distance of the highlight object model. At this time, the moving speed is the speed at which the highlight object model moves in the game scene, and the offset distance is the distance that the highlight object model moves relative to the camera, so as to obtain the time variable based on the fifth operation calculation. At this time, the fifth operation is the offset distance divided by the moving speed, and finally the time variable is obtained, which is not specifically limited in the embodiment of the present invention.

[0074] 202. Calculate an R channel color value based on a second hue function of a defined color model, the visible angle, and the time variable.

[0075] After obtaining the visible angle and time variables, in order to calculate the grayscale color value on the highlight object model, the current execution end predefines the color model of the highlight object model. The color model can be defined as an HSV model, and at the same time, a second hue function of the color model is defined, such as a HUE2RGB function, to calculate the R channel color value.

[0076] In another embodiment of the present invention, for further definition and explanation, the step of calculating the R channel color value corresponding to the visual angle and the time variable based on the second hue function of the defined color model includes:

[0077] Extracting the integer part obtained by performing a first operation on the visible angle and the time variable, and the decimal part obtained by performing a second operation on the real time and the time variable based on the second hue function;

[0078] The R channel color value is obtained by performing numerical integration based on the integer part and the decimal part.

[0079] Specifically, when calculating the color value of the R channel, in order to reduce the system computing consumption, the first operation of the visible angle and the time variable is performed based on the functional relationship in the second hue function. At this time, the first operation is a summation function relationship, that is, the visible angle and the time variable are added based on the second hue function, and the integer part of the calculation result is obtained. At the same time, the real-time time and the time variable are performed a second operation based on the functional relationship in the second hue function. At this time, the second operation is a product operation, that is, the real-time time and the time variable are multiplied based on the second hue function, and the decimal part of the calculation result is obtained. Finally, the integer part and the decimal part obtained based on the calculation are numerically integrated, and the obtained value is used as the color value of the R channel. Among them, the numerical integration is to perform a modulo operation on 1 after the integer part and the decimal part are combined into a value and take the absolute value as the obtained R channel color value.

[0080] It should be noted that, in an embodiment of the present invention, in order to improve the color fidelity of the highlight display, the saturation of the visible angle can be adjusted in advance when calculating the integer part. At this time, the adjusted numerical range can be configured based on the display requirements of the highlight effect in the game scene. At the same time, when performing the first operation, if the calculated value is too large, it is not suitable for a realistic highlight effect. Therefore, the calculated result can be multiplied by 0.1 to reduce the value of the integer part. For example, in a specific implementation scenario, after the saturation of the visible angle NoV is adjusted, the integer part of the time variable OffectAndSpeed ​​is multiplied by 0.1, and the real-time View.RealTime is multiplied by the decimal part of the time variable OffectAndSpeed, and the integer part and the decimal part are modulo 1 and the absolute value is taken to finally obtain the R channel color value.

[0081] 203. Determine a color value obtained by performing saturation adjustment on the R channel color value as the grayscale color value.

[0082] In order to present a realistic highlight effect, when calculating the grayscale color value, the current execution end directly determines the calculated R channel color value as the grayscale color value after saturation adjustment, which greatly reduces the system pressure on the grayscale calculation of the highlight object model. The saturation adjustment can be automatically adjusted according to the adjustment parameters, or can be adaptively adjusted based on the lighting requirements of the game scene, which is not specifically limited in the embodiment of the present invention.

[0083] 204. Perform color value calculations on the grayscale color values ​​respectively using a first hue function corresponding to the defined color model to obtain channel color values.

[0084] In order to achieve accurate calculation of channel color values ​​and thus display a colorful highlight effect, the current execution end predefines a color model, which may be an HSV model. At the same time, a first hue function of this color model is defined, such as a HUE2RGB function, to calculate R channel color values, G channel color values, and B channel color values, which is not specifically limited in the embodiment of the present invention.

[0085] In another embodiment of the present invention, for further definition and explanation, the step of calculating the color value of the grayscale color value by using the hue function in the defined color model to obtain the channel color value includes:

[0086] defining the color model;

[0087] Calculating based on the first color value of the grayscale color value in the first hue function and the R channel operation relationship, and determining the R channel color value based on the difference between the calculated first operation result and the R color threshold;

[0088] Calculating based on the second color value of the grayscale color value in the first hue function and the G channel operation relationship, and determining the G channel color value based on the difference between the calculated second operation result and the G color threshold;

[0089] Calculating based on the third color value of the grayscale color value in the first hue function and the B channel operation relationship, and determining the B channel color value based on the difference between the calculated third operation result and the B color threshold;

[0090] Saturation adjustment is performed on the R channel color value, the G green channel color value, and the B channel color value to obtain the channel color value.

[0091] In order to efficiently calculate the highlight rendering and reduce the calculation pressure of the highlight rendering of the system, in a specific implementation scenario, for the calculation of the R channel color value, at this time, the first hue function is used to characterize the functional relationship of the color values ​​corresponding to the variables of different dimensions, that is, firstly based on the grayscale color value in the first hue function and the R channel operation relationship, the calculation is performed. Among them, when determining the first color value, the grayscale color value can be used as the variable x to determine the first color value in the hue. At the same time, in an embodiment of the present invention, the R channel operation relationship is to multiply the first R channel parameter and then subtract it from the second R channel parameter to obtain the first operation result. At this time, the first R channel parameter can be 4, 6, 8, etc., preferably 6, and the second R channel parameter can be 2, 3, 4, etc., preferably 3, which is not specifically limited in the embodiment of the present invention. In addition, the R color threshold can be 1, and after obtaining the first operation result, it is subtracted from 1 to obtain the R channel color value. In addition, if the first operation result is a negative number, the first operation result can be converted into a numerical value that can be used to subtract from the R color threshold by taking the absolute value, which is not specifically limited in the embodiment of the present invention.

[0092] In a specific implementation scenario, for the calculation of the G channel color value, at this time, the first hue function is used to characterize the functional relationship of the color values ​​corresponding to the variables of different dimensions, that is, firstly based on the second color value whose grayscale color value is in the first hue function and the G channel operation relationship, the calculation is performed. Among them, when determining the second color value, the grayscale color value can be used as the variable x to determine the second color value in the hue. At the same time, in an embodiment of the present invention, the G channel operation relationship is to multiply the first G channel parameter and then subtract it from the second G channel parameter to obtain the second operation result. At this time, the first G channel parameter can be 4, 6, 8, etc., preferably 6, and the second G channel parameter can be 2, 3, 4, etc., preferably 2, which is not specifically limited in the embodiment of the present invention. In addition, the G color threshold can be 2, and after obtaining the second operation result, it is subtracted from 2 to obtain the G channel color value. Moreover, if the second operation result is a negative number, the second operation result can be converted into a numerical value that can be used to subtract from the G color threshold by taking the absolute value, which is not specifically limited in the embodiment of the present invention.

[0093] In a specific implementation scenario, for the calculation of the B channel color value, in a specific implementation scenario, for the calculation of the B channel color value, at this time, the first hue function is used to characterize the functional relationship of the color values ​​corresponding to the variables of different dimensions, that is, firstly based on the grayscale color value in the first hue function and the B channel operation relationship for calculation. Wherein, when determining the third color value, the grayscale color value can be used as the variable x to determine the third color value in the hue. At the same time, in an embodiment of the present invention, the B channel operation relationship is to multiply the first B channel parameter and then subtract it from the second B channel parameter to obtain the third operation result. At this time, the first B channel parameter can be 4, 6, 8, etc., preferably 6, and the second B channel parameter can be 2, 3, 4, etc., preferably 4, and the embodiment of the present invention does not make specific restrictions. In addition, the B color threshold can be 2, and after obtaining the third operation result, it is subtracted from 2 to obtain the B channel color value. Moreover, if the third operation result is a negative number, the third operation result can be converted into a numerical value that can be used to subtract from the B color threshold by taking the absolute value, and the embodiment of the present invention does not make specific restrictions.

[0094] It should be noted that after the current execution end calculates the R channel color value, the G green channel color value, and the B channel color value, in order to ensure the color display effect of the highlight, the saturation is adjusted and constructed as an RBG vector as the channel color value. Among them, the saturation adjustment can be automatically adjusted according to the adjustment parameters, or it can be adaptively adjusted based on the lighting requirements of the game scene, which is not specifically limited in the embodiment of the present invention.

[0095] 205. Perform a vector product operation on the channel color value and the highlight brightness control parameter to obtain a color highlight value.

[0096] In order to achieve a colorful highlight rendering effect and reduce the system processing pressure during highlight rendering, the current execution end performs vector product of the calculated R channel color value, G green channel color value, and B channel color value with the highlight brightness control parameter, and the product result is the color highlight value. At this time, when performing the vector product, the R channel color value, G green channel color value, and B channel color value can be vectorized to obtain a channel color value vector, which is then multiplied with the determined highlight brightness control parameter.

[0097] 206. Under the condition of performing lighting rendering on the highlight object model, interpolate based on the lighting parameters and the color highlight value, and perform highlight rendering based on the differenced lighting color value to obtain the game highlight.

[0098] In order to reduce the system performance overhead during highlight rendering and obtain realistic and colorful highlight effects, the current execution end adopts a method of performing highlight rendering simultaneously with the illumination rendering of the highlight object model when performing highlight rendering, that is, when the current execution end performs illumination rendering on the highlight object model, it performs interpolation calculation according to the illumination parameters and the color highlight value to obtain the illumination color value. Among them, the interpolation calculation can be based on linear interpolation, bilinear interpolation, etc., and can be selected and determined based on the terminal device that executes the current game highlight production. The embodiment of the present invention does not make specific limitations, and the rendering is based on the illumination color value after the difference to obtain the game highlight.

[0099] In a specific scenario of an embodiment of the present invention, when a player user downloads game a on a mobile phone to control a fairy character to perform a game task, when highlight rendering is required, the skin model of the fairy character is retrieved, the grayscale color value of the skin model to be highlighted is calculated, and converted into a color value vector containing R, G, and B color values. At this time, the fairy character is under the moonlight, and the corresponding highlight brightness control parameter is determined, and multiplied with the color value vector to obtain the color highlight value. When performing skin illumination rendering, interpolation is performed based on the illumination parameter and the color highlight value, so that highlight rendering is performed based on the interpolated color value to obtain the skin highlight of the fairy character.

[0100] An embodiment of the present invention provides another method for producing game highlights, which achieves a colorful highlight display effect, greatly reduces the calculation consumption of highlight color, reduces the system processing pressure of highlight rendering, meets the highlight rendering display requirements of mobile terminals, thereby improving high-efficiency rendering efficiency and achieving diversified highlight effects.

[0101] Furthermore, as a response to the above Figure 1 The embodiment of the present invention provides a device for making game highlights, such as Figure 3 As shown, the device comprises:

[0102] An acquisition module 31 is used to acquire the grayscale color value of the highlight object model to be rendered highlight;

[0103] A determination module 32, configured to perform color value conversion based on the grayscale color value to obtain a channel color value, and determine a color highlight value based on the channel color value and a highlight brightness control parameter;

[0104] The rendering module 33 is used to perform highlight rendering according to the illumination parameters of the highlight object model and the color highlight value to obtain the game highlight on the highlight object model.

[0105] Furthermore, the determining module includes:

[0106] A calculation unit, configured to perform color value calculations on the grayscale color values ​​respectively by using a first hue function corresponding to a defined color model to obtain channel color values, wherein the channel color values ​​include an R channel color value, a G channel color value, and a B channel color value;

[0107] The operation unit is used to perform a vector product operation on the channel color value and the highlight brightness control parameter to obtain a color highlight value.

[0108] Further, the calculation unit is used to define the color model; calculate based on the first color value of the grayscale color value in the first hue function and the R channel operation relationship, and determine the R channel color value based on the difference between the calculated first operation result and the R color threshold; calculate based on the second color value of the grayscale color value in the first hue function and the G channel operation relationship, and determine the G channel color value based on the difference between the calculated second operation result and the G color threshold; calculate based on the third color value of the grayscale color value in the first hue function and the B channel operation relationship, and determine the B channel color value based on the difference between the calculated third operation result and the B color threshold; adjust the saturation of the R channel color value, the G green channel color value, and the B channel color value to obtain the channel color value.

[0109] Furthermore, the acquisition module includes:

[0110] An acquisition unit, used to acquire a visible angle and a time variable of a highlight object model to be rendered highlight, wherein the visible angle is an angle between a normal direction of the highlight object model and a camera direction;

[0111] A calculation unit, configured to calculate an R channel color value based on a second hue function of a defined color model, the visual angle, and the time variable;

[0112] A determination unit is used to determine the color value after saturation adjustment of the R channel color value as the grayscale color value.

[0113] Furthermore, the calculation unit is used to extract the integer part obtained by performing a first operation on the visible angle and the time variable, and the decimal part obtained by performing a second operation on the real time and the time variable based on the second hue function; and perform numerical integration based on the integer part and the decimal part to obtain the R channel color value.

[0114] Furthermore, the device also includes:

[0115] An extraction module, used for extracting the normal vector of the highlight object model and the direction vector of the camera corresponding to the highlight to be rendered, and performing a fourth operation on the normal vector and the direction vector to obtain the visible angle;

[0116] The operation module is used to obtain the moving speed and the offset distance of the highlight object model, and perform a fifth operation on the moving speed and the offset distance to obtain the time variable.

[0117] Furthermore, the rendering module is specifically used to interpolate based on the lighting parameters and the color highlight value under the condition of performing lighting rendering on the highlight object model, and perform highlight rendering based on the difference lighting color value to obtain the game highlight.

[0118] An embodiment of the present invention provides a device for producing game highlights. Compared with the prior art, the embodiment of the present invention obtains the grayscale color value of a highlight object model to be rendered with highlights; performs color value conversion based on the grayscale color value to obtain a channel color value, and determines a color highlight value based on the channel color value and a highlight brightness control parameter; performs highlight rendering through the illumination parameters of the highlight object model and the color highlight value to obtain a game highlight on the highlight object model, thereby achieving a colorful highlight display effect, greatly reducing the computational consumption of the highlight color, reducing the system processing pressure of the highlight rendering, meeting the highlight rendering display requirements of the mobile terminal, thereby improving the high-efficiency rendering efficiency, and achieving a variety of highlight effects.

[0119] According to an embodiment of the present invention, a storage medium is provided, wherein the storage medium stores at least one executable instruction, and the computer executable instruction can execute the method for producing game highlights in any of the above method embodiments.

[0120] Figure 4 A schematic diagram of the structure of a terminal provided according to an embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the terminal.

[0121] like Figure 4 As shown, the terminal may include: a processor (processor) 402 , a communication interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .

[0122] The processor 402 , the communication interface 404 , and the memory 406 communicate with each other via a communication bus 408 .

[0123] The communication interface 404 is used to communicate with other devices such as clients or other servers.

[0124] The processor 402 is used to execute the program 410, and specifically can execute the relevant steps in the above-mentioned game highlight production method embodiment.

[0125] Specifically, the program 410 may include program codes, which include computer operation instructions.

[0126] The processor 402 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. The one or more processors included in the terminal may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0127] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0128] The program 410 may be specifically configured to enable the processor 402 to perform the following operations:

[0129] Get the grayscale color value of the highlight object model to be rendered;

[0130] Performing color value conversion based on the grayscale color value to obtain a channel color value, and determining a color highlight value based on the channel color value and a highlight brightness control parameter;

[0131] Highlight rendering is performed through the illumination parameters of the highlight object model and the color highlight value to obtain the game highlight on the highlight object model.

[0132] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0133] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for making game highlights, characterized in that: include: Get the grayscale color value of the highlight object model to be rendered; Performing color value conversion based on the grayscale color value to obtain a channel color value, and determining a color highlight value based on the channel color value and a highlight brightness control parameter, wherein the highlight brightness control parameter is used to characterize a parameter of a pre-configured highlight presentation brightness; Perform highlight rendering using the illumination parameters of the highlight object model and the color highlight value to obtain game highlights on the highlight object model; The converting of the color value based on the grayscale color value to obtain the channel color value, and determining the color highlight value based on the channel color value and the highlight brightness control parameter includes: The grayscale color values ​​are respectively calculated by a first hue function corresponding to a defined color model to obtain channel color values, wherein the channel color values ​​include an R channel color value, a G channel color value, and a B channel color value. The first hue function is used to characterize the functional relationship between color values ​​corresponding to variables of different dimensions, and the color model is an HSV model; Performing a vector product operation on the channel color value and the highlight brightness control parameter to obtain a color highlight value; The step of obtaining the grayscale color value of the highlight object model to be rendered includes: Obtaining a visible angle and a time variable of a highlight object model to be rendered highlight, wherein the visible angle is an angle between a normal direction of the highlight object model and a camera direction; Calculating the R channel color value based on a second hue function of the defined color model, the visible angle, and the time variable, wherein the second hue function is used to perform a first operation on the visible angle and the time variable, and to perform a second operation on the real time and the time variable, wherein the first operation is a summation function relationship, and the second operation is a product operation; Determine the color value after saturation adjustment of the R channel color value as the grayscale color value; The calculating of the R channel color value corresponding to the visual angle and the time variable based on the second hue function of the defined color model comprises: Extracting the integer part obtained by performing a first operation on the visible angle and the time variable, and the decimal part obtained by performing a second operation on the real time and the time variable based on the second hue function; Perform numerical integration based on the integer part and the decimal part to obtain the R channel color value; The method further comprises: Extracting the normal vector of the highlight object model and the direction vector of the camera corresponding to the highlight to be rendered, and performing a fourth operation on the normal vector and the direction vector to obtain the visible angle, wherein the fourth operation is a vector dot multiplication operation; Acquire the moving speed and the offset distance of the highlight object model, and perform a fifth operation on the moving speed and the offset distance to obtain the time variable, wherein the fifth operation is the offset distance divided by the moving speed; The performing highlight rendering by using the illumination parameters of the highlight object model and the color highlight value to obtain the game highlight on the highlight object model comprises: Under the condition of performing illumination rendering on the highlight object model, interpolation is performed based on the illumination parameters and the color highlight value, and highlight rendering is performed based on the illumination color value after difference, so as to obtain the game highlight.

2. The method according to claim 1, characterized in that The color value calculation is performed on the grayscale color value by the hue function in the defined color model to obtain the channel color value, which includes: defining the color model; Calculating based on a first color value of the grayscale color value in the first hue function and an R channel operation relationship, and determining the R channel color value based on a difference between the calculated first operation result and an R color threshold, wherein the R channel operation relationship is an operation relationship in which the first color value is multiplied by a first R channel parameter and then subtracted from a second R channel parameter; Calculating based on a second color value whose grayscale color value is in the first hue function and a G channel operation relationship, and determining the G channel color value based on a difference between the calculated second operation result and a G color threshold, wherein the G channel operation relationship is an operation relationship in which the second color value is multiplied by the first G channel parameter and then subtracted from the second G channel parameter; Calculating based on a third color value of the grayscale color value in the first hue function and a B channel operation relationship, and determining the B channel color value based on a difference between the calculated third operation result and a B color threshold, wherein the B channel operation relationship is an operation relationship in which the third color value is multiplied by the first B channel parameter and then subtracted from the second B channel parameter; Saturation adjustment is performed on the R channel color value, the G channel color value, and the B channel color value to obtain the channel color value.

3. A device for making game highlights, characterized in that: include: An acquisition module, used to acquire the grayscale color value of the highlight object model to be rendered highlight; A determination module, configured to perform color value conversion based on the grayscale color value to obtain a channel color value, and determine a color highlight value based on the channel color value and a highlight brightness control parameter, wherein the highlight brightness control parameter is used to characterize a parameter of a pre-configured highlight presentation brightness; A rendering module, used for performing highlight rendering according to the illumination parameters of the highlight object model and the color highlight value, to obtain game highlights on the highlight object model; Wherein, the determination module includes: A calculation unit, configured to calculate the color values ​​of the grayscale color values ​​respectively by using a first hue function corresponding to a defined color model to obtain channel color values, wherein the channel color values ​​include an R channel color value, a G channel color value, and a B channel color value, wherein the first hue function is used to characterize a functional relationship between color values ​​corresponding to variables of different dimensions, and the color model is an HSV model; An operation unit, used for performing a vector product operation on the channel color value and the highlight brightness control parameter to obtain a color highlight value; The acquisition module comprises: An acquisition unit, used to acquire a visible angle and a time variable of a highlight object model to be rendered highlight, wherein the visible angle is an angle between a normal direction of the highlight object model and a camera direction; a calculation unit, configured to calculate an R channel color value based on a second hue function of a defined color model, the visible angle, and the time variable, wherein the second hue function is used to perform a first operation on the visible angle and the time variable, and to perform a second operation on the real time and the time variable, wherein the first operation is a summation function relationship, and the second operation is a product operation; A determining unit, configured to determine a color value after saturation adjustment of the R channel color value as the grayscale color value; The calculation unit is used to extract the integer part obtained by performing a first operation on the visible angle and the time variable, and the decimal part obtained by performing a second operation on the real time and the time variable based on the second hue function; and perform numerical integration based on the integer part and the decimal part to obtain the R channel color value; The device also includes: An extraction module, used to extract the normal vector of the highlight object model and the direction vector of the camera corresponding to the highlight to be rendered, and perform a fourth operation on the normal vector and the direction vector to obtain the visible angle, wherein the fourth operation is a vector dot multiplication operation; A calculation module, used for obtaining the moving speed and the offset distance of the highlight object model, and performing a fifth calculation on the moving speed and the offset distance to obtain the time variable, wherein the fifth calculation is the offset distance divided by the moving speed; The rendering module is specifically used to interpolate the lighting parameters and the color highlight value under the condition of performing lighting rendering on the highlight object model, and perform highlight rendering based on the difference lighting color value to obtain the game highlight.

4. A storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute operations corresponding to the method for producing game highlights as described in any one of claims 1-2.

5. A terminal, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the method for producing game highlights as described in any one of claims 1-2.