Virtual object information processing method, device, storage medium and electronic device
By splitting and independently processing the texture areas of the facial model of the virtual object, the problem of dynamic expression efficiency caused by discontinuous facial features distribution of virtual objects is solved, and more efficient and diverse expression expressions are achieved.
Patent Information
- Application Number
- CN202411804193.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-04
AI Technical Summary
Due to the discontinuous distribution of facial features of virtual objects, the traditional texture-based virtual character expression switching method has limitations in expression diversity, and the number of expressions in texture maps is limited, which has the problem of low efficiency in realizing dynamic expressions of virtual objects.
By determining the facial model of the virtual object to be processed independently of multiple feature parts, the expression texture area of the expression texture map matching the facial model is split into multiple subtexture areas that are no longer continuous. The multiple subtexture areas correspond to multiple feature parts respectively, and the multiple subtexture areas are textured sampling, and the obtained sampling results are combined to generate the expression expression results of the facial model.
It improves texture reusability and number of expressions, realizes efficient implementation of dynamic expressions of virtual objects, and solves the problem of low efficiency in realizing dynamic expressions of virtual objects.
Smart Images

Figure CN119762636A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of computer graphics, and in particular to a method, device, storage medium and electronic device for processing information of a virtual object. Background Art
[0002] Currently, in virtual scenes, the texture (UV) layout of the virtual character's facial model usually places the texture coordinates of feature parts (such as eyes, mouth, etc.) continuously and centrally in the expression texture map, which facilitates unified texture mapping of the virtual character's facial expressions.
[0003] However, this method is suitable for virtual characters with continuous and concentrated distribution of feature parts. For virtual objects with unique facial structures, such as virtual pets, the facial features of virtual objects are discontinuously distributed and the eyes and mouths are far apart. Therefore, the traditional texture-based virtual character expression switching method has limitations in expression diversity. The number of expressions of texture maps is limited, resulting in a technical problem of low efficiency in realizing dynamic expressions of virtual objects.
[0004] Currently, no effective solution has been proposed to address the problem of low efficiency in achieving dynamic expressions of the above-mentioned virtual objects. Summary of the invention
[0005] At least some embodiments of the present disclosure provide a method, device, storage medium and electronic device for processing information of a virtual object, so as to at least solve the technical problem of low efficiency in realizing dynamic expressions of virtual objects.
[0006] According to one embodiment of the present disclosure, a method for processing information of a virtual object is provided. The method may include: determining a facial model of a virtual object to be processed, wherein the facial model includes multiple characteristic parts, and the multiple characteristic parts are independent of each other; obtaining an expression texture map that matches the facial model, wherein the texture area of the expression texture map includes multiple sub-texture areas, and the multiple sub-texture areas are independent of each other, and the sub-texture areas include different sub-expression texture maps corresponding to the characteristic parts, and the sub-expression texture maps are used to characterize the state of the characteristic parts associated with the expression of the facial model; performing texture sampling on the expression texture map to obtain the texture sampling result of the target sub-expression map corresponding to the characteristic parts; rendering and displaying the texture sampling result to obtain the expression expression result of the facial model.
[0007] According to one embodiment of the present disclosure, a virtual object information processing device is also provided. The device may include: a determination unit, used to determine a facial model of a virtual object to be processed, wherein the facial model includes multiple characteristic parts, and the multiple characteristic parts are independent of each other; an acquisition unit, used to acquire an expression texture map matching the facial model, wherein the texture area of the expression texture map includes multiple sub-texture areas, and the multiple sub-texture areas are independent of each other, and the sub-texture areas include different sub-expression texture maps corresponding to the characteristic parts, and the sub-expression texture maps are used to characterize the state of the characteristic parts associated with the expression of the facial model; a sampling unit, used to perform texture sampling on the expression texture map, and obtain the texture sampling result of the target sub-expression map corresponding to the characteristic parts; a rendering unit, used to render and display the texture sampling result, and obtain the expression expression result of the facial model.
[0008] According to one embodiment of the present disclosure, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute any of the above-mentioned virtual object information processing methods when running.
[0009] According to one embodiment of the present disclosure, an electronic device is provided, which may include a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the above-mentioned virtual object information processing methods.
[0010] According to one embodiment of the present disclosure, a computer program product is further provided. The computer program product may include a computer program, wherein the computer program is configured to execute any of the above-mentioned virtual object information processing methods when running.
[0011] According to one embodiment of the present disclosure, a computer program product is also provided. The computer program product may include a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and the computer program is configured to execute any of the above-mentioned virtual object information processing methods when running.
[0012] According to one embodiment of the present disclosure, a computer program is further provided, wherein the computer program is configured to execute any of the above-mentioned virtual object information processing methods when running.
[0013] In at least some embodiments of the present disclosure, a facial model of a virtual object to be processed is determined, wherein the facial model includes a plurality of feature parts, and the plurality of feature parts are independent of each other; an expression texture map matching the facial model is obtained, wherein a texture region of the expression texture map includes a plurality of sub-texture regions, and the plurality of sub-texture regions are independent of each other, and the sub-texture regions include different sub-expression texture maps corresponding to the feature parts, and the sub-expression texture maps are used to characterize a state of the feature parts associated with an expression of the facial model; texture sampling is performed on the expression texture map to obtain a texture sampling result of a target sub-expression map corresponding to the feature parts; and the texture sampling result is rendered and displayed to obtain an expression expression result of the facial model. That is to say, the disclosed embodiment determines a facial model of a virtual object to be processed with multiple independent feature parts, splits the expression texture area of the expression texture map matching the facial model into multiple non-continuous sub-texture areas, and the multiple sub-texture areas respectively correspond to multiple feature parts, further performs texture sampling on the multiple sub-texture areas, and then combines the obtained sampling results to generate an expression result of the facial model, thereby achieving the purpose of improving texture reusability and the number of expressions. Since multiple independent feature parts can be dynamically combined, the technical effect of improving the efficiency of virtual objects in realizing dynamic expressions is achieved, and the technical problem of low efficiency of virtual objects in realizing dynamic expressions is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present application. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:
[0015] Figure 1 is a hardware structure block diagram of a mobile terminal of a method for processing information of a virtual object according to an embodiment of the present disclosure;
[0016] Figure 2 is a flow chart of a method for processing information of a virtual object according to one embodiment of the present disclosure;
[0017] Figure 3 is a schematic diagram of a texture UV of a virtual game character according to one embodiment of the present disclosure;
[0018] Figure 4 is a schematic diagram of a body texture of a virtual pet according to one embodiment of the present disclosure;
[0019] Figure 5 is a schematic diagram of an expression texture of a virtual pet according to one embodiment of the present disclosure;
[0020] Figure 6 is a schematic diagram of a virtual pet facial structure display according to one embodiment of the present disclosure;
[0021] Figure 7 is a schematic diagram showing a virtual pet texture UV layout according to one embodiment of the present disclosure;
[0022] Figure 8 is a schematic diagram showing a texture layout of a virtual pet according to one embodiment of the present disclosure;
[0023] Fig. 9 is a schematic diagram of a virtual pet expression display according to one embodiment of the present disclosure;
[0024] Fig.10 is a schematic diagram of another virtual pet expression display according to one embodiment of the present disclosure;
[0025] Fig.11 is a structural block diagram of a virtual object information processing device according to one embodiment of the present disclosure;
[0026] Fig.12 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present disclosure, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present disclosure.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0029] In a possible implementation, when it is necessary to generate the expression of a virtual character, the texture coordinates of the characteristic parts (e.g., eyes and mouth) of the facial model of the virtual character can usually be placed continuously and centrally in the expression texture map, so as to facilitate the unified texture mapping of the facial expression of the virtual character. However, after practice and careful research, the inventors found that if the above method is used to generate the expression of a virtual character, since the method is suitable for virtual characters with continuous and concentrated characteristic parts, for virtual objects with unique facial structures, such as virtual pets, the facial features of the virtual objects are not distributed continuously, and the eyes and mouth are far apart. Therefore, the traditional texture-based virtual character expression switching method has limitations in expression diversity, and the number of expressions of the texture map is limited, so there is a technical problem of low efficiency in realizing dynamic expressions of virtual objects.
[0030] Based on the above, the disclosed embodiment proposes a method for processing information of virtual objects. The method determines a facial model of a virtual object to be processed with multiple independent feature parts, splits the expression texture area of the expression texture map matching the facial model into multiple sub-texture areas that are no longer continuous, and the multiple sub-texture areas correspond to multiple feature parts respectively. Texture sampling is further performed on the multiple sub-texture areas, and the obtained sampling results are combined to generate an expression expression result of the facial model, thereby achieving the purpose of improving texture reusability and the number of expressions. Since multiple independent feature parts can be dynamically combined, the technical effect of improving the efficiency of virtual objects in realizing dynamic expressions is achieved.
[0031] Considering that in the related art, when the texture coordinates of the characteristic parts are continuously and centrally placed in the expression texture map to generate the expression of the virtual character, there is a technical problem that the virtual object has low efficiency in realizing dynamic expressions. However, in the embodiment of the present disclosure, a facial model of the virtual object to be processed is determined, wherein the facial model includes multiple characteristic parts, and the multiple characteristic parts are independent of each other; an expression texture map matching the facial model is obtained, wherein the texture area of the expression texture map includes multiple sub-texture areas, and the multiple sub-texture areas are independent of each other, and the sub-texture areas include different sub-expression texture maps corresponding to the characteristic parts, and the sub-expression texture maps are used to characterize the state of the characteristic parts associated with the expression of the facial model; the expression texture map is texture sampled to obtain the texture sampling result of the target sub-expression map corresponding to the characteristic part; the texture sampling result is rendered and displayed to obtain the expression expression result of the facial model, thereby achieving the technical effect of improving the efficiency of the virtual object in realizing dynamic expressions, and solving the technical problem of low efficiency of the virtual object in realizing dynamic expressions.
[0032] According to one embodiment of the present disclosure, an embodiment of a method for processing information of a virtual object is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0033] The method embodiment can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, the mobile terminal can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID for short), a tablet computer (PAD), a game console and other terminal devices. Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for processing information of a virtual object according to an embodiment of the present disclosure. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 (the processor 102 may include but is not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microprocessor (MCU), a field programmable gate array (FPGA), a neural network processor (NPU), a tensor processor (TPU), an artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data. Optionally, the mobile terminal may further include a transmission device 106, an input and output device 108, and a display device 110 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0034] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the information processing method of the virtual object in the embodiment of the present disclosure. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above-mentioned information processing method of the virtual object is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0035] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0036] The inputs in the input / output device 108 may come from a plurality of human interface devices (HIDs), such as keyboards and mice, game controllers, and other dedicated game controllers (such as steering wheels, fishing rods, dance mats, remote controls, etc.). In addition to providing input functions, some human interface devices may also provide output functions, such as force feedback and vibration of game controllers, audio output of controllers, etc.
[0037] The display device 110 may be, for example, a Heads Up Display (HUD), a touch screen liquid crystal display (LCD), and a touch display (also referred to as a "touch screen" or "touch display screen"). The LCD display enables the user to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), and the user can interact with the GUI by finger contacts and / or gestures on the touch-sensitive surface. The human-computer interaction functions here may optionally include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for executing the above human-computer interaction functions are configured / stored in a computer program product or readable storage medium executable by one or more processors.
[0038] Those skilled in the art will understand that Figure 1 The structure shown is for illustration only and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0039] In a possible implementation, an embodiment of the present disclosure provides a method for processing information of a virtual object. Figure 2 is a flowchart of a method for processing information of a virtual object according to one embodiment of the present disclosure. Figure 2 As shown, the method may include the following steps:
[0040] Step S202, determining a facial model of the virtual object to be processed, wherein the facial model includes a plurality of characteristic parts, and the plurality of characteristic parts are independent of each other.
[0041] In the technical solution provided in the above step S202 of the present disclosure, the facial model of the virtual object to be processed can be determined. The virtual object to be processed can be a virtual object to be processed in a virtual scene, for example, the virtual scene can be a virtual game scene, and the virtual object can be a virtual pet. These are all examples, and no specific restrictions are imposed on the type of virtual object.
[0042] In this embodiment, the facial model may include multiple feature parts, which are facial features related to the expression of the virtual object, and may include at least eyes and mouth, and the multiple feature parts are independent of each other, that is, the eyes and mouth of the virtual object are independent of each other.
[0043] Step S204, obtaining an expression texture map that matches the facial model, wherein the texture area of the expression texture map includes multiple sub-texture areas, the multiple sub-texture areas are independent of each other, the sub-texture areas include different sub-expression texture maps corresponding to the feature parts, and the sub-expression texture maps are used to characterize the state of the feature parts associated with the expression of the facial model.
[0044] In the technical solution provided in the above step S204 of the present disclosure, after determining the facial model of the virtual object to be processed, an expression texture map matching the facial model can be obtained. Wherein, the texture area of the expression texture map includes multiple sub-texture (UV) areas, and the sub-texture areas can include at least an eye UV area and a mouth UV area, and the multiple sub-texture areas are independent of each other, that is, the eye UV area and the mouth UV area are independent of each other.
[0045] In this embodiment, the sub-texture area may include different sub-expression texture maps corresponding to the feature parts, and the sub-expression texture maps may be used to characterize the state of the feature parts associated with the expression of the facial model. For example, the eye UV area includes different sub-expression texture maps corresponding to the eyes, and the sub-expression texture maps are used to characterize the state of the eyes, which may be normal, negative, closed eyes, positive, personality, hit, fighting, dizzy, etc. This is only an example, and there is no specific limitation on the type of eye state.
[0046] Optionally, the mouth UV area includes different sub-expression texture maps corresponding to the mouth, and the sub-expression texture maps are used to characterize the state of the mouth, which may be normal, happy, angry, pouting, etc. This is only for illustration and does not specifically limit the state type of the mouth.
[0047] In this embodiment, the eye UV area and the mouth UV area are independent of each other, which can make the expression switching and combination of the virtual object more flexible. For example, the expression of the eyes and the mouth can change independently, which can achieve more expression combinations and increase the expression diversity of the virtual object, so as to better express complex emotional states.
[0048] Step S206, performing texture sampling on the expression texture map to obtain a texture sampling result of a target sub-expression map corresponding to the feature part.
[0049] In the technical solution provided in the above step S206 of the present disclosure, after acquiring the expression texture map matching the facial model, the acquired expression texture map is texture sampled to obtain the texture sampling result of the target sub-expression map corresponding to the characteristic part. The target sub-expression map may include at least different sub-expression texture maps corresponding to the eyes and different sub-expression texture maps corresponding to the mouth. The texture sampling result may be the result of sampling the texture at the eye index corresponding to the eyes and the texture at the mouth index corresponding to the mouth. The texture sampling result may be UV. final To express.
[0050] In this embodiment, since the multiple characteristic parts of the virtual object are independent of each other, the texture coordinates corresponding to the characteristic parts can be determined. Based on the texture coordinates, the index information of the expression texture map can be determined, so as to determine the use range of different characteristic parts on the expression texture map based on the index information. Further, according to the index information, the target sub-expression map corresponding to the characteristic part can be determined, and then the texture sampling of the target sub-expression texture map can be performed to obtain the texture sampling result.
[0051] Step S208, rendering and displaying the texture sampling result to obtain the expression result of the facial model.
[0052] In the technical solution provided in the above step S208 of the present disclosure, after texture sampling is performed on the expression texture map to obtain the texture sampling result of the target sub-expression map corresponding to the characteristic part, the obtained texture sampling result is rendered and displayed to obtain the expression expression result of the facial model. The expression expression result can be a visual expression result of the facial expression of the virtual object.
[0053] In this embodiment, after texture sampling is performed on the target sub-expression texture maps corresponding to different feature parts and texture sampling results are obtained, the obtained sampling results can be combined, and then the obtained combined results can be rendered and displayed to generate the expression results of the facial model.
[0054] Through the above steps S202 to S208, the facial model of the virtual object to be processed is determined, wherein the facial model includes multiple characteristic parts, and the multiple characteristic parts are independent of each other; an expression texture map matching the facial model is obtained, wherein the texture area of the expression texture map includes multiple sub-texture areas, and the multiple sub-texture areas are independent of each other, and the sub-texture areas include different sub-expression texture maps corresponding to the characteristic parts, and the sub-expression texture maps are used to characterize the state of the characteristic parts associated with the expression of the facial model; texture sampling is performed on the expression texture map to obtain the texture sampling result of the target sub-expression map corresponding to the characteristic parts; the texture sampling result is rendered and displayed to obtain the expression expression result of the facial model. That is to say, the disclosed embodiment determines a facial model of a virtual object to be processed with multiple independent feature parts, splits the expression texture area of the expression texture map matching the facial model into multiple non-continuous sub-texture areas, and the multiple sub-texture areas respectively correspond to multiple feature parts, further performs texture sampling on the multiple sub-texture areas, and then combines the obtained sampling results to generate an expression result of the facial model, thereby achieving the purpose of improving texture reusability and the number of expressions. Since multiple independent feature parts can be dynamically combined, the technical effect of improving the efficiency of virtual objects in realizing dynamic expressions is achieved, and the technical problem of low efficiency of virtual objects in realizing dynamic expressions is solved.
[0055] The above method of the embodiment of the present disclosure is further introduced below.
[0056] As an optional embodiment, the expression texture map is independent of the body texture map of the virtual object to be processed.
[0057] In the related art, the expression texture map and body texture map of a virtual game character in a virtual game scene are usually in the same texture map, and the expression texture map is usually concentrated on the top of the texture map, resulting in a problem of low texture reuse rate.
[0058] However, in the disclosed embodiment, the expression texture map of the virtual object to be processed is independent of the body texture map, which can effectively improve the reusability of resources such as maps. For example, the same expression texture map can be applied to different body models, and there is no need to redesign the expression texture map for each body model, thereby saving time and cost of texture design and production. In addition, if you need to add a new expression or modify an existing expression, you only need to adjust the expression texture map without modifying the body texture map, which simplifies the maintenance process. Furthermore, independent expression texture maps can be freely combined with a variety of different body texture maps, thereby improving texture reuse rate and reducing costs.
[0059] As an optional embodiment, step S206, performs texture sampling on the expression texture map to obtain a texture sampling result of a target sub-expression map corresponding to the characteristic part, including: determining the texture coordinates corresponding to the characteristic part in the expression texture map; based on the texture coordinates, determining the target sub-expression texture map in the expression texture map; and performs texture sampling on the target sub-expression texture map to obtain a texture sampling result.
[0060] In this embodiment, after acquiring the expression texture map that matches the facial model, the texture coordinates corresponding to the feature part can be determined in the expression texture map. Based on the determined texture coordinates, the target sub-expression texture map can be determined in the expression texture map. The target sub-expression texture map is further texture sampled to obtain a texture sampling result. The texture coordinates can be represented by UV.y.
[0061] Optionally, since multiple feature parts of the virtual object are independent of each other, this embodiment can determine the target sub-expression map corresponding to the feature part by determining the texture coordinates corresponding to the feature part, and then perform texture sampling on the target sub-expression texture map to obtain the texture sampling result.
[0062] This embodiment can accurately locate a specific area on the expression texture map by determining the texture coordinates corresponding to the eyes or mouth, so that the specific expressions of the eyes or mouth can be accurately read from the map during sampling, thereby improving the accuracy of expression expression.
[0063] As an optional embodiment, based on texture coordinates, a target sub-expression texture map is determined in an expression texture map, including: based on texture coordinates, determining index information of the expression texture map; and indexing to the target sub-expression texture map in the expression texture map according to the index information.
[0064] In this embodiment, after determining the texture coordinates corresponding to the feature parts in the expression texture map, the index information of the expression texture map can be determined based on the determined texture coordinates. Further, according to the index information, the target sub-expression texture map can be indexed in the expression texture map. Among them, the index information can at least include eye index information and mouth index information, the eye index information can be represented by EmojiIndex1, and the mouth index information can be represented by EmojiIndex2.
[0065] Optionally, since the eyes and mouth of the virtual object are independent of each other, index information is needed to determine the usage range of different feature parts on the expression texture map, that is, to distinguish the usage range of the index value of the eyes and the index value of the mouth on the expression texture map.
[0066] Optionally, the eye UV area can be in the upper half of the texture area of the expression texture map, and the reference range of the eye index value is the upper half; the mouth UV area can be in the lower half of the texture area of the expression texture map, and the reference range of the mouth index value is the lower half. That is, the index information of the virtual object is determined by the texture coordinate UV.y (i.e., the vertical position). When the determined index information is the eye index information, it can be determined that the expression state of the virtual object should use the expression texture map of the upper half (eye); when the determined index information is the mouth index information, it can be determined that the expression state of the virtual object should use the expression texture map of the lower half (mouth).
[0067] This embodiment can realize more types of expressions through independent index information. For example, if the upper part of the expression texture map has 5 eye states and the lower part has 5 mouth states, 25 different facial expressions can be realized through combination, rather than a single expression texture map that can only provide a limited number of expressions. In addition, independent index information can make texture management simpler. Each expression state corresponds to a specific expression texture map area. Clear division helps reduce confusion, thereby improving the efficiency of resource search and use.
[0068] As an optional embodiment, at least one feature part includes a first feature part and a second feature part, and a position of the first feature part in the facial model is lower than a position of the second feature part in the facial model. Based on the texture coordinates, the index information of the expression texture map is determined, including: in response to the texture coordinates being greater than a coordinate threshold, determining first index information corresponding to the first feature part, wherein the first index information is used to index a target sub-expression map corresponding to the first feature part; in response to the texture coordinates being less than or equal to the coordinate threshold, determining second index information corresponding to the second feature part, wherein the second index information is used to index a target sub-expression map corresponding to the second feature part.
[0069] In this embodiment, at least one characteristic part may include a first characteristic part and a second characteristic part, the first characteristic part may be a mouth, the second characteristic part may be an eye, and the distance between the eye and the mouth is greater than a distance threshold, the distance threshold may be a value pre-set according to actual conditions, and the distance between the eye and the mouth being greater than the distance threshold may be used to indicate that the eye and the mouth are far apart. The position of the first characteristic part in the facial model is lower than the position of the second characteristic part in the facial model, for example, the mouth may be at a lower position of the facial model, and the eye may be at an upper position of the facial model, and optionally, the eye is located above the mouth.
[0070] Optionally, the coordinate threshold can be a value pre-set according to actual conditions. For example, if the area of the eye UV area is the same as that of the mouth UV area, the coordinate threshold can be set to 0.5, that is, the coordinate threshold can be used to represent the boundary between the eyes and the mouth. This is only an example and there is no specific restriction on the value of the coordinate threshold. The first index information can be used to index the target sub-expression map corresponding to the mouth, and the first index information can be represented by EmojiIndex2. The second index information can be used to index the target sub-expression map corresponding to the eyes, and the second index information can be represented by EmojiIndex1.
[0071] For example, the coordinate threshold is set to 0.5, and based on the determined texture coordinates, the first index information EmojiIndex2 and the second index information EmojiIndex1 can be determined by the following formula:
[0072] Offset=lerp(EmojiIndex1,EmojiIndex2,step(0.5,UV.y))
[0073] Among them, Offset can be used to represent the offset of texture coordinates, and can be used to calculate the increment of UV coordinates from the original map position to the target expression position. Lerp can be used to represent a linear interpolation function, and the lerp function can be expressed as lerp(A, B, Alpha), where the value of Alpha can be used to allocate the ratio of A to B. When Alpha is equal to 1, the lerp function outputs B; when Alpha is equal to 0, the lerp function outputs A. In the above formula, A is the second index information EmojiIndex1, B is the first index information EmojiIndex2, and Alpha is step(0.5, UV.y).
[0074] Furthermore, step can be used to represent a conditional function. Step (0.5, UV.y) can be used to determine whether the current expression state of the virtual object should use the expression map of the upper half (eyes) or the lower half (mouth) according to UV.y (i.e. vertical position) in the UV coordinates. If UV.y is greater than or equal to 0.5, the step function returns 1, which means that the UV coordinates of EmojiIndex2 (corresponding to the mouth expression) are used; if UV.y is less than 0.5, the step function returns 0, which means that the UV coordinates of EmojiIndex1 (corresponding to the eye expression) should be used.
[0075] This embodiment dynamically calculates the offset of the UV coordinates of the eye or mouth expression according to the vertical position of the UV coordinates, thereby achieving smooth transition and correct sampling of the virtual object between different expression states, while improving the flexibility and diversity of the expression, and also ensuring the naturalness and smoothness of the expression switching.
[0076] As an optional embodiment, in response to the texture coordinates being greater than a coordinate threshold, determining the first index information corresponding to the first feature part includes: in response to the texture coordinates being greater than the coordinate threshold, obtaining a first index information set corresponding to the first feature part, wherein the first index information set includes index information of different sub-expression texture maps of the first feature part, and different sub-expression texture maps of the first feature part correspond to different expression results; in response to a selection operation on the first index information set, selecting the first index information from the first index information set.
[0077] In this embodiment, the first index information set may include index information of different sub-expression texture maps of the mouth, and different sub-expression texture maps of the mouth may correspond to different expression results. When the texture coordinate is greater than the coordinate threshold, the first index information set corresponding to the first feature part may be obtained, and further in response to the selection operation on the first index information set, the first index information may be selected from the first index information set. The selection operation may be a touch operation behavior of the game player on the first index information set, for example, the touch operation behavior may be a click operation, which is only for example explanation, and no specific limitation is imposed on the form of the selection operation.
[0078] Optionally, when the texture coordinate is greater than a preset coordinate threshold, it can be determined that the feature part corresponding to the texture coordinate is the mouth, and the index information of all sub-expression texture maps related to the mouth can be obtained from the preset index information set to obtain a first index information set. The first index information set contains all possible expression states of the mouth, such as happy, angry, pouting, etc.
[0079] Furthermore, when the game player selects a pouting expression of the virtual object, in response to the selection operation of the first index information set, the index of the corresponding mouth sub-expression texture map (i.e., the first index information) can be selected from the first index information set, and then the first index information can be used to determine the specific location of sampling on the expression texture map.
[0080] This embodiment intelligently selects a suitable first index information set according to the texture coordinates, and responds to the selection operation of the game player or the game logic, selects the first index information of the correct expression texture map from the first index information set, and finally applies it to the mouth of the virtual object to achieve changes in the mouth expression, thereby improving the flexibility and diversity of expression changes and optimizing resource utilization and rendering efficiency.
[0081] As an optional embodiment, in response to the texture coordinates being less than or equal to a coordinate threshold, determining second index information corresponding to a second feature part includes: in response to the texture coordinates being less than or equal to the coordinate threshold, obtaining a second index information set corresponding to the second feature part, wherein the second index information set includes index information of different sub-expression texture maps of the second feature part, and different sub-expression texture maps of the first feature part correspond to different expression results; in response to a selection operation on the second index information set, selecting the second index information from the second index information set.
[0082] In this embodiment, the second index information set may include index information of different sub-expression texture maps of the eye, and different sub-expression texture maps of the eye may correspond to different expression results. When the texture coordinate is less than or equal to the coordinate threshold, the second index information set corresponding to the eye may be obtained, and further in response to a selection operation on the second index information set, the second index information may be selected from the second index information set. The selection operation may be a touch operation behavior of the game player on the second index information set, for example, the touch operation behavior may be a click operation, which is only an example here, and does not specifically limit the form of the selection operation.
[0083] Optionally, when the texture coordinates are less than or equal to a preset coordinate threshold, it can be determined that the feature part corresponding to the texture coordinates is the eye, and the index information of all sub-expression texture maps related to the eye can be obtained from the preset index information set to obtain a second index information set, which contains all possible eye expression states, such as normal, negative, closed eyes, etc.
[0084] Furthermore, when the game player selects the closed-eye expression of the virtual object, in response to the selection operation of the second index information set, the index of the corresponding eye sub-expression texture map (i.e., the second index information) can be selected from the second index information set, and then the second index information can be used to determine the specific location of the sampling on the expression texture map.
[0085] This embodiment intelligently selects a suitable second index information set according to the texture coordinates, and responds to the selection operation of the game player or the game logic, selects the second index information of the correct expression texture map from the second index information set, and finally applies it to the eyes of the virtual object to achieve changes in eye expressions, thereby improving the flexibility and diversity of expression changes and optimizing resource utilization and rendering efficiency.
[0086] As an optional embodiment, different sub-expression texture maps of different feature parts are stored as sequence frames in the expression texture map, and the target sub-expression texture map is indexed in the expression texture map according to the index information, including: indexing the target sub-expression texture map in the sequence frame according to the index information.
[0087] In this embodiment, different sub-expression texture maps of different feature parts are stored as sequence frames in the expression texture map. After the index information of the expression texture map is determined based on the texture coordinates, the target sub-expression texture map can be indexed in the sequence frame according to the index information. The expression texture of the virtual object is stored in the form of sequence frames, that is, each expression state of the virtual object is assigned to a separate frame in the expression texture map, so that a specific expression state can be easily accessed and used through the index information.
[0088] Optionally, the expression texture map can be designed to have a layout of multiple rows and columns, for example, five rows and four columns, and each row or column can be regarded as a sequence frame, which contains one or more expression states. For example, the first three rows may contain all different states of the eyes, and the last two rows may contain all different states of the mouth. This is only an example, and does not impose specific restrictions on the layout of the expression texture map.
[0089] Optionally, each expression state of the virtual object is assigned an index information, which can be a two-dimensional coordinate based on rows and columns, such as (Row, Column). Row can be used to indicate the row position of the expression state in the expression texture map, and Column can be used to indicate the column position of the expression state in the expression texture map. Through the index information, a specific expression state can be quickly located.
[0090] For example, if you need to display the surprised eye state and smiling mouth state of a virtual object, you can look up the first index information and the second index information corresponding to these two states respectively, and further index the target sub-expression texture map from the expression texture map, that is, the surprised expression of the eyes and the smiling expression of the mouth.
[0091] This embodiment uses a storage method of sequence frames to independently design and store each expression state, so that more expression states can be created to improve the diversity of expressions. In addition, the use of index information makes expression switching fast and simple. There is no need to redraw the entire expression texture. Only the index information needs to be updated to quickly switch between different expression states.
[0092] As an optional embodiment, different sub-expression texture maps of different feature parts are stored as sequence frames in the expression texture map, and the sequence frames include a target number of rows and a target number of columns. Texture sampling is performed on the target sub-expression texture map to obtain a texture sampling result, including: texture sampling is performed on the target sub-expression texture map according to texture coordinates, target number of rows and target number of columns to obtain a texture sampling result.
[0093] In this embodiment, the sequence frame may include a target number of rows and a target number of columns, the target number of rows may be represented by Row, and the target number of columns may be represented by Column. According to the texture coordinates, the target number of rows and the target number of columns, the texture sampling of the target sub-expression texture map may be performed by the following formula to obtain a texture sampling result:
[0094] UV final =((UV.x,frac(UV.y*2))+Offset) / (Column,Row)
[0095] Among them, UV final It can be used to represent the result of texture sampling, UV.x can be used to represent the horizontal position of the UV coordinate, frac can be used to represent the function of removing the decimal part, and the frac function can be used to ensure the correct mapping of the UV coordinates on the texture map, even when spanning different areas of the texture (for example, from the eye UV area to the mouth UV area), the coordinate value can be appropriately looped or adjusted by taking the decimal part.
[0096] This embodiment can make the eye and mouth models sample the texture at the corresponding eye index value and mouth index value through the above formula. By adjusting and standardizing the UV coordinates, accurate sampling of specific expression texture areas is achieved, independent texture mapping of the eyes and mouth is supported, the ability of dynamic expression combination is enhanced, rendering performance is optimized, and the management of texture resources is simplified.
[0097] As an optional embodiment, step S208, rendering and displaying the texture sampling results to obtain the expression results of the facial model, includes: combining the texture sampling results corresponding to different feature parts to obtain a combined result, wherein the textures in the texture sampling results corresponding to the different feature parts are discrete; rendering and displaying the combined result to obtain the expression result.
[0098] In this embodiment, after texture sampling is performed on the eyes and the mouth respectively, the texture sampling results corresponding to the eyes and the texture sampling results corresponding to the mouth can be obtained, the texture sampling results corresponding to the eyes contain the expression texture information of the eyes, and the texture sampling results corresponding to the mouth contain the expression texture information of the mouth. Since the texture sampling results corresponding to the eyes and the texture sampling results corresponding to the mouth are discretely stored in the expression texture map, it is necessary to combine the texture sampling results corresponding to the eyes and the texture sampling results corresponding to the mouth to obtain a combined result.
[0099] Furthermore, the combined result can be rendered and displayed, and the three-dimensional (3D) model combined with the texture information is converted into a two-dimensional (2D) image and displayed on the screen. Through the rendering pipeline, the texture information will be applied to the surface of the 3D model, and the facial model of the virtual object will show the expression composed of the eye and mouth texture information. Finally, the game player or user will see the rich expressions presented on the virtual object's facial model, which can accurately reflect the current state or emotion of the virtual object, thereby improving the immersion and interactivity of the game or application.
[0100] This embodiment can create more expression combinations by independently sampling and combining the texture information of the eyes and mouth, increasing the diversity and naturalness of the expressions. By combining the texture sampling results of different feature parts and rendering and displaying them, accurate, dynamic and efficient expression switching can be achieved.
[0101] In an embodiment of the present disclosure, a facial model of a virtual object to be processed is determined, wherein the facial model includes a plurality of feature parts, and the plurality of feature parts are independent of each other; an expression texture map matching the facial model is obtained, wherein a texture region of the expression texture map includes a plurality of sub-texture regions, and the plurality of sub-texture regions are independent of each other, and the sub-texture regions include different sub-expression texture maps corresponding to the feature parts, and the sub-expression texture maps are used to characterize a state of the feature parts associated with an expression of the facial model; texture sampling is performed on the expression texture map to obtain a texture sampling result of a target sub-expression map corresponding to the feature parts; and the texture sampling result is rendered and displayed to obtain an expression expression result of the facial model. That is to say, the disclosed embodiment determines a facial model of a virtual object to be processed with multiple independent feature parts, splits the expression texture area of the expression texture map matching the facial model into multiple non-continuous sub-texture areas, and the multiple sub-texture areas respectively correspond to multiple feature parts, further performs texture sampling on the multiple sub-texture areas, and then combines the obtained sampling results to generate an expression result of the facial model, thereby achieving the purpose of improving texture reusability and the number of expressions. Since multiple independent feature parts can be dynamically combined, the technical effect of improving the efficiency of virtual objects in realizing dynamic expressions is achieved, and the technical problem of low efficiency of virtual objects in realizing dynamic expressions is solved.
[0102] The technical solution of the embodiment of the present disclosure is further introduced below with examples in combination with preferred implementation modes.
[0103] Currently, in virtual game scenes, the facial UV layout of traditional virtual game characters is quite different from that of virtual pets. For example, the face of a virtual game character is usually continuous and concentrated, but the face of a virtual pet may have eyes and mouths that are far apart, resulting in discontinuous UVs, and texture-based character expression switching usually has a limited number of problems.
[0104] Figure 3 is a schematic diagram of a texture UV of a virtual game character according to one embodiment of the present disclosure, such as Figure 3 As shown in the figure, it can be seen from the conventional virtual game character texture UV layout that the virtual game character's expression texture and body texture are in the same map, and the expression texture is concentrated at the top of the map, with only four options. In the related art, the texture-based expression change method is usually for virtual game characters, and the facial UV of virtual game characters is continuous and concentrated. The expression texture is stored in the form of sequence frames. When switching expressions, there are problems such as limited number and abrupt transition.
[0105] In order to solve the above problems, the present disclosure proposes a method for realizing multi-state expression switching for pets. The method aims at the problem that virtual pets need multiple expression states and the facial structure of virtual pets is quite different from that of virtual game characters. The original texture layout of virtual game characters is abandoned, and exclusive expression textures for virtual pets are introduced to increase the number of expression options. The virtual pet expression UV is further divided into two parts, namely the eyes and the mouth, to adapt to the special model structure and improve the reusability of the expression. The expression can be freely combined, thereby realizing the effect of switching multiple expression states of virtual pets and effectively reducing the texture output cost.
[0106] This embodiment improves and optimizes the original texture layout of the virtual game character, and proposes a new expression layout relative to the traditional virtual game character texture expression layout, that is, for a separate exclusive expression texture, and the virtual pet expression texture UV is split, for example, the eyes are located in the upper half, and the mouth is located in the lower half. Finally, the texture is stored in the form of sequence frames, the upper half is the different states of the eyes, and the lower half is the different states of the mouth. Through mutual combination, the texture reusability is improved while the number of expressions is effectively increased.
[0107] Figure 4 is a schematic diagram of a body texture of a virtual pet according to one embodiment of the present disclosure, Figure 5 is a schematic diagram of an expression texture of a virtual pet according to one embodiment of the present disclosure. In order to increase the number of expressions of the virtual pet, the embodiment abandons the original expression texture layout, such as Figure 4 As shown, separate the body texture in a texture map, such as Figure 5As shown in the figure, the expression texture is separated into another texture map. By freely combining different expressions with different bodies, the texture reuse rate is increased and the cost is reduced.
[0108] Figure 6 is a schematic diagram of a virtual pet facial structure display according to one embodiment of the present disclosure, such as Figure 6 As shown, the facial structure of a virtual pet is different from that of a virtual game character. The facial UV of a virtual game character is continuous and concentrated, but the facial structure of a virtual pet is generally discontinuous and unconcentrated. For example, the eyes and mouth are obviously independent structures. Figure 7 is a schematic diagram showing a virtual pet texture UV layout according to one embodiment of the present disclosure. Figure 7 As shown, in order to improve the texture reuse rate, this embodiment divides the virtual pet texture UV layout into two parts, the eye UV is located in the upper part, and the mouth UV is located in the lower part, that is, the virtual pet texture UV layout is the body UV area, the eye UV area, and the mouth UV area.
[0109] Figure 8 is a schematic diagram showing a layout of a virtual pet expression texture according to one embodiment of the present disclosure. Figure 8 As shown, the expression texture of the virtual pet is stored in the form of sequence frames. According to the specific scene requirements of the project, the virtual pet's eye state can be refined into specific states, such as normal, negative, closed eyes, first positive, personality, hit, fighting, second positive, first dizziness, second dizziness, third dizziness, fourth dizziness, etc. The mouth situation is similar, and the virtual pet's mouth can be refined into specific states, such as normal, first happy, second happy, angry, first pouting, second pouting, etc. The remaining unfilled sequence frames can continue to be supplemented or filled.
[0110] According to the configuration of the expression texture UV layout and the expression texture layout, the expression texture sampling process can be expressed by the following formula:
[0111] Offset=lerp(EmojiIndex1,EmojiIndex2,step(0.5,UV.y))
[0112] UV final =((UV.x,frac(UV.y*2))+Offset) / (Column,Row)
[0113] Among them, Row can be used to indicate the number of rows, Column can be used to indicate the number of columns, and EmojiIndex can be used to indicate the expression index value. For example, the index value is (1, 1), which means the first row and the first column. The first number is the row and the second number is the column. EmojiIndex1 can be used to indicate the eye index and EmojiIndex2 can be used to indicate the mouth index.
[0114] Fig. 9 is a schematic diagram of a virtual pet expression display according to one embodiment of the present disclosure, Fig.10 is a schematic diagram of another virtual pet expression display according to one embodiment of the present disclosure, such as Fig. 9 and Fig.10 As shown, the body textures and expression textures of different virtual pets, as well as some expressions of the virtual pets are respectively displayed. By combining different mouth expressions and eye expressions, a variety of expressions can be obtained, which increases the number of expressions, thereby realizing the expression switching of the virtual pet in different states.
[0115] This embodiment first improves and optimizes the original texture layout, and proposes a new expression layout compared to the expression layout of traditional virtual game character textures, that is, a separate exclusive expression texture for virtual pets. The virtual pet expression texture UV can be split so that the expression texture UV is no longer continuous, the eyes are located in the upper half, and the mouth is located in the lower half. Finally, the texture is stored in the form of sequence frames, the upper half is different states of the eyes, and the lower half is different states of the mouth. Through mutual combination, the number of expressions is effectively increased while the texture reusability is improved.
[0116] In an embodiment of the present disclosure, a facial model of a virtual object to be processed is determined, wherein the facial model includes a plurality of feature parts, and the plurality of feature parts are independent of each other; an expression texture map matching the facial model is obtained, wherein a texture region of the expression texture map includes a plurality of sub-texture regions, and the plurality of sub-texture regions are independent of each other, and the sub-texture regions include different sub-expression texture maps corresponding to the feature parts, and the sub-expression texture maps are used to characterize a state of the feature parts associated with an expression of the facial model; texture sampling is performed on the expression texture map to obtain a texture sampling result of a target sub-expression map corresponding to the feature parts; and the texture sampling result is rendered and displayed to obtain an expression expression result of the facial model. That is to say, the disclosed embodiment determines a facial model of a virtual object to be processed with multiple independent feature parts, splits the expression texture area of the expression texture map matching the facial model into multiple non-continuous sub-texture areas, and the multiple sub-texture areas respectively correspond to multiple feature parts, further performs texture sampling on the multiple sub-texture areas, and then combines the obtained sampling results to generate an expression result of the facial model, thereby achieving the purpose of improving texture reusability and the number of expressions. Since multiple independent feature parts can be dynamically combined, the technical effect of improving the efficiency of virtual objects in realizing dynamic expressions is achieved, and the technical problem of low efficiency of virtual objects in realizing dynamic expressions is solved.
[0117] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present disclosure.
[0118] In this embodiment, a virtual object information processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "unit" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0119] Fig.11 is a structural block diagram of a virtual object information processing device according to one embodiment of the present disclosure, such as Fig.11As shown, the virtual object information processing device 1100 may include: a determining unit 1102 , an acquiring unit 1104 , a sampling unit 1106 and a rendering unit 1108 .
[0120] The determination unit 1102 is used to determine a facial model of the virtual object to be processed, wherein the facial model includes a plurality of characteristic parts, and the plurality of characteristic parts are independent of each other.
[0121] The acquisition unit 1104 is used to acquire an expression texture map that matches the facial model, wherein the texture area of the expression texture map includes multiple sub-texture areas, the multiple sub-texture areas are independent of each other, the sub-texture areas include different sub-expression texture maps corresponding to the feature parts, and the sub-expression texture maps are used to represent the state of the feature parts associated with the expression of the facial model.
[0122] The sampling unit 1106 is used to perform texture sampling on the expression texture map to obtain a texture sampling result of a target sub-expression map corresponding to the feature part.
[0123] The rendering unit 1108 is used to render and display the texture sampling result to obtain the expression result of the facial model.
[0124] Optionally, the expression texture map is independent of the body texture map of the virtual object to be processed.
[0125] Optionally, the sampling unit 1106 includes: a first determination module, used to determine the texture coordinates corresponding to the feature part in the expression texture map; a second determination module, used to determine the target sub-expression texture map in the expression texture map based on the texture coordinates; and a sampling module, used to perform texture sampling on the target sub-expression texture map to obtain a texture sampling result.
[0126] Optionally, the second determination module includes: a determination submodule, used to determine index information of the expression texture map based on texture coordinates; and an index submodule, used to index a target sub-expression texture map in the expression texture map according to the index information.
[0127] Optionally, at least one feature part includes a first feature part and a second feature part, and a position of the first feature part in the facial model is lower than a position of the second feature part in the facial model. The determination submodule is also used to: in response to the texture coordinates being greater than a coordinate threshold, determine first index information corresponding to the first feature part, wherein the first index information is used to index a target sub-expression map corresponding to the first feature part; in response to the texture coordinates being less than or equal to the coordinate threshold, determine second index information corresponding to the second feature part, wherein the second index information is used to index a target sub-expression map corresponding to the second feature part.
[0128] Optionally, the determination submodule is also used to: in response to the texture coordinate being greater than a coordinate threshold, obtain a first index information set corresponding to the first feature part, wherein the first index information set includes index information of different sub-expression texture maps of the first feature part, and different sub-expression texture maps of the first feature part correspond to different expression results; in response to a selection operation on the first index information set, select the first index information from the first index information set.
[0129] Optionally, the response determination submodule is also used to: in response to the texture coordinate being less than or equal to a coordinate threshold, obtain a second index information set corresponding to the second feature part, wherein the second index information set includes index information of different sub-expression texture maps of the second feature part, and different sub-expression texture maps of the first feature part correspond to different expression expression results; in response to a selection operation on the second index information set, select the second index information from the second index information set.
[0130] Optionally, the first characteristic part is the mouth, the second characteristic part is the eyes, and the distance between the eyes and the mouth is greater than a distance threshold.
[0131] Optionally, different sub-expression texture maps of different feature parts are stored as sequence frames in the expression texture map, and the index submodule is further used to: index to the target sub-expression texture map in the sequence frame according to the index information.
[0132] Optionally, different sub-expression texture maps for different feature parts are stored as sequence frames in the expression texture map, and the sequence frames include a target number of rows and a target number of columns. The sampling module includes: a sampling sub-module, which is used to perform texture sampling on the target sub-expression texture map according to the texture coordinates, the target number of rows and the target number of columns to obtain a texture sampling result.
[0133] Optionally, the rendering unit 1108 includes: a combination module, used to combine the texture sampling results corresponding to different feature parts to obtain a combined result, wherein the textures in the texture sampling results corresponding to different feature parts are discrete; a rendering module, used to render and display the combined result to obtain an expression result.
[0134] In this embodiment, the facial model of the virtual object to be processed is determined by the determination unit 1102, wherein the facial model includes multiple characteristic parts, and the multiple characteristic parts are independent of each other. The expression texture map matching the facial model is obtained by the acquisition unit 1104, wherein the texture area of the expression texture map includes multiple sub-texture areas, and the multiple sub-texture areas are independent of each other. The sub-texture areas include different sub-expression texture maps corresponding to the characteristic parts, and the sub-expression texture maps are used to characterize the state of the characteristic parts associated with the expression of the facial model. The expression texture map is texture sampled by the sampling unit 1106 to obtain the texture sampling result of the target sub-expression map corresponding to the characteristic parts. The texture sampling result is rendered and displayed by the rendering unit 1108 to obtain the expression expression result of the facial model. That is to say, the disclosed embodiment determines a facial model of a virtual object to be processed with multiple independent feature parts, splits the expression texture area of the expression texture map matching the facial model into multiple non-continuous sub-texture areas, and the multiple sub-texture areas respectively correspond to multiple feature parts, further performs texture sampling on the multiple sub-texture areas, and then combines the obtained sampling results to generate an expression result of the facial model, thereby achieving the purpose of improving texture reusability and the number of expressions. Since multiple independent feature parts can be dynamically combined, the technical effect of improving the efficiency of virtual objects in realizing dynamic expressions is achieved, and the technical problem of low efficiency of virtual objects in realizing dynamic expressions is solved.
[0135] It should be noted that the above-mentioned units can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: the above-mentioned units are all located in the same processor; or the above-mentioned units are located in different processors in any combination.
[0136] An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0137] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0138] S1, determining a facial model of a virtual object to be processed, wherein the facial model includes a plurality of characteristic parts, and the plurality of characteristic parts are independent of each other;
[0139] S2, obtaining an expression texture map that matches the facial model, wherein a texture region of the expression texture map includes a plurality of sub-texture regions, the plurality of sub-texture regions are independent of each other, the sub-texture regions include different sub-expression texture maps corresponding to feature parts, and the sub-expression texture maps are used to represent a state of the feature parts associated with the expression of the facial model;
[0140] S3, performing texture sampling on the expression texture map to obtain a texture sampling result of a target sub-expression map corresponding to the feature part;
[0141] S4, rendering and displaying the texture sampling result to obtain the expression result of the facial model.
[0142] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0143] An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0144] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0145] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0146] S1, determining a facial model of a virtual object to be processed, wherein the facial model includes a plurality of characteristic parts, and the plurality of characteristic parts are independent of each other;
[0147] S2, obtaining an expression texture map that matches the facial model, wherein a texture region of the expression texture map includes a plurality of sub-texture regions, the plurality of sub-texture regions are independent of each other, the sub-texture regions include different sub-expression texture maps corresponding to feature parts, and the sub-expression texture maps are used to represent a state of the feature parts associated with the expression of the facial model;
[0148] S3, performing texture sampling on the expression texture map to obtain a texture sampling result of a target sub-expression map corresponding to the feature part;
[0149] S4, rendering and displaying the texture sampling result to obtain the expression result of the facial model.
[0150] An embodiment of the present disclosure further provides a computer program product, which may include a computer program, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0151] Optionally, in this embodiment, the computer program product may be configured to include a computer program for performing the following steps:
[0152] S1, determining a facial model of a virtual object to be processed, wherein the facial model includes a plurality of characteristic parts, and the plurality of characteristic parts are independent of each other;
[0153] S2, obtaining an expression texture map that matches the facial model, wherein a texture region of the expression texture map includes a plurality of sub-texture regions, the plurality of sub-texture regions are independent of each other, the sub-texture regions include different sub-expression texture maps corresponding to feature parts, and the sub-expression texture maps are used to represent a state of the feature parts associated with the expression of the facial model;
[0154] S3, performing texture sampling on the expression texture map to obtain a texture sampling result of a target sub-expression map corresponding to the feature part;
[0155] S4, rendering and displaying the texture sampling result to obtain the expression result of the facial model.
[0156] An embodiment of the present disclosure further provides a computer program product, which may include a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and the computer program is configured to execute the steps of any of the above method embodiments when running.
[0157] Optionally, in this embodiment, the computer program product may be configured to include a non-volatile computer-readable storage medium, and the non-volatile computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0158] S1, determining a facial model of a virtual object to be processed, wherein the facial model includes a plurality of characteristic parts, and the plurality of characteristic parts are independent of each other;
[0159] S2, obtaining an expression texture map that matches the facial model, wherein a texture region of the expression texture map includes a plurality of sub-texture regions, the plurality of sub-texture regions are independent of each other, the sub-texture regions include different sub-expression texture maps corresponding to feature parts, and the sub-expression texture maps are used to represent a state of the feature parts associated with the expression of the facial model;
[0160] S3, performing texture sampling on the expression texture map to obtain a texture sampling result of a target sub-expression map corresponding to the feature part;
[0161] S4, rendering and displaying the texture sampling result to obtain the expression result of the facial model.
[0162] An embodiment of the present disclosure further provides a computer program, which is configured to execute the steps of any of the above method embodiments when running.
[0163] Optionally, in this embodiment, the computer program is configured to perform the following steps:
[0164] S1, determining a facial model of a virtual object to be processed, wherein the facial model includes a plurality of characteristic parts, and the plurality of characteristic parts are independent of each other;
[0165] S2, obtaining an expression texture map that matches the facial model, wherein a texture region of the expression texture map includes a plurality of sub-texture regions, the plurality of sub-texture regions are independent of each other, the sub-texture regions include different sub-expression texture maps corresponding to feature parts, and the sub-expression texture maps are used to represent a state of the feature parts associated with the expression of the facial model;
[0166] S3, performing texture sampling on the expression texture map to obtain a texture sampling result of a target sub-expression map corresponding to the feature part;
[0167] S4, rendering and displaying the texture sampling result to obtain the expression result of the facial model.
[0168] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0169] Fig.12 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. Fig.12 As shown, the electronic device 1200 is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0170] like Fig.12 As shown, the electronic device 1200 is in the form of a general computing device. The components of the electronic device 1200 may include but are not limited to: at least one processor 1210, at least one memory 1220, a bus 1230 connecting different system components (including the memory 1220 and the processor 1210), and a display 1240.
[0171] The memory 1220 stores program codes, which can be executed by the processor 1210, so that the processor 1210 executes the steps described in the method part of the embodiment of the present disclosure according to various exemplary embodiments of the present disclosure.
[0172] The memory 1220 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 12201 and / or a cache memory unit 12202, and may further include a read-only memory unit (ROM) 12203, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
[0173] In some examples, the memory 1220 may also include a program / utility 12204 having a set (at least one) of program modules 12205, such program modules 12205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may include the implementation of a network environment. The memory 1220 may further include a memory remotely disposed relative to the processor 1210, and these remote memories may be connected to the electronic device 1200 via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0174] The bus 1230 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a local bus of the processor 1210, or a bus using any of a variety of bus architectures.
[0175] The display 1240 may be, for example, a touch screen type liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 1200 .
[0176] Optionally, the electronic device 1200 may also communicate with one or more external devices 1300 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 1200, and / or any device that enables the electronic device 1200 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 1250. Furthermore, the electronic device 1200 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 1260. Fig.12 As shown, the network adapter 1260 communicates with other modules of the electronic device 1200 via the bus 1230. It should be understood that although Fig.12Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 1200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, independent redundant disk arrays (Redundant Array of Independent Disk, referred to as RAID) systems, tape drives, and data backup storage systems.
[0177] The electronic device 1200 may further include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply and / or a camera.
[0178] It can be understood by those skilled in the art that Fig.12 The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig.12 More or fewer components as shown, or with Figure 1 The memory 1220 may be used to store computer programs and corresponding data, such as the computer programs and corresponding data corresponding to the information processing method of the virtual object in the embodiment of the present disclosure. The processor 1210 executes various functional applications and data processing by running the computer programs stored in the memory 1220, that is, implements the above-mentioned information processing method of the virtual object.
[0179] The serial numbers of the above-mentioned embodiments of the present disclosure are only for description and do not represent the advantages or disadvantages of the embodiments.
[0180] In the above embodiments of the present disclosure, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0181] In the several embodiments provided in the present disclosure, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0182] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0183] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0184] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the relevant technology or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk, etc., which can store program code.
[0185] The above are only preferred embodiments of the present disclosure. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as the protection scope of the present disclosure.
Claims
1. A method for processing information of a virtual object, characterized in that: include: Determine a facial model of a virtual object to be processed, wherein the facial model includes a plurality of characteristic parts, and the plurality of characteristic parts are independent of each other; Acquire an expression texture map that matches the facial model, wherein a texture region of the expression texture map includes a plurality of sub-texture regions, the plurality of sub-texture regions are independent of each other, the sub-texture regions include different sub-expression texture maps corresponding to the characteristic parts, and the sub-expression texture maps are used to represent a state of the characteristic parts associated with the expression of the facial model; Performing texture sampling on the expression texture map to obtain a texture sampling result of a target sub-expression map corresponding to the characteristic part; The texture sampling result is rendered and displayed to obtain the expression result of the facial model.
2. The method according to claim 1, characterized in that: The expression texture map is independent of the body texture map of the virtual object to be processed.
3. The method according to claim 1, characterized in that Performing texture sampling on the expression texture map to obtain a texture sampling result of a target sub-expression map corresponding to the characteristic part includes: Determining texture coordinates corresponding to the feature part in the expression texture map; Determining the target sub-expression texture map in the expression texture map based on the texture coordinates; Texture sampling is performed on the target sub-expression texture map to obtain the texture sampling result.
4. The method according to claim 3, characterized in that Determining the target sub-expression texture map in the expression texture map based on the texture coordinates includes: Based on the texture coordinates, determining index information of the expression texture map; According to the index information, the target sub-expression texture map is indexed in the expression texture map.
5. The method according to claim 4, characterized in that The at least one characteristic part includes a first characteristic part and a second characteristic part, a position of the first characteristic part in the facial model is lower than a position of the second characteristic part in the facial model, and based on the texture coordinates, determining index information of the expression texture map includes: In response to the texture coordinate being greater than a coordinate threshold, determining first index information corresponding to the first characteristic part, wherein the first index information is used to index the target sub-expression map corresponding to the first characteristic part; In response to the texture coordinate being less than or equal to the coordinate threshold, second index information corresponding to the second characteristic part is determined, wherein the second index information is used to index the target sub-expression map corresponding to the second characteristic part.
6. The method according to claim 5, characterized in that In response to the texture coordinate being greater than a coordinate threshold, determining first index information corresponding to the first characteristic part includes: In response to the texture coordinate being greater than the coordinate threshold, obtaining a first index information set corresponding to the first feature part, wherein the first index information set includes index information of different sub-expression texture maps of the first feature part, and different sub-expression texture maps of the first feature part correspond to different expression expression results; In response to a selection operation on the first index information set, the first index information is selected from the first index information set.
7. The method according to claim 5, characterized in that In response to the texture coordinate being less than or equal to the coordinate threshold, determining second index information corresponding to the second characteristic part includes: In response to the texture coordinate being less than or equal to the coordinate threshold, obtaining a second index information set corresponding to the second feature part, wherein the second index information set includes index information of different sub-expression texture maps of the second feature part, and different sub-expression texture maps of the first feature part correspond to different expression expression results; In response to a selection operation on the second index information set, the second index information is selected from the second index information set.
8. The method according to claim 5, characterized in that The first characteristic part is a mouth, the second characteristic part is an eye, and a distance between the eye and the mouth is greater than a distance threshold.
9. The method according to claim 4, characterized in that The different sub-expression texture maps of the different feature parts are stored in the expression texture map as sequence frames, and the target sub-expression texture map is indexed in the expression texture map according to the index information, including: According to the index information, the target sub-expression texture map is indexed in the sequence frame.
10. The method according to claim 3, characterized in that Different sub-expression texture maps of different characteristic parts are stored in the expression texture map as sequence frames, and the sequence frames include a target number of rows and a target number of columns. Texture sampling is performed on the target sub-expression texture map to obtain the texture sampling result, including: According to the texture coordinates, the target number of rows and the target number of columns, texture sampling is performed on the target sub-expression texture map to obtain the texture sampling result.
11. The method according to any one of claims 1 to 10, characterized in that Rendering and displaying the texture sampling result to obtain the expression result of the facial model includes: Combining the texture sampling results corresponding to different characteristic parts to obtain a combination result, wherein the textures in the texture sampling results corresponding to different characteristic parts are discrete; The combination result is rendered and displayed to obtain the expression result.
12. A virtual object information processing device, characterized in that: include: A determination unit, configured to determine a facial model of a virtual object to be processed, wherein the facial model includes a plurality of characteristic parts, and the plurality of characteristic parts are independent of each other; An acquisition unit is used to acquire an expression texture map that matches the facial model, wherein a texture region of the expression texture map includes a plurality of sub-texture regions, the plurality of sub-texture regions are independent of each other, the sub-texture regions include different sub-expression texture maps corresponding to the characteristic parts, and the sub-expression texture maps are used to represent a state of the characteristic parts associated with the expression of the facial model; A sampling unit, used for performing texture sampling on the expression texture map to obtain a texture sampling result of a target sub-expression map corresponding to the characteristic part; A rendering unit is used to render and display the texture sampling result to obtain the expression result of the facial model.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 11 when executed by a processor.
14. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method described in any one of claims 1 to 11.
15. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 11.