Image generation method and device of virtual character, equipment, medium and product

By responding to user editing operations in strategy games, using direction mapping models and configuration information to generate a two-dimensional image of virtual characters, the problem of users needing to repeatedly adjust the camera position is solved, and efficient virtual character image generation is achieved.

CN120502099APending Publication Date: 2025-08-19YIDIAN LINGXI INFORMATION TECHNOLOGY (GUANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510641417.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

When existing strategy games generate virtual scene animations with more virtual characters, users need to repeatedly adjust the camera position of the virtual scene, resulting in a large amount of work.

Method used

By responding to user editing operations, the editing logo is determined, the reference direction of the virtual group is determined using the direction mapping model, and a two-dimensional image of the virtual group is generated based on configuration information, simplifying user input to generate an animation that meets the needs.

Benefits of technology

It improves the efficiency of virtual character image generation, reduces user workload, and improves the output efficiency of animation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120502099A_ABST
    Figure CN120502099A_ABST
Patent Text Reader

Abstract

The invention relates to an image generation method and device of a virtual character, equipment, a medium and a product, and belongs to the technical field of data processing.The method comprises the steps that in response to an editing operation of a user on a target virtual group, an editing identifier indicated by the editing operation is determined; determining a first angle of the target virtual group in a first angle interval according to the editing identifier; inputting the first angle into a preset direction mapping model to obtain a reference direction of the target virtual group; and determining a first two-dimensional image of the target virtual group according to configuration information of the target virtual group indicated by the editing identifier and the reference direction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of data processing, and more specifically, to a method, apparatus, device, medium, and product for generating an image of a virtual character. Background Art

[0002] With the rapid development of the gaming industry, strategy games have become widely popular among players. Currently, existing strategy games typically use game engine editors to edit the game's virtual scenes. However, when users need to generate animations for virtual scenes with multiple virtual characters, they need to repeatedly adjust the virtual scene's camera position before generating the corresponding animations, which greatly increases the user's workload. Summary of the Invention

[0003] One purpose of the embodiments of the present disclosure is to provide a new technical solution for generating images of virtual characters.

[0004] According to a first aspect of the present disclosure, a method for generating an image of a virtual character is provided, the method comprising:

[0005] In response to a user's editing operation on a target virtual group, determining an editing identifier indicated by the editing operation;

[0006] Determining a first angle of the target virtual group in a first angle interval according to the editing identifier;

[0007] Inputting the first angle into a preset direction mapping model to obtain a reference direction of the target virtual group;

[0008] A first two-dimensional image of the target virtual group is determined according to the configuration information of the target virtual group indicated by the editing identifier and the reference direction.

[0009] In a possible implementation, the editing identifier includes an input second angle; and determining, based on the editing identifier, the first angle of the target virtual group in the first angle interval includes:

[0010] determining a second angle interval of the second angle;

[0011] The second angle is converted into a first angle matching the first angle range according to the interval difference between the first angle interval and the second angle interval.

[0012] In a possible implementation, the direction mapping model includes:

[0013] DirectionID=((Angel+22.5) / 45)%8+1

[0014] Where DirectionID is the reference direction, Angel is the first angle, and % is the modulo operation.

[0015] In a possible implementation, the configuration information includes motion information of the target virtual group, and determining the first two-dimensional image of the target virtual group according to the configuration information of the target virtual group indicated by the edit identifier and the reference direction includes:

[0016] Determining the action duration and action sequence of each display action of the target virtual group according to the action information;

[0017] Determining an action sampling node according to the action duration and the action sequence;

[0018] Extracting a second three-dimensional image of the first three-dimensional image of the target virtual group at an action sampling node;

[0019] Determine the second three-dimensional image in the reference direction as the first two-dimensional image of the target virtual group

[0020] In a possible implementation, the method further includes:

[0021] When the configuration information of the target virtual group indicated by the editing identifier does not contain the action information of the target virtual group, obtaining a set default resource file;

[0022] Determine the action information for the target virtual group in the default resource file.

[0023] In a possible implementation, there are multiple reference directions, and the method further includes:

[0024] determining, according to the direction values corresponding to the reference directions, that a first reference direction and a second reference direction in the reference directions have a set association relationship;

[0025] The determining, according to the configuration information of the target virtual group indicated by the editing identifier and the reference direction, a first two-dimensional image of the target virtual group includes:

[0026] determining a second two-dimensional image of the target virtual group according to the configuration information of the target virtual group indicated by the editing identifier, the first reference direction, and a third reference direction among the reference directions;

[0027] According to the second two-dimensional image and the conversion configuration set by the association relationship, a first two-dimensional image of the target virtual group in the first reference direction, the second reference direction, and the third reference direction is determined.

[0028] According to a second aspect of the present disclosure, there is also provided a device for generating an image of a virtual character, the device comprising:

[0029] a response module, configured to determine an edit identifier indicated by the edit operation in response to an edit operation performed by a user on a target virtual group;

[0030] A first determining module, configured to determine a first angle of the target virtual group in a first angle interval according to the editing identifier;

[0031] an obtaining module, configured to input the first angle into a preset direction mapping model to obtain a reference direction of the target virtual group;

[0032] The second determining module is configured to determine a first two-dimensional image of the target virtual group according to the configuration information of the target virtual group indicated by the editing identifier and the reference direction.

[0033] According to a third aspect of the present disclosure, a computer system is provided. The computer system includes a processor. When the processor executes program instructions or code, the computer system implements the method for generating an image of a virtual character in the first aspect. Exemplarily, the computer system also includes a memory for storing the program instructions or code.

[0034] According to a fourth aspect of the present disclosure, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned virtual character image generation method when running.

[0035] According to a fifth aspect of the present disclosure, a computer program product is also provided, comprising a computer program, which, when executed, enables a computer to execute the steps of the above-mentioned method for generating an image of a virtual character.

[0036] According to a sixth aspect of the present disclosure, an electronic device is further provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the image generation method of the virtual character through the computer program.

[0037] One beneficial effect of the embodiments of the present disclosure is that the image generation method of the virtual character provided by the embodiments of the present disclosure can respond to the user's editing operation, determine the editing identifier indicated by the editing operation, determine the first angle of the target virtual group in the first angle range based on the editing identifier, and then determine the reference direction matched by the first angle through the direction mapping model, so as to determine the first two-dimensional image of the target virtual group through the reference direction and the configuration information of the target virtual group, so as to enable the user to generate the first two-dimensional image that meets the user's needs through simple input, thereby improving the output efficiency of the first two-dimensional image and reducing the user's workload.

[0038] Features and advantages of the embodiments of the present specification will become apparent from the following detailed description of exemplary embodiments of the present specification with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and, together with the description, serve to explain the principles of the embodiments of the specification.

[0040] Figure 1 A schematic diagram showing the hardware structure of an electronic device that can be used to implement the method for generating an image of a virtual character according to an embodiment of the present disclosure is shown;

[0041] Figure 2 A schematic flow chart of a method for generating an image of a virtual character according to some embodiments is shown;

[0042] Figure 3 A schematic diagram illustrating reference directions according to some embodiments is shown;

[0043] Figure 4 A schematic structural diagram of a device for generating an image of a virtual character according to some embodiments is shown;

[0044] Figure 5 A schematic diagram of the hardware structure of an electronic device according to some embodiments is shown. DETAILED DESCRIPTION

[0045] Various exemplary embodiments of the present specification will now be described in detail with reference to the accompanying drawings.

[0046] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the embodiments of this specification, its application, or uses.

[0047] It should be noted that like reference numerals and letters refer to like items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0048] It should be noted that all actions of acquiring signals, information or data in the embodiments of the present disclosure are performed in compliance with the corresponding data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.

[0049] The disclosed embodiments provide a new image generation solution for virtual characters, which allows the user to perform editing operations on virtual characters in a virtual scene. The solution can determine a reference direction that can better display each virtual character based on the angle of each virtual character in the virtual scene reflected by the editing operation, and generate animations for each virtual character based on the perspective of the reference direction, so that the user can generate animations that meet the user's needs through simple input, thereby improving the animation output efficiency and reducing the user's workload.

[0050] Figure 1 A schematic diagram of the hardware structure of an electronic device that can be used to implement the method for generating an image of a virtual character according to an embodiment of the present disclosure is shown.

[0051] The electronic device 1000 is a device capable of running a computer program. The computer program may be a local application installed on the electronic device, or a web application, a light application, or a small program, etc., without limitation. The electronic device 1000 may be a mobile phone, a tablet computer, a PC, etc., without limitation.

[0052] like Figure 1 As shown, the electronic device 1000 may include a processor 1101, a memory 1102, an interface device 1103, a communication device 1104, an output device 1105, an input device 1106, and the like. Figure 1 The hardware configuration shown is merely illustrative and is in no way intended to limit the disclosure, its application, or uses.

[0053] The processor 1101 is used to execute a computer program, which can be written using an instruction set of an architecture such as x86, Arm, RISC, MIPS, SSE, etc. The memory 1102 includes, for example, ROM (read-only memory), RAM (random access memory), and non-volatile memory such as a hard disk. The interface device 1103 includes, for example, a USB interface, a network cable interface, a headphone interface, etc. The communication device 1104 is capable of wired or wireless communication, and the communication device 1104 may include at least one short-range communication module, for example, any module that performs short-range wireless communication based on a short-range wireless communication protocol such as Hilink protocol, WiFi (IEEE 802.11 protocol), Mesh, Bluetooth, ZigBee, Thread, Z-Wave, NFC, UWB, LiFi, etc. The communication device 1104 may also include a remote communication module, for example, any module that performs WLAN, GPRS, 2G / 3G / 4G / 5G remote communication. The output device 1105 may include, for example, an LCD display or a touch display, a speaker, etc. The input device 1106 may include, for example, a touch screen, a keyboard, a microphone, various sensors, and the like.

[0054] In this embodiment, the memory 1102 of the electronic device 1000 is used to store a computer program, which is used to control the processor 1101 to operate so as to execute the method for generating an image of a virtual character according to any embodiment of the present disclosure.

[0055] Next, as Figure 1 Taking the electronic device 1000 as an example, various embodiments of the method for generating an image of a virtual character are described.

[0056] <First embodiment>

[0057] Figure 2 A method for generating an image of a virtual character according to some embodiments is shown. The method for generating an image of a virtual character may include the following steps S210 to S240:

[0058] Step S210 : In response to the user's editing operation on the target virtual group, determining an editing identifier indicated by the editing operation.

[0059] In this embodiment, the editing operation may involve the user setting the target virtual group's group formation, individual models, and display actions in the tool bar of the game engine editor. The virtual group here is generally composed of multiple virtual characters, and the group formation of the virtual group may be multiple virtual characters arranged in fixed positions. For example, if there are 9 virtual characters lined up in a row with a distance unit of 1, the group formation is a 9×1 formation.

[0060] In this embodiment, the editing identifier can be a group formation ID, an individual model ID, and an action ID. Different group formation IDs correspond to different group formations. For example, the group formation ID ZX01 corresponds to a 9×1 formation, and the group formation ID ZX02 corresponds to a 3×3 formation. Different individual model IDs correspond to different individual models. For example, the individual model ID MD1 corresponds to an infantryman, and the individual model ID MD2 corresponds to a spearman. Different action IDs correspond to different display actions. For example, the display action corresponding to the action ID DZ1 is slashing, and the display action corresponding to the action ID DZ2 is retreating.

[0061] Step S220: determining a first angle of the target virtual group in a first angle interval according to the editing identifier.

[0062] In this embodiment, the first angle interval may be an angle range, such as [0, 360°), and the first angle is an angle in [0, 360°), such as 5° or 100°.

[0063] Step S230: input the first angle into a preset direction mapping model to obtain a reference direction of the target virtual group.

[0064] In some embodiments, in order to obtain a reference direction, a direction mapping model may be used. The direction mapping model may include:

[0065] DirectionID=((Angel+22.5) / 45)%8+1

[0066] Where DirectionID is the reference direction, Angel is the first angle, and % is the modulo operation.

[0067] In this embodiment, if Figure 3 As shown, the reference direction is automatically mapped to 1-8, formatted with zero padding to 3 digits, such as 1→001. With a step size of 45°, each angle interval includes ±22.5° from the center point, for a total of 8 directions, 001-008, covering the full viewing angle. When the first angle is 22.5°, the reference direction can be 002.

[0068] Step S240 : determining a first two-dimensional image of the target virtual group according to the configuration information and reference direction of the target virtual group indicated by the editing mark.

[0069] In this embodiment, the configuration information may include relative position information of each virtual character in the target virtual group, individual models of each virtual character, and display actions of each virtual character.

[0070] In this embodiment, the first two-dimensional image may be a two-dimensional picture generated by encoding in a PNG format.

[0071] The method for generating images of virtual characters according to the first embodiment of the present invention solves the problem in the prior art that, when a user needs to generate animations of virtual scenes with a large number of virtual characters, the user needs to repeatedly adjust the camera position of the virtual scene before generating the corresponding animation, which greatly increases the user's workload. Based on this method, in response to the user's editing operation, an editing identifier indicating the editing operation is determined. Based on the editing identifier, a first angle of the target virtual group in a first angle interval is determined. Then, through a direction mapping model, a reference direction matching the first angle is determined. The first two-dimensional image of the target virtual group is determined based on the reference direction and the configuration information of the target virtual group. This enables the user to generate a first two-dimensional image that meets the user's needs through simple input, thereby improving the output efficiency of the first two-dimensional image and reducing the user's workload.

[0072] <Second embodiment>

[0073] In this embodiment, in order to adapt to the editing settings of different users, the editing identifier may include the input second angle. According to different editing settings, the input second angle may be converted into a first angle that conforms to the first angle range.

[0074] In these embodiments, relative to the first embodiment, step S220 may include the following steps S310 and S320:

[0075] Step S310: Determine a second angle interval of a second angle.

[0076] In this embodiment, different user editing settings may correspond to different second angle ranges, for example, the second angle range is [-30, 330°).

[0077] Step S320: Convert the second angle into a first angle matching the first angle range according to the interval difference between the first angle interval and the second angle interval.

[0078] In some examples, the second angle is -30°, the first angle interval is [0, 360°), the second angle interval is [-30, 330°), and the interval difference is 30°, then the first angle is 0°.

[0079] <Third embodiment>

[0080] In this embodiment, in order to improve the comprehensiveness of the generated animation, the configuration information may include action information of the target virtual group. Through this action information, the various display actions of the target virtual group are determined, and multiple two-dimensional images that can represent all actions of the target virtual group are effectively extracted to improve the comprehensiveness and accuracy of the generated animation.

[0081] In these embodiments, relative to the first embodiment, step S240 may include the following steps S410 to S440:

[0082] Step S410 : determining the action duration and action sequence of each display action of the target virtual group according to the action information.

[0083] In this embodiment, the target virtual groups are, for example, Zhao Yun and Lu Bu. The action information may include Zhao Yun slashing at Lu Bu, and the displayed actions may include action A1 of Zhao Yun moving toward Lu Bu, action A2 of Zhao Yun slashing at Lu Bu, and action A3 of Lu Bu receiving the attack. Action A1 may last 2 seconds, action A2 may last 1 second, and action A3 may last 0.5 seconds. The order of the actions may be A1-A2-A3.

[0084] Step S420: Determine the action sampling node according to the action duration and action sequence.

[0085] In this embodiment, each display action can be sampled N times, and the sampling interval t is calculated. The specific expression can be: sampling interval t = action duration length / N, where N can be 5, 10, or 15. After the sampling interval for each display action is determined, the action sampling nodes can be determined. For example, if the sampling interval for display action A1 is 0.5, then the action sampling nodes for display action A1 can be: 0s node, 0.5s node, 1s node, 1.5s node, and 2s node.

[0086] Step S430 : extracting a second three-dimensional image of the first three-dimensional image of the target virtual group at the action sampling node.

[0087] Step S440 : determining a second three-dimensional image in a reference direction as a first two-dimensional image of the target virtual group.

[0088] In this embodiment, the first 3D image of the target virtual group can be set to start playback, and a snapshot can be taken every sampling interval t. The snapshot operation can include creating a Render Target map, rendering the 3D skeletal animation to the target virtual group, extracting the texture data of the target virtual group, and encoding it in PNG format to generate a 2D image, namely the first 2D image. The generated first 2D image is then saved as a file with a file name starting with 1.png until the playback of the first 3D image ends. Ultimately, N action sequence frame images, namely the N first 2D images, are obtained.

[0089] <Fourth embodiment>

[0090] In this embodiment, in order to generate animation even when the user's editing operation does not indicate an action for the target virtual group, a default resource file may be obtained, and a display action may be set for the target virtual group using the action information for the target virtual group in the default resource file.

[0091] In these embodiments, compared to the third embodiment, before step S240, the method further includes the following steps S510 and S520:

[0092] Step S510 : when the configuration information of the target virtual group indicated by the editing identifier does not contain the action information of the target virtual group, a set default resource file is obtained.

[0093] In this embodiment, the configuration information of the target virtual group indicated by the editing identifier does not contain the action information of the target virtual group. This can be: the action name in the configuration information of the target virtual group is empty. When the action name is empty, the game engine editor can use "idle" by default or configure the default resource file.

[0094] Step S520: determining the action information for the target virtual group in the default resource file.

[0095] In this embodiment, the action information for the target virtual group in the default resource file may include an action ID of a fixed action, where the fixed action is, for example, a normal attack.

[0096] <Fifth embodiment>

[0097] In this embodiment, in order to reduce the computing resources occupied by generating the first two-dimensional image of the target virtual group, the reference direction can be multiple. By extracting a single two-dimensional image of the first reference direction among the multiple reference directions and using mirror conversion processing, a two-dimensional image of the second reference direction that is a mirror image of the first reference direction can be obtained.

[0098] In these embodiments, compared to the first embodiment, before step S240, the method further includes the following step S610:

[0099] Step S610 : determining, based on the direction values corresponding to the reference directions, whether a first reference direction and a second reference direction in the reference directions have a set association relationship.

[0100] In this embodiment, if Figure 3 As shown, the direction values corresponding to the first reference direction can be 006, 007, and 008, and the direction values corresponding to the second reference direction can be 004, 003, and 002. When the first reference direction is 006, the second reference direction is 004, that is, the first reference direction and the second reference direction have a set association relationship.

[0101] Based on this, step S240 may include the following steps S620 and S630:

[0102] Step S620 : determining a second two-dimensional image of the target virtual group according to the configuration information of the target virtual group indicated by the editing mark, the first reference direction, and the third reference direction among the reference directions.

[0103] In this embodiment, if Figure 3 As shown, the direction values corresponding to the third reference direction may be 001 and 005.

[0104] Step S630 : determining the first two-dimensional images of the target virtual group in the first reference direction, the second reference direction, and the third reference direction according to the second two-dimensional image and the conversion configuration set by the association relationship.

[0105] In this embodiment, the conversion configuration may be a configuration of performing a mirror conversion process on the second two-dimensional image in the first reference direction and converting it into a second two-dimensional image in the second reference direction. The mirror conversion process here is a prior art and will not be elaborated on here.

[0106] <Device Example>

[0107] Figure 4 FIG. 1 shows a schematic diagram of the structure of a virtual character image generation device according to an embodiment of the present disclosure. Figure 4 As shown, the virtual character image generation device 400 includes a response module 410 , a first determination module 420 , an acquisition module 430 and a second determination module 440 .

[0108] The response module 410 is used to determine the editing identifier of the editing operation indication in response to the user's editing operation on the target virtual group;

[0109] The first determining module 420 is configured to determine a first angle of the target virtual group in a first angle interval according to the editing identifier;

[0110] The obtaining module 430 is used to input the first angle into a preset direction mapping model to obtain a reference direction of the target virtual group;

[0111] The second determining module 440 is configured to determine a first two-dimensional image of the target virtual group according to the configuration information and the reference direction of the target virtual group indicated by the editing identifier.

[0112] In some embodiments, the first determination module 420 is further configured to determine a second angle interval of the second angle; and convert the second angle into a first angle matching the first angle range according to an interval difference between the first angle interval and the second angle interval.

[0113] In some embodiments, the second determination module 440 is also used to determine the action duration and action sequence of each display action of the target virtual group based on the action information; determine the action sampling node based on the action duration and action sequence; extract the second three-dimensional image of the first three-dimensional image of the target virtual group at the action sampling node; and determine the second three-dimensional image in the reference direction as the first two-dimensional image of the target virtual group.

[0114] In some embodiments, the image generation device 400 of the virtual character also includes a third determination module, which is further used to obtain a set default resource file when the configuration information of the target virtual group indicated by the editing identifier does not contain the action information of the target virtual group; and determine the action information for the target virtual group in the default resource file.

[0115] In some embodiments, the virtual character image generation device 400 further includes a fourth determination module, which is further configured to determine, based on the direction value corresponding to the reference direction, whether the first reference direction and the second reference direction in the reference direction have a set association relationship.

[0116] The second determination module 440 is further configured to determine a second two-dimensional image of the target virtual group based on the configuration information of the target virtual group indicated by the editing identifier, the first reference direction, and the third reference direction among the reference directions; and to determine the first two-dimensional images of the target virtual group in the first reference direction, the second reference direction, and the third reference direction based on the conversion configuration set by the second two-dimensional image and the association relationship.

[0117] <Equipment Example>

[0118] Figure 5 Schematic diagram of the hardware structure of electronic devices according to other embodiments is shown. Figure 5As shown, the electronic device 500 includes a processor 510 and a memory 520. The memory 520 is used to store a computer program. The computer program is used to control the processor 510 to operate so as to control the electronic device 500 to execute the method for generating an image of a virtual character according to any embodiment of the present disclosure.

[0119] An embodiment of the present disclosure further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for generating an image of a virtual character according to any embodiment of the present disclosure.

[0120] The embodiments of the present disclosure further provide a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the method for generating an image of a virtual character according to any embodiment of the disclosure is implemented.

[0121] The various embodiments in this specification are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the device and apparatus embodiments are generally similar to the method embodiments, so their descriptions are relatively simplified. For relevant portions, reference can be made to the descriptions of the method embodiments.

[0122] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0123] The embodiments of this specification may be devices, methods, and / or computer program products. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the embodiments of this specification.

[0124] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.

[0125] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.

[0126] The computer program instructions for executing the embodiments of the present specification can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or the first code written in any combination of one or more programming languages, wherein the programming language includes object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. The computer readable program instructions can be executed completely on the first user computer, partially on the first user computer, executed as an independent software package, partially on the first user computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the first user computer via any type of network including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (such as an Internet service provider connected via the Internet). In certain embodiments, by utilizing the state information of the computer readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer readable program instructions, thereby realizing the various aspects of the embodiments of the present specification.

[0127] Various aspects of the embodiments of this specification are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of this specification. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0128] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0129] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0130] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to the multiple embodiments of this specification. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of an instruction, and a part of the module, program segment or instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are all equivalent.

[0131] The embodiments of the present specification have been described above. The above description is illustrative and not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for generating an image of a virtual character, the method comprising: In response to a user's editing operation on a target virtual group, determining an editing identifier indicated by the editing operation; Determining a first angle of the target virtual group in a first angle interval according to the editing identifier; Inputting the first angle into a preset direction mapping model to obtain a reference direction of the target virtual group; A first two-dimensional image of the target virtual group is determined according to the configuration information of the target virtual group indicated by the editing identifier and the reference direction.

2. The method according to claim 1, wherein The editing identifier includes the input second angle; and determining the first angle of the target virtual group in the first angle interval according to the editing identifier includes: determining a second angle interval of the second angle; The second angle is converted into a first angle matching the first angle range according to the interval difference between the first angle interval and the second angle interval.

3. The method according to claim 1, wherein The direction mapping model includes: DirectionID=((Angel+22.5) / 45)%8+1 Where DirectionID is the reference direction, Angel is the first angle, and % is the modulo operation.

4. The method according to claim 1, wherein The configuration information includes motion information of the target virtual group, and determining the first two-dimensional image of the target virtual group according to the configuration information of the target virtual group indicated by the edit identifier and the reference direction includes: Determining the action duration and action sequence of each display action of the target virtual group according to the action information; Determining an action sampling node according to the action duration and the action sequence; Extracting a second three-dimensional image of the first three-dimensional image of the target virtual group at an action sampling node; The second three-dimensional image in the reference direction is determined as the first two-dimensional image of the target virtual group.

5. The method according to claim 4, wherein The method further comprises: When the configuration information of the target virtual group indicated by the editing identifier does not contain the action information of the target virtual group, obtaining a set default resource file; Determine the action information for the target virtual group in the default resource file.

6. The method according to claim 1, wherein There are multiple reference directions, and the method further includes: determining, according to the direction values corresponding to the reference directions, that a first reference direction and a second reference direction in the reference directions have a set association relationship; The determining, according to the configuration information of the target virtual group indicated by the editing identifier and the reference direction, a first two-dimensional image of the target virtual group includes: determining a second two-dimensional image of the target virtual group according to the configuration information of the target virtual group indicated by the editing identifier, the first reference direction, and a third reference direction among the reference directions; According to the second two-dimensional image and the conversion configuration set by the association relationship, a first two-dimensional image of the target virtual group in the first reference direction, the second reference direction, and the third reference direction is determined.

7. A device for generating an image of a virtual character, wherein: The device comprises: a response module, configured to determine an edit identifier indicated by the edit operation in response to an edit operation performed by a user on a target virtual group; A first determining module, configured to determine a first angle of the target virtual group in a first angle interval according to the editing identifier; an obtaining module, configured to input the first angle into a preset direction mapping model to obtain a reference direction of the target virtual group; The second determining module is configured to determine a first two-dimensional image of the target virtual group according to the configuration information of the target virtual group indicated by the editing identifier and the reference direction.

8. An electronic device, wherein: The method comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the method steps according to any one of claims 1 to 6 under the control of the computer program.

9. A computer-readable storage medium comprising a stored computer program, wherein: When the computer program is executed, the method steps of any one of claims 1 to 6 are performed.

10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.