Avatar control method, apparatus, device, medium and program product thereof
By setting multiple body parts surrounding the virtual character and adjusting the safe zone range according to the body shape parameters, the problem of user psychological discomfort caused by the sensitive body behavior of the virtual character is solved, and the user experience and the control accuracy of the virtual character are improved.
Patent Information
- Application Number
- PCT/CN2023/140267
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-12-22
- Filing Date
- 2023-12-20
- Publication Date
- 2025-08-07
AI Technical Summary
In the extended reality space, the sensitive body behaviors of virtual characters cause psychological discomfort to users. The safe zone range of virtual characters in the existing technology is unreasonable and affects the user experience.
Set up a surrounding body for multiple body parts for the virtual character, trigger invisibility based on the contact of the surrounding body parts, accurately identify sensitive body behaviors, avoid invisibility due to insensitive body behaviors, and adjust the size of the virtual character's body parts and surrounding bodies to match the body shape parameters , reasonably determine the scope of the safety zone.
It improves the user experience, accurately identifies sensitive body behaviors, reduces the security risks of virtual characters, and enhances the control accuracy of virtual characters and the user's sense of immersion.
Smart Images

Figure CN2023140267_07082025_PF_FP_ABST
Abstract
Description
Virtual character control method, device, equipment, medium and program product thereof
[0001] This application claims priority to the Chinese invention patent application entitled “Method, device, equipment, medium and program product for controlling virtual characters” and application number 202211659049.9, filed on December 22, 2022; this application also claims priority to the Chinese invention patent application entitled “Method, device, equipment, medium and program product for controlling virtual characters” and application number 202211659424.X, filed on December 22, 2022. The entire contents of the above applications are incorporated by reference into this application. Technical Field
[0002] The embodiments of the present application relate to the field of computer vision technology, and in particular to a method, apparatus, device, medium, and program product for controlling a virtual character. Background Art
[0003] Extended Reality (XR) combines the real and virtual worlds through computers to create a virtual environment where humans and machines can interact. XR is also a general term for various technologies, including Virtual Reality (VR), Augmented Reality (AR), and Mixed Reality (MR). By integrating the visual interaction technologies of these three, XR creates an immersive experience, allowing users to seamlessly transition between the virtual and real worlds.
[0004] In the extended reality space, there are many avatars. Avatars, also known as virtual characters, are the virtual images of online users in image-based virtual worlds. These avatars are typically cartoon characters that can appear in chat rooms or in games. The high degree of freedom afforded to avatars allows for overly intimate physical contact with other users' avatars, which can cause some users to experience significant psychological discomfort.
[0005] Summary of the Invention
[0006] In order to solve the discomfort caused to users by the sensitive physical behaviors of virtual characters, the inventors of the present application have tried the following method: setting a fixed-range safety zone centered on the virtual character controlled by the user, and when virtual characters controlled by other users approach the safety zone, prompting or controlling the virtual characters of other users to be unable to enter the safety zone, thereby reducing the user's psychological discomfort and reducing safety risks. However, the method for determining the range of the virtual character's safety zone in this method is unreasonable, and the user experience is not good. Based on this, the embodiments of the present application provide a virtual character control method, device, equipment, medium and program product thereof, which sets a virtual character with a plurality of body parts surrounding bodies, triggers invisibility based on contact of the body parts surrounding bodies, can accurately identify sensitive body behaviors, avoid invisibility of some insensitive body behaviors, and thus improve the user experience.
[0007] In a first aspect, an embodiment of the present application provides a method for controlling a virtual character, comprising:
[0008] Determining that a bounding volume of a target body part of a first virtual character contacts a bounding volume of a target body part of a second virtual character, wherein both the first virtual character and the second virtual character are provided with bounding volumes of multiple body parts;
[0009] Control the first virtual character and / or the second virtual character to become invisible.
[0010] In some embodiments, the multiple body part enclosures include: two hand enclosures, a head enclosure, two thigh enclosures, two calf enclosures, and a torso and hip enclosure.
[0011] In some embodiments, the size of the bounding volume of each body part is determined according to the size of the corresponding body part.
[0012] In some embodiments, the method further comprises:
[0013] Acquire dimensions of various body parts of a target virtual character, where the target virtual character includes the first virtual character and / or the second virtual character;
[0014] The size of the bounding volume of each body part of the target virtual character is determined according to the size of each body part of the target virtual character.
[0015] In some embodiments, the method further comprises:
[0016] receiving size adjustment data of a body part of the target virtual character input by a user;
[0017] The size of the body part of the target virtual character is adjusted according to the size adjustment data.
[0018] In some embodiments, the bounding volumes of the multiple body parts adopt one or more of the following shapes: a cuboid, a cylinder, a cube, an ellipsoid, or a sphere.
[0019] In some embodiments, before controlling the first virtual character and / or the second virtual character to become invisible, the method further includes:
[0020] Obtaining a category of a bounding volume of a target body part of the first virtual character and a category of a bounding volume of a target body part of the second virtual character;
[0021] When the category of the bounding box of the target body part of the first virtual character matches the category of the bounding box of the target body part of the second virtual character, it is determined that the first virtual character and / or the second virtual character are to be made invisible.
[0022] In some embodiments, the categories of the bounding volumes of the multiple body parts of the first virtual character include at least two categories, and the categories of the bounding volumes of the multiple body parts of the second virtual character include at least two categories.
[0023] In some embodiments, the categories of the bounding volumes of the multiple body parts of the first virtual character include subjects and receptors, and the categories of the bounding volumes of the multiple body parts of the second virtual character include subjects and receptors, the subjects are the categories of the bounding volumes of the hands, and the receptors are the categories of the bounding volumes of the other body parts except the hands;
[0024] The category of the bounding volume of the target body part of the first virtual character matches the category of the bounding volume of the target body part of the second virtual character, including:
[0025] The category of the bounding volume of the target body part of the first virtual character is a subject, and the category of the bounding volume of the target body part of the second virtual character is a receptor.
[0026] In some embodiments, before controlling the first virtual character and / or the second virtual character to become invisible, the method further includes:
[0027] Obtaining a movement distance of the enclosing volume of the subject category within a preset time period before the enclosing volume of the target body part of the first virtual character contacts the enclosing volume of the target body part of the second virtual character;
[0028] When the moving distance is greater than a preset distance, the first virtual character and / or the second virtual character is controlled to become invisible.
[0029] In some embodiments, determining that the bounding volume of the target body part of the first virtual character contacts the target bounding volume of the body part of the second virtual character includes:
[0030] Determining a first distance between a center point of a bounding volume of a target body part of the first virtual character and a center point of a bounding volume of a target body part of the second virtual character;
[0031] When the first distance is less than or equal to a preset distance, it is determined that the bounding volume of the target body part of the first virtual character is in contact with the bounding volume of the target body part of the second virtual character.
[0032] In some embodiments, determining that the bounding volume of the target body part of the first virtual character contacts the bounding volume of the target body part of the second virtual character includes:
[0033] detecting whether a bounding volume of a target body part of the first virtual character overlaps with a bounding volume of a target body part of the second virtual character;
[0034] When the bounding volume of the target body part of the first virtual character overlaps with the bounding volume of the target body part of the second virtual character, it is determined that the bounding volume of the target body part of the first virtual character is in contact with the bounding volume of the target body part of the second virtual character.
[0035] In some embodiments, before controlling the first virtual character and / or the second virtual character to become invisible, the method further includes:
[0036] detecting whether a total enclosing volume of the first virtual character contacts a total enclosing volume of the second virtual character, wherein the size of the total enclosing volume is determined according to body parameters of the corresponding virtual characters;
[0037] When the total enclosing volume of the first virtual character contacts the total enclosing volume of the second virtual character, the first virtual character and / or the second virtual character are controlled to become invisible.
[0038] In some embodiments, the method further comprises:
[0039] Acquire positions of skeleton points of a target virtual character, where the target virtual character includes the first virtual character and / or the second virtual character;
[0040] Determining body parameters of the target virtual character according to positions of the skeleton points of the target virtual character;
[0041] The size of the total bounding volume of the target virtual character is determined according to the body parameters of the target virtual character.
[0042] In some embodiments, the body parameters of the target virtual character include height and shoulder width.
[0043] In some embodiments, the method further includes: determining a position of a total bounding volume of the target virtual character according to a sternum position of the target virtual character.
[0044] In some embodiments, the method further comprises:
[0045] receiving adjustment data of the body parameters of the target virtual character input by a user;
[0046] The body parameters of the target virtual character are adjusted according to the body parameter adjustment data.
[0047] In some embodiments, the overall enclosing volume of the target virtual character is a cylinder, and determining the size of the overall enclosing volume of the target virtual character according to the body parameters of the target virtual character includes:
[0048] Determining that the height of the cylinder is equal to the height of the target virtual character;
[0049] The radius of the cylinder is determined according to the shoulder width of the target virtual character.
[0050] In some embodiments, determining the radius of the cylinder according to the shoulder width of the target virtual character includes:
[0051] The radius of the cylinder is determined to be equal to r=L / 2+N1, where L is the shoulder width of the target virtual character, and N1 is an adjustment amount greater than 0.
[0052] In some embodiments, the total enclosing volume of the target virtual character is a cuboid, and determining the size of the total enclosing volume of the target virtual character according to the body parameters of the target virtual character includes:
[0053] Determining that the height of the cuboid is equal to the height of the target virtual character;
[0054] The length and width of the cuboid are determined according to the shoulder width of the target virtual character.
[0055] In some embodiments, determining the length and width of the cuboid according to the shoulder width of the target virtual character includes:
[0056] Determining that the length of the cuboid is equal to a=L+N2, where L is the shoulder width of the avatar, N2 is an adjustment amount greater than 0, and the length direction of the cuboid is parallel to the shoulder width direction of the target avatar;
[0057] The width of the rectangular parallelepiped is determined to be equal to b=L / 2+N3, N3 is an adjustment amount greater than 0, and the value of b is less than a.
[0058] In some embodiments, the radius of the cylinder satisfies the following condition: when the first virtual character shakes hands with the second virtual character, the bounding volume of the first virtual character does not contact the bounding volume of the second virtual character.
[0059] In some embodiments, the length and width of the cuboid satisfy the following condition: when the first virtual character shakes hands with the second virtual character, the bounding volume of the first virtual character does not touch the bounding volume of the second virtual character.
[0060] In some embodiments, detecting whether the total enclosing volume of the first virtual character contacts the total enclosing volume of the second virtual character includes:
[0061] Determining a first distance between a center point of a total bounding volume of the first virtual character and a center point of a total bounding volume of the second virtual character;
[0062] When the first distance is less than or equal to a preset distance, it is determined that the total enclosing volume of the first virtual character is in contact with the total enclosing volume of the second virtual character.
[0063] In some embodiments, detecting contact between the total enclosing volume of the first virtual character and the total enclosing volume of the second virtual character includes:
[0064] detecting whether a total enclosing volume of the first virtual character overlaps with a total enclosing volume of the second virtual character;
[0065] When the total enclosing volume of the first virtual character overlaps with the total enclosing volume of the second virtual character, it is determined that the total enclosing volume of the first virtual character is in contact with the total enclosing volume of the second virtual character.
[0066] In some embodiments, before controlling the first virtual character and / or the second virtual character to become invisible, the method further includes:
[0067] According to the social protection information of the first virtual character and the social protection information of the second virtual character, it is determined to make the first virtual character and / or the second virtual character invisible.
[0068] In some embodiments, the social protection information includes any one of the following information: everyone can approach, only friends can approach, everyone cannot approach, designated users cannot approach, designated users can approach and blacklisted users cannot approach;
[0069] Among them, when the user approaches, the corresponding virtual character will become invisible.
[0070] In some embodiments, determining to make the first virtual character and / or the second virtual character invisible based on the social protection information of the first virtual character and the social protection information of the second virtual character includes:
[0071] Determining a visibility result of the first virtual character based on the social protection information of the first virtual character and the identity information of the second virtual character, wherein the visibility result is used to indicate whether the virtual character is invisible;
[0072] Determining a result of revealing or hiding the second virtual character based on the social protection information of the second virtual character and the identity information of the first virtual character;
[0073] Determining whether the appearance and disappearance results of the first virtual character and the second virtual character are consistent;
[0074] When the revealing and hiding results of the first virtual character and the second virtual character are consistent, determining that the revealing and hiding results of the first virtual character and the second virtual character are effective;
[0075] When the revealing and hiding results of the first virtual character and the second virtual character are inconsistent, it is determined to make the first virtual character and the second virtual character invisible.
[0076] In some embodiments, when the first virtual character and / or the second virtual character becomes invisible, the head cards / held items of the invisible virtual characters are displayed normally.
[0077] In some embodiments, after controlling the first virtual character and / or the second virtual character to become invisible, the method further includes:
[0078] When the enclosing volume of the target body part of the first virtual character and the enclosing volume of the target body part of the second virtual character are not in contact, and the duration of the non-contact is equal to the preset duration, the invisible virtual character is controlled to be displayed.
[0079] On the other hand, an embodiment of the present application provides a control device for a virtual character, comprising:
[0080] a contact detection module, configured to determine whether a bounding volume of a target body part of a first virtual character contacts a bounding volume of a target body part of a second virtual character, wherein both the first virtual character and the second virtual character are provided with bounding volumes of multiple body parts;
[0081] The stealth module is used to control the first virtual character and / or the second virtual character to be invisible.
[0082] On the other hand, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute any of the methods described above.
[0083] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program enables a computer to execute any of the methods described above.
[0084] On the other hand, an embodiment of the present application provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, it implements any of the methods described above.
[0085] The control method for virtual characters provided in an embodiment of the present application controls the first virtual character and / or the second virtual character to become invisible when it is determined that the bounding box of the target body part of the first virtual character contacts the bounding box of the target body part of the second virtual character. The first virtual character and the second virtual character are both provided with bounding boxes for multiple body parts. When the bounding boxes of the target body parts of the two virtual characters contact, the virtual characters are rendered invisible. The invisibility triggered by the contact of the bounding boxes of the body parts can accurately identify sensitive physical behaviors and avoid making some insensitive physical behaviors invisible, thereby improving the user experience.
[0086] The embodiments of the present application also provide a method, apparatus, device, medium and program product for controlling a virtual character, which sets an enclosing volume (i.e., a safety zone) for the virtual character. The size of the enclosing volume of the virtual character matches the body parameters of the virtual character, making the range of the virtual character's safety zone more reasonable, thereby improving the user experience.
[0087] In a first aspect, an embodiment of the present application provides a method for controlling a virtual character, comprising:
[0088] Determining that a bounding volume of the first virtual character contacts a bounding volume of the second virtual character, wherein sizes of the bounding volumes are determined based on body parameters of the corresponding virtual characters;
[0089] Control the first virtual character and / or the second virtual character to become invisible.
[0090] In some embodiments, the method further comprises:
[0091] Acquire positions of skeleton points of a target virtual character, where the target virtual character includes the first virtual character and / or the second virtual character;
[0092] Determining body parameters of the target virtual character according to positions of the skeleton points of the target virtual character;
[0093] The size of the bounding volume of the target virtual character is determined according to the body parameters of the target virtual character.
[0094] In some embodiments, the body parameters of the target virtual character include height and shoulder width.
[0095] In some embodiments, the method further includes: determining a position of a bounding volume of the target virtual character according to a sternum position of the target virtual character.
[0096] In some embodiments, the method further comprises:
[0097] receiving adjustment data of the body parameters of the target virtual character input by a user;
[0098] The body parameters of the target virtual character are adjusted according to the body parameter adjustment data.
[0099] In some embodiments, the bounding volume of the target virtual character is a cylinder, and determining the size of the bounding volume of the target virtual character according to the body parameters of the target virtual character includes:
[0100] Determining that the height of the cylinder is equal to the height of the target virtual character;
[0101] The radius of the cylinder is determined according to the shoulder width of the target virtual character.
[0102] In some embodiments, determining the radius of the cylinder according to the shoulder width of the target virtual character includes:
[0103] The radius of the cylinder is determined to be equal to r=L / 2+N1, where L is the shoulder width of the target virtual character, and N1 is an adjustment amount greater than 0.
[0104] In some embodiments, the bounding volume of the target virtual character is a cuboid, and determining the size of the bounding volume of the target virtual character according to the body parameters of the target virtual character includes:
[0105] Determining that the height of the cuboid is equal to the height of the target virtual character;
[0106] The length and width of the cuboid are determined according to the shoulder width of the target virtual character.
[0107] In some embodiments, determining the length and width of the cuboid according to the shoulder width of the target virtual character includes:
[0108] Determining that the length of the cuboid is equal to a=L+N2, where L is the shoulder width of the avatar, N2 is an adjustment amount greater than 0, and the length direction of the cuboid is parallel to the shoulder width direction of the target avatar;
[0109] The width of the rectangular parallelepiped is determined to be equal to b=L / 2+N3, N3 is an adjustment amount greater than 0, and the value of b is less than a.
[0110] In some embodiments, the radius of the cylinder satisfies the following condition: when the first virtual character shakes hands with the second virtual character, the bounding volume of the first virtual character does not contact the bounding volume of the second virtual character.
[0111] In some embodiments, the length and width of the cuboid satisfy the following condition: when the first virtual character shakes hands with the second virtual character, the bounding volume of the first virtual character does not touch the bounding volume of the second virtual character.
[0112] In some embodiments, determining that the bounding volume of the first virtual character contacts the bounding volume of the second virtual character includes:
[0113] Determining a first distance between a center point of a bounding volume of the first virtual character and a center point of a bounding volume of the second virtual character;
[0114] When the first distance is less than or equal to a preset distance, it is determined that the enclosing volume of the first virtual character is in contact with the enclosing volume of the second virtual character.
[0115] In some embodiments, determining that the bounding volume of the first virtual character contacts the bounding volume of the second virtual character includes:
[0116] detecting whether the bounding volume of the first virtual character overlaps with the bounding volume of the second virtual character;
[0117] When the enclosing volume of the first virtual character overlaps with the enclosing volume of the second virtual character, it is determined that the enclosing volume of the first virtual character is in contact with the enclosing volume of the second virtual character.
[0118] In some embodiments, before controlling the first virtual character and / or the second virtual character to become invisible, the method further includes:
[0119] According to the social protection information of the first virtual character and the social protection information of the second virtual character, it is determined to make the first virtual character and / or the second virtual character invisible.
[0120] In some embodiments, the social protection information includes any one of the following information: everyone can approach, only friends can approach, everyone cannot approach, designated users cannot approach, designated users can approach and blacklisted users cannot approach;
[0121] Among them, when the user approaches, the corresponding virtual character will become invisible.
[0122] In some embodiments, determining to make the first virtual character and / or the second virtual character invisible based on the social protection information of the first virtual character and the social protection information of the second virtual character includes:
[0123] Determining a visibility result of the first virtual character based on the social protection information of the first virtual character and the identity information of the second virtual character, wherein the visibility result is used to indicate whether the virtual character is invisible;
[0124] Determining a result of revealing or hiding the second virtual character based on the social protection information of the second virtual character and the identity information of the first virtual character;
[0125] Determining whether the appearance and disappearance results of the first virtual character and the second virtual character are consistent;
[0126] When the revealing and hiding results of the first virtual character and the second virtual character are consistent, determining that the revealing and hiding results of the first virtual character and the second virtual character are effective;
[0127] When the revealing and hiding results of the first virtual character and the second virtual character are inconsistent, it is determined to make the first virtual character and the second virtual character invisible.
[0128] In some embodiments, when the first virtual character and the second virtual character are invisible, the head cards and / or handheld items of the invisible virtual characters are displayed normally.
[0129] In some embodiments, after controlling the first virtual character and / or the second virtual character to become invisible, the method further includes:
[0130] When the enclosing body of the first virtual character and the enclosing body of the second virtual character are not in contact, and the duration of the non-contact is equal to a preset duration, the invisible virtual character is controlled to be displayed.
[0131] On the other hand, an embodiment of the present application provides a control device for a virtual character, comprising:
[0132] a contact detection module, configured to determine whether a bounding volume of a first virtual character contacts a bounding volume of a second virtual character, wherein the size of the bounding volume is determined based on body parameters of the corresponding virtual characters;
[0133] The stealth module is used to control the first virtual character and / or the second virtual character to be invisible.
[0134] On the other hand, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute any of the methods described above.
[0135] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program enables a computer to execute any of the methods described above.
[0136] On the other hand, an embodiment of the present application provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, it implements any of the methods described above.
[0137] The present invention provides a method for controlling a virtual character, wherein the bounding volume of a first virtual character contacts the bounding volume of a second virtual character, wherein the size of the bounding volume is determined based on the body parameters of the corresponding virtual characters, and the first virtual character and / or the second virtual character are controlled to become invisible. In this method, the bounding volume (i.e., the safety zone) of the virtual character is automatically set based on the body parameters of the virtual character, and the size of the bounding volume matches the body parameters of the virtual character, making the range of the virtual character's safety zone more reasonable, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0138] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0139] FIG1 is a flow chart of a method for controlling a virtual character provided in Example 1 of the present application;
[0140] FIG2 is a schematic diagram of the bounding volume of each body part of the virtual character;
[0141] FIG3 is a schematic diagram of a configuration interface for social protection information;
[0142] FIG4 is a flow chart of a method for controlling a virtual character provided in Example 2 of the present application;
[0143] FIG5 is a schematic diagram showing the size determination of the hand enclosing volume;
[0144] FIG6 is a flow chart of a method for controlling a virtual character provided in Example 3 of the present application;
[0145] FIG7 is a schematic diagram of the total bounding volume of a virtual character;
[0146] FIG8 is a schematic diagram of a contact between the total bounding volumes of two virtual characters;
[0147] FIG9 is a flow chart of a method for controlling a virtual character provided in Example 4 of the present application;
[0148] FIG10 is a schematic diagram of the shoulder width and sternum position of the virtual character;
[0149] FIG11 is a flow chart of a method for controlling a virtual character provided in Example 5 of the present application;
[0150] FIG12 is a flow chart of a method for controlling a virtual character provided in Example 6 of the present application;
[0151] FIG13 is a schematic diagram of a virtual character's bounding volume;
[0152] FIG14 is a schematic diagram of a contact between the bounding volumes of two virtual characters;
[0153] FIG15 is a schematic diagram of a configuration interface for social protection information;
[0154] FIG16 is a flow chart of a method for controlling a virtual character provided in Example 7 of the present application;
[0155] FIG17 is a schematic diagram of the shoulder width and sternum position of the virtual character;
[0156] FIG18 is a flow chart of a method for controlling a virtual character provided in Example 8 of the present application;
[0157] 19A and 19B are schematic diagrams of the structure of the control device for the virtual character provided in the ninth and tenth embodiments of the present application;
[0158] Figure 20 is a structural diagram of an electronic device provided in Example 11 of the present application. DETAILED DESCRIPTION
[0159] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0160] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention 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 numbers used in this way are interchangeable where appropriate so that the embodiments of the present invention 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 server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0161] The present application provides a method for controlling a virtual character, which is applied to electronic devices capable of providing a virtual environment, such as XR devices, mobile phones, computers, servers, etc. XR refers to the use of computers to combine the real and virtual to create a virtual environment that allows human-computer interaction. XR is also a general term for various technologies such as VR, AR, and MR. By integrating the visual interaction technologies of these three, the user can experience an "immersive" experience, with a seamless transition between the virtual and real worlds.
[0162] VR: A technology for creating and experiencing a virtual world. It generates a virtual environment through computational means. It is a multi-source information (the virtual reality mentioned in this article includes at least visual perception, and can also include auditory perception, tactile perception, motion perception, and even taste perception, olfactory perception, etc.). It realizes the simulation of the fusion of virtual environments, interactive three-dimensional dynamic vision and entity behavior, immersing users in a simulated virtual reality environment, and realizing applications in various virtual environments such as maps, games, videos, education, medical care, simulation, collaborative training, sales, assisted manufacturing, maintenance and repair.
[0163] VR devices refer to terminals that achieve virtual reality effects, and can usually be provided in the form of glasses, helmet-mounted displays (HMDs), or contact lenses to achieve visual perception and other forms of perception. Of course, the form of virtual reality devices is not limited to this, and can be further miniaturized or enlarged as needed.
[0164] Optionally, the virtual reality devices described in the embodiments of this application may include but are not limited to the following types:
[0165] 2.1) PC-based virtual reality (PCVR) devices use the PC to perform calculations and output data related to virtual reality functions. External PC-based virtual reality devices use the data output by the PC to achieve virtual reality effects.
[0166] 2.2) Mobile VR devices support the configuration of mobile terminals (such as smartphones) in various ways (such as head-mounted displays with dedicated card slots). Through wired or wireless connection with the mobile terminal, the mobile terminal performs relevant calculations for VR functions and outputs data to the mobile VR device, such as viewing VR videos through the mobile terminal's app.
[0167] 2.3) All-in-one virtual reality devices have a processor for performing relevant calculations for virtual functions, and thus have independent virtual reality input and output functions. They do not need to be connected to a PC or mobile terminal and have a high degree of freedom of use.
[0168] AR: An AR set refers to a simulated set in which at least one virtual object is superimposed on a physical set or a representation thereof. For example, an electronic system may have an opaque display and at least one imaging sensor that captures images or videos of a physical set, which are representations of the physical set. The system combines the images or videos with virtual objects and displays the combination on the opaque display. An individual using the system indirectly views the physical set via the images or videos of the physical set and observes the virtual objects superimposed on the physical set. When the system uses one or more image sensors to capture images of the physical set and uses those images to present the AR set on the opaque display, the displayed images are referred to as video pass-through. Alternatively, an electronic system for displaying the AR set may have a transparent or translucent display through which an individual can directly view the physical set. The system can display virtual objects on the transparent or translucent display, allowing an individual using the system to observe the virtual objects superimposed on the physical set. For another example, the system may include a projection system that projects virtual objects onto the physical set. Virtual objects can be projected, for example, on a physical surface or as a hologram, allowing an individual using the system to observe virtual objects superimposed on a physical setting. Specifically, a technology that calculates the camera's pose parameters in the real world (or three-dimensional world, real world) in real time during the process of the camera capturing an image, and adds virtual elements to the image captured by the camera based on the camera pose parameters. Virtual elements include but are not limited to: images, videos, and three-dimensional models. The goal of AR technology is to overlay the virtual world on the real world on the screen for interaction.
[0169] MR: By presenting virtual scene information in a real scene, an interactive feedback information loop is established between the real world, the virtual world, and the user to enhance the realism of the user experience. For example, computer-generated sensory input (e.g., virtual objects) is integrated with sensory input from a physical scene or its representation in a simulated scene. In some MR scenes, computer-generated sensory input can adapt to changes in sensory input from the physical scene. In addition, some electronic systems used to present MR scenes can monitor the orientation and / or position relative to the physical scene so that virtual objects can interact with real objects (i.e., physical elements from the physical scene or their representations). For example, the system can monitor movement so that virtual plants appear stationary relative to physical buildings.
[0170] The method provided in the embodiment of the present application is applied in an electronic device that can provide a virtual environment. The virtual environment can be a 2D space or a 3D space. The 3D space can be an extended reality space provided by an XR device, and the 2D space is usually a virtual space provided by a traditional mobile phone or computer.
[0171] The virtual characters involved in the embodiments of the present application, also known as Avatars, are virtual images of network users in a virtual world dominated by images. Virtual characters are typically cartoon characters and can appear in chat rooms or games. Virtual characters are controlled by users, who can change the appearance of the virtual characters according to their preferences, such as hairstyle, clothing, and expressions. Virtual characters can also interact with other virtual characters, including but not limited to voice interaction, text interaction, and physical interaction, including but not limited to handshakes and fist bumps.
[0172] Similar to physical contact between users in a real environment, physical contact between virtual characters should also be kept within an appropriate range to avoid some physical contact causing psychological discomfort to users and reduce safety risks for virtual characters.
[0173] After introducing some concepts involved in the embodiments of the present application, a control method for a virtual character provided in the embodiments of the present application is specifically described below with reference to the accompanying drawings. The same content refers to the description of the previous embodiments and will not be repeated.
[0174] Figure 1 is a flowchart of a method for controlling a virtual character provided in Example 1 of the present application. The method of this embodiment can be executed by electronic devices such as XR devices, mobile phones, computers, and servers. The following embodiments are described using VR devices as an example. As shown in Figure 1, the method of this embodiment includes the following steps.
[0175] S101: Determine whether the bounding volume of a target body part of a first virtual character contacts the bounding volume of a target body part of a second virtual character, wherein both the first virtual character and the second virtual character are provided with bounding volumes of multiple body parts.
[0176] Taking VR devices as an example, there are multiple virtual characters in the virtual reality space. The virtual characters move or perform some tasks in the virtual reality space. Taking the first virtual character as an example, during the movement or task execution process, the first virtual character may have physical interactions with other virtual characters in the virtual reality space, or be physically harassed by other virtual characters.
[0177] In this embodiment, bounding volumes for multiple body parts are set for each virtual character. These bounding volumes are also called bounding boxes, collision boxes, collision volumes, protective shields, protection boxes, safety zones, etc. These bounding volumes can be considered as transparent objects that cover or surround all or part of the virtual character's body parts. These bounding volumes are used to assist in detecting whether the virtual character has made physical contact. These bounding volumes are invisible to the user.
[0178] Illustratively, in this embodiment, a bounding box is set for one or more of the following body parts of the virtual character: head, two hands, two thighs, two calves, and torso and buttocks.
[0179] Optionally, in some embodiments, the thigh and calf of the virtual character may be treated as a whole, and a bounding box may be set for each leg, or a bounding box may be set for each lower limb, where the lower limbs include the legs and feet.
[0180] Optionally, in some embodiments, a bounding box may be set for the two arms, or a bounding box may be set for each of the two upper limbs, where the upper limbs include the hands and the arms.
[0181] The size of the bounding volume of each body part of the virtual character may be fixed or determined according to the size of the corresponding body part.
[0182] The size of a body part can be the length, width and height of the body part. For example, the length of a hand refers to the distance from the wrist joint to the tip of the middle finger, the width of a hand refers to the maximum distance between the outermost sides of the thumb and the little finger, and the height of a hand refers to the thickest thickness of the palm.
[0183] Taking the head as an example, the head height refers to the distance from the top of the head to the chin or neck, the head length refers to the maximum distance between the left and right sides of the face, and the head width refers to the maximum distance between the front and back sides of the face. Taking the thigh as an example, the thigh height refers to the maximum distance between the upper and lower thighs, the thigh length refers to the maximum distance between the left and right thighs, and the thigh width refers to the maximum distance between the front and back thighs.
[0184] It should be noted that, when describing the body parts of the virtual character, the up and down, left and right, and front and back involved are described with reference to the virtual character.
[0185] Optionally, the dimensions of some body parts can be described using the height and circumference of the body part, for example, the dimensions of the head include head height and head circumference, the dimensions of the thigh include thigh length and thigh circumference, and the dimensions of the torso and hips include torso height and hip circumference (or waist circumference).
[0186] Because different body parts have different sizes, the sizes of the bounding volumes for different body parts can be different. For example, the sizes of the bounding volumes for the head and the hands are different. Furthermore, because different avatars have different body sizes, the sizes of the same body part for different avatars may be different. For example, if a first avatar is significantly larger than a second avatar, the size of the bounding volume for the first avatar's head will be correspondingly larger than the size of the bounding volume for the second avatar's head.
[0187] The embodiment of the present application does not limit the shape of the body surrounding the body part. The shape of the body surrounding the body part can be a cylinder, a cube, a cuboid, an ellipsoid, a sphere, etc., and can also be some irregular three-dimensional shapes.
[0188] FIG2 is a schematic diagram of the bounding volumes of various body parts of a virtual character. As shown in FIG2 , the virtual character has a total of eight bounding volumes: a bounding volume of the head, a bounding volume of the torso and hips, a bounding volume of two hands, a bounding volume of two thighs, and a bounding volume of two calves.
[0189] The enclosing volume of the target body part of the first virtual character belongs to the multiple enclosing volumes of the first virtual character, and the enclosing volume of the target body part of the second virtual character belongs to the multiple enclosing volumes of the second virtual character. The contact of the enclosing volumes of the body parts of the two virtual characters can be understood as the overlap of the enclosing volumes of the body parts of the two virtual characters, and the size of the overlapping area can be not limited.
[0190] Exemplarily, whether the bounding box of the target body part of the first virtual character contacts the bounding box of the target body part of the second virtual character may be determined in the following two ways.
[0191] Method 1: Determine a first distance between a center point of an enclosing volume of a target body part of a first virtual character and a center point of an enclosing volume of a target body part of a second virtual character; when the first distance is less than or equal to a preset distance, determine that the enclosing volume of the target body part of the first virtual character is in contact with the enclosing volume of the target body part of the second virtual character.
[0192] The bounding volume moves with the virtual character. Each bounding volume has a center point, and the distance between two bounding volumes can be measured based on the distance between the center points.
[0193] Method 2: Detect whether the enclosing volume of the target body part of the first virtual character overlaps with the enclosing volume of the target body part of the second virtual character. When the enclosing volume of the target body part of the first virtual character overlaps with the enclosing volume of the target body part of the second virtual character, determine that the enclosing volume of the target body part of the first virtual character is in contact with the enclosing volume of the target body part of the second virtual character.
[0194] In this embodiment, the execution entity can be a first terminal device used by a first user corresponding to the first virtual character, or a second terminal device used by a second user corresponding to the second virtual character. Both the first terminal device and the second terminal device can be XR devices, mobile phones, personal computers, etc. In actual scenarios, the first terminal device and the second terminal device each execute the virtual character control method of this embodiment, that is, each user determines whether they are in contact with other users from their own perspective, and then determines whether to become invisible.
[0195] The execution entity may also be a server, which communicates with the first terminal device and the second terminal device to provide a virtual scene to the first user and the second user.
[0196] S102: Control the first virtual character and / or the second virtual character to become invisible.
[0197] When the bounding volumes of two virtual characters come into contact, one of the two virtual characters may be made invisible, or both virtual characters may be made invisible.
[0198] The invisibility means that the current virtual character itself or other virtual characters are not displayed or are not fully displayed on the terminal corresponding to the virtual character. The incomplete display includes but is not limited to a certain degree of transparent display, only displaying the outline or only displaying the logo, etc.
[0199] When the first virtual character is invisible, the first virtual character or the second virtual character cannot see the first virtual character. When the second virtual character is invisible, the first virtual character or the second virtual character cannot see the second virtual character.
[0200] When both virtual characters are invisible, the visibility and invisibility status of the two virtual characters are always consistent. The visibility and invisibility status is used to indicate whether the virtual character is invisible or visible. That is, the visibility and invisibility status of the second virtual character as seen by the first virtual character is consistent with the visibility and invisibility status of the first virtual character as seen by the second virtual character. If the first virtual character sees the second virtual character as invisible, then the second virtual character will also see the first virtual character as invisible. If the first virtual character sees the second virtual character as visible, then the second virtual character will also see the first virtual character as visible.
[0201] In an exemplary invisibility method, after determining to make the first virtual character and / or the second virtual character invisible, the first virtual character and / or the second virtual character gradually become invisible within a preset time, and the preset time is, for example, 2S, that is, the first virtual character and / or the second virtual character gradually become invisible within 2S.
[0202] The invisibility process can be achieved through dynamic effects, for example, the color of the first virtual character and / or the second virtual character gradually becomes lighter to transparent, and then finally disappears completely, or the first virtual character and / or the second virtual character gradually shrinks from large to disappear.
[0203] In another exemplary invisibility mode, after determining that the first virtual character and / or the second virtual character are invisible, the first virtual character and / or the second virtual character can be instantly invisible. Instant invisibility is different from the gradual invisibility mentioned above, that is, the invisibility time of the two is different.
[0204] It's important to note that each avatar in a virtual scene only judges the avatar it's in contact with from its own perspective, and doesn't judge contact between other avatars. For example, if avatars B and C are in contact and become invisible, avatar A's perspective is unaffected; avatar A can still see avatars B and C, but avatars B and C cannot see each other.
[0205] After the first virtual character and / or the second virtual character becomes invisible, when the enclosing body of the target body part of the first virtual character and the enclosing body of the target body part of the second virtual character are not in contact, and the duration of non-contact is equal to the preset duration, the invisible virtual character is controlled to be displayed. In one implementation, the invisible virtual character gradually appears within a preset time, and the preset time is, for example, 2 seconds. The preset time used for the invisible process and the appearance after the invisible process can be the same or different. The appearance after the invisible process is similar to the invisible process, so the two can be implemented using the same animation effect, which will not be repeated here. In another implementation, the invisible virtual character appears instantly.
[0206] Optionally, when the first virtual character and / or the second virtual character becomes invisible, the invisible virtual character's head card / handheld items are displayed normally. A head card refers to a sign displayed above the virtual character's head. The head card can display the user's nickname or account information. Optionally, the head card can also display the user's level or other attribute information. In game scenes, the head card can also display the user's health or life value. Handheld items can be props held by the virtual character, such as weapons or gifts.
[0207] Optionally, before controlling the first virtual character and / or the second virtual character to be invisible, that is, before step S102, it is determined whether to make the first virtual character and / or the second virtual character invisible based on the social protection information of the first virtual character and the social protection information of the second virtual character.
[0208] The social protection information is used to describe the approach permission information of the virtual character, where the approach permission information is used to indicate whether approaching the virtual character is allowed, and user information of users who are allowed to approach the virtual character and those who are not allowed to approach the virtual character.
[0209] Exemplarily, the social protection information includes any one of the following information: everyone can approach, only friends can approach, no one can approach, designated users can not approach, designated users can approach and blacklisted users can not approach, wherein, when the unapproachable user approaches, the corresponding virtual character will become invisible.
[0210] The social protection information of the first virtual character and the social protection information of the second virtual character are set by the users corresponding to the virtual characters. Accordingly, a configuration interface for the social protection information is provided to the user, and the user sets or selects the social protection information through the configuration interface for the social protection information.
[0211] Figure 3 is a schematic diagram of the configuration interface for social protection information. As shown in Figure 3, the user opens the settings interface through the app's settings function. The settings interface includes "Mobile Mode," "Voice," and "Privacy" setting options. After the user selects "Privacy," the interface shown in Figure 3(a) is displayed. The "Privacy" option can be understood as a first-level menu, which includes multiple second-level submenus, such as "Blacklist" and "Personal Social Shield."
[0212] Each second-level submenu includes a third-level submenu. For example, after the user selects the sub-menu button corresponding to "Personal Social Shield", the interface shown in Figure 3(b) is opened. The interface of Figure 3(b) is the configuration interface of social protection information. As shown in Figure 3(b), the configuration interface of social protection information has three options for the user to choose: everyone can approach, only friends can approach, and no one can approach.
[0213] After users install or log in to the app, the default setting is "Everyone Can Approach." This means everyone can approach you, and neither avatar will become invisible in the event of close physical contact. Users can choose to have only friends approach or no one approach. The "Friends Only" setting means only users in the user's friend list can approach, and other users will become invisible. The "No One Can Approach" setting means no one can approach you, and they will become invisible if they do.
[0214] It is understood that the configuration interface for social protection information is not limited to the interface shown in Figure 3. The configuration interface may also include more options, such as specifying users to be unapproachable, specifying users to be approachable, and blacklisting users to be unapproachable. Taking the "Specify users to be unapproachable" option as an example, the "Specify users to be unapproachable" option can further add one or more accounts of unapproachable users, or set a category of users to be unapproachable, for example, setting male users to be unapproachable. For the current user, the user specified in the "Specify users to be unapproachable" option will appear invisible when approached, but other users will not appear invisible when approached.
[0215] The "Specify Approachable Users" option is similar to the "Unapproachable Users" option. Users can add one or more accounts that can be approached, or set a category of users to be approachable, for example, only female users. For the current user, the user will not be invisible when the user specified in the "Specify Approachable Users" option approaches, but will be invisible when other users approach.
[0216] Optionally, a blacklist option can be set in the setting options of some applications, and users in the blacklist option can be set to be unable to approach.
[0217] The social protection information of the first and second virtual characters can be modified at any time based on user needs. Taking the game scenario as an example, the user can modify the social protection information before the game starts, and the user can also modify the social protection information during the game. For example, during the game, the first virtual character and the second virtual character come into contact, and according to the judgment result, both need to be invisible. At this time, the first user corresponding to the first virtual character modifies his or her own social protection. In this case, the above-mentioned invisibility determination result may not take effect, and the modified social protection information may be updated to perform the invisibility determination again, and the corresponding operation may be performed based on the determination result. Optionally, after the current invisibility determination result takes effect, the first virtual character may use the modified social protection information to perform the invisibility determination after coming into contact with the other virtual character.
[0218] Optionally, before controlling the first virtual character and / or the second virtual character to become invisible, obtain the category of the enclosing body of the target body part of the first virtual character and the category of the enclosing body of the target body part of the second virtual character; when the category of the enclosing body of the target body part of the first virtual character matches the category of the enclosing body of the target body part of the second virtual character, control the first virtual character and / or the second virtual character to become invisible; if the category of the enclosing body of the target body part of the first virtual character does not match the category of the enclosing body of the target body part of the second virtual character, do not perform any operation and return to execute step S101.
[0219] In this method, invisibility is not triggered by the contact of the enclosing bodies of any two body parts, but by the contact of the enclosing bodies of some specific body parts.
[0220] The categories of the bounding volumes of the multiple body parts of the first virtual character include at least two categories, and the categories of the bounding volumes of the multiple body parts of the second virtual character include at least two categories. For example, the first virtual character has a total of 8 body parts, which are divided into 3 categories. Body parts 1-3 belong to category 1, body parts 4-7 belong to category 2, and body part 8 belongs to category 3.
[0221] Exemplarily, the categories of the bounding boxes of body parts include subjects and receptors, wherein the category of the bounding boxes of the hands of the first virtual character and the second virtual character is subjects, and the category of the bounding boxes of other body parts is receptors, where other body parts refer to body parts other than hands.
[0222] Correspondingly, the category of the enclosing body of the target body part of the first virtual character matches the category of the enclosing body of the target body part of the second virtual character, including: the category of the enclosing body of the target body part of the first virtual character is the subject, and the category of the enclosing body of the target body part of the second virtual character is the receptor.
[0223] That is, a virtual character will only become invisible when the main body of the character contacts the receptor of another virtual character. For example, the contact between the enclosing body of the first virtual character's hand and the enclosing body of the other parts of the second virtual character (excluding the hand) triggers invisibility. When the main body of a virtual character contacts the receptor of another virtual character, for example, the contact between the enclosing body of the first virtual character's hand and the enclosing body of the second virtual character's hand, invisibility will not be triggered. When the receptor of one virtual character contacts the receptor of another virtual character, for example, the contact between the enclosing body of the first virtual character's calf and the enclosing body of the second virtual character's calf, invisibility will not be triggered.
[0224] This method can more accurately identify sensitive body movements, hiding only sensitive body movements and avoiding hiding insensitive body movements, thereby improving the user experience. For users, not all body contact is sensitive and will cause discomfort. Therefore, accurate identification of sensitive body movements can provide users with a better experience. For example, when the hand enclosed bodies of two virtual characters are detected to be in contact, the two virtual characters may just be performing a normal handshake or fist bump operation. In this case, there is no need to hide. Moreover, for most users, physical contact between hands does not cause discomfort to the user, so there is no need to hide. Only when a virtual character's hand touches the torso or thigh of another virtual character will it cause discomfort to the user and require hiding.
[0225] Optionally, in one implementation, the invisibility determination can be made in conjunction with the social protection information and the target body part category. The invisibility determination can be made based on the social protection information of the two virtual characters. If the virtual character is deemed to be invisible based on the social protection information, the determination is then made to see if the categories of the target body parts of the two virtual characters match. If so, the virtual character is rendered invisible. Alternatively, the determination is made to see if the categories of the target body parts of the two virtual characters match. If so, the determination is then made based on the social protection information of the two virtual characters.
[0226] When subject categories and receptor categories are defined for the bounding boxes of each body part of a virtual character, when the subject of the first virtual character contacts the receptor of the second virtual character, it is optionally necessary to obtain the moving distance of the bounding box of the target body part of the first virtual character within a preset time period before the bounding box contacts the bounding box of the target body part of the second virtual character, that is, to detect the moving distance of the virtual character's hand. When the moving distance is greater than the preset distance, the first virtual character and / or the second virtual character is controlled to be invisible.
[0227] This approach further improves the accuracy of sensitive body movement recognition. For example, if the second avatar's head bumps the first avatar's hand, and the bounding box of the first avatar's hand moves less than a preset distance within a preset time period, the avatar will not be invisible. However, if the first avatar's hand actively touches the second avatar's head, the bounding box of the first avatar's hand will typically move more than a preset distance within a preset time period, and the avatar will be invisible.
[0228] In this embodiment, when the execution entities are the first terminal device and the second terminal device, the first terminal device and the second terminal device control the virtual characters in the displayed virtual scene to become invisible. When the execution entity is a server, the server sends a disappearance instruction to the first terminal device and the second terminal device, instructing the first and second virtual characters to become invisible.
[0229] In this embodiment, when it is determined that the bounding box of the target body part of the first virtual character contacts the bounding box of the target body part of the second virtual character, the first virtual character and / or the second virtual character are controlled to be invisible. Specifically, the first virtual character and the second virtual character are both provided with bounding boxes of multiple body parts. When the bounding boxes of the target body parts of the two virtual characters contact, the virtual characters are rendered invisible. Triggering the invisibility based on the contact of the bounding boxes of the body parts can accurately identify sensitive physical behaviors and avoid making some insensitive physical behaviors invisible, thereby improving the user experience.
[0230] Based on Example 1, Example 2 of the present application provides a method for controlling a virtual character, which is used to illustrate the method for generating the bounding volume of each body part of the virtual character. Figure 4 is a flow chart of the method for controlling a virtual character provided by Example 2 of the present application. As shown in Figure 4, the method provided in this embodiment includes the following steps.
[0231] S201: Receive size adjustment data of a body part of a target virtual character input by a user, where the target virtual character includes a first virtual character and / or a second virtual character.
[0232] Optionally, in this embodiment, the size of each body part of the virtual character can be adjusted, that is, the user can define the size of each body part of the virtual character according to his or her needs.
[0233] In one implementation, the user can individually adjust the size of each body part of the virtual character, for example, individually adjust the length of the virtual character's arms, or adjust the length of the virtual character's legs.
[0234] In another implementation, the user can adjust the overall size of each body part of the virtual character. For example, if the user adjusts the height of the virtual character, the size of the virtual character's head, hands, torso, hips, legs, and arms will also be adjusted accordingly.
[0235] The body adjustment page allows users to adjust the dimensions of various body parts of their avatar. For example, users can select a avatar on the page and scale the avatar to enlarge or reduce it. Alternatively, users can enter body adjustment parameters, such as the avatar's height or select from several height options. Users can also adjust the avatar's weight, such as by entering the avatar's shoulder width or selecting from several shoulder width options. This adjustment method allows for simultaneous adjustment of multiple avatar body parts.
[0236] Optionally, the body shape adjustment page also includes an adjustment entrance for the size of each body part. The user opens the size adjustment page for each body part through the adjustment entrance for the size of each body part, and then enters or selects a suitable size. For example, the user adjusts the leg length of the virtual character separately, or adjusts the waist circumference of the virtual character separately.
[0237] S202: Adjust the size of the target virtual character's body parts according to the size adjustment data.
[0238] The size of the body part of the target avatar is updated based on the size adjustment data.
[0239] S203: Obtain the size of each body part of the target virtual character.
[0240] When the executing entity is a first VR device used by a first user corresponding to a first virtual character, the first VR device reads the sizes of the body parts of the first virtual character from its own device memory, and requests the sizes of the body parts of the second virtual character from a second VR device used by a second user corresponding to the second virtual character. Alternatively, the sizes of the body parts of the virtual characters are stored in a server, and the first VR device requests the sizes of the body parts of the first virtual character and the second virtual character from the server.
[0241] S204: Determine the size of the bounding volume of each body part of the target virtual character according to the size of each body part of the target virtual character.
[0242] The shape of the bounding volume for each body part of the target virtual character can be a default shape provided by the system or selected by the user. After determining the shape of the bounding volume, the size of the bounding volume is determined. The shape of the bounding volume can be a cylinder, a cuboid, a cube, an ellipsoid, a sphere, or other irregular three-dimensional shape, which is not limited in this embodiment of the present application.
[0243] Taking the rectangular enclosing body as an example, Figure 5 is a schematic diagram of determining the size of the hand enclosing body. Referring to Figure 5, the length of the hand enclosing body is 3 / 4 of the hand length, the height of the hand enclosing body is the highest height of the hand, and the width of the hand enclosing body is the widest width of the four fingers of the hand (excluding the thumb).
[0244] The values shown in Figure 5 are just examples; the length, height, and width of the hand's enclosing volume can also have other values. For example, the length of the hand's enclosing volume can be the longest length of the hand, or the length of the hand's enclosing volume can be the hand's length plus an adjustment factor of 1 cm or 2 cm. For another example, the width of the hand's enclosing volume can be the widest width of the hand, where the widest width of the hand refers to the widest width of the five fingers.
[0245] Taking the cylindrical enclosure as an example, the height of the cylinder of the hand can be the length of the hand or 3 / 4 of the length of the hand, and the diameter of the cylinder of the hand can be the widest width of the four fingers of the hand (excluding the thumb) or the widest width of the five fingers of the hand.
[0246] The method for determining the bounding volume of other body parts of the virtual character is similar, and examples are not given here one by one.
[0247] In this embodiment, the sizes of the target virtual character's body parts are obtained, and the sizes of the bounding volumes of the target virtual character's body parts are determined based on the sizes of the target virtual character's body parts. This ensures that the sizes of the bounding volumes of the target virtual character's body parts match the virtual character's body shape, making the range of the bounding volumes of the virtual character's body parts more reasonable, thereby improving the user experience. In addition, the sizes of the target virtual character's body parts are adjustable, and the sizes of the bounding volumes of the virtual character's body parts adapt to changes in the sizes of the target virtual character's body parts.
[0248] Based on Examples 1 and 2, Example 3 of the present application provides a method for controlling a virtual character. In this embodiment, a total enclosing volume is defined for the virtual character. This total enclosing volume is relative to the virtual character as a whole, and is different from the enclosing volumes of each body part in Example 1. When making an invisibility determination, if two virtual characters meet the conditions of total enclosing volume contact or the enclosing volumes of any body parts contact, an invisibility determination will be made. Figure 6 is a flow chart of the method for controlling a virtual character provided in Example 3 of the present application. As shown in Figure 6, the method provided in this embodiment includes the following steps.
[0249] S301: Detect whether the bounding volume of the target body part of the first virtual character contacts the bounding volume of the target body part of the second virtual character, and / or detect whether the total bounding volume of the first virtual character contacts the total bounding volume of the second virtual character.
[0250] The size of the overall bounding volume is determined based on the body parameters of the corresponding avatar, and the overall bounding volume encloses all or part of the corresponding avatar. The first and second avatars are each provided with multiple body part bounding volumes, each of which encloses all or part of the avatar's body parts. Optionally, the size of each body part bounding volume is determined based on the size of the corresponding body part.
[0251] Based on the first embodiment, in addition to setting bounding volumes for each body part of each virtual character, this embodiment also sets a global bounding volume for the virtual character. This bounding volume is also called a bounding box, collision box, collision volume, protection shield, protection box, safety zone, etc. Similar to the bounding volumes for each body part, this global bounding volume is a transparent object that covers or surrounds all or part of the virtual character. This global bounding volume is used to assist in detecting whether the virtual character has made physical contact. This global bounding volume is invisible to the user.
[0252] The size of the overall bounding volume is determined based on the corresponding avatar's body parameters. That is, avatars with different body parameters have corresponding overall bounding volume sizes that are different. For example, the body parameters include, but are not limited to, the avatar's height, shoulder width, hip circumference, waist circumference, and body proportions.
[0253] Accordingly, the height of the total enclosing volume is equal to or slightly greater than the height of the virtual character, the length, width or radius of the total enclosing volume is determined according to parameters such as the virtual character's shoulder width, hip circumference or waist circumference, and the position of the total enclosing volume is determined according to parameters such as the virtual character's sternum position or pelvic position.
[0254] The embodiment of the present application does not limit the shape of the overall enclosing body. The shape of the overall enclosing body can be a cylinder, a cube, a cuboid, an ellipsoid, a sphere, etc., and can also be some irregular three-dimensional shapes.
[0255] Taking the overall enclosing volume as a cylinder as an example, the height of the cylinder can be equal to the height of the avatar, and the radius of the cylinder can be determined based on the avatar's shoulder width. For example, the radius of the cylinder can be equal to half the shoulder width, or the radius of the cylinder can be increased by an adjustment amount based on half the shoulder width, such as 3 centimeters (cm), 5 centimeters, or 6 centimeters. The central axis of the cylinder can be determined based on the position of the sternum or pelvis of the avatar.
[0256] FIG7 is a schematic diagram of the overall enclosing volume of the virtual character. As shown in FIG7 , the overall enclosing volume is a cylinder, and the circle in the figure shows a cross section of the overall enclosing volume.
[0257] In this embodiment, the contact between the total enclosing volume of the first virtual character and the total enclosing volume of the second virtual character can be understood as the overlap of the total enclosing volumes of the two virtual characters, and the size of the overlapping area may not be limited.
[0258] FIG8 is a schematic diagram of a contact between the total enclosing volumes of two virtual characters. As shown in FIG8 , the total enclosing volumes of the two virtual characters are cylinders, and the total enclosing volumes of the two virtual characters just touch each other.
[0259] Exemplarily, whether the total enclosing volume of the first virtual character is in contact with the total enclosing volume of the second virtual character may be determined in the following two ways.
[0260] Method 1: Determine a first distance between the center point of the overall enclosing volume of the first virtual character and the center point of the overall enclosing volume of the second virtual character. When the first distance is less than or equal to a preset distance, determine that the overall enclosing volume of the first virtual character is in contact with the overall enclosing volume of the second virtual character.
[0261] The total bounding volume moves with the virtual character. Each total bounding volume has a center point, and the distance between two total bounding volumes can be measured according to the distance between the center points.
[0262] Method 2 is to detect whether the total enclosing volume of the first virtual character overlaps with the total enclosing volume of the second virtual character. When the total enclosing volume of the first virtual character overlaps with the total enclosing volume of the second virtual character, it is determined that the total enclosing volume of the first virtual character is in contact with the total enclosing volume of the second virtual character.
[0263] S302: When the enclosing volume of the target body part of the first virtual character contacts the enclosing volume of the target body part of the second virtual character, and / or the total enclosing volume of the first virtual character contacts the total enclosing volume of the second virtual character, control the first virtual character and / or the second virtual character to become invisible.
[0264] In this embodiment, when the enclosing volumes of the target body parts of the two virtual characters and the total enclosing volumes are not in contact, the invisibility determination will not be triggered. As long as one of the enclosing volumes of the target body parts of the two virtual characters and the total enclosing volumes is in contact, the invisibility determination will be triggered.
[0265] The specific implementation of this step is described in the first embodiment and will not be repeated here.
[0266] In this embodiment, not only the enclosing volumes of each body part are defined for the virtual characters, but also a total enclosing volume is defined. When the total enclosing volumes of two virtual characters or the enclosing volumes of any body parts are in contact, a stealth determination will be triggered. When the enclosing volumes of the target body parts and the total enclosing volumes of the two virtual characters are not in contact, the stealth determination will not be triggered. This allows for more accurate detection of the virtual characters' physical contact, and further allows for stealth operations to be performed, giving users a better experience.
[0267] Based on Example 3, Example 4 of the present application provides a method for controlling a virtual character, which is used to illustrate the method for generating the total enclosing volume of the virtual character. Figure 9 is a flowchart of the method for controlling a virtual character provided by Example 4 of the present application. As shown in Figure 9, the method provided in this embodiment includes the following steps.
[0268] S401: Receive adjustment data of body parameters of a target virtual character input by a user, where the target virtual character includes a first virtual character and / or a second virtual character.
[0269] Optionally, in this embodiment, the body parameters of the virtual character can be adjusted, that is, the user can define the body parameters of the virtual character according to his or her needs. Exemplarily, the body parameters of the target virtual character include height and shoulder width.
[0270] The user can adjust the body parameters of the virtual character through the body adjustment page. For example, the user selects the virtual character in the body adjustment page and scales the virtual character as a whole, enlarging or reducing the virtual character as a whole. Alternatively, the user enters body adjustment parameters on the virtual character's body adjustment page, for example, enters the virtual character's height, or provides several height values for the user to choose from. The user can also adjust the virtual character's fatness or thinness, for example, enters the virtual character's shoulder width or provides several shoulder widths for the user to choose from. The virtual character's fatness or thinness can be adjusted by adjusting the virtual character's shoulder width.
[0271] S402: Adjust the body parameters of the target virtual character according to the body parameter adjustment data.
[0272] Based on the adjustment data, the body parameters of the target virtual character are updated.
[0273] S403: Obtain body parameters of the target virtual character.
[0274] When the executing entity is a first VR device used by a first user corresponding to a first virtual character, the first VR device reads the body parameters of the first virtual character from its own device memory, and requests the body parameters of the second virtual character from a second VR device used by a second user corresponding to the second virtual character. Alternatively, the body parameters of each virtual character are stored in a server, and the first VR device requests the body parameters of the first virtual character and the second virtual character from the server.
[0275] Optionally, the body parameters of the virtual character are determined by obtaining the positions of the skeletal points of the target virtual character and determining the body parameters of the target virtual character based on the positions of the skeletal points of the target virtual character. Exemplarily, the body parameters of the target virtual character include height and shoulder width. It is understood that if the target virtual character has multiple skeletal points, only the positions of the required skeletal points may be obtained. If the body parameters include height and shoulder width, only the positions of the skeletal points required to calculate the height and shoulder width are obtained.
[0276] For example, if the skeletal points of the target avatar include shoulder skeletal points, the distance between the two shoulder skeletal points is determined as the shoulder width. Alternatively, if the skeletal points of the target avatar include two hip skeletal points, the distance between the two hip skeletal points is determined as the shoulder width. The height of the target avatar can be determined based on the position of the head skeletal point, where the distance between the head skeletal point and the ground is the height of the target avatar.
[0277] S404: Determine the size of the total bounding volume of the target virtual character according to the body parameters of the target virtual character.
[0278] The shape of the target avatar's overall enclosing volume can be a system default shape or a user-selected shape. After determining the shape of the overall enclosing volume, the size of the overall enclosing volume is determined. The shape of the overall enclosing volume can be a cylinder, a cuboid, a cube, an ellipsoid, a sphere, or other irregular three-dimensional shapes, but this embodiment of the application is not limited thereto.
[0279] When the total enclosing volume of the target avatar is a cylinder, the size of the total enclosing volume of the target avatar is determined as follows: the height of the cylinder is determined to be equal to the height of the target avatar, and the radius of the cylinder is determined according to the shoulder width of the target avatar.
[0280] Optionally, the radius of the cylinder meets the following conditions: when the first virtual character shakes hands with the second virtual character, the enclosing volume of the first virtual character does not touch the enclosing volume of the second virtual character, that is, the cylinders of the two virtual characters do not touch. This is because, in some applications or scenarios, the two virtual characters need to perform a handshake interaction. If the radius of the cylinder is set too large, when the two virtual characters extend their hands to shake hands, the two cylinders will touch, causing the two virtual characters to become invisible and unable to achieve a handshake interaction. When the radius of the cylinder is set appropriately, when the two virtual characters extend their hands to shake hands, the two cylinders will not touch, and the two virtual characters will not become invisible, so that a normal handshake interaction can be performed.
[0281] For example, the radius of the cylinder is determined to be equal to r = L / 2 + N1, where L is the shoulder width of the target virtual character, N1 is an adjustment value greater than 0, and the value of N1 is set according to the application scenario. For example, the value of N1 is 5cm or 4cm. Through actual testing, when the value of N1 is less than or equal to 5cm, the radius of the cylinder does not affect the handshake interaction between the two virtual characters. Of course, in some scenarios or applications, users do not need to perform handshake interaction. In this case, the value of N1 can also be appropriately larger.
[0282] Optionally, the position of the target virtual character's total enclosing volume can also be determined based on the target virtual character's sternum position. The sternum position can be considered the virtual character's central axis, and a straight line passing through the sternum position and perpendicular to the ground is used as the central axis of the virtual character's enclosing volume. This central axis does not rotate with the virtual character and is less affected by changes in the virtual character's body parameters and the virtual character's posture. This allows for stable and accurate determination of the virtual character's enclosing volume, making enclosing volume contact judgment based on the position of the virtual character's enclosing volume more accurate.
[0283] In the total bounding volume of the cylinder, the position of the cylinder is represented by the central axis of the cylinder, which passes through the sternum of the target avatar and is perpendicular to the ground.
[0284] Figure 10 is a schematic diagram of the shoulder width and sternum position of a virtual character. As shown in Figure 10(a), the shoulder width of the virtual character is the distance between the two shoulder bones of the virtual character shown in Figure 10(a). A virtual character has a model. The external contour of the virtual character is formed by adding bones to the model. Currently, the virtual character model is usually obtained by skinning the virtual character's bones. For a virtual character, the position of the virtual character's bones is obtained. The distance between the bones is determined based on the position of the bones, thereby obtaining parameters such as shoulder width, arm length, leg length, palm length, head length, and head width. Modifying the body parameters of a virtual character actually means modifying the position of the virtual character's bones.
[0285] Figure 10(b) shows the sternum bone point of the virtual character. The sternum can be considered as the central axis of the human body. Therefore, the straight line passing through the sternum and perpendicular to the ground can be regarded as the central axis of the cylinder. This central axis can also be understood as the central axis of the virtual character.
[0286] When the target avatar's bounding volume is a rectangular parallelepiped, the dimensions of the target avatar's bounding volume are determined as follows: the height of the rectangular parallelepiped is equal to the target avatar's height, and the length and width of the rectangular parallelepiped are determined based on the target avatar's shoulder width. Within the rectangular parallelepiped's bounding volume, the position of the rectangular parallelepiped is represented by its central axis, which passes through the target avatar's sternum and is perpendicular to the ground.
[0287] Optionally, the length and width of the cuboid meet the following condition: when the first avatar shakes hands with the second avatar, the bounding volume of the first avatar and the bounding volume of the second avatar do not touch. That is, the cuboids of the two avatars do not touch. This is to ensure that the normal handshake interaction between the avatars is not affected. For more details, refer to the description of the cylinder radius setting.
[0288] Exemplarily, the length of the cuboid is determined to be equal to a=L+N2, and the width of the cuboid is determined to be equal to b=L / 2+N3, where L is the shoulder width of the avatar, N2 is an adjustment value greater than 0, N3 is an adjustment value greater than 0, the value of b is less than a, the length direction of the cuboid is parallel to the shoulder width direction of the target avatar, and the width direction of the cuboid is perpendicular to the shoulder width direction. The shoulder width direction of the target avatar can be understood as the direction of the line connecting the two shoulder bones. Exemplarily, the value of N2 is equal to 2, 2.5, or 3, and the value of N3 can be 1 or 2.
[0289] Optionally, in some embodiments, the length of the cuboid is determined according to the shoulder width of the virtual character, and the width of the cuboid and the length of the cuboid satisfy a certain ratio, for example, the width of the cuboid is 1 / 2 or 1 / 3 of the length.
[0290] It should be noted that in other embodiments of the present application, waist width, hip width, crotch width, etc. can be used instead of shoulder width (i.e., shoulder width) to determine the radius of the cylinder, or the length and width of the cuboid. Similarly, other skeletal points can be used instead of the sternum to determine the central axis of the overall enclosure.
[0291] In this embodiment, the body parameters of the target virtual character are obtained, and the size of the target virtual character's total enclosing volume is determined based on the body parameters of the target virtual character. The body parameters of the target virtual character include height and shoulder width. This ensures that the size of the target virtual character's total enclosing volume matches the virtual character's body type, making the range of the virtual character's total enclosing volume more reasonable. Furthermore, the body parameters of the target virtual character are adjustable, and the size of the virtual character's total enclosing volume adaptively changes as the body parameters of the target virtual character change.
[0292] Based on the above embodiments, Example 5 of the present application provides a method for controlling a virtual character, which is used to illustrate the method for determining the invisibility of a virtual character, that is, how to make an invisibility determination based on social protection information. Figure 11 is a flow chart of the method for controlling a virtual character provided in Example 5 of the present application. As shown in Figure 11, the method provided in this embodiment includes the following steps.
[0293] S501: Acquire social protection information of a first virtual character and social protection information of a second virtual character.
[0294] Exemplarily, the social protection information includes any one of the following information: everyone can approach, only friends can approach, no one can approach, designated users can not approach, designated users can approach and blacklisted users can not approach, wherein, when the unapproachable user approaches, the corresponding virtual character will become invisible.
[0295] S502: Determine a visibility result of the first virtual character based on the social protection information of the first virtual character and the identity information of the second virtual character, where the visibility result is used to indicate whether the virtual character is invisible.
[0296] The identity information of the second virtual character includes, but is not limited to, one or more of the following information: account number, gender, level, etc.
[0297] For example, when the social protection information of the first virtual character indicates that everyone can approach, the visibility result of the first virtual character is determined to be not invisible. In this scenario, it is not necessary to determine the visibility result of the first virtual character based on the identity information of the second virtual character.
[0298] When the social protection information of the first virtual character indicates that only friends can approach, it is determined whether the first virtual character and the second virtual character are friends. The friend list corresponding to the first virtual character and the account information of the second virtual character are read to determine whether the account of the first virtual character is in the friend list corresponding to the first virtual character. If the account of the first virtual character is in the friend list corresponding to the first virtual character, it is determined that the two are friends; otherwise, it is determined that the two are not friends. If the first virtual character and the second virtual character are friends, the result of the visibility and invisibility of the first virtual character is determined to be not invisible. If the first virtual character and the second virtual character are not friends, the result of the visibility and invisibility of the first virtual character is determined to be invisible.
[0299] When the social protection information of the first virtual character is that no one can approach, the visibility result of the first virtual character is determined to be invisible. In this scenario, it is not necessary to determine the visibility result of the first virtual character based on the identity information of the second virtual character.
[0300] The determination methods for other social protection information are similar and will not be listed here one by one.
[0301] It should be noted that for blacklist users, the following methods can be used to handle them: if the second virtual character is a user on the blacklist of the first virtual character, no invisible judgment is performed; or, after the invisible judgment is performed, the development result does not take effect, that is, the development result is not executed.
[0302] S503: Determine the visibility result of the second virtual character according to the social protection information of the second virtual character and the identity information of the first virtual character.
[0303] The method for determining the visibility result of the second virtual character is similar to the method for determining the visibility result of the first virtual character in step S502, and will not be repeated here.
[0304] S504: Determine whether the display and disappearance results of the first virtual character and the second virtual character are consistent.
[0305] When the display and hiding results of the first virtual character and the second virtual character are consistent, step S505 is executed. When the display and hiding results of the first virtual character and the second virtual character are inconsistent, step S506 is executed.
[0306] S505: Determine whether the display and hiding results of the first virtual character and the second virtual character are effective.
[0307] The results of the first virtual character and the second virtual character being shown and hidden are the same include: the first virtual character and the second virtual character are both invisible or both are not invisible.
[0308] S506: Determine to make the first virtual character and the second virtual character invisible.
[0309] This step is executed when the visibility results of the first virtual character and the second virtual character are inconsistent. The inconsistent visibility results of the first virtual character and the second virtual character mean that the visibility result of one virtual character is invisible, and the visibility result of the other virtual character is not invisible. In this case, it is determined that both virtual characters are invisible. It can be understood that the priority of the invisible operation is greater than the priority of the non-invisible operation. When the visibility results of the two virtual characters are inconsistent, the invisible operation with a higher priority is executed.
[0310] Figure 12 is a flowchart of the control method of the virtual character provided in Example 6 of the present application. The method of this embodiment can be executed by electronic devices such as XR devices, mobile phones, computers, servers, etc. The following embodiments are explained using VR devices as an example. As shown in Figure 12, the method of this embodiment includes the following steps.
[0311] S601: Determine whether the bounding volume of the first virtual character contacts the bounding volume of the second virtual character, wherein the size of the bounding volume is determined according to the body parameters of the corresponding virtual characters.
[0312] Taking VR devices as an example, there are multiple virtual characters in the virtual reality space. The virtual characters move or perform some tasks in the virtual reality space. Taking the first virtual character as an example, during the movement or task execution process, the first virtual character may have physical interactions with other virtual characters in the virtual reality space, or be physically harassed by other virtual characters.
[0313] In this embodiment, a bounding volume is set for each virtual character. This bounding volume is also called a bounding box, collision box, collision body, protection shield, protection box, safety zone, etc. This bounding volume can be considered as a transparent object that covers or surrounds all or part of the virtual character. This bounding volume is used to assist in detecting whether the virtual character has made physical contact. This bounding volume is invisible to the user.
[0314] The size of the bounding volume is determined based on the body parameters of the corresponding avatar. That is, avatars with different body parameters have corresponding bounding volumes of different sizes. For example, the body parameters include, but are not limited to, the avatar's height, shoulder width, hip circumference, waist circumference, and body proportions.
[0315] Accordingly, the height of the enclosing body is equal to or slightly greater than the height of the virtual character, the length, width or radius of the enclosing body is determined according to parameters such as the virtual character's shoulder width, hip circumference or waist circumference, and the position of the enclosing body is determined according to parameters such as the virtual character's sternum position or pelvic position.
[0316] The embodiment of the present application does not limit the shape of the enclosing body. The shape of the enclosing body can be a cylinder, a cube, a cuboid, an ellipsoid, a sphere, etc., and can also be some irregular three-dimensional shapes.
[0317] Taking a cylinder as an example, the height of the cylinder can be equal to the height of the avatar, and the radius of the cylinder can be determined based on the avatar's shoulder width. For example, the radius of the cylinder can be equal to half the shoulder width, or the radius of the cylinder can be equal to half the shoulder width plus an adjustment amount, such as 3 centimeters (cm), 5 centimeters, or 6 centimeters. The central axis of the cylinder can be determined based on the position of the avatar's sternum or pelvis.
[0318] FIG13 is a schematic diagram of the enclosing volume of the virtual character. As shown in FIG13 , the enclosing volume is a cylinder, and the circle in the figure shows the cross section of the enclosing volume.
[0319] In this embodiment, the contact between the enclosing volume of the first virtual character and the enclosing volume of the second virtual character can be understood as the overlap of the enclosing volumes of the two virtual characters, and the size of the overlapping area may not be limited.
[0320] FIG14 is a schematic diagram of a contact between the bounding volumes of two virtual characters. As shown in FIG14 , the bounding volumes of the two virtual characters are cylinders, and the bounding volumes of the two virtual characters just touch each other.
[0321] Exemplarily, whether the enclosing volume of the first virtual character is in contact with the enclosing volume of the second virtual character may be determined in the following two ways.
[0322] Method 1: Determine a first distance between the center point of the bounding volume of the first virtual character and the center point of the bounding volume of the second virtual character. When the first distance is less than or equal to a preset distance, determine that the bounding volume of the first virtual character is in contact with the bounding volume of the second virtual character.
[0323] The bounding volume moves with the virtual character. Each bounding volume has a center point, and the distance between two bounding volumes can be measured based on the distance between the center points.
[0324] Method 2 is to detect whether the enclosing volume of the first virtual character overlaps with the enclosing volume of the second virtual character. When the enclosing volume of the first virtual character overlaps with the enclosing volume of the second virtual character, it is determined that the enclosing volume of the first virtual character is in contact with the enclosing volume of the second virtual character.
[0325] In this embodiment, the execution entity can be a first terminal device used by a first user corresponding to the first virtual character, or a second terminal device used by a second user corresponding to the second virtual character. Both the first terminal device and the second terminal device can be XR devices, mobile phones, personal computers, etc. In actual scenarios, the first terminal device and the second terminal device each execute the virtual character control method of this embodiment, that is, each user determines whether they are in contact with other users from their own perspective, and then determines whether to become invisible.
[0326] The execution entity may also be a server, which communicates with the first terminal device and the second terminal device to provide a virtual scene to the first user and the second user.
[0327] S602: Control the first virtual character and / or the second virtual character to become invisible.
[0328] When the bounding volumes of two virtual characters come into contact, one of the two virtual characters may be made invisible, or both virtual characters may be made invisible.
[0329] The invisibility means that the current virtual character itself or other virtual characters are not displayed or are not fully displayed on the terminal corresponding to the virtual character. The incomplete display includes but is not limited to a certain degree of transparent display, only displaying the outline or only displaying the logo, etc.
[0330] When the first virtual character is invisible, the first virtual character or the second virtual character cannot see the first virtual character. When the second virtual character is invisible, the first virtual character or the second virtual character cannot see the second virtual character.
[0331] When both virtual characters are invisible, the visibility and invisibility status of the two virtual characters are always consistent. The visibility and invisibility status is used to indicate whether the virtual character is invisible or visible. That is, the visibility and invisibility status of the second virtual character as seen by the first virtual character is consistent with the visibility and invisibility status of the first virtual character as seen by the second virtual character. If the first virtual character sees the second virtual character as invisible, then the second virtual character will also see the first virtual character as invisible. If the first virtual character sees the second virtual character as visible, then the second virtual character will also see the first virtual character as visible.
[0332] In an exemplary invisibility method, after determining to make the first virtual character and / or the second virtual character invisible, the first virtual character and / or the second virtual character gradually become invisible within a preset time, and the preset time is, for example, 2S, that is, the first virtual character and / or the second virtual character gradually become invisible within 2S.
[0333] The invisibility process can be achieved through dynamic effects, for example, the color of the first virtual character and / or the second virtual character gradually becomes lighter to transparent, and then finally disappears completely, or the first virtual character and / or the second virtual character gradually shrinks from large to disappear.
[0334] In another exemplary invisibility mode, after determining that the first virtual character and / or the second virtual character are invisible, the first virtual character and / or the second virtual character can be instantly invisible. Instant invisibility is different from the gradual invisibility mentioned above, that is, the invisibility time of the two is different.
[0335] It's important to note that each avatar in a virtual scene only judges the avatar it's in contact with from its own perspective, and doesn't judge contact between other avatars. For example, if avatars B and C are in contact and become invisible, avatar A's perspective is unaffected; avatar A can still see avatars B and C, but avatars B and C cannot see each other.
[0336] After the first and / or second virtual characters become invisible, when the enclosing volume of the first and second virtual characters are not in contact, and the duration of this non-contact is equal to a preset duration, the invisible virtual characters are controlled to be displayed. In one implementation, the invisible virtual characters gradually appear within a preset time, such as 2 seconds. The preset time used during the invisible process and the appearance after the invisible process can be the same or different. The appearance after the invisible process is similar to the invisible process, so the two can be implemented using the same animation effect, which will not be detailed here. In another implementation, the invisible virtual characters appear instantly.
[0337] Optionally, when the first and / or second avatar characters become invisible, the invisible avatar's head card / held items remain displayed normally. A head card refers to a sign displayed above the avatar's head. The head card can display the user's nickname or account information. Optionally, the head card can also display the user's health bar or life value. Handheld items can be items held by the avatar, such as weapons or gifts.
[0338] In this embodiment, when the execution entities are the first terminal device and the second terminal device, the first terminal device and the second terminal device control the virtual characters in the displayed virtual scene to become invisible. When the execution entity is a server, the server sends a disappearance instruction to the first terminal device and the second terminal device, instructing the first and second virtual characters to become invisible.
[0339] Optionally, before controlling the first virtual character and / or the second virtual character to be invisible, that is, before step S602, determine whether to make the first virtual character and / or the second virtual character invisible based on the social protection information of the first virtual character and the social protection information of the second virtual character. If it is determined that the first virtual character and / or the second virtual character is to be invisible, execute step S602. If it is determined that the first virtual character and the second virtual character are not to be invisible, continue to determine whether the enclosing bodies of the virtual characters are in contact.
[0340] The social protection information is used to describe the approach permission information of the virtual character, where the approach permission information is used to indicate whether approaching the virtual character is allowed, and user information of users who are allowed to approach the virtual character and those who are not allowed to approach the virtual character.
[0341] Exemplarily, the social protection information includes any one of the following information: everyone can approach, only friends can approach, no one can approach, designated users can not approach, designated users can approach and blacklisted users can not approach, wherein, when the unapproachable user approaches, the corresponding virtual character will become invisible.
[0342] The social protection information of the first virtual character and the social protection information of the second virtual character are set by the users corresponding to the virtual characters. Accordingly, a configuration interface for the social protection information is provided to the user, and the user sets or selects the social protection information through the configuration interface for the social protection information.
[0343] Figure 15 is a schematic diagram of the configuration interface for social protection information. As shown in Figure 15, the user opens the settings interface through the app's settings function. The settings interface includes "Mobile Mode," "Voice," and "Privacy" setting options. After the user selects "Privacy," the interface shown in Figure 15(a) is displayed. The "Privacy" option can be understood as a first-level menu, which includes multiple second-level submenus, such as "Blacklist" and "Personal Social Shield."
[0344] Each second-level submenu includes a third-level submenu. For example, after the user selects the sub-menu button corresponding to "Personal Social Shield", the interface shown in Figure 15(b) is opened. The interface of Figure 15(b) is the configuration interface of social protection information. As shown in Figure 15(b), the configuration interface of social protection information has three options for the user to choose: everyone can approach, only friends can approach, and no one can approach.
[0345] After a user installs or logs in to the app, the default setting is "Everyone Can Approach." This means everyone can approach you, and neither avatar will become invisible in the event of close physical contact. The user can select "Only Friends Can Approach" or "No One Can Approach" through the interface shown in Figure 15(b). "Only Friends Can Approach" means only users in the user's friend list can approach, and other users will become invisible when approaching. "No One Can Approach" means no one can approach you, and they will become invisible when approaching.
[0346] It is understood that the configuration interface for social protection information is not limited to the interface shown in Figure 15. The configuration interface may also include more options, such as specifying users to be unapproachable, specifying users to be approachable, and blacklisting users to be unapproachable. Taking the example of specifying users to be unapproachable, the option to specify users to be unapproachable can further add one or more accounts of unapproachable users, or set a category of users to be unapproachable, for example, setting male users to be unapproachable. For the current user, the user specified in the option to specify users to be unapproachable will be invisible when approached, but other users will not be invisible when approached.
[0347] The "Specify Approachable Users" option is similar to the "Unapproachable Users" option. Users can add one or more accounts that can be approached, or set a category of users to be approachable, for example, only female users. For the current user, the user will not be invisible when the user specified in the "Specify Approachable Users" option approaches, but will be invisible when other users approach.
[0348] Optionally, a blacklist option can be set in the setting options of some applications, and users in the blacklist option can be set to be unable to approach.
[0349] The social protection information of the first and second virtual characters can be modified at any time based on user needs. Taking the game scenario as an example, the user can modify the social protection information before the game starts, and the user can also modify the social protection information during the game. For example, during the game, the first virtual character and the second virtual character come into contact, and according to the judgment result, both need to be invisible. At this time, the first user corresponding to the first virtual character modifies his or her own social protection. In this case, the above-mentioned invisibility determination result may not take effect, and the modified social protection information may be updated to perform the invisibility determination again, and the corresponding operation may be performed based on the determination result. Optionally, after the current invisibility determination result takes effect, the first virtual character may use the modified social protection information to perform the invisibility determination after coming into contact with the other virtual character.
[0350] In this embodiment, the first virtual character's bounding volume is determined to be in contact with the second virtual character's bounding volume, where the size of the bounding volume is determined based on the corresponding virtual character's body parameters, and the first virtual character and / or the second virtual character are controlled to become invisible. In this method, the virtual character's bounding volume (i.e., the safe zone) is automatically set based on the virtual character's body parameters, and the size of the bounding volume matches the virtual character's body parameters, making the range of the virtual character's safe zone more reasonable, thereby improving the user experience.
[0351] Based on Example 6, Example 7 of the present application provides a method for controlling a virtual character, which is used to illustrate the method for generating the enclosing volume of the virtual character. Figure 16 is a flowchart of the method for controlling a virtual character provided by Example 7 of the present application. As shown in Figure 16, the method provided in this embodiment includes the following steps.
[0352] S701: Receive adjustment data of body parameters of a target virtual character input by a user, where the target virtual character includes a first virtual character and / or a second virtual character.
[0353] Optionally, in this embodiment, the body parameters of the virtual character can be adjusted, that is, the user can define the body parameters of the virtual character according to his or her needs. Exemplarily, the body parameters of the target virtual character include height and shoulder width.
[0354] The user can adjust the body parameters of the virtual character through the body adjustment page. For example, the user selects the virtual character in the body adjustment page and scales the virtual character as a whole, enlarging or reducing the virtual character as a whole. Alternatively, the user enters body adjustment parameters on the virtual character's body adjustment page, for example, enters the virtual character's height, or provides several height values for the user to choose from. The user can also adjust the virtual character's fatness or thinness, for example, enters the virtual character's shoulder width or provides several shoulder widths for the user to choose from. The virtual character's fatness or thinness can be adjusted by adjusting the virtual character's shoulder width.
[0355] Optionally, the body parts of the virtual character may be adjusted, for example, adjusting the arm length, leg length, head circumference, etc., but this embodiment of the present application is not limited thereto.
[0356] S702: Adjust the body parameters of the target virtual character according to the body parameter adjustment data.
[0357] Based on the adjustment data, the body parameters of the target virtual character are updated.
[0358] S703: Obtain the body parameters of the target virtual character.
[0359] When the executing entity is a first VR device used by a first user corresponding to a first virtual character, the first VR device reads the body parameters of the first virtual character from its own device memory, and requests the body parameters of the second virtual character from a second VR device used by a second user corresponding to the second virtual character. Alternatively, the body parameters of each virtual character are stored in a server, and the first VR device requests the body parameters of the first virtual character and the second virtual character from the server.
[0360] Optionally, the body parameters of the virtual character are determined by obtaining the positions of the skeletal points of the target virtual character and determining the body parameters of the target virtual character based on the positions of the skeletal points of the target virtual character. Exemplarily, the body parameters of the target virtual character include height and shoulder width. It is understood that if the target virtual character has multiple skeletal points, only the positions of the required skeletal points may be obtained. If the body parameters include height and shoulder width, only the positions of the skeletal points required to calculate the height and shoulder width are obtained.
[0361] For example, if the skeletal points of the target avatar include shoulder skeletal points, the distance between the two shoulder skeletal points is determined as the shoulder width. Alternatively, if the skeletal points of the target avatar include two hip skeletal points, the distance between the two hip skeletal points is determined as the shoulder width. The height of the target avatar can be determined based on the position of the head skeletal point, where the distance between the head skeletal point and the ground is the height of the target avatar.
[0362] S704: Determine the size of the bounding volume of the target virtual character according to the body parameters of the target virtual character.
[0363] The shape of the target virtual character's bounding volume can be a default shape provided by the system or selected by the user. After determining the shape of the bounding volume, the size of the bounding volume is determined. The shape of the bounding volume can be a cylinder, a cuboid, a cube, an ellipsoid, a sphere, or other irregular three-dimensional shapes, which are not limited in this embodiment of the present application.
[0364] When the bounding volume of the target avatar is a cylinder, the size of the bounding volume of the target avatar is determined by determining the height of the cylinder to be equal to the height of the target avatar, and determining the radius of the cylinder according to the shoulder width of the target avatar.
[0365] Optionally, the radius of the cylinder meets the following conditions: when the first virtual character shakes hands with the second virtual character, the enclosing volume of the first virtual character does not touch the enclosing volume of the second virtual character, that is, the cylinders of the two virtual characters do not touch. This is because, in some applications or scenarios, the two virtual characters need to perform a handshake interaction. If the radius of the cylinder is set too large, when the two virtual characters extend their hands to shake hands, the two cylinders will touch, causing the two virtual characters to become invisible and unable to achieve a handshake interaction. When the radius of the cylinder is set appropriately, when the two virtual characters extend their hands to shake hands, the two cylinders will not touch, and the two virtual characters will not become invisible, so that a normal handshake interaction can be performed.
[0366] For example, the radius of the cylinder is determined to be equal to r = L / 2 + N1, where L is the shoulder width of the target virtual character, N1 is an adjustment value greater than 0, and the value of N1 is set according to the application scenario. For example, the value of N1 is 5cm or 4cm. Through actual testing, when the value of N1 is less than or equal to 5cm, the radius of the cylinder does not affect the handshake interaction between the two virtual characters. Of course, in some scenarios or applications, users do not need to perform handshake interaction. In this case, the value of N1 can also be appropriately larger.
[0367] Optionally, the position of the target virtual character's enclosing volume can also be determined based on the target virtual character's sternum position. The sternum position can be considered the virtual character's central axis, and a straight line passing through the sternum position and perpendicular to the ground is used as the central axis of the virtual character's enclosing volume. This central axis does not rotate with the virtual character and is less affected by changes in the virtual character's body parameters and the virtual character's posture. This allows for stable and accurate determination of the virtual character's enclosing volume, making enclosing volume contact judgment based on the position of the virtual character's enclosing volume more accurate.
[0368] In the bounding volume of the cylinder, the position of the cylinder is represented by the central axis of the cylinder, which passes through the sternum of the target avatar and is perpendicular to the ground.
[0369] Figure 17 is a schematic diagram of the shoulder width and sternum position of a virtual character. As shown in Figure 17(a), the shoulder width of the virtual character is the distance between the two shoulder bones of the virtual character shown in Figure 17(a). A virtual character has a model. The external contour of the virtual character is formed by adding bones to the model. Currently, the virtual character model is usually obtained by skinning the virtual character's bones. For a virtual character, the position of the virtual character's bones is obtained. The distance between the bones is determined based on the position of the bones, thereby obtaining parameters such as shoulder width, arm length, leg length, palm length, head length, and head width. Modifying the body parameters of a virtual character actually means modifying the position of the virtual character's bones.
[0370] Figure 17(b) shows the sternum bone point of the virtual character. The sternum can be considered as the central axis of the human body. Therefore, the straight line passing through the sternum and perpendicular to the ground can be regarded as the central axis of the cylinder. This central axis can also be understood as the central axis of the virtual character.
[0371] When the target avatar's bounding volume is a rectangular parallelepiped, the dimensions of the target avatar's bounding volume are determined as follows: the height of the rectangular parallelepiped is equal to the target avatar's height, and the length and width of the rectangular parallelepiped are determined based on the target avatar's shoulder width. Within the rectangular parallelepiped's bounding volume, the position of the rectangular parallelepiped is represented by the central axis of the rectangular parallelepiped, which passes through the target avatar's sternum and is perpendicular to the ground.
[0372] Optionally, the length and width of the cuboid meet the following condition: when the first avatar shakes hands with the second avatar, the bounding volume of the first avatar and the bounding volume of the second avatar do not touch. That is, the cuboids of the two avatars do not touch. This is to ensure that the normal handshake interaction between the avatars is not affected. For more details, refer to the description of the cylinder radius setting.
[0373] Exemplarily, the length of the cuboid is determined to be equal to a=L+N2, and the width of the cuboid is determined to be equal to b=L / 2+N3, where L is the shoulder width of the avatar, N2 is an adjustment value greater than 0, N3 is an adjustment value greater than 0, the value of b is less than a, the length direction of the cuboid is parallel to the shoulder width direction of the target avatar, and the width direction of the cuboid is perpendicular to the shoulder width direction. The shoulder width direction of the target avatar can be understood as the direction of the line connecting the two shoulder bones. Exemplarily, the value of N2 is equal to 2, 2.5, or 3, and the value of N3 can be 1 or 2.
[0374] Optionally, in some embodiments, the length of the cuboid is determined according to the shoulder width of the virtual character, and the width of the cuboid and the length of the cuboid satisfy a certain ratio, for example, the width of the cuboid is 1 / 2 or 1 / 3 of the length.
[0375] It should be noted that in other embodiments of the present application, waist width, hip width, crotch width, etc. can be used instead of shoulder width (i.e., shoulder width) to determine the radius of the cylinder, or the length and width of the cuboid. Similarly, other bone points can be used instead of the sternum to determine the central axis of the enclosed volume.
[0376] In this embodiment, the body parameters of the target virtual character are obtained, and the size of the target virtual character's bounding volume is determined based on the body parameters of the target virtual character. The body parameters of the target virtual character include height and shoulder width. This ensures that the size of the target virtual character's bounding volume matches the virtual character's body type, making the range of the virtual character's bounding volume more reasonable. In addition, the body parameters of the target virtual character are adjustable, and the size of the virtual character's bounding volume adaptively changes as the body parameters of the target virtual character change.
[0377] Based on the sixth and seventh embodiments, the eighth embodiment of the present application provides a method for controlling a virtual character, which is used to illustrate the method for determining the invisibility of a virtual character, that is, how to make an invisibility determination based on social protection information. Figure 18 is a flow chart of the method for controlling a virtual character provided by the eighth embodiment of the present application. As shown in Figure 18, the method provided in this embodiment includes the following steps.
[0378] S801: Acquire social protection information of a first virtual character and social protection information of a second virtual character.
[0379] Exemplarily, the social protection information includes any one of the following information: everyone can approach, only friends can approach, no one can approach, designated users can not approach, designated users can approach and blacklisted users can not approach, wherein, when the unapproachable user approaches, the corresponding virtual character will become invisible.
[0380] S802: Determine a visibility result of the first virtual character based on the social protection information of the first virtual character and the identity information of the second virtual character, where the visibility result is used to indicate whether the virtual character is invisible.
[0381] The identity information of the second virtual character includes, but is not limited to, one or more of the following information: account number, gender, level, etc.
[0382] For example, when the social protection information of the first virtual character indicates that everyone can approach, the visibility result of the first virtual character is determined to be not invisible. In this scenario, it is not necessary to determine the visibility result of the first virtual character based on the identity information of the second virtual character.
[0383] When the social protection information of the first virtual character indicates that only friends can approach, it is determined whether the first virtual character and the second virtual character are friends. The friend list corresponding to the first virtual character and the account information of the second virtual character are read to determine whether the account of the first virtual character is in the friend list corresponding to the first virtual character. If the account of the first virtual character is in the friend list corresponding to the first virtual character, it is determined that the two are friends; otherwise, it is determined that the two are not friends. If the first virtual character and the second virtual character are friends, the result of the visibility and invisibility of the first virtual character is determined to be not invisible. If the first virtual character and the second virtual character are not friends, the result of the visibility and invisibility of the first virtual character is determined to be invisible.
[0384] When the social protection information of the first virtual character is that no one can approach, the visibility result of the first virtual character is determined to be invisible. In this scenario, it is not necessary to determine the visibility result of the first virtual character based on the identity information of the second virtual character.
[0385] The determination methods for other social protection information are similar and will not be listed here one by one.
[0386] It should be noted that for blacklist users, the following methods can be used to handle them: if the second virtual character is a user on the blacklist of the first virtual character, no invisible judgment is performed; or, after the invisible judgment is performed, the development result does not take effect, that is, the development result is not executed.
[0387] S803: Determine the visibility result of the second virtual character according to the social protection information of the second virtual character and the identity information of the first virtual character.
[0388] The method for determining the visibility result of the second virtual character is similar to the method for determining the visibility result of the first virtual character in step S302, and will not be repeated here.
[0389] S804: Determine whether the display and disappearance results of the first virtual character and the second virtual character are consistent.
[0390] When the results of revealing and hiding the first virtual character and the second virtual character are consistent, step S305 is executed. When the results of revealing and hiding the first virtual character and the second virtual character are inconsistent, step S306 is executed.
[0391] S805: Determine whether the display and hiding results of the first virtual character and the second virtual character are effective.
[0392] The results of the first virtual character and the second virtual character being shown and hidden are the same include: the first virtual character and the second virtual character are both invisible or both are not invisible.
[0393] S806: Determine to make the first virtual character and the second virtual character invisible.
[0394] This step is executed when the visibility results of the first virtual character and the second virtual character are inconsistent. The inconsistent visibility results of the first virtual character and the second virtual character mean that the visibility result of one virtual character is invisible, and the visibility result of the other virtual character is not invisible. In this case, it is determined that both virtual characters are invisible. It can be understood that the priority of the invisible operation is greater than the priority of the non-invisible operation. When the visibility results of the two virtual characters are inconsistent, the invisible operation with a higher priority is executed.
[0395] To facilitate better implementation of the virtual character control method of the embodiment of the present application, the embodiment of the present application also provides a virtual character control device. Figures 19A and 19B are schematic structural diagrams of the virtual character control device provided in the ninth and tenth embodiments of the present application. As shown in Figure 19A, the virtual character control device 100 may include:
[0396] a contact detection module 11 for determining whether a bounding volume of a target body part of a first virtual character contacts a bounding volume of a target body part of a second virtual character, wherein both the first virtual character and the second virtual character are provided with bounding volumes of multiple body parts;
[0397] The stealth module 12 is used to control the first virtual character and / or the second virtual character to be invisible.
[0398] In some embodiments, the multiple body part enclosures include: two hand enclosures, a head enclosure, two thigh enclosures, two calf enclosures, and a torso and hip enclosure.
[0399] In some embodiments, the size of the bounding volume of each body part is determined according to the size of the corresponding body part.
[0400] In some embodiments, the device also includes a determination module for: obtaining the size of each body part of the target virtual character, the target virtual character including the first virtual character and / or the second virtual character; and determining the size of the enclosing volume of each body part of the target virtual character based on the size of each body part of the target virtual character.
[0401] In some embodiments, the determining module is further configured to:
[0402] receiving size adjustment data of a body part of the target virtual character input by a user;
[0403] The size of the body part of the target virtual character is adjusted according to the size adjustment data.
[0404] In some embodiments, the bounding volumes of the multiple body parts adopt one or more of the following shapes: a cuboid, a cylinder, a cube, an ellipsoid, or a sphere.
[0405] In some embodiments, the system further includes a stealth determination module configured to:
[0406] Obtaining a category of a bounding volume of a target body part of the first virtual character and a category of a bounding volume of a target body part of the second virtual character;
[0407] When the category of the bounding box of the target body part of the first virtual character matches the category of the bounding box of the target body part of the second virtual character, it is determined that the first virtual character and / or the second virtual character are to be made invisible.
[0408] In some embodiments, the categories of the bounding volumes of the multiple body parts of the first virtual character include at least two categories, and the categories of the bounding volumes of the multiple body parts of the second virtual character include at least two categories.
[0409] In some embodiments, the categories of the bounding volumes of the multiple body parts of the first virtual character include subjects and receptors, and the categories of the bounding volumes of the multiple body parts of the second virtual character include subjects and receptors, the subjects are the categories of the bounding volumes of the hands, and the receptors are the categories of the bounding volumes of the other body parts except the hands;
[0410] The category of the bounding volume of the target body part of the first virtual character matches the category of the bounding volume of the target body part of the second virtual character, including:
[0411] The category of the bounding volume of the target body part of the first virtual character is a subject, and the category of the bounding volume of the target body part of the second virtual character is a receptor.
[0412] In some embodiments, the stealth module 12 is further configured to:
[0413] Obtaining a movement distance of the enclosing volume of the subject category within a preset time period before the enclosing volume of the target body part of the first virtual character contacts the enclosing volume of the target body part of the second virtual character;
[0414] When the moving distance is greater than a preset distance, the first virtual character and / or the second virtual character is controlled to become invisible.
[0415] In some embodiments, the contact detection module 11 is specifically configured to:
[0416] Determining a first distance between a center point of a bounding volume of a target body part of the first virtual character and a center point of a bounding volume of a target body part of the second virtual character;
[0417] When the first distance is less than or equal to a preset distance, it is determined that the bounding volume of the target body part of the first virtual character is in contact with the bounding volume of the target body part of the second virtual character.
[0418] In some embodiments, the contact detection module 11 is specifically configured to:
[0419] detecting whether a bounding volume of a target body part of the first virtual character overlaps with a bounding volume of a target body part of the second virtual character;
[0420] When the bounding volume of the target body part of the first virtual character overlaps with the bounding volume of the target body part of the second virtual character, it is determined that the bounding volume of the target body part of the first virtual character is in contact with the bounding volume of the target body part of the second virtual character.
[0421] In some embodiments, the contact detection module 11 is further configured to:
[0422] detecting whether a total enclosing volume of the first virtual character contacts a total enclosing volume of the second virtual character, wherein the size of the total enclosing volume is determined according to body parameters of the corresponding virtual characters;
[0423] When the total enclosing volume of the first virtual character contacts the total enclosing volume of the second virtual character, the first virtual character and / or the second virtual character are controlled to become invisible.
[0424] In some embodiments, the determining module is further configured to:
[0425] Acquire positions of skeleton points of a target virtual character, where the target virtual character includes the first virtual character and / or the second virtual character;
[0426] Determining body parameters of the target virtual character according to positions of the skeleton points of the target virtual character;
[0427] The size of the total bounding volume of the target virtual character is determined according to the body parameters of the target virtual character.
[0428] In some embodiments, the body parameters of the target virtual character include height and shoulder width.
[0429] In some embodiments, the determination module is further configured to determine the position of the overall bounding volume of the target virtual character according to the sternum position of the target virtual character.
[0430] In some embodiments, the determining module is further configured to:
[0431] receiving adjustment data of the body parameters of the target virtual character input by a user;
[0432] The body parameters of the target virtual character are adjusted according to the body parameter adjustment data.
[0433] In some embodiments, the total bounding volume of the target virtual character is a cylinder, and the determining module is specifically configured to:
[0434] Determining that the height of the cylinder is equal to the height of the target virtual character;
[0435] The radius of the cylinder is determined according to the shoulder width of the target virtual character.
[0436] In some embodiments, the determination module is specifically configured to: determine that the radius of the cylinder is equal to r=L / 2+N1, where L is the shoulder width of the target virtual character, and N1 is an adjustment value greater than 0.
[0437] In some embodiments, the total bounding volume of the target virtual character is a cuboid, and the determining module is specifically configured to:
[0438] Determining that the height of the cuboid is equal to the height of the target virtual character;
[0439] The length and width of the cuboid are determined according to the shoulder width of the target virtual character.
[0440] In some embodiments, the determining module is specifically configured to:
[0441] Determining that the length of the cuboid is equal to a=L+N2, where L is the shoulder width of the avatar, N2 is an adjustment amount greater than 0, and the length direction of the cuboid is parallel to the shoulder width direction of the target avatar;
[0442] The width of the rectangular parallelepiped is determined to be equal to b=L / 2+N3, N3 is an adjustment amount greater than 0, and the value of b is less than a.
[0443] In some embodiments, the radius of the cylinder satisfies the following condition: when the first virtual character shakes hands with the second virtual character, the bounding volume of the first virtual character does not contact the bounding volume of the second virtual character.
[0444] In some embodiments, the length and width of the cuboid satisfy the following condition: when the first virtual character shakes hands with the second virtual character, the bounding volume of the first virtual character does not touch the bounding volume of the second virtual character.
[0445] In some embodiments, the contact detection module 11 is specifically configured to:
[0446] Determining a first distance between a center point of a total bounding volume of the first virtual character and a center point of a total bounding volume of the second virtual character;
[0447] When the first distance is less than or equal to a preset distance, it is determined that the total enclosing volume of the first virtual character is in contact with the total enclosing volume of the second virtual character.
[0448] In some embodiments, the contact detection module 11 is specifically configured to:
[0449] detecting whether a total enclosing volume of the first virtual character overlaps with a total enclosing volume of the second virtual character;
[0450] When the total enclosing volume of the first virtual character overlaps with the total enclosing volume of the second virtual character, it is determined that the total enclosing volume of the first virtual character is in contact with the total enclosing volume of the second virtual character.
[0451] In some embodiments, the system further includes a stealth determination module configured to:
[0452] According to the social protection information of the first virtual character and the social protection information of the second virtual character, it is determined to make the first virtual character and / or the second virtual character invisible.
[0453] In some embodiments, the social protection information includes any one of the following information: everyone can approach, only friends can approach, everyone cannot approach, designated users cannot approach, designated users can approach and blacklisted users cannot approach;
[0454] Among them, when the user approaches, the corresponding virtual character will become invisible.
[0455] In some embodiments, the stealth determination module is specifically configured to:
[0456] Determining a visibility result of the first virtual character based on the social protection information of the first virtual character and the identity information of the second virtual character, wherein the visibility result is used to indicate whether the virtual character is invisible;
[0457] Determining a result of revealing or hiding the second virtual character based on the social protection information of the second virtual character and the identity information of the first virtual character;
[0458] Determining whether the appearance and disappearance results of the first virtual character and the second virtual character are consistent;
[0459] When the revealing and hiding results of the first virtual character and the second virtual character are consistent, determining that the revealing and hiding results of the first virtual character and the second virtual character are effective;
[0460] When the revealing and hiding results of the first virtual character and the second virtual character are inconsistent, it is determined to make the first virtual character and the second virtual character invisible.
[0461] In some embodiments, when the first virtual character and / or the second virtual character becomes invisible, the head cards / held items of the invisible virtual characters are displayed normally.
[0462] In some embodiments, the stealth module 12 is further used to control the display of the invisible virtual character when the enclosing body of the target body part of the first virtual character and the enclosing body of the target body part of the second virtual character are not in contact, and the duration of the non-contact is equal to a preset duration.
[0463] [Corrected 02.02.2024 according to Rule 91] As shown in FIG19B , the control device 110 of the virtual character may include:
[0464] a contact detection module 13, configured to determine whether the bounding volume of the first virtual character contacts the bounding volume of the second virtual character, wherein the size of the bounding volume is determined according to the body parameters of the corresponding virtual characters;
[0465] The stealth module 14 is used to control the first virtual character and / or the second virtual character to be invisible.
[0466] In some embodiments, the apparatus further comprises a determination module configured to: obtain positions of skeletal points of a target virtual character, the target virtual character including the first virtual character and / or the second virtual character;
[0467] Determining body parameters of the target virtual character according to positions of the skeleton points of the target virtual character;
[0468] The size of the bounding volume of the target virtual character is determined according to the body parameters of the target virtual character.
[0469] In some embodiments, the body parameters of the target virtual character include height and shoulder width.
[0470] In some embodiments, the determining module is further configured to:
[0471] The position of the bounding volume of the target virtual character is determined according to the sternum position of the target virtual character.
[0472] In some embodiments, the determining module is further configured to:
[0473] receiving adjustment data of the body parameters of the target virtual character input by a user;
[0474] The body parameters of the target virtual character are adjusted according to the body parameter adjustment data.
[0475] In some embodiments, the determining module is specifically configured to:
[0476] Determining that the height of the cylinder is equal to the height of the target virtual character;
[0477] The radius of the cylinder is determined according to the shoulder width of the target virtual character.
[0478] In some embodiments, the determining module is specifically configured to:
[0479] The radius of the cylinder is determined to be equal to r=L / 2+N1, where L is the shoulder width of the target virtual character, and N1 is an adjustment amount greater than 0.
[0480] In some embodiments, the bounding volume of the target virtual character is a cuboid, and the determining module is specifically configured to:
[0481] Determining that the height of the cuboid is equal to the height of the target virtual character;
[0482] The length and width of the cuboid are determined according to the shoulder width of the target virtual character.
[0483] In some embodiments, the determining module is specifically configured to:
[0484] Determining that the length of the cuboid is equal to a=L+N2, where L is the shoulder width of the avatar, N2 is an adjustment amount greater than 0, and the length direction of the cuboid is parallel to the shoulder width direction of the target avatar;
[0485] The width of the rectangular parallelepiped is determined to be equal to b=L / 2+N3, N3 is an adjustment amount greater than 0, and the value of b is less than a.
[0486] In some embodiments, the radius of the cylinder satisfies the following condition: when the first virtual character shakes hands with the second virtual character, the bounding volume of the first virtual character does not contact the bounding volume of the second virtual character.
[0487] In some embodiments, the length and width of the cuboid satisfy the following condition: when the first virtual character shakes hands with the second virtual character, the bounding volume of the first virtual character does not touch the bounding volume of the second virtual character.
[0488] In some embodiments, the contact detection module 13 is specifically configured to:
[0489] Determining a first distance between a center point of a bounding volume of the first virtual character and a center point of a bounding volume of the second virtual character;
[0490] When the first distance is less than or equal to a preset distance, it is determined that the enclosing volume of the first virtual character is in contact with the enclosing volume of the second virtual character.
[0491] In some embodiments, the contact detection module 13 is specifically configured to:
[0492] detecting whether the bounding volume of the first virtual character overlaps with the bounding volume of the second virtual character;
[0493] When the enclosing volume of the first virtual character overlaps with the enclosing volume of the second virtual character, it is determined that the enclosing volume of the first virtual character is in contact with the enclosing volume of the second virtual character.
[0494] In some embodiments, the device 110 further includes a stealth determination module, configured to determine whether to make the first virtual character and / or the second virtual character invisible based on the social protection information of the first virtual character and the social protection information of the second virtual character.
[0495] In some embodiments, the social protection information includes any one of the following information: everyone can approach, only friends can approach, everyone cannot approach, designated users cannot approach, designated users can approach and blacklisted users cannot approach;
[0496] Among them, when the user approaches, the corresponding virtual character will become invisible.
[0497] In some embodiments, the stealth determination module is specifically configured to:
[0498] Determining a visibility result of the first virtual character based on the social protection information of the first virtual character and the identity information of the second virtual character, wherein the visibility result is used to indicate whether the virtual character is invisible;
[0499] Determining a result of revealing or hiding the second virtual character based on the social protection information of the second virtual character and the identity information of the first virtual character;
[0500] Determining whether the appearance and disappearance results of the first virtual character and the second virtual character are consistent;
[0501] When the revealing and hiding results of the first virtual character and the second virtual character are consistent, determining that the revealing and hiding results of the first virtual character and the second virtual character are effective;
[0502] When the revealing and hiding results of the first virtual character and the second virtual character are inconsistent, it is determined to make the first virtual character and the second virtual character invisible.
[0503] In some embodiments, when the first virtual character and the second virtual character are invisible, the head cards and / or handheld items of the invisible virtual characters are displayed normally.
[0504] In some embodiments, the stealth module 14 is further configured to control the display of the invisible virtual character when the enclosing body of the first virtual character and the enclosing body of the second virtual character are not in contact, and the duration of the non-contact is equal to a preset duration.
[0505] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here.
[0506] The above describes the device 100 of the embodiment of the present application from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in conjunction with its hardware.
[0507] The embodiment of the present application further provides an electronic device. FIG20 is a schematic diagram of the structure of an electronic device provided in the eleventh embodiment of the present application. As shown in FIG20 , the electronic device 200 may include:
[0508] Memory 21, processor 22, and dual-camera module 23. The memory 21 is used to store computer programs and transmit the program code to the processor 22. In other words, the processor 22 can call and run the computer program from the memory 21 to implement the method in the embodiment of the present application. The dual-camera module 23 is used to capture images and send them to the memory 21 and processor 22 for processing.
[0509] For example, the processor 22 may be configured to execute the above method embodiments according to instructions in the computer program.
[0510] In some embodiments of the present application, the processor 22 may include but is not limited to:
[0511] General-purpose processor, Digital Signal Processor (DSP), Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
[0512] In some embodiments of the present application, the memory 21 includes but is not limited to:
[0513] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0514] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 21 and executed by the processor 22 to implement the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0515] As shown in FIG. 20 , the electronic device 200 may further include: a transceiver 24 , which may be connected to the processor 22 or the memory 21 .
[0516] The processor 22 can control the transceiver 24 to communicate with other devices. Specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 23 may include a transmitter and a receiver. The transceiver 24 may further include an antenna, which may be one or more.
[0517] It can be understood that, although not shown in FIG. 20 , the electronic device 200 may further include a wireless fidelity WIFI module, a positioning module, a Bluetooth module, a display, a controller, etc., which will not be described in detail here.
[0518] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
[0519] The present application also provides a computer storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment. In other words, the present application also provides a computer program product containing instructions, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment.
[0520] This application also provides a computer program product, comprising a computer program stored in a computer-readable storage medium. A processor of an electronic device reads the computer program from the computer-readable storage medium and executes the computer program, causing the electronic device to perform the corresponding processes of the map relocalization method incorporating semantic information in the embodiments of this application. For the sake of brevity, these processes are not further described here.
[0521] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules 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 devices or modules, which can be electrical, mechanical or other forms.
[0522] Modules described as separate components may or may not be physically separate, and components displayed as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected based on actual needs to achieve the purpose of the present embodiment. For example, the functional modules in the various embodiments of the present application may be integrated into a processing module, each module may exist physically separately, or two or more modules may be integrated into a single module.
[0523] The above is only a specific embodiment of the present application, but the scope of protection of the present application is not limited to this. Any changes or substitutions that can be easily conceived by any person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A control method for a virtual character, characterized in that, Including: Determine that the bounding volume of the target body part of the first virtual character contacts the bounding volume of the target body part of the second virtual character, where both the first virtual character and the second virtual character are provided with bounding volumes of multiple body parts; Control the first virtual character and / or the second virtual character to become invisible.
2. The method according to claim 1, wherein The bounding volumes of the multiple body parts include: bounding volumes of two hands, a bounding volume of the head, bounding volumes of two thighs, bounding volumes of two calves, and a bounding volume of the torso and buttocks.
3. The method according to claim 1, characterized in that The size of the bounding volume of each body part is determined according to the size of the corresponding body part.
4. The method according to claim 3, wherein It further includes: Obtain the sizes of the body parts of the target virtual character, where the target virtual character includes the first virtual character and / or the second virtual character; Determine the sizes of the bounding volumes of the body parts of the target virtual character according to the sizes of the body parts of the target virtual character.
5. The method according to claim 4, characterized in that, It further includes: Receive the size adjustment data of the body part of the target virtual character input by the user; Adjust the size of the body part of the target virtual character according to the size adjustment data.
6. The method according to any one of claims 1-5, characterized in that, The bounding volumes of the multiple body parts adopt one or more of the following shapes: cuboid, cylinder, cube, ellipsoid, or sphere.
7. The method according to any one of claims 1-5, characterized in that, Before controlling the first virtual character and / or the second virtual character to become invisible, it further includes: Obtain the category of the bounding volume of the target body part of the first virtual character and the category of the bounding volume of the target body part of the second virtual character; When the category of the bounding volume of the target body part of the first virtual character matches the category of the bounding volume of the target body part of the second virtual character, determine to make the first virtual character and / or the second virtual character invisible.
8. The method according to claim 7, wherein The categories of the bounding volumes of the multiple body parts of the first virtual character include at least two categories, and the categories of the bounding volumes of the multiple body parts of the second virtual character include at least two categories.
9. The method according to claim 8, wherein The categories of the bounding volumes of the multiple body parts of the first virtual character include a main body and a receptor, and the categories of the bounding volumes of the multiple body parts of the second virtual character include a main body and a receptor. The main body is the category of the bounding volume of the hand, and the receptor is the category of the bounding volumes of the other body parts except the hand; The category of the bounding volume of the target body part of the first virtual character matching the category of the bounding volume of the target body part of the second virtual character includes: The category of the bounding volume of the target body part of the first virtual character is the main body, and the category of the bounding volume of the target body part of the second virtual character is the receptor.
10. The method according to claim 9, characterized in that, Before controlling the first virtual character and / or the second virtual character to become invisible, it further includes: Obtain the moving distance of the bounding volume of the main body category within a preset time period before the bounding volume of the target body part of the first virtual character contacts the bounding volume of the target body part of the second virtual character; When the moving distance is greater than the preset distance, control the first virtual character and / or the second virtual character to become invisible.
11. The method according to any one of claims 1 to 5, characterized in that, The determination that the bounding volume of the target body part of the first virtual character contacts the target bounding volume of the body part of the second virtual character includes: Determine a first distance between the center point of the bounding volume of the target body part of the first virtual character and the center point of the bounding volume of the target body part of the second virtual character; When the first distance is less than or equal to a preset distance, determine that the bounding volume of the target body part of the first virtual character contacts the bounding volume of the target body part of the second virtual character.
12. The method according to any one of claims 1-5, characterized in that, The determination that the bounding volume of the target body part of the first virtual character contacts the bounding volume of the target body part of the second virtual character includes: Detect whether the bounding volume of the target body part of the first virtual character overlaps with the bounding volume of the target body part of the second virtual character; When the bounding volume of the target body part of the first virtual character overlaps with the bounding volume of the target body part of the second virtual character, determine that the bounding volume of the target body part of the first virtual character contacts the bounding volume of the target body part of the second virtual character.
13. The method according to claim 1, characterized in that, Before controlling the first virtual character and / or the second virtual character to become invisible, it further includes: Detect whether the total bounding volume of the first virtual character contacts the total bounding volume of the second virtual character, where the size of the total bounding volume is determined according to the body type parameters of the corresponding virtual character; When the total bounding volume of the first virtual character contacts the total bounding volume of the second virtual character, control the first virtual character and / or the second virtual character to become invisible.
14. The method according to claim 13, wherein It further includes: Obtain the positions of the bone points of the target virtual character, where the target virtual character includes the first virtual character and / or the second virtual character; Determine the body type parameters of the target virtual character according to the positions of the bone points of the target virtual character; Determine the size of the total bounding volume of the target virtual character according to the body type parameters of the target virtual character.
15. The method according to claim 14, characterized in that, The body type parameters of the target virtual character include height and shoulder width.
16. The method according to claim 15, wherein It further includes: Determine the position of the total bounding volume of the target virtual character according to the position of the sternum of the target virtual character.
17. The method according to claim 14, wherein It further includes: Receive the adjustment data of the body type parameters of the target virtual character input by the user; Adjust the body type parameters of the target virtual character according to the adjustment data of the body type parameters.
18. The method according to claim 15, characterized in that, The total bounding volume of the target virtual character is a cylinder, and determining the size of the total bounding volume of the target virtual character according to the body type parameters of the target virtual character includes: Determine that the height of the cylinder is equal to the height of the target virtual character; Determine the radius of the cylinder according to the shoulder width of the target virtual character.
19. The method according to claim 18, characterized in that, Determining the radius of the cylinder according to the shoulder width of the target virtual character includes: Determine that the radius of the cylinder is equal to r = L / 2 + N1, where L is the shoulder width of the target virtual character and N1 is an adjustment amount greater than 0.
20. The method according to claim 15, wherein The total bounding volume of the target virtual character is a cuboid, and determining the size of the total bounding volume of the target virtual character according to the body type parameters of the target virtual character includes: Determine that the height of the cuboid is equal to the height of the target virtual character; Determine the length and width of the cuboid according to the shoulder width of the target virtual character.
21. The method according to claim 20, characterized in that, Determining the length and width of the cuboid according to the shoulder width of the target virtual character includes: Determining that the length of the cuboid is equal to a = L + N2, where L is the shoulder width of the virtual character, N2 is an adjustment amount greater than 0, and the length direction of the cuboid is parallel to the shoulder width direction of the target virtual character; Determining that the width of the cuboid is equal to b = L / 2 + N3, N3 is an adjustment amount greater than 0, and the value of b is less than a.
22. The method according to claim 18 or 19, characterized in that, The radius of the cylinder satisfies the following condition: when the first virtual character shakes hands with the second virtual character, the bounding volume of the first virtual character does not contact the bounding volume of the second virtual character.
23. The method according to claim 20 or 21, characterized in that, The length and width of the cuboid satisfy the following condition: when the first virtual character shakes hands with the second virtual character, the bounding volume of the first virtual character does not contact the bounding volume of the second virtual character.
24. The method according to claim 13, wherein Detecting whether the total bounding volume of the first virtual character contacts the total bounding volume of the second virtual character includes: Determining a first distance between the center point of the total bounding volume of the first virtual character and the center point of the total bounding volume of the second virtual character; When the first distance is less than or equal to a preset distance, determining that the total bounding volume of the first virtual character contacts the total bounding volume of the second virtual character.
25. The method according to claim 13, wherein Detecting whether the total bounding volume of the first virtual character contacts the total bounding volume of the second virtual character includes: Detecting whether the total bounding volume of the first virtual character overlaps with the total bounding volume of the second virtual character; When the total bounding volume of the first virtual character overlaps with the total bounding volume of the second virtual character, determining that the total bounding volume of the first virtual character contacts the total bounding volume of the second virtual character.
26. The method according to any one of claims 1-5, characterized in that, Before controlling the first virtual character and / or the second virtual character to become invisible, it further includes: According to the social protection information of the first virtual character and the social protection information of the second virtual character, determining to make the first virtual character and / or the second virtual character invisible.
27. The method according to claim 26, wherein The social protection information includes any one of the following information: everyone can approach, only friends can approach, everyone cannot approach, specified users cannot approach, specified users can approach, blacklisted users cannot approach; Among them, when a user who cannot approach approaches, the corresponding virtual character will become invisible.
28. The method according to claim 27, characterized in that, Determining to make the first virtual character and / or the second virtual character invisible according to the social protection information of the first virtual character and the social protection information of the second virtual character includes: Determining the visibility result of the first virtual character according to the social protection information of the first virtual character and the identity information of the second virtual character, and the visibility result is used to indicate whether the virtual character is invisible; Determining the visibility result of the second virtual character according to the social protection information of the second virtual character and the identity information of the first virtual character; Judging whether the visibility results of the first virtual character and the second virtual character are consistent; When the visibility results of the first virtual character and the second virtual character are consistent, determining that the visibility results of the first virtual character and the second virtual character take effect; When the visibility results of the first virtual character and the second virtual character are inconsistent, determine to make the first virtual character and the second virtual character invisible.
29. The method according to any one of claims 1-5, characterized in that, After the first virtual character and / or the second virtual character becomes invisible, the nameplate / held item of the invisible virtual character is normally displayed.
30. The method according to any one of claims 1-5, characterized in that, After controlling the first virtual character and / or the second virtual character to become invisible, it further includes: When the bounding volumes of the target body parts of the first virtual character and the bounding volumes of the target body parts of the second virtual character do not touch, and the non-touching duration is equal to the preset duration, control the invisible virtual character to be displayed.
31. A control device for a virtual character, characterized in that, It includes: A contact detection module for determining that the bounding volume of the target body part of the first virtual character contacts the bounding volume of the target body part of the second virtual character, where the first virtual character and the second virtual character are both provided with bounding volumes of multiple body parts; An invisibility module for controlling the first virtual character and / or the second virtual character to become invisible.
32. A control method for a virtual character, characterized in that It includes: Determine that the bounding volume of the first virtual character contacts the bounding volume of the second virtual character, where the size of the bounding volume is determined according to the body size parameters of the corresponding virtual character; Control the first virtual character and / or the second virtual character to become invisible.
33. The method according to claim 32, wherein It further includes: Obtain the positions of the bone points of the target virtual character, where the target virtual character includes the first virtual character and / or the second virtual character; Determine the body size parameters of the target virtual character according to the positions of the bone points of the target virtual character; Determine the size of the bounding volume of the target virtual character according to the body size parameters of the target virtual character.
34. The method according to claim 33, characterized in that, The body size parameters of the target virtual character include height and shoulder width.
35. The method according to claim 33, characterized in that, It further includes: Determine the position of the bounding volume of the target virtual character according to the position of the sternum of the target virtual character.
36. The method according to claim 33, wherein It further includes: Receive the adjustment data of the body size parameters of the target virtual character input by the user; Adjust the body size parameters of the target virtual character according to the adjustment data of the body size parameters.
37. The method according to claim 34, characterized in that, The bounding volume of the target virtual character is a cylinder, and determining the size of the bounding volume of the target virtual character according to the body size parameters of the target virtual character includes: Determine that the height of the cylinder is equal to the height of the target virtual character; Determine the radius of the cylinder according to the shoulder width of the target virtual character.
38. The method according to claim 37, wherein Determining the radius of the cylinder according to the shoulder width of the target virtual character includes: Determine that the radius of the cylinder is equal to r = L / 2 + N1, where L is the shoulder width of the target virtual character and N1 is an adjustment amount greater than 0.
39. The method according to claim 34, wherein The bounding volume of the target virtual character is a cuboid, and determining the size of the bounding volume of the target virtual character according to the body size parameters of the target virtual character includes: Determine that the height of the cuboid is equal to the height of the target virtual character; Determine the length and width of the cuboid according to the shoulder width of the target virtual character.
40. The method according to claim 39, characterized in that, Determining the length and width of the cuboid according to the shoulder width of the target virtual character includes: Determine that the length of the cuboid is equal to a = L + N2, where L is the shoulder width of the virtual character and N2 is an adjustment amount greater than 0, and the length direction of the cuboid is parallel to the shoulder width direction of the target virtual character; Determine that the width of the cuboid is equal to b = L / 2 + N3, where N3 is an adjustment amount greater than 0, and the value of b is less than a.
41. The method according to claim 37, wherein The radius of the cylinder satisfies the following condition: when the first virtual character shakes hands with the second virtual character, the bounding volume of the first virtual character does not contact the bounding volume of the second virtual character.
42. The method according to claim 39, wherein The length and width of the cuboid satisfy the following condition: when the first virtual character shakes hands with the second virtual character, the bounding volume of the first virtual character does not contact the bounding volume of the second virtual character.
43. The method according to any one of claims 32 - 42, characterized in that, The determination that the bounding volume of the first virtual character contacts the bounding volume of the second virtual character includes: Determine the first distance between the center point of the bounding volume of the first virtual character and the center point of the bounding volume of the second virtual character; When the first distance is less than or equal to the preset distance, determine that the bounding volume of the first virtual character contacts the bounding volume of the second virtual character.
44. The method according to any one of claims 32 - 42, characterized in that, The determination that the bounding volume of the first virtual character contacts the bounding volume of the second virtual character includes: Detect whether the bounding volume of the first virtual character overlaps with the bounding volume of the second virtual character; When the bounding volume of the first virtual character overlaps with the bounding volume of the second virtual character, determine that the bounding volume of the first virtual character contacts the bounding volume of the second virtual character.
45. The method according to any one of claims 32-42, characterized in that, Before controlling the first virtual character and / or the second virtual character to become invisible, it further includes: Determine to make the first virtual character and / or the second virtual character invisible according to the social protection information of the first virtual character and the social protection information of the second virtual character.
46. The method according to claim 45, wherein The social protection information includes any one of the following information: everyone can approach, only friends can approach, everyone cannot approach, designated users cannot approach, designated users can approach, blacklisted users cannot approach; Among them, when a user who cannot approach approaches, the corresponding virtual character will become invisible.
47. The method according to claim 46, wherein The determination to make the first virtual character and / or the second virtual character invisible according to the social protection information of the first virtual character and the social protection information of the second virtual character includes: Determine the visibility result of the first virtual character according to the social protection information of the first virtual character and the identity information of the second virtual character, and the visibility result is used to indicate whether the virtual character is invisible; Determine the visibility result of the second virtual character according to the social protection information of the second virtual character and the identity information of the first virtual character; Judge whether the visibility results of the first virtual character and the second virtual character are consistent; When the visibility results of the first virtual character and the second virtual character are consistent, determine that the visibility results of the first virtual character and the second virtual character take effect; When the visibility results of the first virtual character and the second virtual character are inconsistent, determine to make the first virtual character and the second virtual character invisible.
48. The method according to any one of claims 32 - 42, characterized in that, When the first virtual character and / or the second virtual character becomes invisible, the nameplate and / or the hand-held item of the invisible virtual character are displayed normally.
49. The method according to any one of claims 32 - 42, characterized in that, After controlling the first virtual character and / or the second virtual character to become invisible, it further includes: When the bounding volume of the first virtual character and the bounding volume of the second virtual character do not touch, and the non-touching duration is equal to the preset duration, control the invisible virtual character to be displayed.
50. A control device for a virtual character, characterized in that, It includes: A contact detection module, configured to determine that the bounding volume of the first virtual character contacts the bounding volume of the second virtual character, wherein the size of the bounding volume is determined according to the body size parameters of the corresponding virtual character; An invisibility module, configured to control the first virtual character and / or the second virtual character to become invisible.
51. An electronic device, characterized in that, It includes: A processor and a memory, the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method described in any one of claims 1 to 30, and / or the method described in any one of claims 32 to 49.
52. A computer-readable storage medium, characterized in that, For storing a computer program, the computer program causes a computer to execute the method described in any one of claims 1 to 30, and / or the method described in any one of claims 32 to 49.
53. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 30, and / or the method described in any one of claims 32 to 49.