Virtual object display method and device, equipment, storage medium and program product
The virtual object editing interface allows users to attach virtual pendants at any time on the virtual object display interface, solving the problem of location restriction during virtual image editing, improving the interactivity and fun of virtual object editing, and improving user experience.
Patent Information
- Application Number
- CN202411548750.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-01-10
AI Technical Summary
In the prior art, users are restricted by the framework when creating personalized virtual images, which affects the freedom of user experience and creative expression, and the mounting location of virtual pendants is restricted, affecting the interactive experience between users and virtual images.
Provide a virtual object display method. Through the virtual object editing interface, the user can drag the virtual pendant to the virtual object display interface, and determine whether the pendant is within the model range according to the termination position of the drag operation. If it is, it will be attached to the virtual object. Surface, allowing pendants to be attached anywhere, enhancing editing and interactivity.
It enriches the editing methods of virtual objects, increases the interactivity and fun of virtual objects when editing, improves the quality of user experience, and eliminates the problem of restricted virtual pendant mounting location.
Smart Images

Figure CN119292509A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and in particular, relates to a virtual object display method, device, equipment, storage medium and program product. Background Art
[0002] With the significant enhancement of mobile device performance and the continuous advancement of artificial intelligence (AI) technology, more innovative elements are gradually being incorporated into applications to enhance user experience. Among them, the embedding of virtual characters or pet images has become a highlight of many applications, greatly enriching the expressiveness of the products. These virtual images support functions such as custom editing (such as adding decorations and pendants), meeting users' strong demand for personalized DIY images.
[0003] However, in the process of realizing these functions, there are some limitations. For example, users may be restricted by the current framework when creating personalized virtual images, which to some extent affects the user experience and freedom of creative expression, and affects the user experience of interacting with the virtual image. Summary of the invention
[0004] The embodiment of the present application provides an implementation scheme different from the related art to solve the technical problem in the related art that the user experience in interacting with the virtual image is poor.
[0005] In a first aspect, the present application provides a virtual object display method, the virtual object display method comprising:
[0006] Displaying a virtual object editing interface, wherein the virtual object editing interface includes a virtual object display interface and a virtual widget display interface, wherein the virtual object display interface includes a virtual object to be edited, and the virtual widget display interface includes at least one virtual widget;
[0007] In response to a dragging operation of dragging a first virtual pendant to the virtual object display interface, if the end position of the dragging operation is within the model range corresponding to the virtual object, the first virtual pendant is attached to the virtual object, wherein the first attachment position of the first virtual pendant on the surface of the virtual object is determined according to the end position of the dragging operation.
[0008] In a second aspect, the present application provides a virtual object display device, the virtual object display device comprising:
[0009] A display unit, used to display a virtual object editing interface, wherein the virtual object editing interface includes a virtual object display interface and a virtual widget display interface, wherein the virtual object display interface includes a virtual object to be edited, and the virtual widget display interface includes at least one virtual widget;
[0010] a determining unit, configured to, in response to a dragging operation of dragging a first virtual pendant to the virtual object display interface, determine whether a termination position of the dragging operation is within a model range corresponding to the virtual object according to a first depth value corresponding to the termination position of the dragging operation in the virtual object display interface and a current depth range corresponding to the virtual object in the virtual object display interface;
[0011] An attaching unit is used to attach the first virtual pendant to the virtual object if the end position of the dragging operation is within the model range corresponding to the virtual object, wherein the first attachment position of the first virtual pendant on the surface of the virtual object is determined according to the end position of the dragging operation.
[0012] In a third aspect, the present application provides an electronic device, the electronic device comprising:
[0013] Processor; and
[0014] A memory, configured to store executable instructions of the processor;
[0015] The processor is configured to execute the first aspect, or any method in any possible implementation manner of the first aspect, by executing the executable instructions.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements the first aspect, or any method in any possible implementation manner of the first aspect.
[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the first aspect, or any method in any possible implementation manner of the first aspect.
[0018] The present application provides a display virtual object editing interface, the virtual object editing interface includes a virtual object display interface and a virtual pendant display interface, the virtual object display interface includes a virtual object to be edited, and the virtual pendant display interface includes at least one virtual pendant; in response to a drag operation of dragging a first virtual pendant to the virtual object display interface, according to a first depth value corresponding to the end position of the drag operation in the virtual object display interface and a current depth range corresponding to the virtual object in the virtual object display interface, it is determined whether the end position of the drag operation is located within a model range corresponding to the virtual object; if the end position of the drag operation is within the model range corresponding to the virtual object, the first virtual pendant is attached to the virtual object, wherein the first attachment position of the first virtual pendant on the surface of the virtual object is a scheme determined according to the end position of the drag operation, and when the virtual pendant is dragged to the virtual object, the virtual pendant can be attached to any position on the surface of the virtual object according to the actual drag position of the virtual pendant when the user releases the hand, thereby achieving a technical effect of enriching the way of editing virtual objects and increasing the interactivity and fun when editing virtual objects. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0020] Figure 1 A schematic diagram of a system structure of an optional application environment of the virtual object display method provided in an embodiment of the present application;
[0021] Figure 2 A first flow chart of a method for displaying a virtual object provided in an embodiment of the present application;
[0022] Figure 3 This is an example diagram of the interface of the virtual object editing interface 100 provided in an embodiment of the present application;
[0023] Figure 4 A schematic diagram of a first application scenario of the virtual object display method provided in an embodiment of the present application;
[0024] Figure 5 A schematic diagram of a second application scenario of the virtual object display method provided in an embodiment of the present application;
[0025] Figure 6 A schematic diagram of a third application scenario of the virtual object display method provided in an embodiment of the present application;
[0026] Figure 7 A schematic diagram of a fourth application scenario of the virtual object display method provided in an embodiment of the present application;
[0027] Figure 8 A schematic diagram of a fifth application scenario of the virtual object display method provided in an embodiment of the present application;
[0028] Fig. 9 A second flow chart of the virtual object display method provided in an embodiment of the present application;
[0029] Fig.10 A schematic diagram of the structure of a virtual object display device provided in an embodiment of the present application;
[0030] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, but cannot be understood as limiting the present application.
[0032] The terms "first" and "second" etc. in the specification, claims and drawings of the embodiments of the present application are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that this scheme is implemented in other orders in addition to the order illustrated or described in the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising 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 equipment.
[0033] First, some terms in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.
[0034] Virtual environment: is a virtual environment displayed (or provided) when an application is running on a terminal. The virtual environment can be a simulation of the real world, a semi-simulation and semi-fictitious environment, or a purely fictitious environment. The virtual environment can be any one of a two-dimensional virtual environment, a 2.5-dimensional virtual environment, and a three-dimensional virtual environment, and this application does not limit this. The following embodiments are illustrated by taking the virtual environment as a three-dimensional virtual environment.
[0035] Normalized device coordinates: A coordinate system used in computer graphics to represent and process graphics. The coordinate range of normalized device coordinates is usually from -1 to 1 on the x and y axes, and from 0 to 1 on the z axis (some definitions may also have a range of -1 to 1 on the z axis, but the more common definition is 0 to 1).
[0036] UV coordinates: A two-dimensional coordinate system used in computer graphics to determine a point on a texture image, where U represents the horizontal position and V represents the vertical position. The UV coordinate system usually uses values between 0 and 1 to represent the pixel position on a texture, with the lower left corner as the origin (0,0) and the upper right corner as (1.0,1.0).
[0037] Depth Texture: A rendering texture. The difference from ordinary texture is that the depth texture does not store information such as color, but high-precision depth values. These depth values represent the height of the object surface or the distance from the camera, which can come from the z component value in the standardized device coordinates.
[0038] With the improvement of mobile terminal performance and the development of AI technology, it has become a trend to embed editable virtual images in applications, meeting the personalized DIY needs of users. In related technologies, by reserving hanging points on the model skeleton, the wearing effect of the pendant following the model animation movement is achieved. However, the pendants need to be classified by type, and the same type of pendants can only be mounted on the same hanging point, which limits the user's creative freedom and the potential of user-generated content (UGC).
[0039] In order to solve this technical problem, the present application provides a virtual object display method, device, equipment and medium, which are used to solve the technical problem of poor experience of users interacting with virtual images in related technologies.
[0040] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0041] See also Figure 1 , Figure 1 A system structure diagram of an optional application environment of a virtual object display method provided in an embodiment of the present application, the system may include: a communication client 10 and a communication server 20, the communication client 10 and the communication server 20 can exchange data through a network, and the network may be a wide area network or a local area network, or a combination of the two.
[0042] In some embodiments, the communication client 10 may be an application that supports user interaction operations, and the user may interact with the content of the communication client 10 displayed by the local electronic device. The communication client 10 is used to display a virtual object editing interface, the virtual object editing interface includes a virtual object display interface and a virtual widget display interface, the virtual object display interface includes a virtual object to be edited, and the virtual widget display interface includes at least one virtual widget; in response to a drag operation of dragging a first virtual widget to the virtual object display interface, the communication client 10 determines whether the end position of the drag operation is within the model range corresponding to the virtual object according to the first depth value corresponding to the end position of the drag operation in the virtual object display interface and the current depth range corresponding to the virtual object in the virtual object display interface, and if the end position of the drag operation is within the model range corresponding to the virtual object, the first virtual widget is attached to the virtual object, wherein the first attachment position of the first virtual widget on the surface of the virtual object is determined according to the end position of the drag operation.
[0043] Exemplarily, the communication client 10 may be a game client, an instant messaging client, a live broadcast client, a video client or other application program. The present application does not impose any restrictions on the application type of the communication client 10 .
[0044] In practical applications, the communication client 10 may be a stand-alone application installed on a terminal, or a web client logged in through a browser of the terminal, and the present application does not limit the specific form of the communication client 10. In the embodiment of the present application, the terminal may be an electronic device capable of human-computer interaction through one or more modes such as a keyboard, a touch screen, and voice interaction, and the electronic device may include but is not limited to a smart phone, a tablet computer, a wearable device, a personal computer (PC), a netbook, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, a vehicle-mounted device, a robot, a desktop computer, etc.
[0045] The communication server 20 can be a service device that supports the implementation of various functions of the corresponding communication client 10. Specifically, it can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services, etc. This application does not limit the type of communication server, which can be determined according to the circumstances.
[0046] In an embodiment of the present application, when a user interacts with the communication client 10 by performing interactive operations on the virtual object editing interface displayed by the communication client 10, such as by dragging a virtual widget to the virtual object display interface, the corresponding service interface configured by the communication server 20 can be called to respond to the interactive operation and update the display content of the virtual object editing interface to meet the interactive application requirements.
[0047] It should be understood that Figure 1 The system structure shown does not constitute a limitation on the application environment system proposed in the embodiment of the present application. In actual application, the system may include Figure 1 More or fewer devices as shown, or combinations of certain subsystems, such as a data storage device (such as a database server) for storing various communication data generated by the operation of the communication client, and various configuration information set by the user for a personal account, etc., are not listed one by one in this application.
[0048] See also Figure 2 , Figure 2 A first flow chart of a virtual object display method provided in an embodiment of the present application, which method can be applied to an electronic device with a display screen. The virtual object display method proposed in this embodiment can be specifically executed by a communication client of the electronic device, and the description of the corresponding part of the above embodiment can be referred to for the communication client, and this embodiment will not be repeated here.
[0049] like Figure 2 As shown, the virtual object display method provided in this embodiment includes but is not limited to the following steps:
[0050] Step S21, displaying a virtual object editing interface, the virtual object editing interface including a virtual object display interface and a virtual widget display interface, the virtual object display interface including a virtual object to be edited, and the virtual widget display interface including at least one virtual widget;
[0051] In some embodiments, a virtual object refers to an object in a virtual environment. The virtual object may be at least one of a virtual person, a virtual animal, a cartoon character, a virtual item, a virtual creature, and a virtual building. Optionally, when the virtual environment is a three-dimensional virtual environment, the virtual object is a three-dimensional stereoscopic model created based on three-dimensional modeling technology. Each virtual object has its own shape and volume in the three-dimensional virtual environment and occupies a part of the space in the three-dimensional virtual environment.
[0052] In some embodiments, virtual pendants refer to props used to edit or decorate virtual objects in a virtual environment. Virtual pendants are independent of virtual objects to increase their aesthetics, functionality or uniqueness, such as virtual clothing, virtual accessories, virtual weapons, virtual special effects and animations.
[0053] In some embodiments, the virtual widget in the virtual widget display interface can be dragged to the virtual object display interface to dress up the virtual object or the background environment where the virtual object is located.
[0054] See also Figure 3 , Figure 3 This is an example diagram of the interface of the virtual object editing interface 100 provided in the embodiment of the present application. In a specific embodiment provided in the present application, the virtual object display interface 110 displays a virtual object 1100 "Little Fireman", and the virtual pendant display interface 120 displays virtual pendants such as a five-pointed star, glasses, a hat, a bow tie, a sun, and a windmill, which can be used to decorate the little fireman or the background environment where the little fireman is located. The little fireman and the virtual pendants such as the five-pointed star, glasses, a hat, a bow tie, a sun, and a windmill are all three-dimensional models.
[0055] Step S22, in response to a dragging operation of dragging the first virtual widget to the virtual object display interface, determining whether the end position of the dragging operation is located within a model range corresponding to the virtual object according to a first depth value corresponding to the end position of the dragging operation in the virtual object display interface and a current depth range corresponding to the virtual object in the virtual object display interface;
[0056] The first virtual widget is one of the multiple virtual widgets displayed in the virtual widget display interface, and the end position of the drag operation is the screen coordinate when the user releases the mouse or finger.
[0057] The first attachment position of the first virtual pendant on the surface of the virtual object is arbitrary and is determined according to the end position of the dragging operation.
[0058] In some embodiments, the step of determining a first depth value corresponding to the end position of the drag operation in the virtual object display interface includes the following steps S011 to S013:
[0059] Step S011, determining the standardized device coordinates corresponding to the end position of the drag operation in the virtual object display interface;
[0060] In some embodiments, the communication client in the electronic device captures the screen coordinates when the user releases the mouse or finger, which screen coordinates may be pixel coordinates, for example, and sends the pixel coordinates to the communication server. The communication server converts the screen coordinates corresponding to the end position of the drag operation into the initial standardized device coordinates corresponding to the end position of the drag operation on the screen through mathematical transformations (such as scaling and offset) based on the screen parameters of the electronic device corresponding to the communication client (such as width, height, and origin position) and the screen coordinates corresponding to the end position of the drag operation. The communication server may further convert the initial standardized device coordinates corresponding to the end position of the drag operation on the screen to obtain the standardized device coordinates corresponding to the end position of the drag operation in the virtual object display interface.
[0061] Step S012, converting the standardized device coordinates into UV coordinates;
[0062] In some embodiments, after the communication server determines the standardized device coordinates corresponding to the end position of the drag operation in the virtual object display interface, the standardized device coordinates corresponding to the end position of the drag operation in the virtual object display interface are converted into UV coordinates, which include information for indicating the relative position of the end position of the drag operation on the virtual object display interface.
[0063] Step S013: determining a first depth value corresponding to the end position of the dragging operation in the virtual object display interface according to the UV coordinates.
[0064] In some embodiments, after determining the UV coordinates corresponding to the end position of the drag operation, the depth value corresponding to the UV coordinates can be determined based on depth buffering technology (such as Z-buffing) to obtain a first depth value corresponding to the end position of the drag operation in the virtual object display interface. The first depth value includes information indicating the position or level of the end position of the drag operation in the virtual object display interface.
[0065] In some embodiments, the current depth range of the virtual object in the virtual object display interface is: the depth range of the virtual object in the virtual object display interface at the end of the dragging operation.
[0066] In this embodiment, the default display effect of the virtual object in the virtual object display interface is dynamic display, that is, the state of the position of the virtual object in the virtual environment changes over time, thereby affecting its position or depth in the virtual environment. Therefore, when judging whether the end position of the drag operation is within the model range corresponding to the virtual object, it is necessary to determine the current depth range corresponding to the virtual object in the virtual object display interface, that is, the depth range of the virtual object in the virtual object display interface at the end of the drag operation.
[0067] In some embodiments, the current depth range corresponding to the virtual object in the virtual object display interface can be determined through relevant application programming interface (Application Programming Interface, API) query, depth buffer, ray casting or other methods.
[0068] In some embodiments, determining whether the end position of the drag operation is within the model range corresponding to the virtual object according to the first depth value corresponding to the end position of the drag operation in the virtual object display interface and the current depth range corresponding to the virtual object in the virtual object display interface includes the following steps S21-S22:
[0069] Step S21, if the first depth value is included in the current depth range, determining that the end position of the drag operation is within the model range corresponding to the virtual object;
[0070] Specifically, if the first depth value corresponding to the end position of the drag operation in the virtual object display interface is included in the current depth range corresponding to the virtual object in the virtual object display interface, it can be determined that the end position of the drag operation is within the model range corresponding to the virtual object.
[0071] Step S22: if the first depth value is not included in the current depth range, it is determined that the end position of the drag operation is not located in the model range corresponding to the virtual object.
[0072] Specifically, if the first depth value corresponding to the end position of the drag operation in the virtual object display interface is not included in the current depth range corresponding to the virtual object in the virtual object display interface, it can be determined that the end position of the drag operation is not within the model range corresponding to the virtual object.
[0073] Step S23, if the end position of the dragging operation is within the model range corresponding to the virtual object, attach the first virtual pendant to the virtual object, wherein the first attachment position of the first virtual pendant on the surface of the virtual object is determined according to the end position of the dragging operation.
[0074] See also Figure 4 , Figure 4 A schematic diagram of a first application scenario of the virtual object display method provided in an embodiment of the present application. A user performs a drag operation on the first virtual pendant 1201 glasses in the virtual pendant display interface 120, and the end position of the drag operation is located in the area where the eyes of the virtual object 1100 in the virtual object display interface 110 are located. In response to the drag operation, the electronic device attaches the glasses model corresponding to the first virtual pendant 1201 glasses to the area where the eyes of the virtual object 1100 are located.
[0075] Another example Figure 5 , Figure 5A schematic diagram of a second application scenario of the virtual object display method provided in an embodiment of the present application. A user performs a drag operation on the first virtual pendant 1201 glasses in the virtual pendant display interface 120, and the end position of the drag operation is located in the area where the flame on the top of the virtual object 1100 in the virtual object display interface 110 is located. In response to the drag operation, the electronic device attaches the glasses model corresponding to the first virtual pendant 1201 glasses to the area where the flame on the top of the virtual object 1100 is located.
[0076] It should be noted that, in addition to the area where the eyes of the virtual object are located, the first virtual pendant glasses can also be dragged to any other position in the virtual object display interface, and the first virtual object glasses can be attached at the first attachment position determined according to the end position of the dragging operation, allowing users to give full play to their creative freedom.
[0077] Optionally, the user can drag virtual clothing, virtual accessories, etc. used to decorate the virtual object into the model range corresponding to the virtual object, so as to decorate the appearance or style of the virtual object.
[0078] In some embodiments, a communication client in an electronic device monitors screen interaction events, where the screen interaction events include a virtual widget click operation, a virtual widget drag operation, etc. If a virtual widget drag operation is monitored, the electronic device records the end position of the drag operation, and the electronic device sends the end position of the drag operation to a communication server. The communication server determines a first depth value corresponding to the end position of the drag operation in the virtual object display interface and a current depth range corresponding to the virtual object in the virtual object display interface, and sends the determined first depth value and the current depth range corresponding to the virtual object to the communication client in the electronic device. The communication client determines a first depth value corresponding to the end position of the drag operation in the virtual object display interface and a current depth range corresponding to the virtual object in the virtual object display interface. The communication server determines whether the end position of the drag operation is within the model range corresponding to the virtual object. If the communication server determines that the end position of the drag operation is within the model range corresponding to the virtual object, the communication server determines the first attachment position of the first virtual pendant on the surface of the virtual object according to the end position of the drag operation. Furthermore, the communication server re-renders the virtual object display interface so that the first virtual pendant is attached to the first attachment position on the surface of the virtual object, and sends the updated virtual object display interface to the communication client in the electronic device, or the communication server sends information indicating the first attachment position to the communication client in the electronic device, and the communication client updates its locally rendered virtual object display interface according to the information indicating the first attachment position and displays it.
[0079] In some embodiments, the method further comprises:
[0080] Step S24, if the end position of the dragging operation is located in an area other than the model range corresponding to the virtual object in the virtual object display interface, the first virtual widget is displayed at the second attachment position of the first virtual widget in the virtual object display interface, wherein the second attachment position includes the first target three-dimensional space coordinates corresponding to the end position of the dragging operation and a preset orientation corresponding to the first virtual widget.
[0081] In some embodiments, the preset orientation corresponding to the virtual widget is determined based on characteristic information of the virtual widget, for example, based on one or more of the attribute information, shape information, and function information of the virtual widget for the virtual object.
[0082] For example, for a virtual pendant tree, the preset orientation of the tree should be facing the light source (such as the sun), perpendicular to the ground and pointing toward the sky.
[0083] See also Figure 6 , Figure 6 A schematic diagram of a third application scenario of the virtual object display method provided in an embodiment of the present application. A user performs a drag operation on the first virtual pendant 1201 sun in the virtual pendant display interface 120, and the end position of the drag operation is located at the upper right corner of the virtual object 1100 little fire man in the virtual object display interface 110, then in response to the drag operation, the electronic device displays the sun model corresponding to the first virtual pendant 1201 sun in the upper right corner of the virtual object 1100 little fire man.
[0084] Optionally, the user may drag a virtual pendant used to decorate the background environment where the virtual object is located to other areas of the object display interface except the model range corresponding to the virtual object, thereby decorating the background or environment where the virtual object is located.
[0085] In some embodiments, the electronic device monitors screen interaction events, which include virtual widget click operations, virtual widget drag operations, etc. If the virtual widget drag operation is monitored, the electronic device records the end position of the drag operation, and the electronic device sends the end position of the drag operation to the communication server. The communication server determines a first depth value corresponding to the end position of the drag operation in the virtual object display interface and a current depth range corresponding to the virtual object in the virtual object display interface, and sends the determined first depth value and the current depth range corresponding to the virtual object to a communication client in the electronic device. The communication client determines whether the end position of the drag operation is within the model range corresponding to the virtual object based on the first depth value corresponding to the end position of the drag operation in the virtual object display interface and the current depth range corresponding to the virtual object in the virtual object display interface. If the communication server The device determines that the end position of the drag operation is not within the model range corresponding to the virtual object, the communication server determines the first target three-dimensional space coordinates corresponding to the end position of the drag operation and the preset orientation corresponding to the first virtual widget, and renders the first virtual widget in the virtual object display interface according to the first target three-dimensional space coordinates corresponding to the end position of the drag operation and the preset orientation corresponding to the first virtual widget, and sends the rendered virtual object display interface to the communication client in the electronic device, or the communication server sends information indicating the first target three-dimensional space coordinates corresponding to the end position of the drag operation and the preset orientation corresponding to the first virtual widget to the communication client in the electronic device, and the communication client updates its locally rendered virtual object display interface according to the information indicating the first target three-dimensional space coordinates corresponding to the end position of the drag operation and the preset orientation corresponding to the first virtual widget and displays it.
[0086] In some embodiments, the step of determining the three-dimensional space coordinates of the first target includes the following steps S241-S242:
[0087] Step S231, determining the standardized device coordinates corresponding to the end position of the drag operation in the virtual object display interface;
[0088] Specifically, screen coordinates are usually based on pixels, while standardized device coordinates are coordinates normalized to the range of [-1,1]. The communication server converts the screen coordinates corresponding to the end position of the drag operation into the initial standardized device coordinates corresponding to the end position of the drag operation on the screen through mathematical transformations (such as scaling and offset) based on the screen parameters (width, height, origin position) of the electronic device corresponding to the communication client and the screen coordinates corresponding to the end position of the drag operation. The communication server can further convert the initial standardized device coordinates corresponding to the end position of the drag operation on the screen to obtain the standardized device coordinates corresponding to the end position of the drag operation in the virtual object display interface.
[0089] Step S242, performing coordinate transformation on the standardized device coordinates to obtain the first target three-dimensional space coordinates.
[0090] In some embodiments, after obtaining the standardized device coordinates corresponding to the end position of the drag operation in the virtual object display interface, the communication client performs coordinate conversion on the standardized device coordinates to obtain the first target three-dimensional space coordinates corresponding to the end position of the drag operation.
[0091] In some embodiments, the first attachment position includes the second target three-dimensional space coordinates and the target orientation, and the step of determining the first attachment position of the first virtual pendant on the surface of the virtual object includes the following steps S001-S004:
[0092] Step S001, determining a second depth value corresponding to a preset area centered on a UV coordinate according to depth texture information corresponding to a virtual object;
[0093] In some embodiments, the preset area centered on the UV coordinates corresponding to the end position of the drag operation in the virtual object display interface can be, for example, a rectangle, a circle, or other shapes, and the size and shape of the preset area can be reasonably set according to the actual scene.
[0094] In a specific embodiment provided in the present application, the preset area may be a nine-square grid centered on the UV coordinate.
[0095] In some embodiments, the communication server calculates the average or median of the depth values of all points in the preset area centered on the UV coordinate as the second depth value corresponding to the preset area centered on the UV coordinate. The second depth value corresponding to the preset area centered on the UV coordinate represents the average depth of the area near the UV coordinate, which helps to subsequently determine the accurate three-dimensional spatial coordinates of the second target.
[0096] Step S002, determining the three-dimensional space coordinates of the second target according to the second depth value and the UV coordinates;
[0097] In some embodiments, the communication server calculates the corresponding point of the UV coordinate in the virtual environment where the virtual object is located using an inverse projection transformation method based on the second depth value and the UV coordinate to obtain the second target three-dimensional space coordinate. The second target three-dimensional space coordinate represents the position of the point on the surface of the virtual object corresponding to the UV coordinate in the three-dimensional space corresponding to the virtual environment.
[0098] Step S003, determining the surface normal direction of the point on the surface of the virtual object corresponding to the three-dimensional space coordinates of the second target;
[0099] In some embodiments, the communication server determines the surface normal direction of a point on the surface of the virtual object corresponding to the second target three-dimensional space coordinates based on the second target three-dimensional space coordinates and geometric information of the virtual object.
[0100] Step S004: taking the surface normal direction as the target orientation.
[0101] In some embodiments, the communication server uses the calculated surface normal direction of the point on the surface of the virtual object corresponding to the second target three-dimensional space coordinates as the target orientation when the first virtual pendant is attached.
[0102] By using the normal direction of the point on the surface of the virtual object corresponding to the three-dimensional space coordinates of the second target as the target orientation when the first virtual pendant is attached, the front side (or designated side) of the first virtual pendant can face the normal direction when it is attached to the surface of the virtual object, thereby maintaining a sense of fit and consistency with the surface of the virtual object.
[0103] In some embodiments, the method further comprises the following steps S25:
[0104] Step S25 , in response to a sliding operation on the virtual object with the first virtual pendant attached, rotating the display angle of the virtual object with the first virtual pendant attached, wherein the first attachment position of the first virtual pendant on the surface of the virtual object remains unchanged.
[0105] In some embodiments, when a user performs a sliding operation on a virtual object, the electronic device recognizes the sliding operation on the virtual object, and rotates the display angle of the virtual object to which the first virtual pendant is attached according to the direction and distance corresponding to the sliding operation, while ensuring that the first attachment position of the first virtual pendant on the surface of the virtual object remains unchanged.
[0106] In some embodiments, the method further comprises the following steps S26:
[0107] Step S26 , in response to a scaling operation on the first virtual widget attached to the virtual object, the first virtual widget is enlarged or reduced for display, wherein the first attachment position of the first virtual widget on the surface of the virtual object remains unchanged.
[0108] In some embodiments, when a user performs a reduction or enlargement operation on a first virtual pendant attached to a virtual object, the electronic device recognizes the reduction or enlargement operation, reduces or enlarges the first virtual pendant, and ensures that the first attachment position of the first virtual pendant on the surface of the virtual object remains unchanged.
[0109] In some embodiments, the method further comprises the following steps S27:
[0110] Step S27, in response to the first click operation on the virtual object, triggering a dynamic display effect of the virtual object.
[0111] In some embodiments, when the user clicks on the virtual object, the electronic device recognizes a first click operation on the virtual object and triggers a dynamic display effect of the virtual object. The first click operation includes but is not limited to a single click operation, a double click operation, etc. The dynamic display effect of the virtual object can be an animation display of the virtual object itself (such as making an action, switching expressions, switching forms, etc.), or a dynamic change of the environment around the virtual object, or an interactive effect between the virtual object and the pendant.
[0112] The virtual object dynamic display solution provided in the embodiment of the present application can enhance the user's immersion and interactivity and improve the user's quality of experience.
[0113] In some embodiments, the method further comprises the following steps S28:
[0114] Step S28 , in response to a second click operation on the second virtual widget in the virtual widget display interface, displaying the second virtual widget in the virtual object display interface according to the category of the second virtual widget.
[0115] In some embodiments, when the user clicks on the second virtual widget in the virtual widget display interface, the electronic device identifies a second click operation on the virtual widget in the virtual widget display interface, and displays the second virtual widget in the virtual object display interface according to the category of the second virtual widget. The second click operation includes but is not limited to a single click operation, a double click operation, etc.
[0116] In some embodiments, in step S28, displaying the second virtual widget on the virtual object display interface according to the widget category of the second virtual widget includes the following steps S281-S282:
[0117] Step S281, if the widget type of the second virtual widget is the first widget category, displaying the second virtual widget at a second attachment position on the surface of the virtual object in the virtual object display interface, wherein the second attachment position is a preset attachment position on the surface of the virtual object corresponding to the second virtual widget, and the virtual widget of the first widget category is used to decorate the virtual object;
[0118] In some embodiments, the second attachment position corresponding to the second virtual pendant may be pre-set and stored in the communication client or the communication server. For example, for the second virtual pendant hat, the hat is used to decorate the virtual object, and is usually used to decorate the head of the virtual object, so the corresponding second attachment position may be set to the top of the head of the virtual object. For another example, for the second virtual pendant bow tie, the bow tie is used to decorate the virtual object, and is usually used to decorate the neck of the virtual object, so the corresponding second attachment position may be set to the neck of the virtual object.
[0119] See also Figure 7 , Figure 7 This is a schematic diagram of the fourth application scenario of the virtual object display method provided in an embodiment of the present application. In response to a second click operation on the hat of the second virtual pendant 1202 in the virtual pendant display interface 120, a hat model corresponding to the hat of the second virtual pendant 1202 is displayed on the head of the surface of the virtual object 1100 in the virtual object display interface 110.
[0120] Step S282, if the widget type of the second virtual widget is the second widget category, display the second virtual widget at a preset display position corresponding to the second virtual widget in the virtual object display interface, wherein the virtual widget of the second widget category is used to decorate the background environment where the virtual object is located.
[0121] In some embodiments, the preset display position corresponding to the second virtual widget of the second widget category may also be set in advance and saved in the communication client or the communication server. For example, for the second virtual widget windmill, the windmill is usually used to decorate the background environment where the virtual object is located, and the windmill is usually placed on the ground, then the preset display position of the second virtual widget windmill is the ground in the background environment where the virtual object is located.
[0122] See also Figure 8 , Figure 8 The fifth application scenario schematic diagram of the virtual object display method provided in an embodiment of the present application, in response to a second click operation on the second virtual widget 1202 windmill in the virtual widget display interface 120, a windmill model corresponding to the second virtual widget 1202 windmill is displayed on the ground in the virtual object display interface 110.
[0123] See also Fig. 9 , Fig. 9 A second flow chart of the virtual object display method provided in an embodiment of the present application includes:
[0124] S91, in response to an access operation to the virtual object editing interface, displaying the virtual object editing interface;
[0125] S92, monitor screen interaction events;
[0126] S93, determining whether a drag operation on the virtual widget is monitored, if so, executing the following S94, if not, returning to execute S92;
[0127] S94, converting the screen coordinates corresponding to the end position of the drag operation into normalized device coordinates;
[0128] S95, converting the normalized device coordinates corresponding to the end position of the dragging operation into UV coordinates;
[0129] S96, determining a depth value corresponding to the end position of the drag operation according to the UV coordinates;
[0130] S97, determining whether the depth value corresponding to the end position of the drag operation is valid for the virtual object, if not, executing the following S98, if yes, executing the following S910;
[0131] S98, converting the UV coordinates corresponding to the end position of the dragging operation into the first target three-dimensional space coordinates;
[0132] S99, displaying the virtual widget according to the first target three-dimensional space coordinates and the preset orientation corresponding to the virtual widget, and jumping to execute the following S913;
[0133] S910, reading the depth value of the nine-square grid centered on the UV coordinate corresponding to the end position corresponding to the drag operation in the depth texture information corresponding to the virtual object;
[0134] S911, calculating, according to the depth value of the nine-grid, the second target three-dimensional space coordinates corresponding to the end position of the drag operation and the surface normal direction of the point on the surface of the virtual object corresponding to the second target three-dimensional space coordinates;
[0135] S912, attaching the virtual pendant to the virtual object according to the calculated second target three-dimensional space coordinates and the surface normal direction of the point on the surface of the virtual object corresponding to the second target three-dimensional space coordinates;
[0136] S913, determining whether an exit operation of the virtual object editing interface is detected, if so, executing the following S914, if not, returning to executing S92;
[0137] S914, exit the virtual object editing interface.
[0138] The implementation method of each step in the embodiment of the present application can refer to the specific implementation method of any embodiment in the above-mentioned method embodiments, which will not be repeated here.
[0139] The present application provides a display virtual object editing interface, the virtual object editing interface includes a virtual object display interface and a virtual pendant display interface, the virtual object display interface includes a virtual object to be edited, and the virtual pendant display interface includes at least one virtual pendant; in response to a drag operation of dragging a first virtual pendant to the virtual object display interface, according to a first depth value corresponding to the end position of the drag operation in the virtual object display interface and a current depth range corresponding to the virtual object in the virtual object display interface, it is determined whether the end position of the drag operation is located within the model range corresponding to the virtual object; if the end position of the drag operation is within the model range corresponding to the virtual object, the first virtual pendant is attached to the virtual object, wherein the first attachment position of the first virtual pendant on the surface of the virtual object is a scheme determined according to the end position of the drag operation, and when the virtual pendant is dragged to the virtual object, the virtual pendant can be attached to any position on the surface of the virtual object according to the actual drag position of the virtual pendant when the user releases the hand, thereby achieving a technical effect of enriching the way of editing virtual objects and increasing the interactivity and fun when editing virtual objects.
[0140] In order to better implement the virtual object display method of the embodiment of the present application, the embodiment of the present application also provides a virtual object display device. Fig.10 A schematic diagram of the structure of a virtual object display device provided by an exemplary embodiment of the present application;
[0141] The device comprises:
[0142] A display unit 101 is used to display a virtual object editing interface, the virtual object editing interface includes a virtual object display interface and a virtual widget display interface, the virtual object display interface includes a virtual object to be edited, and the virtual widget display interface includes at least one virtual widget;
[0143] A determination unit 102, configured to, in response to a drag operation of dragging the first virtual widget to the virtual object display interface, determine whether the end position of the drag operation is located within a model range corresponding to the virtual object according to a first depth value corresponding to the end position of the drag operation in the virtual object display interface and a current depth range corresponding to the virtual object in the virtual object display interface;
[0144] The attaching unit 103 is used to attach the first virtual pendant to the virtual object if the end position of the dragging operation is within the model range corresponding to the virtual object, wherein the first attachment position of the first virtual pendant on the surface of the virtual object is determined according to the end position of the dragging operation.
[0145] In some embodiments, the display unit 101 is further configured to:
[0146] If the end position of the dragging operation is located in an area other than the model range corresponding to the virtual object in the virtual object display interface, the first virtual pendant is displayed at the second attachment position of the first virtual pendant in the virtual object display interface, wherein the second attachment position includes the first target three-dimensional space coordinates corresponding to the end position of the dragging operation and a preset orientation corresponding to the first virtual pendant.
[0147] In some embodiments, the determination unit 102 further includes a first target three-dimensional space coordinate determination subunit, and the first target three-dimensional space coordinate determination subunit, when used to determine the first target three-dimensional space coordinate, is specifically used to:
[0148] Determine the standardized device coordinates corresponding to the end position of the drag operation in the virtual object display interface;
[0149] The standardized device coordinates are transformed to obtain the first target three-dimensional space coordinates.
[0150] In some embodiments, when the determination unit 102 is used to determine whether the end position of the drag operation is within the model range corresponding to the virtual object according to the first depth value corresponding to the end position of the drag operation in the virtual object display interface and the current depth range corresponding to the virtual object in the virtual object display interface, it is specifically used to:
[0151] If the first depth value is included in the current depth range, determining that the end position of the drag operation is within the model range corresponding to the virtual object;
[0152] If the first depth value is not included in the current depth range, it is determined that the end position of the drag operation is not located in the model range corresponding to the virtual object.
[0153] In some embodiments, the determining unit 102 further includes a first depth value determining subunit, which, when used to determine the first depth value corresponding to the end position of the drag operation in the virtual object display interface, is specifically used to:
[0154] Determine the standardized device coordinates corresponding to the end position of the drag operation in the virtual object display interface;
[0155] Convert normalized device coordinates to UV coordinates;
[0156] A first depth value corresponding to the end position of the drag operation in the virtual object display interface is determined according to the UV coordinates.
[0157] In some embodiments, the first attachment position includes the second target three-dimensional space coordinates and the target orientation, and the determination unit 102 further includes a first attachment position determination subunit, which is used to determine the first attachment position of the first virtual pendant on the surface of the virtual object, specifically for:
[0158] Determine a second depth value corresponding to a preset area centered on the UV coordinate according to the depth texture information corresponding to the virtual object;
[0159] Determine the three-dimensional space coordinates of the second target according to the second depth value and the UV coordinates;
[0160] Determine the direction of the surface normal at the point on the surface of the virtual object corresponding to the three-dimensional spatial coordinates of the second target;
[0161] Use the surface normal direction as the target orientation.
[0162] In some embodiments, the display unit 101 is further configured to:
[0163] In response to a sliding operation on the virtual object with the first virtual pendant attached, the display angle of the virtual object with the first virtual pendant attached is rotated, wherein the first attachment position of the first virtual pendant on the surface of the virtual object remains unchanged.
[0164] In some embodiments, the display unit 101 is further configured to:
[0165] In response to a scaling operation on a first virtual widget attached to a virtual object, the first virtual widget is enlarged or reduced for display, wherein a first attachment position of the first virtual widget on the surface of the virtual object remains unchanged.
[0166] In some embodiments, the display unit 101 is further configured to:
[0167] In response to a first click operation on the virtual object, a dynamic display effect of the virtual object is triggered.
[0168] In some embodiments, the display unit 101 is further configured to:
[0169] In response to a second click operation on the second virtual widget in the virtual widget display interface, the second virtual widget is displayed in the virtual object display interface according to the widget category of the second virtual widget.
[0170] In some embodiments, when the display unit 101 is used to display the second virtual widget on the virtual object display interface according to the widget category of the second virtual widget, it is specifically used to:
[0171] If the pendant type of the second virtual pendant is the first pendant category, the second virtual pendant is displayed at a second attachment position on the surface of the virtual object in the virtual object display interface, wherein the second attachment position is a preset attachment position on the surface of the virtual object corresponding to the second virtual pendant, and the virtual pendant of the first pendant category is used to decorate the virtual object;
[0172] If the widget type of the second virtual widget is the second widget category, the second virtual widget is displayed at a preset display position corresponding to the second virtual widget in the virtual object display interface, wherein the virtual widget of the second widget category is used to decorate the background environment where the virtual object is located.
[0173] 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, no further description is given here. Specifically, the device may perform the above method embodiment, and the above and other operations and / or functions of each module in the device are the corresponding processes in each method in the above method embodiment, respectively, and no further description is given here for the sake of brevity.
[0174] The above describes the device of the embodiment of the present application from the perspective of the functional module 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 a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.
[0175] Fig.11 is a schematic block diagram of an electronic device provided in an embodiment of the present application, and the electronic device may include:
[0176] The memory 1101 and the processor 1102, the memory 1101 is used to store the computer program and transmit the program code to the processor 1102. In other words, the processor 1102 can call and run the computer program from the memory 1101 to implement the method in the embodiment of the present application.
[0177] For example, the processor 1102 may be configured to execute the above method embodiments according to instructions in the computer program.
[0178] In some embodiments of the present application, the processor 1102 may include but is not limited to:
[0179] 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.
[0180] In some embodiments of the present application, the memory 1101 includes but is not limited to:
[0181] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The 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).
[0182] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 1101 and executed by the processor 1102 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0183] like Fig.11 As shown, the electronic device may also include:
[0184] The transceiver 1103 may be connected to the processor 1102 or the memory 1101 .
[0185] The processor 1102 may control the transceiver 1103 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 1103 may include a transmitter and a receiver. The transceiver 1103 may further include an antenna, and the number of antennas may be one or more.
[0186] 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.
[0187] The present application also provides a computer storage medium on which a computer program is stored. When the computer program is executed by a computer, the computer is enabled to execute the method of the above method embodiment.
[0188] In some embodiments, the present application further provides a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the corresponding process in the virtual object display method in the embodiment of the present application, which will not be described here for the sake of brevity.
[0189] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.
[0190] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0191] In the several embodiments provided in the present 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 only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, 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.
[0192] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0193] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0194] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A virtual object display method, characterized in that: include: Displaying a virtual object editing interface, wherein the virtual object editing interface includes a virtual object display interface and a virtual widget display interface, wherein the virtual object display interface includes a virtual object to be edited, and the virtual widget display interface includes at least one virtual widget; In response to a dragging operation of dragging a first virtual widget to the virtual object display interface, determining whether the end position of the dragging operation is within a model range corresponding to the virtual object according to a first depth value corresponding to the end position of the dragging operation in the virtual object display interface and a current depth range corresponding to the virtual object in the virtual object display interface; If the end position of the dragging operation is within the model range corresponding to the virtual object, the first virtual pendant is attached to the virtual object, wherein a first attachment position of the first virtual pendant on the surface of the virtual object is determined according to the end position of the dragging operation.
2. The method according to claim 1, characterized in that: The method further comprises: If the end position of the dragging operation is located in an area other than the model range corresponding to the virtual object in the virtual object display interface, the first virtual widget is displayed at a second attachment position of the first virtual widget in the virtual object display interface, wherein the second attachment position includes the first target three-dimensional space coordinates corresponding to the end position of the dragging operation and a preset orientation corresponding to the first virtual widget.
3. The method according to claim 2, characterized in that The step of determining the three-dimensional space coordinates of the first target includes: Determine the standardized device coordinates corresponding to the end position of the drag operation in the virtual object display interface; The standardized device coordinates are transformed to obtain the first target three-dimensional space coordinates.
4. The method according to claim 1, characterized in that: Determining whether the end position of the drag operation is within a model range corresponding to the virtual object according to a first depth value corresponding to the end position of the drag operation in the virtual object display interface and a current depth range corresponding to the virtual object in the virtual object display interface includes: If the first depth value is included in the current depth range, determining that the end position of the drag operation is within the model range corresponding to the virtual object; or If the first depth value is not included in the current depth range, it is determined that the termination position of the drag operation is not located in the model range corresponding to the virtual object.
5. The method according to claim 1, characterized in that The step of determining a first depth value corresponding to the end position of the dragging operation in the virtual object display interface includes: Determine the standardized device coordinates corresponding to the end position of the drag operation in the virtual object display interface; Convert the normalized device coordinates to texture UV coordinates; A first depth value corresponding to the termination position of the dragging operation in the virtual object display interface is determined according to the UV coordinates.
6. The method according to claim 5, characterized in that The first attachment position includes the second target three-dimensional space coordinates and the target orientation, and the step of determining the first attachment position of the first virtual pendant on the surface of the virtual object includes: Determine, according to the depth texture information corresponding to the virtual object, a second depth value corresponding to a preset area centered on the UV coordinate; Determine the second target three-dimensional space coordinates according to the second depth value and the UV coordinates; Determining the direction of the surface normal at the point on the surface of the virtual object corresponding to the three-dimensional spatial coordinates of the two targets; The surface normal direction is used as the target orientation.
7. The method according to claim 1, characterized in that The method further comprises: In response to a sliding operation on the virtual object to which the first virtual pendant is attached, a display angle of the virtual object to which the first virtual pendant is attached is rotated, wherein the first attachment position of the first virtual pendant on the surface of the virtual object remains unchanged.
8. The method according to claim 1, characterized in that The method further comprises: In response to a scaling operation on the first virtual widget attached to the virtual object, the first virtual widget is enlarged or reduced for display, wherein the first attachment position of the first virtual widget on the surface of the virtual object remains unchanged.
9. The method according to claim 1, characterized in that: The method further comprises: In response to a first click operation on the virtual object, a dynamic display effect of the virtual object is triggered.
10. The method according to claim 1, characterized in that The method further comprises: In response to a second click operation on a second virtual widget in the virtual widget display interface, the second virtual widget is displayed on the virtual object display interface according to the widget category of the second virtual widget.
11. The method according to claim 10, characterized in that Displaying the second virtual widget on the virtual object display interface according to the widget category of the second virtual widget includes: If the pendant type of the second virtual pendant is the first pendant category, the second virtual pendant is displayed at a second attachment position on the surface of the virtual object in the virtual object display interface, wherein the second attachment position is a preset attachment position on the surface of the virtual object corresponding to the second virtual pendant, and the virtual pendant of the first pendant category is used to decorate the virtual object; or If the widget type of the second virtual widget is a second widget category, the second virtual widget is displayed at a preset display position corresponding to the second virtual widget in the virtual object display interface, wherein the virtual widget of the second widget category is used to decorate the background environment where the virtual object is located.
12. A virtual object display device, characterized in that: include: A display unit, used to display a virtual object editing interface, wherein the virtual object editing interface includes a virtual object display interface and a virtual widget display interface, wherein the virtual object display interface includes a virtual object to be edited, and the virtual widget display interface includes at least one virtual widget; a determining unit, configured to, in response to a dragging operation of dragging a first virtual pendant to the virtual object display interface, determine whether a termination position of the dragging operation is within a model range corresponding to the virtual object according to a first depth value corresponding to the termination position of the dragging operation in the virtual object display interface and a current depth range corresponding to the virtual object in the virtual object display interface; An attaching unit is used to attach the first virtual pendant to the virtual object if the end position of the dragging operation is within the model range corresponding to the virtual object, wherein the first attachment position of the first virtual pendant on the surface of the virtual object is determined according to the end position of the dragging operation.
13. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1-11 by executing the executable instructions.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
Citation Information
Cited By
Virtual object display method and device, terminal and storage medium
CN120234077A