WO2024082753A1 - 游戏指示器的生成方法、装置、计算机设备及存储介质 - Google Patents
游戏指示器的生成方法、装置、计算机设备及存储介质 Download PDFInfo
- Publication number
- WO2024082753A1 WO2024082753A1 PCT/CN2023/109196 CN2023109196W WO2024082753A1 WO 2024082753 A1 WO2024082753 A1 WO 2024082753A1 CN 2023109196 W CN2023109196 W CN 2023109196W WO 2024082753 A1 WO2024082753 A1 WO 2024082753A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- model
- vertex
- indicator
- target
- fan
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims description 56
- 238000012545 processing Methods 0.000 claims description 24
- 238000004590 computer program Methods 0.000 claims description 13
- 238000013507 mapping Methods 0.000 claims description 7
- 238000006243 chemical reaction Methods 0.000 claims description 6
- 230000004044 response Effects 0.000 claims description 6
- 238000004519 manufacturing process Methods 0.000 abstract description 7
- 230000009471 action Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 13
- 230000006870 function Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- 238000001514 detection method Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 208000015041 syndromic microphthalmia 10 Diseases 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 238000007792 addition Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000002860 competitive effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 230000001815 facial effect Effects 0.000 description 1
- 238000012905 input function Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/50—Controlling the output signals based on the game progress
- A63F13/53—Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game
- A63F13/537—Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/80—Special adaptations for executing a specific game genre or game mode
- A63F13/847—Cooperative playing, e.g. requiring coordinated actions from several players to achieve a common goal
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
Definitions
- the present disclosure relates to the field of game technology, and in particular to a method, device, computer equipment and storage medium for generating a game indicator.
- terminals such as smart phones, tablet computers and laptops
- terminals are developing in a diversified and personalized direction, and are increasingly becoming indispensable terminals in people's life and work.
- entertainment games that can be operated on terminals have emerged.
- multiplayer online tactical competitive games Multiplayer Online Battle Arena, MOBA
- massively multiplayer online games Massive Multiplayer Online, MMO
- client or server architecture are deeply loved by users because of their high fluency, good operation feel, real-time combat and other characteristics.
- the game screen displayed on the graphical user interface of a computer device is usually a screen obtained by observing the virtual environment with the main virtual character as the observation center.
- Players can control the main virtual character to release skills in a specified direction to attack enemy virtual characters in the specified direction.
- a game indicator is usually displayed in the game screen to prompt the player in which direction the skill can be released and the range of action.
- the relevant technology usually uses a mapping method to make a game indicator, and the indicator angle and range of action corresponding to the game indicator made in this way are fixed.
- the embodiments of the present disclosure provide a method, apparatus, computer device and storage medium for generating a game indicator, which can at least partially solve the problems that the existing game indicators are relatively rigid and single in expression, the steps for modifying the indicator angle and range of action corresponding to the game indicator are cumbersome, and the production efficiency of the game indicator is low.
- an embodiment of the present disclosure provides a method for generating a game indicator, the method comprising:
- the fan-shaped indicator model includes a plurality of model tops Point, each model vertex is set with a corresponding vertex color value, the vertex color value includes a first gray value and a second gray value, the first gray value is stored through a first color channel corresponding to the model vertex, and the second gray value is stored through a second color channel corresponding to the model vertex;
- the target radius and the target angle determined by the target fan indicator Based on the fan angle control parameter, the target radius and the target angle determined by the target fan indicator, generating the two-dimensional vertex coordinates of the model vertex corresponding to the target fan indicator;
- the target sector indicator is generated and displayed based on the adjusted three-dimensional vertex coordinates, the target angle and the target radius.
- an embodiment of the present disclosure further provides a device for generating a game indicator, the device for generating a game indicator comprising:
- an acquisition unit configured to acquire a preset fan-shaped indicator model, wherein the fan-shaped indicator model includes a plurality of model vertices, each model vertex is provided with a corresponding vertex color value, the vertex color value includes a first grayscale value and a second grayscale value, the first grayscale value is stored through a first color channel corresponding to the model vertex, and the second grayscale value is stored through a second color channel corresponding to the model vertex;
- a first adjustment unit is used to perform threshold adjustment processing on a first grayscale value of each model vertex of the fan-shaped indicator model, and use the adjusted first grayscale value of each model vertex of the fan-shaped indicator model as a fan angle control parameter corresponding to the target fan-shaped indicator;
- a first generating unit configured to generate two-dimensional vertex coordinates of a model vertex corresponding to the target sector indicator based on the sector angle control parameter, the target radius, and the target angle;
- a conversion unit used for converting the two-dimensional vertex coordinates of the model vertices into three-dimensional vertex coordinates
- a second adjustment unit configured to adjust the three-dimensional vertex coordinates based on a second grayscale value of each model vertex of the fan-shaped indicator model to obtain adjusted three-dimensional vertex coordinates
- the second generating unit is used to generate and display the target sector indicator based on the adjusted three-dimensional vertex coordinates, the target angle and the target radius.
- an embodiment of the present disclosure further provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements any step of a method for generating a game indicator when executed by the processor.
- an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the methods for generating a game indicator are implemented.
- the disclosed embodiments provide a method, apparatus, computer equipment and storage medium for generating a game indicator.
- the target fan-shaped indicator corresponding to the preset fan-shaped indicator model can be dynamically adjusted by changing parameters such as the fan radius and the preset angle in the three-dimensional vertex coordinates, thereby obtaining a fan-shaped indicator that can control the range of action in real time, diversifying the expression form of the fan-shaped indicator, simplifying the steps of modifying the indicator angle and range of action corresponding to the game indicator, and improving the production efficiency of the game indicator.
- FIG. 1 is a schematic diagram of a scenario of a system for generating a game indicator provided by one of the embodiments of the present disclosure.
- FIG. 2 is a flow chart of a method for generating a game indicator provided by one of the embodiments of the present disclosure.
- FIG3 is a schematic structural diagram of a fan-shaped indicator model provided by one of the embodiments of the present disclosure.
- FIG. 4 is a schematic diagram of the colors of each model vertex of the fan-shaped indicator model provided by one of the embodiments of the present disclosure.
- FIG. 5 is a schematic diagram of a scenario of a fan-shaped indicator model provided by one of the embodiments of the present disclosure.
- FIG. 6 is a schematic diagram of a scenario of vertex color thresholds of a fan-shaped indicator model provided by one of the embodiments of the present disclosure.
- FIG. 7 is a schematic diagram of another scenario of a fan-shaped indicator model provided in one of the embodiments of the present disclosure.
- FIG8 is a schematic diagram of the structure of a device for generating a game indicator provided by one of the embodiments of the present disclosure.
- FIG. 9 is a schematic diagram of the structure of a computer device provided in one of the embodiments of the present disclosure.
- the disclosed embodiments provide a method, device, computer device and storage medium for generating a game indicator.
- the method for generating a game indicator in the disclosed embodiments can be executed by a computer device, wherein the computer device can be a terminal or a server.
- the terminal can be a terminal device such as a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA), etc.
- the terminal can also include a client, which can be a game application client, a browser client carrying a game program, or an instant messaging client.
- the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
- basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
- the terminal device when the method for generating the game indicator is run on a terminal, the terminal device stores a game application and is used to present a virtual scene in the game screen.
- the terminal device is used to interact with the user through a graphical user interface, for example, the game application is downloaded and installed by the terminal device and run.
- the terminal device may provide the graphical user interface to the user in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal device, or the graphical user interface may be presented through holographic projection.
- the terminal device may include a touch display screen and a processor, the touch display screen is used to present a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, respond to operation instructions, and control the display of the graphical user interface on the touch display screen.
- the touch display screen is used to present a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface
- the graphical user interface includes a game screen
- the processor is used to run the game, generate a graphical user interface, respond to operation instructions, and control the display of the graphical user interface on the touch display screen.
- Cloud gaming refers to a gaming method based on cloud computing.
- the operating body of the game application and the main body of the game screen presentation are separated, and the storage and operation of the method for generating the game indicator are completed on the cloud gaming server.
- the game screen presentation is completed on the client side of the cloud gaming.
- the cloud gaming client is mainly used for receiving and sending game data and presenting the game screen.
- the cloud gaming client can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a PDA, a personal digital assistant, etc., but the terminal device for processing game data is the cloud gaming server in the cloud.
- the user operates the cloud gaming client to send an operation instruction to the cloud gaming server.
- the cloud gaming server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the cloud gaming client through the network.
- the cloud gaming client decodes and outputs the game screen.
- FIG. 1 is a scene diagram of a system for generating a game indicator provided by an embodiment of the present disclosure.
- the system may include at least one terminal, at least one server, at least one database, and a network.
- the terminal held by the user can be connected to the servers of different games through the network.
- the terminal is any device with computing hardware that can support and execute software products corresponding to the game.
- the system includes multiple terminals, multiple servers, and multiple networks, different terminals can be connected to each other through different networks and different servers.
- the network can be a wireless network or a wired network, such as a wireless network such as a wireless local area network (WLAN), a local area network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, etc.
- WLAN wireless local area network
- LAN local area network
- cellular network a 2G network
- 3G network a 3G network
- 4G network a 5G network
- different terminals can also use their own Bluetooth network or hotspot network to connect to other terminals or to servers, etc.
- multiple users can be online through different terminals and thus connected and synchronized with each other through appropriate networks to support multi-player games.
- the system may include multiple databases, multiple databases are coupled to different servers, and information related to the game environment can be continuously stored in the database when different users are online for multi-player games.
- scenario diagram of the game indicator generation system shown in Figure 1 is merely an example.
- the game indicator generation system and scenario described in the embodiments of the present disclosure are intended to more clearly illustrate the technical solution of the embodiments of the present disclosure, and do not constitute a limitation on the technical solution provided by the embodiments of the present disclosure.
- Those skilled in the art will appreciate that with the emergence of new business scenarios, the technical solution provided by the embodiments of the present disclosure is equally applicable to similar technical problems.
- the embodiments of the present disclosure provide a method, device, computer equipment and storage medium for generating a game indicator, which can improve the efficiency of making a game indicator. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.
- FIG. 2 is a schematic flow chart of a method for generating a game indicator provided by an embodiment of the present disclosure.
- the specific flow of the method for generating a game indicator may be shown in steps 101 to 106 as follows:
- the fan-shaped indicator model includes a plurality of model vertices, each model vertex is provided with a corresponding vertex color value, the vertex color value includes a first grayscale value and a second grayscale value, the first grayscale value is stored via a first color channel corresponding to the model vertex, and the second grayscale value is stored via a second color channel corresponding to the model vertex.
- the artist can use 3D software to create a fan-shaped indicator model in the model space, and draw the vertex color (VertexColor) corresponding to each model vertex.
- the vertex color includes a first gray value and a second gray value.
- the fan-shaped indicator model also exists in the world space.
- the model space is a three-dimensional space constructed with the origin of the virtual model itself, and the world space can be understood as a three-dimensional space shared by all virtual models.
- VertexColor is the color of each vertex on the virtual model.
- the embodiment of the present disclosure can select the A channel to store the first gray value and the R channel to store the second gray value.
- G can also be selected to store the first gray value
- B can be selected to store the second gray value, that is, any two channels in the RGBA channel can be arbitrarily selected to store the first gray value and the second gray value, wherein the value range of the first gray value and the second gray value is [0,1], wherein 0 represents black and 1 represents white.
- Figure 4 is a color diagram of each model vertex of the fan indicator model, which is used to intuitively express the color expression of the first grayscale value and the second grayscale value of each model vertex of the fan indicator model.
- the setting rule of VertexColor.a (first grayscale value) of each model vertex is that the first grayscale value of the model vertex from left to right is set from small to large, so that the first grayscale value can be used as a fan angle control parameter, so that the value stored in the A channel plays a role in constructing the positive and negative relationship of the model vertex coordinates.
- the setting rule of VertexColor.r (second grayscale value) of each model vertex is that the second grayscale value of the model vertex from the center to the surrounding is set from small to large, so that the second grayscale value can be used as a fan radius control parameter, so that the value stored in the R channel plays a role in constraining the vertex range of the model vertex coordinates.
- the preset sector indicator model and the subsequent adjustment of the preset sector indicator model are all grid models with a thickness parameter of zero.
- the step of "threshold adjustment processing is performed on the first grayscale value of each model vertex of the fan indicator model, and the adjusted first grayscale value of each model vertex of the fan indicator model is used as the fan angle control parameter corresponding to the target fan indicator" the method may include:
- a first grayscale value of each model vertex of the fan-shaped indicator model is mapped from an initial threshold range to a target threshold range.
- the step of “mapping the first grayscale value of each model vertex of the fan-shaped indicator model from the initial threshold range to the target threshold range by specifying the offset parameter value and adjusting the weight value” may include:
- the product of the difference value of each model vertex and the adjustment weight value is obtained, and the product of each model vertex is used as the fan angle control parameter of each model vertex.
- the specified offset parameter value and the adjustment weight value provided in the embodiment of the present disclosure are set by artists to achieve mapping of the first grayscale value of each model vertex of the fan-shaped indicator model from the initial threshold range to the target threshold range.
- the parameter 0.5 is used as the specified offset parameter value
- the parameter 2 is used as the adjustment weight value, so as to adjust the first grayscale value of each model vertex, so as to achieve mapping the first grayscale value of each model vertex of the fan indicator model from the initial threshold range to the target threshold range.
- the center point of the target sector indicator model can be placed at the origin of the two-dimensional coordinate system.
- the radius of the target sector indicator model is r.
- the angle between the straight line from point a1 to the origin and the y-axis is A/2.
- the method may include:
- Initialization processing is performed on vertex coordinates corresponding to each model vertex among the multiple model vertices, so that the vertex coordinates are set to zero.
- the step of “converting the two-dimensional vertex coordinates of the model vertices into three-dimensional vertex coordinates” may include:
- the three-dimensional vertex coordinates of each model vertex are determined based on the two-dimensional vertex coordinates of each model vertex and the coordinate value.
- the coordinate value of each model vertex on the target coordinate axis can be set to a non-zero value.
- the step of “adjusting the three-dimensional vertex coordinates based on the second grayscale value of each model vertex of the fan-shaped indicator model to obtain adjusted three-dimensional vertex coordinates” may include:
- the second grayscale value of each model vertex is multiplied by its corresponding three-dimensional vertex coordinate to obtain the adjusted three-dimensional vertex coordinate of each model vertex.
- N(x,0,z) N(sin((A/2)*vc.a)*r,0,cos((A/2)*vc.a)*r).
- N(x,0,z) N(sin((A/2)*vc.a)*r*vc.r,0,cos((A/2)*vc.a)*r*vc.r).
- the method may include:
- the target sector indicator is updated based on the target three-dimensional vertex coordinates of each model vertex, and the updated target sector indicator is generated and displayed.
- the step of “adjusting the adjusted three-dimensional vertex coordinates of each model vertex in the target sector indicator based on the sector model adjustment parameters to obtain the target three-dimensional vertex coordinates of each model vertex” may include:
- the target angle and/or the target radius in the adjusted three-dimensional vertex coordinates of each model vertex in the target sector indicator are replaced to obtain the target three-dimensional vertex coordinates of each model vertex.
- the player can control the main virtual character to release skills in a specified direction to attack the enemy virtual character in the specified direction.
- a target fan-shaped indicator is usually displayed in the game screen to prompt the player, the direction in which the game skills triggered by the main virtual character currently controlled by the player can be released and the scope of the game skills.
- the player controls the main virtual character to chase and capture other virtual characters controlled by other players.
- a target fan-shaped indicator is generated in front of the main virtual character as a capture field of view.
- the main virtual character can increase the radius and angle of the target fan-shaped indicator through upgrades or virtual item additions, thereby increasing the scope of the fan-shaped area of the target fan-shaped indicator.
- Artists can use 3D software to create a fan-shaped indicator model in the model space, and draw the vertex color (VertexColor) corresponding to each model vertex, which includes a first grayscale value and a second grayscale value.
- the disclosed embodiment can use the A channel to store the first grayscale value and the R channel to store the second grayscale value, wherein the value range of the first grayscale value and the second grayscale value is [0,1], wherein 0 represents black and 1 represents white.
- the setting rule of VertexColor.a (first grayscale value) of each model vertex is that the first grayscale value of the model vertex from left to right is set from small to large, so that the first grayscale value can be used as a fan angle control parameter, thereby realizing that the value stored in the A channel plays a role in constructing the positive and negative relationship of the model vertex coordinates.
- the setting rule of VertexColor.r (second grayscale value) of each model vertex is that the second grayscale value of the model vertex from the center to the surrounding is set from small to large, so that the second grayscale value can be used as a fan radius control parameter, thereby realizing that the value stored in the R channel plays a role in constraining the vertex range of the model vertex coordinates.
- the center point of the fan-shaped indicator model can be placed at the origin of the two-dimensional coordinate system.
- the radius of the sector indicator model is r.
- the angle between the straight line from point a1 to the origin and the y-axis is A/2.
- N(x,0,z) N(sin((A/2)*vc.a)*r*vc.r,0,cos((A/2)*vc.a)*r*vc.r).
- the model scaling value origin position needs to be added to the vertex position of the fan indicator model in the model space when the model is output, and then the subsequent screen drawing is continued in the world space to display the fan indicator corresponding to the fan indicator model on the screen.
- the computer device can obtain the target radius and target angle corresponding to the target sector indicator ultimately required by the artist, and substitute the target radius and target angle into the calculation formula of each model vertex corresponding to the preset sector indicator model.
- the computer device can obtain the fan model adjustment parameters set by the artist, and the computer device can obtain the fan model adjustment parameters in response to the adjustment instruction for the target fan indicator, wherein the fan model adjustment parameters include angle adjustment parameters and/or radius adjustment parameters; based on the fan model adjustment parameters, the adjusted three-dimensional vertex coordinates of each model vertex in the target fan indicator are adjusted to obtain the target three-dimensional vertex coordinates of each model vertex; based on the target three-dimensional vertex coordinates of each model vertex, the target fan indicator is updated, and the updated target fan indicator is generated and displayed.
- the computer device can replace the target angle and/or target radius in the adjusted three-dimensional vertex coordinates of each model vertex in the target fan indicator based on the angle adjustment parameter and/or the radius adjustment parameter to obtain the target three-dimensional vertex coordinates of each model vertex, and generate and display the adjusted target fan indicator according to the target three-dimensional vertex coordinates.
- the embodiment of the present disclosure provides a method for generating a game indicator, by acquiring a preset fan-shaped indicator model, wherein the fan-shaped indicator model includes a plurality of model vertices, each model vertex is provided with a corresponding vertex color value, the vertex color value includes a first grayscale value and a second grayscale value, the first grayscale value is stored through a first color channel corresponding to the model vertex, and the second grayscale value is stored through a second color channel corresponding to the model vertex; threshold adjustment processing is performed on the first grayscale value of each model vertex of the fan-shaped indicator model, and the adjusted first grayscale value of each model vertex of the fan-shaped indicator model is used as a fan angle control parameter corresponding to the target fan-shaped indicator; based on the fan angle control parameter, a target radius and a target angle determined by the target fan-shaped indicator, a two-dimensional vertex coordinate of the model vertex corresponding to the target fan-shaped indicator is generated; the two-dimensional vertex coordinate of
- the target sector indicator constructs the three-dimensional vertex coordinates of each model vertex based on the preset sector indicator model, and can dynamically adjust the target sector indicator corresponding to the preset sector indicator model by changing the sector radius and the preset angle and other parameters in the three-dimensional vertex coordinates, thereby obtaining a sector indicator that can control the scope of action in real time, diversifying the expression form of the sector indicator, simplifying the steps of modifying the indicator angle and scope of action corresponding to the game indicator, and improving the production efficiency of the game indicator.
- the embodiment of the present disclosure also provides a device for generating a game indicator based on the above-mentioned method.
- the meanings of the terms are the same as those in the method for generating a game indicator, and the specific implementation details can refer to the description in the method embodiment.
- FIG8 is a schematic diagram of the structure of a device for generating a game indicator provided by an embodiment of the present disclosure, the device comprising:
- An acquisition unit 201 is used to acquire a preset fan-shaped indicator model, wherein the fan-shaped indicator model includes a plurality of model vertices, each model vertex is provided with a corresponding vertex color value, the vertex color value includes a first grayscale value and a second grayscale value, the first grayscale value is stored through a first color channel corresponding to the model vertex, and the second grayscale value is stored through a second color channel corresponding to the model vertex;
- a first adjustment unit 202 is used to perform threshold adjustment processing on the first grayscale value of each model vertex of the fan-shaped indicator model, and use the adjusted first grayscale value of each model vertex of the fan-shaped indicator model as a fan angle control parameter corresponding to the target fan-shaped indicator;
- a first generating unit 203 configured to generate two-dimensional vertex coordinates of a model vertex corresponding to the target sector indicator based on the sector angle control parameter, the target radius and the target angle;
- a conversion unit 204 used to convert the two-dimensional vertex coordinates of the model vertices into three-dimensional vertex coordinates
- a second adjustment unit 205 configured to adjust the three-dimensional vertex coordinates based on a second grayscale value of each model vertex of the fan-shaped indicator model to obtain adjusted three-dimensional vertex coordinates;
- the second generating unit 206 is configured to generate and display the target sector indicator based on the adjusted three-dimensional vertex coordinates, the target angle and the target radius.
- the game indicator generating device includes:
- the first processing subunit is used to initialize the vertex coordinates corresponding to each model vertex among the multiple model vertices so as to set the vertex coordinates to zero.
- the game indicator generating device includes:
- a first acquisition subunit is configured to acquire a sector model adjustment parameter in response to an adjustment instruction for the target sector indicator, wherein the sector model adjustment parameter includes an angle adjustment parameter and/or a radius adjustment parameter;
- An adjustment subunit configured to adjust the adjusted three-dimensional vertex coordinates of each model vertex in the target sector indicator based on the sector model adjustment parameters to obtain target three-dimensional vertex coordinates of each model vertex;
- the updating subunit is used to update the target sector indicator based on the target three-dimensional vertex coordinates of each model vertex, and generate and display the updated target sector indicator.
- the game indicator generating device includes:
- the replacement subunit is used to replace the target angle and/or target radius in the adjusted three-dimensional vertex coordinates of each model vertex in the target sector indicator based on the angle adjustment parameter and/or the radius adjustment parameter to obtain the target three-dimensional vertex coordinates of each model vertex.
- the game indicator generating device includes:
- the mapping subunit is used to map the first grayscale value of each model vertex of the fan-shaped indicator model from an initial threshold range to a target threshold range by specifying an offset parameter value and adjusting a weight value.
- the game indicator generating device includes:
- a second acquisition subunit used for acquiring a difference between the first grayscale value of each model vertex and the specified offset parameter value
- the second acquisition subunit is further used to obtain the product of the difference value of each model vertex and the adjustment weight value, and use the product of each model vertex as the fan angle control parameter of each model vertex.
- the game indicator generating device includes:
- a determination subunit configured to determine, based on a positional relationship between the fan-shaped indicator model and the preset coordinate system, a target coordinate axis of the fan-shaped indicator model in a vertical relationship in the preset coordinate system;
- a setting subunit used for setting the coordinate value of each model vertex on the target coordinate axis to zero;
- the determination subunit is further used to determine the three-dimensional vertex coordinates of each model vertex based on the two-dimensional vertex coordinates of each model vertex and the coordinate value.
- the game indicator generating device includes:
- the second processing subunit is used to compare the second gray value of each model vertex with its corresponding three-dimensional
- the vertex coordinates are multiplied to obtain the adjusted three-dimensional vertex coordinates of each model vertex.
- the embodiment of the present disclosure provides a device for generating a game indicator, wherein an acquisition unit 201 acquires a preset fan-shaped indicator model, wherein the fan-shaped indicator model includes a plurality of model vertices, each model vertex is provided with a corresponding vertex color value, the vertex color value includes a first grayscale value and a second grayscale value, the first grayscale value is stored through a first color channel corresponding to the model vertex, and the second grayscale value is stored through a second color channel corresponding to the model vertex; a first adjustment unit 202 performs threshold adjustment processing on the first grayscale value of each model vertex of the fan-shaped indicator model, and uses the adjusted first grayscale value of each model vertex of the fan-shaped indicator model as the
- the first generation unit 203 generates the two-dimensional vertex coordinates of the model vertex corresponding to the target sector indicator based on the sector angle control parameters, the target radius and the target angle; the conversion unit 204 converts the two-dimensional vertex coordinates of the model
- the disclosed embodiment constructs the three-dimensional vertex coordinates of each model vertex based on the preset sector indicator model, and can dynamically adjust the target sector indicator corresponding to the preset sector indicator model by changing the sector radius and the preset angle in the three-dimensional vertex coordinates, so as to obtain a sector indicator that can control the scope of action in real time, diversify the expression of the sector indicator, simplify the steps of modifying the indicator angle and the scope of action corresponding to the game indicator, and improve the production efficiency of the game indicator.
- FIG9 is a schematic diagram of the structure of the computer device provided in the embodiment of the present disclosure.
- the computer device 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor.
- the processor 301 is electrically connected to the memory 302.
- the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or Different component arrangements.
- the processor 301 is the control center of the computer device 300. It uses various interfaces and lines to connect the various parts of the entire computer device 300, executes various functions of the computer device 300 and processes data by running or loading software programs and/or modules stored in the memory 302, and calling data stored in the memory 302, thereby monitoring the computer device 300 as a whole.
- the processor 301 in the computer device 300 will load instructions corresponding to the processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 will run the application programs stored in the memory 302 to implement various functions:
- the fan-shaped indicator model includes a plurality of model vertices, each model vertex is provided with a corresponding vertex color value, the vertex color value includes a first grayscale value and a second grayscale value, the first grayscale value is stored through a first color channel corresponding to the model vertex, and the second grayscale value is stored through a second color channel corresponding to the model vertex;
- the target radius and the target angle determined by the target fan indicator Based on the fan angle control parameter, the target radius and the target angle determined by the target fan indicator, generating the two-dimensional vertex coordinates of the model vertex corresponding to the target fan indicator;
- the three-dimensional vertex coordinates are adjusted to obtain adjusted three-dimensional vertex coordinates
- the target sector indicator is generated and displayed based on the adjusted three-dimensional vertex coordinates, the target angle and the target radius.
- the method before generating the two-dimensional vertex coordinates of the model vertex corresponding to the target sector indicator based on the sector angle control parameter, the target radius and the target angle determined by the target sector indicator, the method further includes:
- Initialization processing is performed on vertex coordinates corresponding to each model vertex among the multiple model vertices so that the vertex coordinates are set to zero.
- the method further includes:
- a sector model adjustment parameter is obtained, wherein
- the fan-shaped model adjustment parameters include angle adjustment parameters and/or radius adjustment parameters
- the target sector indicator is updated based on the target three-dimensional vertex coordinates of each model vertex, and the updated target sector indicator is generated and displayed.
- adjusting the adjusted three-dimensional vertex coordinates of each model vertex in the target sector indicator based on the sector model adjustment parameters to obtain the target three-dimensional vertex coordinates of each model vertex includes:
- the target angle and/or the target radius in the adjusted three-dimensional vertex coordinates of each model vertex in the target sector indicator are replaced to obtain the target three-dimensional vertex coordinates of each model vertex.
- the threshold adjustment process is performed on the first grayscale value of each model vertex of the fan-shaped indicator model, and the adjusted first grayscale value of each model vertex of the fan-shaped indicator model is used as the fan angle control parameter corresponding to the target fan-shaped indicator, including:
- a first grayscale value of each model vertex of the fan-shaped indicator model is mapped from an initial threshold range to a target threshold range.
- mapping the first grayscale value of each model vertex of the fan-shaped indicator model from an initial threshold range to a target threshold range by specifying an offset parameter value and adjusting a weight value comprises:
- the product of the difference value of each model vertex and the adjustment weight value is obtained, and the product of each model vertex is used as the fan angle control parameter of each model vertex.
- converting the two-dimensional vertex coordinates of the model vertices into three-dimensional vertex coordinates includes:
- the three-dimensional vertex coordinates of each model vertex are determined based on the two-dimensional vertex coordinates of each model vertex and the coordinate value.
- the second grayscale value of each model vertex of the fan-shaped indicator model is value, adjusting the three-dimensional vertex coordinates to obtain adjusted three-dimensional vertex coordinates, including:
- the second grayscale value of each model vertex is multiplied by its corresponding three-dimensional vertex coordinate to obtain the adjusted three-dimensional vertex coordinate of each model vertex.
- the preset sector indicator model and the target sector indicator are both grid models with a thickness parameter of zero.
- the computer device 300 further includes: a touch screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307.
- the processor 301 is electrically connected to the touch screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307.
- the computer device structure shown in FIG4 does not limit the computer device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.
- the touch display screen 303 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface.
- the touch display screen 303 may include a display panel and a touch panel.
- the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the computer device, and these graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof.
- the display panel can be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode) and the like.
- LCD liquid crystal display
- OLED Organic Light-Emitting Diode
- the touch panel can be used to collect the user's touch operation on or near it (such as the user uses any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs.
- the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, and converts it into touch point coordinates, and then sends it to the processor 301, and can receive commands sent by the processor 301 and execute them.
- the touch panel can cover the display panel.
- the touch panel When the touch panel detects a touch operation on or near it, it is transmitted to the processor 301 to determine the type of touch event, and then the processor 301 provides corresponding visual output on the display panel according to the type of touch event.
- the touch panel and the display panel can be integrated into the touch display screen 303 to realize the input and output functions.
- the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 303 can also be used as a part of the input unit 306. The input function is realized.
- the processor 301 executes the game application to generate a graphical user interface on the touch screen 303.
- the touch screen 303 is used to present the graphical user interface and receive operation instructions generated by the user acting on the graphical user interface.
- the radio frequency circuit 304 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other computer devices through wireless communication, and to send and receive signals between the network device or other computer devices.
- the audio circuit 305 can be used to provide an audio interface between the user and the computer device through a speaker and a microphone.
- the audio circuit 305 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 305 and converted into audio data, and then the audio data is output to the processor 301 for processing, and then sent to another computer device through the radio frequency circuit 304, or the audio data is output to the memory 302 for further processing.
- the audio circuit 305 may also include an earphone jack to provide communication between an external headset and the computer device.
- the input unit 306 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
- user feature information such as fingerprint, iris, facial information, etc.
- the power supply 307 is used to supply power to various components of the computer device 300.
- the power supply 307 can be logically connected to the processor 301 through a power management system, so that the power management system can manage charging, discharging, and power consumption.
- the power supply 307 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
- the computer device 300 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail herein.
- the computer device obtains a preset fan-shaped indicator model, wherein the fan-shaped indicator model includes a plurality of model vertices, each model vertex is provided with a corresponding vertex color value, the vertex color value includes a first grayscale value and a second grayscale value, the first grayscale value is stored through a first color channel corresponding to the model vertex, and the second grayscale value is stored through a second color channel corresponding to the model vertex; the first grayscale value of each model vertex of the fan-shaped indicator model is stored in a first grayscale channel corresponding to the model vertex.
- the value is threshold-adjusted, and the adjusted first grayscale value of each model vertex of the fan indicator model is used as the fan angle control parameter corresponding to the target fan indicator; based on the fan angle control parameter, the target radius and the target angle determined by the target fan indicator, the two-dimensional vertex coordinates of the model vertex corresponding to the target fan indicator are generated; the two-dimensional vertex coordinates of the model vertex are converted into three-dimensional vertex coordinates; based on the second grayscale value of each model vertex of the fan indicator model, the three-dimensional vertex coordinates are adjusted to obtain the adjusted three-dimensional vertex coordinates; based on the adjusted three-dimensional vertex coordinates, the target angle and the target radius, the target fan indicator is generated and displayed.
- the disclosed embodiment constructs the three-dimensional vertex coordinates of each model vertex based on the preset fan indicator model, and can dynamically adjust the target fan indicator corresponding to the preset fan indicator model by changing the parameters such as the fan radius and the preset angle in the three-dimensional vertex coordinates, so as to obtain a fan indicator that can control the scope of action in real time, so as to diversify the expression form of the fan indicator, simplify the steps of modifying the indicator angle and the scope of action corresponding to the game indicator, and improve the production efficiency of the game indicator.
- the present disclosure provides a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer program can be loaded by a processor to execute the steps in any of the methods for generating a game indicator provided in the present disclosure.
- the computer program can execute the following steps:
- the fan-shaped indicator model includes a plurality of model vertices, each model vertex is provided with a corresponding vertex color value, the vertex color value includes a first grayscale value and a second grayscale value, the first grayscale value is stored through a first color channel corresponding to the model vertex, and the second grayscale value is stored through a second color channel corresponding to the model vertex;
- the target radius and the target angle determined by the target fan indicator Based on the fan angle control parameter, the target radius and the target angle determined by the target fan indicator, generating the two-dimensional vertex coordinates of the model vertex corresponding to the target fan indicator;
- the target sector indicator is generated and displayed based on the adjusted three-dimensional vertex coordinates, the target angle and the target radius.
- the method before generating the two-dimensional vertex coordinates of the model vertex corresponding to the target sector indicator based on the sector angle control parameter, the target radius and the target angle determined by the target sector indicator, the method further includes:
- Initialization processing is performed on vertex coordinates corresponding to each model vertex among the multiple model vertices, so that the vertex coordinates are set to zero.
- the method further includes:
- the target sector indicator is updated based on the target three-dimensional vertex coordinates of each model vertex, and the updated target sector indicator is generated and displayed.
- adjusting the adjusted three-dimensional vertex coordinates of each model vertex in the target sector indicator based on the sector model adjustment parameters to obtain the target three-dimensional vertex coordinates of each model vertex includes:
- the target angle and/or the target radius in the adjusted three-dimensional vertex coordinates of each model vertex in the target sector indicator are replaced to obtain the target three-dimensional vertex coordinates of each model vertex.
- the threshold adjustment process is performed on the first grayscale value of each model vertex of the fan-shaped indicator model, and the adjusted first grayscale value of each model vertex of the fan-shaped indicator model is used as the fan angle control parameter corresponding to the target fan-shaped indicator, including:
- a first grayscale value of each model vertex of the fan-shaped indicator model is mapped from an initial threshold range to a target threshold range.
- the fan-shaped pointer is set by specifying the offset parameter value and adjusting the weight value.
- the first grayscale value of each model vertex of the indicator model is mapped from the initial threshold range to the target threshold range, including:
- the product of the difference value of each model vertex and the adjustment weight value is obtained, and the product of each model vertex is used as the fan angle control parameter of each model vertex.
- converting the two-dimensional vertex coordinates of the model vertices into three-dimensional vertex coordinates includes:
- the three-dimensional vertex coordinates of each model vertex are determined based on the two-dimensional vertex coordinates of each model vertex and the coordinate value.
- the adjusting the three-dimensional vertex coordinates based on the second grayscale value of each model vertex of the fan-shaped indicator model to obtain the adjusted three-dimensional vertex coordinates includes:
- the second grayscale value of each model vertex is multiplied by its corresponding three-dimensional vertex coordinate to obtain the adjusted three-dimensional vertex coordinate of each model vertex.
- the preset sector indicator model and the target sector indicator are both grid models with a thickness parameter of zero.
- the storage medium may include: read-only memory (ROM), random access memory (RAM), disk or CD, etc.
- the fan indicator model includes a plurality of model vertices, each model vertex is provided with a corresponding vertex color value, the vertex color value includes a first gray value and a second gray value, the first gray value is stored through a first color channel corresponding to the model vertex, and the second gray value is stored through a second color channel corresponding to the model vertex; threshold adjustment processing is performed on the first gray value of each model vertex of the fan indicator model, and the adjusted first gray value of each model vertex of the fan indicator model is used as a fan angle control parameter corresponding to the target fan indicator; based on the fan angle control parameter, a target radius and a target angle determined by the target fan indicator, the target fan is generated.
- the two-dimensional vertex coordinates of the model vertex corresponding to the fan-shaped indicator converting the two-dimensional vertex coordinates of the model vertex into three-dimensional vertex coordinates; adjusting the three-dimensional vertex coordinates based on the second grayscale value of each model vertex of the fan-shaped indicator model to obtain adjusted three-dimensional vertex coordinates; generating and displaying the target fan-shaped indicator based on the adjusted three-dimensional vertex coordinates, the target angle and the target radius.
- the disclosed embodiment constructs the three-dimensional vertex coordinates of each model vertex based on a preset fan-shaped indicator model, and can dynamically adjust the target fan-shaped indicator corresponding to the preset fan-shaped indicator model by changing parameters such as the fan radius and the preset angle in the three-dimensional vertex coordinates, thereby obtaining a fan-shaped indicator that can control the scope of action in real time, thereby diversifying the expression form of the fan-shaped indicator, simplifying the steps of modifying the indicator angle and scope of action corresponding to the game indicator, and improving the production efficiency of the game indicator.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- Computer Graphics (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Optics & Photonics (AREA)
- Processing Or Creating Images (AREA)
Abstract
本公开通过获取预设的扇形指示器模型并将每个模型顶点调整后第一灰度值作为扇形角度控制参数;基于扇形角度控制参数、目标半径以及目标夹角生成目标扇形指示器各模型顶点的二维顶点坐标,并转换、调整得到调整后的三维顶点坐标;基于调整后的三维顶点坐标、目标夹角和目标半径,生成并显示目标扇形指示器,以提高制作效率。
Description
本公开涉及游戏技术领域,具体涉及一种游戏指示器的生成方法、装置、计算机设备及存储介质。
随着计算机通信技术的不断发展,智能手机、平板电脑及笔记本电脑等终端的大量普及应用,终端向着多样化、个性化的方向发展,日益成为人们在生活与工作中不可或缺的终端,为了满足人们对精神生活的追求,能够在终端上操作的娱乐游戏应运而生,例如,基于客户端或服务器架构开发的多人在线战术竞技游戏(Multiplayer Online Battle Arena,MOBA)和大型多人在线游戏(Massive Multiplayer Online,MMO)等类型的游戏,由于具有高流畅度、操作手感好、即时战斗等特点,深受用户喜爱。
在MOBA游戏中,计算机设备的图形用户界面上显示的游戏画面,通常是以主控虚拟角色为观察中心对虚拟环境进行观察得到的画面。玩家可以控制主控虚拟角色向指定方向释放技能,来攻击指定方向上的敌方虚拟角色。当玩家控制主控虚拟角色朝指定方向进行瞄准时,在游戏画面中通常会显示游戏指示器来提示玩家技能能够释放的方向以及作用范围。相关技术通常采用贴图的方式制作游戏指示器,这种方式制作出来的游戏指示器对应的指示器角度和作用范围都是固定。
本公开实施例提供一种游戏指示器的生成方法、装置、计算机设备及存储介质,可以至少部分解决现有游戏指示器表现形式比较死板且单一,对游戏指示器对应的指示器角度和作用范围进行修改的步骤繁琐,游戏指示器的制作效率低的问题。
第一方面,本公开实施例提供了一种游戏指示器的生成方法,该方法包括:
获取预设的扇形指示器模型,其中,所述扇形指示器模型包括多个模型顶
点,每个模型顶点设置有对应的顶点颜色值,所述顶点颜色值包括第一灰度值和第二灰度值,所述第一灰度值通过所述模型顶点对应的第一颜色通道存储,所述第二灰度值通过所述模型顶点对应的第二颜色通道存储;
对所述扇形指示器模型的每个模型顶点的第一灰度值进行阈值调整处理,并将所述扇形指示器模型的每个模型顶点调整后的第一灰度值作为所述目标扇形指示器对应的扇形角度控制参数;
基于所述扇形角度控制参数、目标扇形指示器所确定的目标半径以及目标夹角,生成所述目标扇形指示器对应的模型顶点的二维顶点坐标;
将所述模型顶点的二维顶点坐标转换为三维顶点坐标;
基于所述扇形指示器模型的每个模型顶点的第二灰度值,对所述三维顶点坐标进行调整,得到调整后的三维顶点坐标;
基于所述调整后的三维顶点坐标、所述目标夹角和所述目标半径,生成并显示所述目标扇形指示器。
第二方面,本公开实施例还提供了一种游戏指示器的生成装置,该游戏指示器的生成装置包括:
获取单元,用于获取预设的扇形指示器模型,其中,所述扇形指示器模型包括多个模型顶点,每个模型顶点设置有对应的顶点颜色值,所述顶点颜色值包括第一灰度值和第二灰度值,所述第一灰度值通过所述模型顶点对应的第一颜色通道存储,所述第二灰度值通过所述模型顶点对应的第二颜色通道存储;
第一调整单元,用于对所述扇形指示器模型的每个模型顶点的第一灰度值进行阈值调整处理,并将所述扇形指示器模型的每个模型顶点调整后的第一灰度值作为所述目标扇形指示器对应的扇形角度控制参数;
第一生成单元,用于基于所述扇形角度控制参数、所述目标半径以及所述目标夹角,生成所述目标扇形指示器对应的模型顶点的二维顶点坐标;
转换单元,用于将所述模型顶点的二维顶点坐标转换为三维顶点坐标;
第二调整单元,用于基于所述扇形指示器模型的每个模型顶点的第二灰度值,对所述三维顶点坐标进行调整,得到调整后的三维顶点坐标;
第二生成单元,用于基于所述调整后的三维顶点坐标、所述目标夹角和所述目标半径,生成并显示所述目标扇形指示器。
第三方面,本公开实施例还提供一种计算机设备,包括处理器、存储器及存储在所述存储器上并能够在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现游戏指示器的生成方法任一项的步骤。
第四方面,本公开实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现游戏指示器的生成方法任一项的步骤。
本公开实施例提供一种游戏指示器的生成方法、装置、计算机设备及存储介质,通过基于预设扇形指示器模型构建每个模型顶点的三维顶点坐标,可以通过改变三维顶点坐标中的扇形半径以及预设夹角等参数,从而对预设扇形指示器模型对应的目标扇形指示器进行动态调整,得到可以实时控制作用范围的扇形指示器,使扇形指示器的表现形式多样化,简化了对游戏指示器对应的指示器角度和作用范围进行修改的步骤,提高了游戏指示器的制作效率。
为了更清楚地说明本公开实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本公开实施例其中之一提供的游戏指示器的生成系统的场景示意图。
图2为本公开实施例其中之一提供的游戏指示器的生成方法的一种流程示意图。
图3为本公开实施例其中之一提供的扇形指示器模型的一种结构示意图。
图4为本公开实施例其中之一提供的扇形指示器模型的各模型顶点的一种颜色示意图。
图5为本公开实施例其中之一提供的扇形指示器模型的一种场景示意图。
图6为本公开实施例其中之一提供的扇形指示器模型的顶点色阈值的一种场景示意图。
图7为本公开实施例其中之一提供的扇形指示器模型的另一种场景示意图。
图8为本公开实施例其中之一提供的游戏指示器的生成装置的一种结构示意图。
图9为本公开实施例其中之一提供的计算机设备的结构示意图。
本公开的实施方式
下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
本公开实施例提供一种游戏指示器的生成方法、装置、计算机设备及存储介质。具体地,本公开实施例的游戏指示器的生成方法可以由计算机设备执行,其中,该计算机设备可以为终端或者服务器等设备。该终端可以为智能手机、平板电脑、笔记本电脑、触控屏幕、游戏机、个人计算机(PC,Personal Computer)、个人数字助理(Personal Digital Assistant,PDA)等终端设备,终端还可以包括客户端,该客户端可以是游戏应用客户端、携带有游戏程序的浏览器客户端或即时通信客户端等。服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN、以及大数据和人工智能平台等基础云计算服务的云服务器。
例如,当该游戏指示器的生成方法运行于终端时,终端设备存储有游戏应用程序并用于呈现游戏画面中的虚拟场景。终端设备用于通过图形用户界面与用户进行交互,例如通过终端设备下载安装游戏应用程序并运行。该终端设备将图形用户界面提供给用户的方式可以包括多种,例如,可以渲染显示在终端设备的显示屏上,或者,通过全息投影呈现图形用户界面。例如,终端设备可以包括触控显示屏和处理器,该触控显示屏用于呈现图形用户界面以及接收用户作用于图形用户界面产生的操作指令,该图形用户界面包括游戏画面,该处理器用于运行该游戏、生成图形用户界面、响应操作指令以及控制图形用户界面在触控显示屏上的显示。
例如,当该游戏指示器的生成方法运行于服务器时,可以为云游戏。云游
戏是指以云计算为基础的游戏方式。在云游戏的运行模式下,游戏应用程序的运行主体和游戏画面呈现主体是分离的,游戏指示器的生成方法的储存与运行是在云游戏服务器上完成的。而游戏画面呈现是在云游戏的客户端完成的,云游戏客户端主要用于游戏数据的接收、发送以及游戏画面的呈现,例如,云游戏客户端可以是靠近用户侧的具有数据传输功能的显示设备,如,移动终端、电视机、计算机、掌上电脑、个人数字助理等,但是进行游戏数据处理的终端设备为云端的云游戏服务器。在进行游戏时,用户操作云游戏客户端向云游戏服务器发送操作指令,云游戏服务器根据操作指令运行游戏,将游戏画面等数据进行编码压缩,通过网络返回云游戏客户端,最后,通过云游戏客户端进行解码并输出游戏画面。
请参阅图1,图1为本公开实施例提供的一种游戏指示器的生成系统的场景示意图。该系统可以包括至少一个终端,至少一个服务器,至少一个数据库,以及网络。用户持有的终端可以通过网络连接到不同游戏的服务器。终端是具有计算硬件的任何设备,该计算硬件能够支持和执行与游戏对应的软件产品。另外,当系统包括多个终端、多个服务器、多个网络时,不同的终端可以通过不同的网络、通过不同的服务器相互连接。网络可以是无线网络或者有线网络,比如无线网络为无线局域网(WLAN)、局域网(LAN)、蜂窝网络、2G网络、3G网络、4G网络、5G网络等。另外,不同的终端之间也可以使用自身的蓝牙网络或者热点网络连接到其他终端或者连接到服务器等。例如,多个用户可以通过不同的终端在线从而通过适当网络连接并且相互同步,以支持多玩家游戏。另外,该系统可以包括多个数据库,多个数据库耦合到不同的服务器,并且可以将与游戏环境有关的信息在不同用户在线进行多玩家游戏时连续地存储于数据库中。
需要说明的是,图1所示的游戏指示器的生成系统的场景示意图仅仅是一个示例,本公开实施例描述的游戏指示器的生成系统以及场景是为了更加清楚的说明本公开实施例的技术方案,并不构成对于本公开实施例提供的技术方案的限定,本领域普通技术人员可知,随着新业务场景的出现,本公开实施例提供的技术方案对于类似的技术问题,同样适用。
基于上述问题,本公开实施例提供一种游戏指示器的生成方法、装置、计算机设备及存储介质,可以提高游戏指示器的制作效率。以下分别进行详细说
明。需说明的是,以下实施例的描述顺序不作为对实施例优选顺序的限定。
请参阅图2,图2为本公开实施例提供的一种游戏指示器的生成方法的流程示意图,该游戏指示器的生成方法的具体流程可以如下步骤101至步骤106所示:
101,获取预设的扇形指示器模型,其中,所述扇形指示器模型包括多个模型顶点,每个模型顶点设置有对应的顶点颜色值,所述顶点颜色值包括第一灰度值和第二灰度值,所述第一灰度值通过所述模型顶点对应的第一颜色通道存储,所述第二灰度值通过所述模型顶点对应的第二颜色通道存储。
在本公开实施例中,请参阅图3,美术人员可以采用3D软件在模型空间中创建一个扇形指示器模型,并绘制好每个模型顶点对应的顶点色(VertexColor),该顶点色包括第一灰度值和第二灰度值,该扇形指示器模型同时还存在在世界空间中。其中,模型空间即以虚拟模型自身原点构建的三维空间,世界空间可以理解为一个所有虚拟模型共用的三维空间,VertexColor即虚拟模型上每个顶点的颜色,通常有四个通道可以使用,分别为RGBA四个通道,各通道值域在0到1之间,0在视觉理解上为黑色,1在视觉理解上为白色。具体的,本公开实施例可以选用A通道存储第一灰度值,选用R通道存储第二灰度值,可以理解的是,也可以选用G存储第一灰度值,B存储第二灰度值,即可以任意选择RGBA通道中任意两个通道对第一灰度值和第二灰度值进行存储,其中,第一灰度值和第二灰度值的值域为[0,1],其中0代表黑色,1代表白色。
请参阅图4,图4为扇形指示器模型各模型顶点的颜色示意图,用于直观表现扇形指示器模型各模型顶点的第一灰度值和第二灰度值的颜色表现。各模型顶点的VertexColor.a(第一灰度值)的设置规则为从左到右的模型顶点的第一灰度值大小由小到大设置,从而使第一灰度值可以作为扇形角度控制参数,从而实现A通道中存储的值起到构建模型顶点坐标的正负关系的作用。另外,各模型顶点的VertexColor.r(第二灰度值)的设置规则为从中心到四周的模型顶点的第二灰度值大小由小到大设置,从而使第二灰度值可以作为扇形半径控制参数,从而实现R通道中存储的值起到约束模型顶点坐标的顶点范围的作用。
可选的,在本公开实施例中,预设的扇形指示器模型以及后续通过调整预
设的扇形指示器模型得到的目标扇形指示器均为厚度参数为零的网格模型。
102,对所述扇形指示器模型的每个模型顶点的第一灰度值进行阈值调整处理,并将所述扇形指示器模型的每个模型顶点调整后的第一灰度值作为所述目标扇形指示器对应的扇形角度控制参数。
为了满足后续坐标建立的标准,步骤“所述对所述扇形指示器模型的每个模型顶点的第一灰度值进行阈值调整处理,并将所述扇形指示器模型的每个模型顶点调整后的第一灰度值作为所述目标扇形指示器对应的扇形角度控制参数”,方法可以包括:
通过指定偏移参数值以及调整权重值,将所述扇形指示器模型的每个模型顶点的第一灰度值从初始阈值范围映射到目标阈值范围内。
在一具体实施例中,步骤“所述通过指定偏移参数值以及调整权重值,将所述扇形指示器模型的每个模型顶点的第一灰度值从初始阈值范围映射到目标阈值范围内”,方法可以包括:
获取所述每个模型顶点的第一灰度值与所述指定偏移参数值的差值;
获取所述每个模型顶点的差值与所述调整权重值的乘积,将每个模型顶点的乘积作为每个模型顶点的扇形角度控制参数。
本公开实施例中提供的指定偏移参数值与调整权重值是美术人员设置的,以实现将扇形指示器模型的每个模型顶点的第一灰度值从初始阈值范围映射到目标阈值范围内。
为了将扇形指示器模型的第一灰度值调整为符合坐标系下x坐标轴和y坐标轴的正确结果,因此,采用参数0.5作为指定偏移参数值,采用参数2作为调整权重值,从而对各模型顶点的第一灰度值进行调整,以实现将扇形指示器模型的每个模型顶点的第一灰度值从初始阈值范围映射到目标阈值范围内。例如,扇形指示器模型的每个模型顶点的第一灰度值的初始阈值范围为[0,1]时,美术人员可以设定目标阈值范围为[-1,1],可以采用阈值调整公式VertexColor.a2=(VertexColor.a1–0.5)*2对每个模型顶点的第一灰度值进行转换,从而得到每个模型顶点调整后的第一灰度值作为扇形角度控制参数,其中,VertexColor.a1为每个模型顶点初始的第一灰度值,VertexColor.a2为每个模型顶点调整后的第一灰度值。
103,基于所述扇形角度控制参数、目标扇形指示器所确定的目标半径以及目标夹角,生成所述目标扇形指示器对应的模型顶点的二维顶点坐标。
例如,可以将目标扇形指示器模型的中心点放在二维坐标系的原点,该目标扇形指示器模型的半径为r,取目标扇形指示器模型上一点a1,a1点到原点的直线和y轴的夹角为A/2,那么目标扇形指示器模型上点a在一四象限的位置坐标即可通过三角函数公示计算出来,即a1(x,y)=a(sin(A/2)*r,cos(A/2)*r),目标扇形指示器模型上与点a1对称的a2的坐标点即为即a1(-x,y)=a(-sin(A/2)*r,cos(A/2)*r)。进一步的,将上述得到的二维坐标公式与每个模型顶点的扇形角度控制参数进行相乘处理,则可以推导出组成目标扇形指示器模型的所有线段(扇形弧线以及除扇形弧线的其他边缘轮廓线)上所有模型顶点的位置坐标N,即N(x,y)=N(sin((A/2)*vc.a)*r,cos((A/2)*vc.a)*r),其中vc.a为每个模型顶点的扇形角度控制参数。
在本公开实施例中,在步骤“基于所述扇形角度控制参数、目标扇形指示器所确定的目标半径以及目标夹角,生成所述目标扇形指示器对应的模型顶点的二维顶点坐标”之前,方法可以包括:
对所述多个模型顶点中各模型顶点对应的顶点坐标进行初始化处理,以使所述顶点坐标置零。
104,将所述模型顶点的二维顶点坐标转换为三维顶点坐标。
具体的,步骤“所述将所述模型顶点的二维顶点坐标转换为三维顶点坐标”,方法可以包括:
基于所述扇形指示器模型与预设坐标系的位置关系,确定所述扇形指示器模型在所述预设坐标系中为垂直关系的目标坐标轴;
将每个模型顶点在所述目标坐标轴的坐标值设置为零;
基于每个模型顶点的二维顶点坐标、以及所述坐标值确定每个模型顶点的三维顶点坐标。
例如,美术人员需要按扇形指示器模型在三维空间下实际的位置做相应的转换,已知扇形指示器模型是没有厚度的,所以与扇形指示器模型的平面垂直的轴向的顶点坐标为0。因此可以推导出N的坐标,也即N(x,0,z)=N(sin((A/2)*vc.a)*r,0,cos((A/2)*vc.a)*r)。可选的,若美术人员根据设计需
求需要设计具有厚度的扇形指示器模型时,则可以将每个模型顶点在该目标坐标轴的坐标值设置为非零数值。
105,基于所述扇形指示器模型的每个模型顶点的第二灰度值,对所述三维顶点坐标进行调整,得到调整后的三维顶点坐标。
在一具体实施例中,步骤“所述基于所述扇形指示器模型的每个模型顶点的第二灰度值,对所述三维顶点坐标进行调整,得到调整后的三维顶点坐标”,方法可以包括:
将所述每个模型顶点的第二灰度值与其对应的三维顶点坐标进行相乘处理,得到每个模型顶点调整后的三维顶点坐标。
其中,由于在对扇形指示器模型进行夹角和半径的调整时,扇形指示器模型的中心点是不会发生变化的,为了确保扇形中心点的位置始终为(0,0,0),因此需要将N的坐标和模型顶点的VertexColor在R通道储存的第二灰度值相乘以确保扇形中心点的位置始终为(0,0,0),从而确保中心点不发生变化。其中,N坐标的计算公式为:N(x,0,z)=N(sin((A/2)*vc.a)*r,0,cos((A/2)*vc.a)*r)。将N坐标和各模型顶点VertexColor在R通道存储的第二灰度值相乘得到的最终公式为:N(x,0,z)=N(sin((A/2)*vc.a)*r*vc.r,0,cos((A/2)*vc.a)*r*vc.r)。
106,基于所述调整后的三维顶点坐标、所述目标夹角和所述目标半径,生成并显示所述目标扇形指示器。
具体的,在步骤“基于所述调整后的三维顶点坐标、所述目标夹角和所述目标半径,生成并显示所述目标扇形指示器”之后,方法可以包括:
响应于针对所述目标扇形指示器的调整指令,获取扇形模型调整参数,其中,所述扇形模型调整参数包括角度调整参数和/或半径调整参数;
基于所述扇形模型调整参数对所述目标扇形指示器中每个模型顶点调整后的三维顶点坐标进行调整,得到每个模型顶点的目标三维顶点坐标;
基于所述每个模型顶点的目标三维顶点坐标更新所述目标扇形指示器,生成并显示所述更新后的目标扇形指示器。
进一步的,步骤“所述基于所述扇形模型调整参数对所述目标扇形指示器中每个模型顶点调整后的三维顶点坐标进行调整,得到每个模型顶点的目标三维顶点坐标”,方法可以包括:
基于所述角度调整参数和/或所述半径调整参数,对所述目标扇形指示器中每个模型顶点调整后的三维顶点坐标中的目标夹角和/或目标半径进行替换,得到每个模型顶点的目标三维顶点坐标。
在本公开实施例中,玩家可以控制主控虚拟角色向指定方向释放技能,来攻击指定方向上的敌方虚拟角色。当玩家控制主控虚拟角色朝指定方向进行瞄准时,在游戏画面中通常会显示目标扇形指示器来提示玩家,玩家当前控制的主控虚拟角色触发的游戏技能能够释放的方向以及游戏技能的作用范围。又或者,玩家控制主控虚拟角色可以对其他玩家控制的其他虚拟角色进行追逐抓捕操作,当检测到主控虚拟角色和其他虚拟角色进行游戏对局时,基于主控虚拟角色的实时显示位置,在主控虚拟角色的前方生成目标扇形指示器,作为抓捕视野范围,一旦其他虚拟角色进入目标扇形指示器的扇形区域内就会被发现,然后被主控虚拟角色锁定追杀,并且,在游戏过程中,主控虚拟角色可以通过升级或虚拟物品的加成,增大目标扇形指示器的半径和角度,从而增大目标扇形指示器的扇形区域的范围。
为了对本公开实施例提供的游戏指示器的生成方法进行进一步说明,下面将以扇形指示器模型的生成方法在具体实施场景中的应用为例进行说明,具体应用场景如下所述:
美术人员可以采用3D软件在模型空间中创建一个扇形指示器模型,并绘制好每个模型顶点对应的顶点色(VertexColor),该顶点色包括第一灰度值和第二灰度值,本公开实施例可以选用A通道存储第一灰度值,选用R通道存储第二灰度值,其中,第一灰度值和第二灰度值的值域为[0,1],其中0代表黑色,1代表白色。其中,各模型顶点的VertexColor.a(第一灰度值)的设置规则为从左到右的模型顶点的第一灰度值大小由小到大设置,从而使第一灰度值可以作为扇形角度控制参数,从而实现A通道中存储的值起到构建模型顶点坐标的正负关系的作用。另外,各模型顶点的VertexColor.r(第二灰度值)的设置规则为从中心到四周的模型顶点的第二灰度值大小由小到大设置,从而使第二灰度值可以作为扇形半径控制参数,从而实现R通道中存储的值起到约束模型顶点坐标的顶点范围的作用。
请参阅图5,可以将扇形指示器模型的中心点放在二维坐标系的原点,设
扇形指示器模型的半径为r,取扇形指示器模型上一点a1,a1点到原点的直线和y轴的夹角为A/2,那么扇形指示器模型上点a在一四象限的位置坐标即可通过三角函数公示计算出来,即a1(x,y)=a(sin(A/2)*r,cos(A/2)*r),扇形指示器模型上与点a1对称的a2的坐标点即为即a1(-x,y)=a(-sin(A/2)*r,cos(A/2)*r)。并且,请参阅图6,扇形指示器模型的每个模型顶点的第一灰度值的初始阈值范围为[0,1]时,美术人员可以设定目标阈值范围为[-1,1],采用参数0.5作为指定偏移参数值,采用参数2作为调整权重值,通过阈值调整公式VertexColor.a2=(VertexColor.a1–0.5)*2对每个模型顶点的第一灰度值进行转换,从而得到每个模型顶点调整后的第一灰度值作为扇形角度控制参数,其中,VertexColor.a1为每个模型顶点初始的第一灰度值,VertexColor.a2为每个模型顶点调整后的第一灰度值。
进一步的,美术人员可以将上述得到的二维坐标公式与每个模型顶点的扇形角度控制参数进行相乘处理,则可以推导出扇形指示器模型的扇形弧线上所有顶点的位置坐标N,即N(x,y)=N(sin((A/2)*vc.a)*r,cos((A/2)*vc.a)*r),其中vc.a为每个模型顶点的扇形角度控制参数。
请参阅图7,本公开实施例中,美术人员需要按扇形指示器模型在三维空间下实际的位置做相应的转换,已知扇形指示器模型是没有厚度的,所以与扇形指示器模型的平面垂直的轴向的顶点坐标为0。因此可以推导出N的坐标,也即N(x,0,z)=N(sin((A/2)*vc.a)*r,0,cos((A/2)*vc.a)*r)。另外,扇形指示器模型在改变夹角和半径时中心点是不会发生变化的,为了确保扇形中心点的位置始终为(0,0,0),美术人员还需要将N的坐标和VertexColor的R通道相乘以确保扇形中心点的位置始终为(0,0,0),也即最终坐标计算公式为N终(x,0,z)=N(sin((A/2)*vc.a)*r*vc.r,0,cos((A/2)*vc.a)*r*vc.r)。
为了避免扇形指示器模型自身顶点位置带来的位置偏差,在模型输出时需要将模型缩放值原点位置,将上面推导的N终坐标位置和扇形指示器模型在模型空间下的顶点位置相加,然后转到世界空间下继续后续的屏幕绘制,以在屏幕上显示扇形指示器模型对应的扇形指示器。
为了对本公开实施例提供的游戏指示器的生成方法进行进一步说明,下面将以目标扇形指示器的处理方法在具体实施场景中的应用为例进行说明,具体
应用场景如下所述:
计算机设备可以获取美术人员最终需要的目标扇形指示器对应的目标半径以及目标夹角,将目标半径以及目标夹角带入预设的扇形指示器模型对应的各模型顶点的计算公式中,模型顶点的计算公式为:N终(x,0,z)=N(sin((A/2)*vc.a)*r*vc.r,0,cos((A/2)*vc.a)*r*vc.r),从而得到目标扇形指示器对应的各个模型顶点的顶点坐标,根据该顶点坐标生成并显示所述目标扇形指示器。
计算机设备可以获取美术人员设置的扇形模型调整参数,计算机设备可以响应于针对所述目标扇形指示器的调整指令,获取扇形模型调整参数,其中,所述扇形模型调整参数包括角度调整参数和/或半径调整参数;基于所述扇形模型调整参数对所述目标扇形指示器中每个模型顶点调整后的三维顶点坐标进行调整,得到每个模型顶点的目标三维顶点坐标;基于所述每个模型顶点的目标三维顶点坐标更新所述目标扇形指示器,生成并显示所述更新后的目标扇形指示器。具体的,计算机设备可以基于所述角度调整参数和/或所述半径调整参数,对目标扇形指示器中每个模型顶点调整后的三维顶点坐标中的目标夹角和/或目标半径进行替换,得到每个模型顶点的目标三维顶点坐标,根据该目标三维顶点坐标生成并显示调整后的目标扇形指示器。
综上所述,本公开实施例提供一种游戏指示器的生成方法,通过获取预设的扇形指示器模型,其中,所述扇形指示器模型包括多个模型顶点,每个模型顶点设置有对应的顶点颜色值,所述顶点颜色值包括第一灰度值和第二灰度值,所述第一灰度值通过所述模型顶点对应的第一颜色通道存储,所述第二灰度值通过所述模型顶点对应的第二颜色通道存储;对所述扇形指示器模型的每个模型顶点的第一灰度值进行阈值调整处理,并将所述扇形指示器模型的每个模型顶点调整后的第一灰度值作为所述目标扇形指示器对应的扇形角度控制参数;基于所述扇形角度控制参数、目标扇形指示器所确定的目标半径以及目标夹角,生成所述目标扇形指示器对应的模型顶点的二维顶点坐标;将所述模型顶点的二维顶点坐标转换为三维顶点坐标;基于所述扇形指示器模型的每个模型顶点的第二灰度值,对所述三维顶点坐标进行调整,得到调整后的三维顶点坐标;基于所述调整后的三维顶点坐标、所述目标夹角和所述目标半径,生成并显示
所述目标扇形指示器。本公开实施例基于预设扇形指示器模型构建每个模型顶点的三维顶点坐标,可以通过改变三维顶点坐标中的扇形半径以及预设夹角等参数,从而对预设扇形指示器模型对应的目标扇形指示器进行动态调整,得到可以实时控制作用范围的扇形指示器,使扇形指示器的表现形式多样化,简化了对游戏指示器对应的指示器角度和作用范围进行修改的步骤,提高了游戏指示器的制作效率。
为便于更好的实施本公开实施例提供的游戏指示器的生成方法,本公开实施例还提供一种基于上述游戏指示器的生成装置。其中名词的含义与上述游戏指示器的生成方法中相同,具体实现细节可以参考方法实施例中的说明。
请参阅图8,图8为本公开实施例提供的一种游戏指示器的生成装置的结构示意图,该装置包括:
获取单元201,用于获取预设的扇形指示器模型,其中,所述扇形指示器模型包括多个模型顶点,每个模型顶点设置有对应的顶点颜色值,所述顶点颜色值包括第一灰度值和第二灰度值,所述第一灰度值通过所述模型顶点对应的第一颜色通道存储,所述第二灰度值通过所述模型顶点对应的第二颜色通道存储;
第一调整单元202,用于对所述扇形指示器模型的每个模型顶点的第一灰度值进行阈值调整处理,并将所述扇形指示器模型的每个模型顶点调整后的第一灰度值作为所述目标扇形指示器对应的扇形角度控制参数;
第一生成单元203,用于基于所述扇形角度控制参数、所述目标半径以及所述目标夹角,生成所述目标扇形指示器对应的模型顶点的二维顶点坐标;
转换单元204,用于将所述模型顶点的二维顶点坐标转换为三维顶点坐标;
第二调整单元205,用于基于所述扇形指示器模型的每个模型顶点的第二灰度值,对所述三维顶点坐标进行调整,得到调整后的三维顶点坐标;
第二生成单元206,用于基于所述调整后的三维顶点坐标、所述目标夹角和所述目标半径,生成并显示所述目标扇形指示器。
在一些实施例中,该游戏指示器的生成装置包括:
第一处理子单元,用于对所述多个模型顶点中各模型顶点对应的顶点坐标进行初始化处理,以使所述顶点坐标置零。
在一些实施例中,该游戏指示器的生成装置包括:
第一获取子单元,用于响应于针对所述目标扇形指示器的调整指令,获取扇形模型调整参数,其中,所述扇形模型调整参数包括角度调整参数和/或半径调整参数;
调整子单元,用于基于所述扇形模型调整参数对所述目标扇形指示器中每个模型顶点调整后的三维顶点坐标进行调整,得到每个模型顶点的目标三维顶点坐标;
更新子单元,用于基于所述每个模型顶点的目标三维顶点坐标更新所述目标扇形指示器,生成并显示所述更新后的目标扇形指示器。
在一些实施例中,该游戏指示器的生成装置包括:
替换子单元,用于基于所述角度调整参数和/或所述半径调整参数,对所述目标扇形指示器中每个模型顶点调整后的三维顶点坐标中的目标夹角和/或目标半径进行替换,得到每个模型顶点的目标三维顶点坐标。
在一些实施例中,该游戏指示器的生成装置包括:
映射子单元,用于通过指定偏移参数值以及调整权重值,将所述扇形指示器模型的每个模型顶点的第一灰度值从初始阈值范围映射到目标阈值范围内。
在一些实施例中,该游戏指示器的生成装置包括:
第二获取子单元,用于获取所述每个模型顶点的第一灰度值与所述指定偏移参数值的差值;
第二获取子单元,还用于获取所述每个模型顶点的差值与所述调整权重值的乘积,将每个模型顶点的乘积作为每个模型顶点的扇形角度控制参数。
在一些实施例中,该游戏指示器的生成装置包括:
确定子单元,用于基于所述扇形指示器模型与预设坐标系的位置关系,确定所述扇形指示器模型在所述预设坐标系中为垂直关系的目标坐标轴;
设置子单元,用于将每个模型顶点在所述目标坐标轴的坐标值设置为零;
确定子单元,还用于基于每个模型顶点的二维顶点坐标、以及所述坐标值确定每个模型顶点的三维顶点坐标。
在一些实施例中,该游戏指示器的生成装置包括:
第二处理子单元,用于将所述每个模型顶点的第二灰度值与其对应的三维
顶点坐标进行相乘处理,得到每个模型顶点调整后的三维顶点坐标。
本公开实施例提供一种游戏指示器的生成装置,通过获取单元201获取预设的扇形指示器模型,其中,所述扇形指示器模型包括多个模型顶点,每个模型顶点设置有对应的顶点颜色值,所述顶点颜色值包括第一灰度值和第二灰度值,所述第一灰度值通过所述模型顶点对应的第一颜色通道存储,所述第二灰度值通过所述模型顶点对应的第二颜色通道存储;第一调整单元202对所述扇形指示器模型的每个模型顶点的第一灰度值进行阈值调整处理,并将所述扇形指示器模型的每个模型顶点调整后的第一灰度值作为所述目标扇形指示器对应的扇形角度控制参数;第一生成单元203基于所述扇形角度控制参数、所述目标半径以及所述目标夹角,生成所述目标扇形指示器对应的模型顶点的二维顶点坐标;转换单元204将所述模型顶点的二维顶点坐标转换为三维顶点坐标;第二调整单元205基于所述扇形指示器模型的每个模型顶点的第二灰度值,对所述三维顶点坐标进行调整,得到调整后的三维顶点坐标;第二生成单元206基于所述调整后的三维顶点坐标、所述目标夹角和所述目标半径,生成并显示所述目标扇形指示器。本公开实施例基于预设扇形指示器模型构建每个模型顶点的三维顶点坐标,可以通过改变三维顶点坐标中的扇形半径以及预设夹角等参数,从而对预设扇形指示器模型对应的目标扇形指示器进行动态调整,得到可以实时控制作用范围的扇形指示器,使扇形指示器的表现形式多样化,简化了对游戏指示器对应的指示器角度和作用范围进行修改的步骤,提高了游戏指示器的制作效率。
相应的,本公开实施例还提供一种计算机设备,该计算机设备可以为终端或者服务器,该终端可以为智能手机、平板电脑、笔记本电脑、触控屏幕、游戏机、个人计算机(PC,Personal Computer)、个人数字助理(Personal Digital Assistant,PDA)等终端设备。如图9所示,图9为本公开实施例提供的计算机设备的结构示意图。该计算机设备300包括有一个或者一个以上处理核心的处理器301、有一个或一个以上计算机可读存储介质的存储器302及存储在存储器302上并可在处理器上运行的计算机程序。其中,处理器301与存储器302电性连接。本领域技术人员可以理解,图中示出的计算机设备结构并不构成对计算机设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者
不同的部件布置。
处理器301是计算机设备300的控制中心,利用各种接口和线路连接整个计算机设备300的各个部分,通过运行或加载存储在存储器302内的软件程序和/或模块,以及调用存储在存储器302内的数据,执行计算机设备300的各种功能和处理数据,从而对计算机设备300进行整体监控。
在本公开实施例中,计算机设备300中的处理器301会按照如下的步骤,将一个或一个以上的应用程序的进程对应的指令加载到存储器302中,并由处理器301来运行存储在存储器302中的应用程序,从而实现各种功能:
获取预设的扇形指示器模型,其中,所述扇形指示器模型包括多个模型顶点,每个模型顶点设置有对应的顶点颜色值,所述顶点颜色值包括第一灰度值和第二灰度值,所述第一灰度值通过所述模型顶点对应的第一颜色通道存储,所述第二灰度值通过所述模型顶点对应的第二颜色通道存储;
对所述扇形指示器模型的每个模型顶点的第一灰度值进行阈值调整处理,并将所述扇形指示器模型的每个模型顶点调整后的第一灰度值作为所述目标扇形指示器对应的扇形角度控制参数;
基于所述扇形角度控制参数、目标扇形指示器所确定的目标半径以及目标夹角,生成所述目标扇形指示器对应的模型顶点的二维顶点坐标;
将所述模型顶点的二维顶点坐标转换为三维顶点坐标;
基于所述扇形指示器模型的每个模型顶点的第二灰度值,对所述三维顶点坐标进行调整,得到调整后的三维顶点坐标;
基于所述调整后的三维顶点坐标、所述目标夹角和所述目标半径,生成并显示所述目标扇形指示器。
在一实施例中,在基于所述扇形角度控制参数、目标扇形指示器所确定的目标半径以及目标夹角,生成所述目标扇形指示器对应的模型顶点的二维顶点坐标之前,还包括:
对所述多个模型顶点中各模型顶点对应的顶点坐标进行初始化处理,以使所述顶点坐标置零。
在一实施例中,在基于所述调整后的三维顶点坐标、所述目标夹角和所述目标半径,生成并显示所述目标扇形指示器之后,还包括:
响应于针对所述目标扇形指示器的调整指令,获取扇形模型调整参数,其
中,所述扇形模型调整参数包括角度调整参数和/或半径调整参数;
基于所述扇形模型调整参数对所述目标扇形指示器中每个模型顶点调整后的三维顶点坐标进行调整,得到每个模型顶点的目标三维顶点坐标;
基于所述每个模型顶点的目标三维顶点坐标更新所述目标扇形指示器,生成并显示所述更新后的目标扇形指示器。
在一实施例中,所述基于所述扇形模型调整参数对所述目标扇形指示器中每个模型顶点调整后的三维顶点坐标进行调整,得到每个模型顶点的目标三维顶点坐标,包括:
基于所述角度调整参数和/或所述半径调整参数,对所述目标扇形指示器中每个模型顶点调整后的三维顶点坐标中的目标夹角和/或目标半径进行替换,得到每个模型顶点的目标三维顶点坐标。
在一实施例中,所述对所述扇形指示器模型的每个模型顶点的第一灰度值进行阈值调整处理,并将所述扇形指示器模型的每个模型顶点调整后的第一灰度值作为所述目标扇形指示器对应的扇形角度控制参数,包括:
通过指定偏移参数值以及调整权重值,将所述扇形指示器模型的每个模型顶点的第一灰度值从初始阈值范围映射到目标阈值范围内。
在一实施例中,所述通过指定偏移参数值以及调整权重值,将所述扇形指示器模型的每个模型顶点的第一灰度值从初始阈值范围映射到目标阈值范围内,包括:
获取所述每个模型顶点的第一灰度值与所述指定偏移参数值的差值;
获取所述每个模型顶点的差值与所述调整权重值的乘积,将每个模型顶点的乘积作为每个模型顶点的扇形角度控制参数。
在一实施例中,所述将所述模型顶点的二维顶点坐标转换为三维顶点坐标,包括:
基于所述扇形指示器模型与预设坐标系的位置关系,确定所述扇形指示器模型在所述预设坐标系中为垂直关系的目标坐标轴;
将每个模型顶点在所述目标坐标轴的坐标值设置为零;
基于每个模型顶点的二维顶点坐标、以及所述坐标值确定每个模型顶点的三维顶点坐标。
在一实施例中,所述基于所述扇形指示器模型的每个模型顶点的第二灰度
值,对所述三维顶点坐标进行调整,得到调整后的三维顶点坐标,包括:
将所述每个模型顶点的第二灰度值与其对应的三维顶点坐标进行相乘处理,得到每个模型顶点调整后的三维顶点坐标。
在一实施例中,所述预设的扇形指示器模型以及所述目标扇形指示器均为厚度参数为零的网格模型。
以上各个操作的具体实施可参见前面的实施例,在此不再赘述。
可选的,如图9所示,计算机设备300还包括:触控显示屏303、射频电路304、音频电路305、输入单元306以及电源307。其中,处理器301分别与触控显示屏303、射频电路304、音频电路305、输入单元306以及电源307电性连接。本领域技术人员可以理解,图4中示出的计算机设备结构并不构成对计算机设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
触控显示屏303可用于显示图形用户界面以及接收用户作用于图形用户界面产生的操作指令。触控显示屏303可以包括显示面板和触控面板。其中,显示面板可用于显示由用户输入的信息或提供给用户的信息以及计算机设备的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。可选的,可以采用液晶显示器(LCD,Liquid Crystal Display)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。触控面板可用于收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板上或在触控面板附近的操作),并生成相应的操作指令,且操作指令执行对应程序。可选的,触控面板可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器301,并能接收处理器301发来的命令并加以执行。触控面板可覆盖显示面板,当触控面板检测到在其上或附近的触摸操作后,传送给处理器301以确定触摸事件的类型,随后处理器301根据触摸事件的类型在显示面板上提供相应的视觉输出。在本公开实施例中,可以将触控面板与显示面板集成到触控显示屏303而实现输入和输出功能。但是在某些实施例中,触控面板与触控面板可以作为两个独立的部件来实现输入和输出功能。即触控显示屏303也可以作为输入单元306的一部
分实现输入功能。
在本公开实施例中,通过处理器301执行游戏应用程序在触控显示屏303上生成图形用户界面。该触控显示屏303用于呈现图形用户界面以及接收用户作用于图形用户界面产生的操作指令。
射频电路304可用于收发射频信号,以通过无线通信与网络设备或其他计算机设备建立无线通讯,与网络设备或其他计算机设备之间收发信号。
音频电路305可以用于通过扬声器、传声器提供用户与计算机设备之间的音频接口。音频电路305可将接收到的音频数据转换后的电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路305接收后转换为音频数据,再将音频数据输出处理器301处理后,经射频电路304以发送给比如另一计算机设备,或者将音频数据输出至存储器302以便进一步处理。音频电路305还可能包括耳塞插孔,以提供外设耳机与计算机设备的通信。
输入单元306可用于接收输入的数字、字符信息或用户特征信息(例如指纹、虹膜、面部信息等),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。
电源307用于给计算机设备300的各个部件供电。可选的,电源307可以通过电源管理系统与处理器301逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源307还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。
尽管图9中未示出,计算机设备300还可以包括摄像头、传感器、无线保真模块、蓝牙模块等,在此不再赘述。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
由上可知,本实施例提供的计算机设备,通过获取预设的扇形指示器模型,其中,所述扇形指示器模型包括多个模型顶点,每个模型顶点设置有对应的顶点颜色值,所述顶点颜色值包括第一灰度值和第二灰度值,所述第一灰度值通过所述模型顶点对应的第一颜色通道存储,所述第二灰度值通过所述模型顶点对应的第二颜色通道存储;对所述扇形指示器模型的每个模型顶点的第一灰度
值进行阈值调整处理,并将所述扇形指示器模型的每个模型顶点调整后的第一灰度值作为所述目标扇形指示器对应的扇形角度控制参数;基于所述扇形角度控制参数、目标扇形指示器所确定的目标半径以及目标夹角,生成所述目标扇形指示器对应的模型顶点的二维顶点坐标;将所述模型顶点的二维顶点坐标转换为三维顶点坐标;基于所述扇形指示器模型的每个模型顶点的第二灰度值,对所述三维顶点坐标进行调整,得到调整后的三维顶点坐标;基于所述调整后的三维顶点坐标、所述目标夹角和所述目标半径,生成并显示所述目标扇形指示器。本公开实施例基于预设扇形指示器模型构建每个模型顶点的三维顶点坐标,可以通过改变三维顶点坐标中的扇形半径以及预设夹角等参数,从而对预设扇形指示器模型对应的目标扇形指示器进行动态调整,得到可以实时控制作用范围的扇形指示器,使扇形指示器的表现形式多样化,简化了对游戏指示器对应的指示器角度和作用范围进行修改的步骤,提高了游戏指示器的制作效率。
本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。
为此,本公开实施例提供一种计算机可读存储介质,其中存储有多条计算机程序,该计算机程序能够被处理器进行加载,以执行本公开实施例所提供的任一种游戏指示器的生成方法中的步骤。例如,该计算机程序可以执行如下步骤:
获取预设的扇形指示器模型,其中,所述扇形指示器模型包括多个模型顶点,每个模型顶点设置有对应的顶点颜色值,所述顶点颜色值包括第一灰度值和第二灰度值,所述第一灰度值通过所述模型顶点对应的第一颜色通道存储,所述第二灰度值通过所述模型顶点对应的第二颜色通道存储;
对所述扇形指示器模型的每个模型顶点的第一灰度值进行阈值调整处理,并将所述扇形指示器模型的每个模型顶点调整后的第一灰度值作为所述目标扇形指示器对应的扇形角度控制参数;
基于所述扇形角度控制参数、目标扇形指示器所确定的目标半径以及目标夹角,生成所述目标扇形指示器对应的模型顶点的二维顶点坐标;
将所述模型顶点的二维顶点坐标转换为三维顶点坐标;
基于所述扇形指示器模型的每个模型顶点的第二灰度值,对所述三维顶点坐标进行调整,得到调整后的三维顶点坐标;
基于所述调整后的三维顶点坐标、所述目标夹角和所述目标半径,生成并显示所述目标扇形指示器。
在一实施例中,在基于所述扇形角度控制参数、目标扇形指示器所确定的目标半径以及目标夹角,生成所述目标扇形指示器对应的模型顶点的二维顶点坐标之前,还包括:
对所述多个模型顶点中各模型顶点对应的顶点坐标进行初始化处理,以使所述顶点坐标置零。
在一实施例中,在基于所述调整后的三维顶点坐标、所述目标夹角和所述目标半径,生成并显示所述目标扇形指示器之后,还包括:
响应于针对所述目标扇形指示器的调整指令,获取扇形模型调整参数,其中,所述扇形模型调整参数包括角度调整参数和/或半径调整参数;
基于所述扇形模型调整参数对所述目标扇形指示器中每个模型顶点调整后的三维顶点坐标进行调整,得到每个模型顶点的目标三维顶点坐标;
基于所述每个模型顶点的目标三维顶点坐标更新所述目标扇形指示器,生成并显示所述更新后的目标扇形指示器。
在一实施例中,所述基于所述扇形模型调整参数对所述目标扇形指示器中每个模型顶点调整后的三维顶点坐标进行调整,得到每个模型顶点的目标三维顶点坐标,包括:
基于所述角度调整参数和/或所述半径调整参数,对所述目标扇形指示器中每个模型顶点调整后的三维顶点坐标中的目标夹角和/或目标半径进行替换,得到每个模型顶点的目标三维顶点坐标。
在一实施例中,所述对所述扇形指示器模型的每个模型顶点的第一灰度值进行阈值调整处理,并将所述扇形指示器模型的每个模型顶点调整后的第一灰度值作为所述目标扇形指示器对应的扇形角度控制参数,包括:
通过指定偏移参数值以及调整权重值,将所述扇形指示器模型的每个模型顶点的第一灰度值从初始阈值范围映射到目标阈值范围内。
在一实施例中,所述通过指定偏移参数值以及调整权重值,将所述扇形指
示器模型的每个模型顶点的第一灰度值从初始阈值范围映射到目标阈值范围内,包括:
获取所述每个模型顶点的第一灰度值与所述指定偏移参数值的差值;
获取所述每个模型顶点的差值与所述调整权重值的乘积,将每个模型顶点的乘积作为每个模型顶点的扇形角度控制参数。
在一实施例中,所述将所述模型顶点的二维顶点坐标转换为三维顶点坐标,包括:
基于所述扇形指示器模型与预设坐标系的位置关系,确定所述扇形指示器模型在所述预设坐标系中为垂直关系的目标坐标轴;
将每个模型顶点在所述目标坐标轴的坐标值设置为零;
基于每个模型顶点的二维顶点坐标、以及所述坐标值确定每个模型顶点的三维顶点坐标。
在一实施例中,所述基于所述扇形指示器模型的每个模型顶点的第二灰度值,对所述三维顶点坐标进行调整,得到调整后的三维顶点坐标,包括:
将所述每个模型顶点的第二灰度值与其对应的三维顶点坐标进行相乘处理,得到每个模型顶点调整后的三维顶点坐标。
在一实施例中,所述预设的扇形指示器模型以及所述目标扇形指示器均为厚度参数为零的网格模型。
以上各个操作的具体实施可参见前面的实施例,在此不再赘述。
其中,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。
由于该存储介质中所存储的计算机程序,通过获取预设的扇形指示器模型,其中,所述扇形指示器模型包括多个模型顶点,每个模型顶点设置有对应的顶点颜色值,所述顶点颜色值包括第一灰度值和第二灰度值,所述第一灰度值通过所述模型顶点对应的第一颜色通道存储,所述第二灰度值通过所述模型顶点对应的第二颜色通道存储;对所述扇形指示器模型的每个模型顶点的第一灰度值进行阈值调整处理,并将所述扇形指示器模型的每个模型顶点调整后的第一灰度值作为所述目标扇形指示器对应的扇形角度控制参数;基于所述扇形角度控制参数、目标扇形指示器所确定的目标半径以及目标夹角,生成所述目标扇
形指示器对应的模型顶点的二维顶点坐标;将所述模型顶点的二维顶点坐标转换为三维顶点坐标;基于所述扇形指示器模型的每个模型顶点的第二灰度值,对所述三维顶点坐标进行调整,得到调整后的三维顶点坐标;基于所述调整后的三维顶点坐标、所述目标夹角和所述目标半径,生成并显示所述目标扇形指示器。本公开实施例基于预设扇形指示器模型构建每个模型顶点的三维顶点坐标,可以通过改变三维顶点坐标中的扇形半径以及预设夹角等参数,从而对预设扇形指示器模型对应的目标扇形指示器进行动态调整,得到可以实时控制作用范围的扇形指示器,使扇形指示器的表现形式多样化,简化了对游戏指示器对应的指示器角度和作用范围进行修改的步骤,提高了游戏指示器的制作效率。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
以上对本公开实施例所提供的一种游戏指示器的生成方法、装置、计算机设备及存储介质进行了详细介绍,本文中应用了具体个例对本公开的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本公开的技术方案及其核心思想;本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本公开各实施例的技术方案的范围。
Claims (12)
- 一种游戏指示器的生成方法,所述方法包括:获取预设的扇形指示器模型,其中,所述扇形指示器模型包括多个模型顶点,每个模型顶点设置有对应的顶点颜色值,所述顶点颜色值包括第一灰度值和第二灰度值,所述第一灰度值通过所述模型顶点对应的第一颜色通道存储,所述第二灰度值通过所述模型顶点对应的第二颜色通道存储;对所述扇形指示器模型的每个模型顶点的第一灰度值进行阈值调整处理,并将所述扇形指示器模型的每个模型顶点调整后的第一灰度值作为目标扇形指示器对应的扇形角度控制参数;基于所述扇形角度控制参数、目标扇形指示器所确定的目标半径以及目标夹角,生成所述目标扇形指示器对应的模型顶点的二维顶点坐标;将所述模型顶点的二维顶点坐标转换为三维顶点坐标;基于所述扇形指示器模型的每个模型顶点的第二灰度值,对所述三维顶点坐标进行调整,得到调整后的三维顶点坐标;基于所述调整后的三维顶点坐标、所述目标夹角和所述目标半径,生成并显示所述目标扇形指示器。
- 根据权利要求1所述的游戏指示器的生成方法,其中,在基于所述扇形角度控制参数、目标扇形指示器所确定的目标半径以及目标夹角,生成所述目标扇形指示器对应的模型顶点的二维顶点坐标之前,还包括:对所述多个模型顶点中各模型顶点对应的顶点坐标进行初始化处理,以使所述顶点坐标置零。
- 根据权利要求1所述的游戏指示器的生成方法,其中,在基于所述调整后的三维顶点坐标、所述目标夹角和所述目标半径,生成并显示所述目标扇形指示器之后,还包括:响应于针对所述目标扇形指示器的调整指令,获取扇形模型调整参数,其中,所述扇形模型调整参数包括角度调整参数和/或半径调整参数;基于所述扇形模型调整参数对所述目标扇形指示器中每个模型顶点调整后的三维顶点坐标进行调整,得到每个模型顶点的目标三维顶点坐标;基于所述每个模型顶点的目标三维顶点坐标更新所述目标扇形指示器,生成并显示所述更新后的目标扇形指示器。
- 根据权利要求3所述的游戏指示器的生成方法,其中,所述基于所述扇形模型调整参数对所述目标扇形指示器中每个模型顶点调整后的三维顶点坐标进行调整,得到每个模型顶点的目标三维顶点坐标,包括:基于所述角度调整参数和/或所述半径调整参数,对所述目标扇形指示器中每个模型顶点调整后的三维顶点坐标中的目标夹角和/或目标半径进行替换,得到每个模型顶点的目标三维顶点坐标。
- 根据权利要求1所述的游戏指示器的生成方法,其中,所述对所述扇形指示器模型的每个模型顶点的第一灰度值进行阈值调整处理,并将所述扇形指示器模型的每个模型顶点调整后的第一灰度值作为所述目标扇形指示器对应的扇形角度控制参数,包括:通过指定偏移参数值以及调整权重值,将所述扇形指示器模型的每个模型顶点的第一灰度值从初始阈值范围映射到目标阈值范围内。
- 根据权利要求5所述的游戏指示器的生成方法,其中,所述通过指定偏移参数值以及调整权重值,将所述扇形指示器模型的每个模型顶点的第一灰度值从初始阈值范围映射到目标阈值范围内,包括:获取所述每个模型顶点的第一灰度值与所述指定偏移参数值的差值;获取所述每个模型顶点的差值与所述调整权重值的乘积,将每个模型顶点的乘积作为每个模型顶点的扇形角度控制参数。
- 根据权利要求1所述的游戏指示器的生成方法,其中,所述将所述模型顶点的二维顶点坐标转换为三维顶点坐标,包括:基于所述扇形指示器模型与预设坐标系的位置关系,确定所述扇形指示器模型在所述预设坐标系中为垂直关系的目标坐标轴;将每个模型顶点在所述目标坐标轴的坐标值设置为零;基于每个模型顶点的二维顶点坐标、以及所述坐标值确定每个模型顶点的三维顶点坐标。
- 根据权利要求1所述的游戏指示器的生成方法,其中,所述基于所述扇形指示器模型的每个模型顶点的第二灰度值,对所述三维顶点坐标进行调整, 得到调整后的三维顶点坐标,包括:将所述每个模型顶点的第二灰度值与其对应的三维顶点坐标进行相乘处理,得到每个模型顶点调整后的三维顶点坐标。
- 根据权利要求1至8任一项所述的游戏指示器的生成方法,其中,所述预设的扇形指示器模型以及所述目标扇形指示器均为厚度参数为零的网格模型。
- 一种游戏指示器的生成装置,其中,包括:获取单元,用于获取预设的扇形指示器模型,其中,所述扇形指示器模型包括多个模型顶点,每个模型顶点设置有对应的顶点颜色值,所述顶点颜色值包括第一灰度值和第二灰度值,所述第一灰度值通过所述模型顶点对应的第一颜色通道存储,所述第二灰度值通过所述模型顶点对应的第二颜色通道存储;第一调整单元,用于对所述扇形指示器模型的每个模型顶点的第一灰度值进行阈值调整处理,并将所述扇形指示器模型的每个模型顶点调整后的第一灰度值作为所述目标扇形指示器对应的扇形角度控制参数;第一生成单元,用于基于所述扇形角度控制参数、所述目标半径以及所述目标夹角,生成所述目标扇形指示器对应的模型顶点的二维顶点坐标;转换单元,用于将所述模型顶点的二维顶点坐标转换为三维顶点坐标;第二调整单元,用于基于所述扇形指示器模型的每个模型顶点的第二灰度值,对所述三维顶点坐标进行调整,得到调整后的三维顶点坐标;第二生成单元,用于基于所述调整后的三维顶点坐标、所述目标夹角和所述目标半径,生成并显示所述目标扇形指示器。
- 一种计算机设备,其中,所述计算机设备包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器通过调用所述存储器中存储的所述计算机程序,执行如权利要求1至9任一项所述的游戏指示器的生成方法中的步骤。
- 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序适于处理器进行加载,以执行如权利要求1至9任一项所述的游戏指示器的生成方法中的步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211295102.1 | 2022-10-21 | ||
CN202211295102.1A CN115645921A (zh) | 2022-10-21 | 2022-10-21 | 游戏指示器的生成方法、装置、计算机设备及存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024082753A1 true WO2024082753A1 (zh) | 2024-04-25 |
Family
ID=84988673
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/109196 WO2024082753A1 (zh) | 2022-10-21 | 2023-07-25 | 游戏指示器的生成方法、装置、计算机设备及存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115645921A (zh) |
WO (1) | WO2024082753A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115645921A (zh) * | 2022-10-21 | 2023-01-31 | 网易(杭州)网络有限公司 | 游戏指示器的生成方法、装置、计算机设备及存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102173546B1 (ko) * | 2020-04-28 | 2020-11-03 | 주식회사 라이언게임즈 | 게임 객체 렌더링 방법 및 장치 |
CN114146412A (zh) * | 2021-11-18 | 2022-03-08 | 网易(杭州)网络有限公司 | 游戏中的显示控制方法、装置、电子设备和存储介质 |
CN114712852A (zh) * | 2022-03-02 | 2022-07-08 | 网易(杭州)网络有限公司 | 技能指示器的显示方法、装置和电子设备 |
CN115645921A (zh) * | 2022-10-21 | 2023-01-31 | 网易(杭州)网络有限公司 | 游戏指示器的生成方法、装置、计算机设备及存储介质 |
-
2022
- 2022-10-21 CN CN202211295102.1A patent/CN115645921A/zh active Pending
-
2023
- 2023-07-25 WO PCT/CN2023/109196 patent/WO2024082753A1/zh unknown
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102173546B1 (ko) * | 2020-04-28 | 2020-11-03 | 주식회사 라이언게임즈 | 게임 객체 렌더링 방법 및 장치 |
CN114146412A (zh) * | 2021-11-18 | 2022-03-08 | 网易(杭州)网络有限公司 | 游戏中的显示控制方法、装置、电子设备和存储介质 |
CN114712852A (zh) * | 2022-03-02 | 2022-07-08 | 网易(杭州)网络有限公司 | 技能指示器的显示方法、装置和电子设备 |
CN115645921A (zh) * | 2022-10-21 | 2023-01-31 | 网易(杭州)网络有限公司 | 游戏指示器的生成方法、装置、计算机设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN115645921A (zh) | 2023-01-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2024082753A1 (zh) | 游戏指示器的生成方法、装置、计算机设备及存储介质 | |
CN113350793B (zh) | 一种界面元素设置方法、装置、电子设备和存储介质 | |
CN113786620A (zh) | 游戏信息推荐方法、装置、计算机设备及存储介质 | |
CN112657183A (zh) | 游戏的显示控制方法、装置、存储介质及计算机设备 | |
WO2024011894A1 (zh) | 虚拟对象的控制方法、装置、存储介质及计算机设备 | |
CN113426124A (zh) | 游戏中的显示控制方法、装置、存储介质及计算机设备 | |
CN115970284A (zh) | 虚拟武器的攻击方法、装置、存储介质及计算机设备 | |
CN113426129A (zh) | 自定义角色的相貌调整方法、装置、终端和存储介质 | |
WO2024031942A1 (zh) | 游戏道具的控制方法、装置、计算机设备及存储介质 | |
WO2023138160A1 (zh) | 游戏场景控制方法、装置、计算机设备及存储介质 | |
CN112245914B (zh) | 一种视角调整方法、装置、存储介质及计算机设备 | |
CN115501581A (zh) | 一种游戏控制方法、装置、计算机设备及存储介质 | |
CN115382202A (zh) | 一种游戏控制方法、装置、计算机设备及存储介质 | |
CN114404953A (zh) | 虚拟模型的处理方法、装置、计算机设备及存储介质 | |
CN115430150A (zh) | 一种游戏技能释放方法、装置、计算机设备及存储介质 | |
CN115631276A (zh) | 动画制作方法、装置、计算机设备及计算机可读存储介质 | |
CN113546423B (zh) | 一种动作生成方法、装置、计算机设备和存储介质 | |
CN114146418B (zh) | 游戏资源的处理方法、装置、计算机设备及存储介质 | |
CN113546407A (zh) | 游戏画面处理方法、装置、计算机设备及存储介质 | |
CN115393495A (zh) | 虚拟模型的纹理处理方法、装置、计算机设备及存储介质 | |
CN115908643A (zh) | 风暴特效动画的生成方法、装置、计算机设备及存储介质 | |
CN115564916A (zh) | 虚拟场景的编辑方法、装置、计算机设备及存储介质 | |
CN116920392A (zh) | 一种游戏信息提示方法、装置、计算机设备及存储介质 | |
CN115040868A (zh) | 提示信息生成方法、区域调整方法以及装置 | |
CN114768252A (zh) | 游戏场景的显示方法、装置、电子设备及存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23878749 Country of ref document: EP Kind code of ref document: A1 |