Virtual object processing method and device, electronic equipment and storage medium
By generating the positional relationship between the ray and the bounding box in the virtual scene, and displaying resource reference information in the sub-user interface, the problem of inefficient troubleshooting of object resource loading and rendering problems in the virtual scene is solved, and the target object is quickly locked and diagnosed, which improves development efficiency.
Patent Information
- Application Number
- CN202411488906.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-10-23
AI Technical Summary
In virtual scenes, the resource loading and rendering of objects needs to be manually investigated, resulting in low development efficiency and it is difficult to quickly lock the target object due to occlusion problems.
By generating the positional relationship between the ray and the virtual object, determine the target object, and display the resource reference information of the target object in the sub-user interface, quickly lock the problem object.
It effectively avoids click errors and reproduction process problems caused by occlusion, improves development efficiency, and does not affect the continued operation of the program.
Smart Images

Figure CN119701335A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a virtual object processing method, device, electronic device and storage medium. Background Art
[0002] In some virtual scenes, there may be problems with object resource loading or rendering, which require troubleshooting. For example, when a skill is released, there may be an abnormal skill effect, such as a black block on the texture. It is necessary to manually identify the abnormal skill effect, and then verify the log. Then, find the specific effect through the skill reverse, and then confirm the sub-effects of the effect being found, and perform shielding tests on the sub-effects one by one. The entire process requires manual troubleshooting and is complicated, which takes a long time and leads to low development efficiency. Summary of the invention
[0003] In view of this, the purpose of the present disclosure is to provide a virtual object processing method, device, electronic device and storage medium, which determine the target object by the positional relationship between the ray generated based on the touch position and the position of the camera in the target virtual scene and the bounding box corresponding to the virtual object, and display the resource reference information of the object to be displayed in the target object in the sub-user interface, so as to quickly and effectively lock the target object with problems, and determine the object type and corresponding resources of the target object, thereby avoiding the situation where the target object cannot be selected by clicking the screen due to occlusion and the problem of running back and forth to reproduce the process, and at the same time will not affect the continued operation of the program, thereby improving development efficiency.
[0004] In a first aspect, an embodiment of the present disclosure provides a virtual object processing method, wherein a graphical user interface is provided through a terminal device, wherein the graphical user interface includes a virtual object in a target virtual scene, and the virtual object processing method includes:
[0005] Based on the position of the virtual object in the target virtual scene, generating a bounding box corresponding to the virtual object;
[0006] In response to a first touch operation, determining a touch position of the first touch operation on the graphical user interface;
[0007] generating a ray in the target virtual scene based on the touch position and the position of the camera in the target virtual scene;
[0008] Determine a target object from the virtual object based on a positional relationship between the ray and a bounding box corresponding to the virtual object;
[0009] In response to the second touch operation, determining an object to be displayed from the target object, and creating a sub-user interface, wherein the object to be displayed is an object in the target object targeted by the second touch operation;
[0010] The resource reference information of the object to be displayed is displayed in the sub-user interface.
[0011] In a second aspect, an embodiment of the present disclosure provides a virtual object processing device, which provides a graphical user interface through a terminal device, wherein the graphical user interface includes a virtual object in a target virtual scene, and the virtual object processing device includes:
[0012] A first generating module, configured to generate a bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene;
[0013] A first determining module, configured to determine, in response to a first touch operation, a touch position of the first touch operation on the graphical user interface;
[0014] A second generating module, configured to generate a ray in the target virtual scene based on the touch position and the position of the camera in the target virtual scene;
[0015] A second determination module, configured to determine a target object from the virtual object based on a positional relationship between the ray and a bounding box corresponding to the virtual object;
[0016] a third determining module, configured to determine, in response to the second touch operation, an object to be displayed from the target object, and create a sub-user interface, wherein the object to be displayed is an object in the target object targeted by the second touch operation;
[0017] The first display module is used to display the resource reference information of the object to be displayed in the sub-user interface.
[0018] In a third aspect, an embodiment of the present disclosure provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned virtual object processing method.
[0019] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned virtual object processing method.
[0020] The embodiments of the present disclosure bring the following beneficial effects:
[0021] The above-mentioned virtual object processing method, device, electronic device and storage medium generate a bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene; determine the touch position of the first touch operation in the graphical user interface in response to a first touch operation; generate rays in the target virtual scene based on the touch position and the position of the camera in the target virtual scene; determine the target object from the virtual object based on the positional relationship between the ray and the bounding box corresponding to the virtual object; determine the object to be displayed from the target object in response to a second touch operation, and create a sub-user interface, wherein the object to be displayed is the object in the target object targeted by the second touch operation; and display the resource reference information of the object to be displayed in the sub-user interface. In this method, the target object is determined by the positional relationship between the ray generated based on the touch position and the position of the camera in the target virtual scene and the bounding box corresponding to the virtual object, and by displaying the resource reference information of the object to be displayed in the target object in the sub-user interface, the target object with problems can be quickly and effectively locked, and the object type and corresponding resources of the target object can be determined, avoiding the situation where the target object cannot be selected by clicking the screen due to occlusion and the problem of running back and forth to reproduce the process, while not affecting the continued operation of the program, thereby improving development efficiency.
[0022] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or understood by practicing the present disclosure. The purpose and other advantages of the present disclosure are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0023] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0025] Figure 1 A schematic diagram of an embodiment of a virtual object processing method provided by an embodiment of the present disclosure;
[0026] Figure 2 A schematic diagram of a virtual object processing device provided by an embodiment of the present disclosure;
[0027] Figure 3A schematic diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of this embodiment clearer, the technical solution of this disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of this disclosure, rather than all the embodiments. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this disclosure.
[0029] In some virtual scenes (for example, in game virtual scenes), there may be problems with object resource loading or rendering, which require troubleshooting. For example, when a skill special effect is abnormal when releasing a skill, such as when a black block appears on the texture, when the special effect needs to be checked, it is always necessary to manually identify the abnormal skill special effect with the naked eye, then verify it with a log, and reverse the skill to find the specific special effect, then confirm the sub-special effects of the special effect being found, and perform shielding tests on the sub-special effects one by one.
[0030] However, in the above method, there are a large number of special effects and models in the actual virtual scene (e.g., game battle), which requires one to select and check in the editor list one by one, and it is impossible to quickly lock the desired special effects or models. Moreover, when the virtual scene is running, playing a special effect is usually a matter of a few seconds. The conventional manual troubleshooting in the editor requires running the process back and forth to reproduce the problem, or, according to the situation, log on the script code. In addition, usually in the editor mode of some game engines (e.g., Unreal Engine and Unity Game Engine), some objects (e.g., models or special effects) can be selected, and the detailed information of the model or special effects can be viewed, but they need to be manually selected or searched in the editor total list. The whole process requires manual troubleshooting and is complicated, and the time consumed is long. When the virtual scene is running, it is impossible to select a certain obscured object or special effect by clicking the screen, which leads to low development efficiency.
[0031] Based on the above problems, this embodiment provides a virtual object processing method, device, electronic device and storage medium, which can be applied to resource information query scenarios of virtual objects, especially resource information query scenarios of virtual objects in game virtual scenes.
[0032] In one embodiment of the present disclosure, the virtual object processing method can be run on a terminal device or a server. The terminal device can be a local terminal device. When the virtual object processing method is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0033] In one possible implementation, an embodiment of the present invention provides a virtual object processing method, providing a graphical user interface through a terminal device, wherein the terminal device can be the local terminal device mentioned above, or it can be a client device in the cloud interaction system mentioned above, and the graphical user interface includes virtual objects in the target virtual scene.
[0034] For ease of understanding, the specific process of this embodiment is described below. Figure 1 In this embodiment, an embodiment of the virtual object processing method includes the following steps:
[0035] Step 101, generating a bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene;
[0036] The target virtual scene may be a virtual scene that needs to be checked for virtual object anomalies, such as a game. The virtual object may be any entity (object or element) created in the target virtual scene, such as a character, a character model, or a special effect. As an example but not a limitation, the bounding box may be an axisymmetric bounding box, which may be used in two dimensions or in three dimensions. In this embodiment, the bounding box corresponding to the virtual object is used in three dimensions.
[0037] As an example but not limitation, it is possible to: obtain the posture information and geometric data of the virtual object, wherein the posture information includes but is not limited to rotation information and scaling state information; determine the bounding box type of the virtual object according to the shape and characteristics of the virtual object, wherein the bounding box type is, for example, an axisymmetric bounding box (AABB bounding box) and an oriented bounding box (OBB bounding box); obtain the bounding box information of the virtual object based on the bounding box type of the virtual object; determine the center point of the bounding box of the virtual object based on the position of the virtual object in the target virtual scene; generate the bounding box corresponding to the virtual object based on the posture information, geometric data and bounding box information of the virtual object, and the center point of the bounding box, wherein the generation of the bounding box can be parallelized through the multi-core characteristics of the processor. The efficiency and accuracy of the bounding box generation are improved.
[0038] As an example but not limitation, after the bounding box corresponding to the virtual object is generated, the bounding box corresponding to the virtual object is cached to avoid repeated calculation of the bounding box of the same object, thereby saving processing time.
[0039] Step 102, in response to the first touch operation, determining a touch position of the first touch operation on the graphical user interface;
[0040] The first touch operation may be a preset touch operation such as a click operation, a double-click operation, or a long press operation. The specific setting may be based on the requirements and is not limited here. As an example but not a limitation, the area of the first touch operation may be the area where the virtual object in the graphical user interface is located, the object of the first touch operation is the virtual object in the target virtual scene, and the area of the first touch operation includes at least one virtual object.
[0041] As an example but not limitation, in response to a first touch operation, screen coordinates corresponding to the first touch operation are obtained; the screen coordinates are adjusted according to the pixel density of the screen of the terminal device to obtain adjusted screen coordinates to ensure that the coordinates are consistent at different resolutions, thereby obtaining the touch position of the first touch operation in the graphical user interface.
[0042] Step 103, generating a ray in the target virtual scene based on the touch position and the position of the camera in the target virtual scene;
[0043] Here, the ray is a ray starting from the position of the camera and passing through the touch position. As an example but not a limitation, the touch position is converted into normalized device coordinates; the position of the camera is used as the starting point; the normalized device coordinates are converted into a direction vector in the world coordinate system through the projection matrix and the view matrix; the direction vector is normalized to obtain a normalized ray direction; and the ray is generated based on the starting point and the normalized ray direction.
[0044] Step 104, determining a target object from the virtual object based on a positional relationship between the ray and a bounding box corresponding to the virtual object;
[0045] If the positional relationship between the ray and the bounding box corresponding to the virtual object is an intersection relationship, the object of the intersecting bounding box is determined as the target object. That is, as an example but not a limitation, an intersection test can be performed based on the ray and the bounding box corresponding to the virtual object to obtain intersection point information, wherein the intersection point information includes but is not limited to intersection point coordinates, intersection point number and intersection point type; based on the intersection point information, the virtual object in the virtual object that intersects with the ray is determined; the virtual object in the virtual object that intersects with the ray is determined as the target object, wherein the number of objects in the target object is at least one.
[0046] By determining the target object from the virtual object based on the positional relationship between the ray and the bounding box corresponding to the virtual object, it supports selecting at least one virtual object (virtual object) through a first touch operation (for example, clicking the screen) during operation, avoiding the situation where the target object cannot be selected by clicking the screen due to occlusion.
[0047] Step 105, in response to the second touch operation, determining an object to be displayed from the target object, and creating a sub-user interface, wherein the object to be displayed is the object in the target object targeted by the second touch operation;
[0048] The second touch operation may be a preset touch operation such as a click operation, a double-click operation, or a long press operation. The specific operation may be set as required and is not limited here. As an example but not a limitation, the area of the second touch operation may be a display area corresponding to a target object in a graphical user interface, and the object of the second touch operation may be the target object and / or resource reference information corresponding to the target object.
[0049] Among them, as an example but not limitation, the object to be displayed may be the object corresponding to the touch position of the second touch operation in the graphical user interface, and the object to be displayed may also be the object of the third interactive control corresponding to the second touch operation in the graphical user interface, and the third interactive control corresponds one-to-one to each object in the target object.
[0050] Among them, as an example but not limitation, the size of the display area of the sub-user interface may be less than or equal to the size of the display area of the graphical user interface; the sub-user interface may be suspended on the graphical user interface, for example, the sub-user interface is displayed on the graphical user interface in the form of a modal dialog box, pop-up window or floating layer.
[0051] As an example but not limitation, a class or component is created based on a preset layout structure and elements to obtain a sub-interface class or sub-interface component; the required user interface (UI) elements are added and configured in the sub-interface class or sub-interface component, and the appropriate position, size and interactive behavior are set for each UI element, and event listeners or callback functions are added to process the logic of user input or interface changes.
[0052] Step 106: Display resource reference information of the object to be displayed in the sub-user interface.
[0053] Among them, the resource reference information of the object to be displayed includes resource metadata, and may also include other categories of data besides resource metadata; the resource reference information of the object to be displayed may include resource metadata of the sub-virtual object of the object to be displayed, and may also include resource metadata of the object to be displayed; resource metadata may include resource path, and resource metadata may also include class object information, and class object information may include but is not limited to the instance and name of the class object. The content of resource metadata is set according to the content supported by the applied engine. For example, if the engine supports resource path and class object information, the resource metadata includes class object information and resource path; if the engine only supports resource path, the resource metadata is resource path.
[0054] As an example but not limitation, resource reference information of each object in the to-be-displayed object is displayed in the sub-user interface in the form of an interactive control. By displaying the resource reference information of the to-be-displayed object in the sub-user interface, the user can confirm whether the currently selected virtual object is the target object.
[0055] The above-mentioned virtual object processing method determines the target object by the positional relationship between the ray generated based on the touch position and the position of the camera in the target virtual scene and the bounding box corresponding to the virtual object, and displays the resource reference information of the object to be displayed in the target object in the sub-user interface. It can quickly and effectively lock the target object with problems and determine the object type and corresponding resources of the target object, avoiding the situation where the target object cannot be selected by clicking the screen due to occlusion and the problem of running back and forth to reproduce the process. At the same time, it will not affect the continued operation of the program, thereby improving development efficiency.
[0056] In one implementation, when generating a bounding box corresponding to a virtual object based on the position of the virtual object in a target virtual scene, the following can be done: based on the position of the virtual object in the target virtual scene, obtaining bounding box information corresponding to the virtual object from a preset object file, wherein the virtual object includes a model and special effects, the files stored in the preset object file include a model file or a special effects file, and a center point of the bounding box corresponding to the bounding box information is the position of the virtual object in the target virtual scene; and generating a bounding box corresponding to the virtual object based on the bounding box information corresponding to the virtual object.
[0057] By reading the corresponding bounding box information from the preset object file based on the position of the virtual object in the target virtual scene, and generating the corresponding bounding box based on the bounding box information, real-time interaction can be supported, the dynamic response capability of the target virtual scene is enhanced, the misjudgment and missed judgment of the target object are reduced, the calculation efficiency is improved, and it helps to improve the efficiency and accuracy of target object determination.
[0058] In one implementation, before obtaining the bounding box information corresponding to the virtual object from the preset object file based on the position of the virtual object in the target virtual scene, it is also possible to: store the bounding box information of the virtual object offline. Specifically, it is possible to: read the bounding boxes of all objects in the virtual object when the resources of the virtual object (model and / or special effect) are produced or when the target virtual scene is running; determine the type of the bounding box based on the read bounding box, and record the size information of the bounding box (for example, length, width, height); store the type and size information of the bounding box in the preset file to obtain the preset object file. By creating a preset object file to store the bounding box information, it is possible to facilitate quick query of the bounding box information.
[0059] In one implementation, the function of establishing a bounding box in the operation of the target virtual scene is only used in the test process. When the operation starts the object interaction mode (for example, the object selection mode), the bounding box is established, that is, based on the position of the virtual object in the target virtual scene, when the bounding box information corresponding to the virtual object is obtained from the preset object file, it can be: when it is detected that the target virtual scene is running and in the state of the object interaction mode, the virtual objects (for example, models or special effects) in the target virtual scene are traversed to obtain the position of the virtual object in the target virtual scene, wherein the virtual object is the object of the parent node itself (that is, the parent virtual object), and the virtual object also has a child virtual object; with the position of the virtual object in the target virtual scene as the center, the bounding box information in the preset object file is read to obtain the bounding box information corresponding to the virtual object. By reading the bounding box information corresponding to the virtual object from the preset object file at runtime, dynamic adaptability can be enhanced, which can help improve the accuracy of automatic determination of the target object.
[0060] Among them, since the virtual object may be bound to some other objects, or the virtual object may have some other objects, the virtual object is the object of the parent node itself, and the virtual object also has child virtual objects. For example, a model may be bound to some special effects or other models, and a special effect may have multiple child special effects. The virtual object (virtual object) in the target virtual scene refers to the parent node of the model or special effect itself.
[0061] In one implementation, after determining the touch position of the first touch operation in response to the first touch operation on the graphical user interface, it is also possible to: display a mask or a highlight mark in the display area of the touch position of the graphical user interface, wherein the mask or the highlight mark is used to highlight the touch position. Highlighting the touch position by using the mask or the highlight mark enhances the visual effect of the touch position, which is conducive to ensuring the accuracy of the touch position.
[0062] In one implementation, after determining the target object from the virtual object based on the positional relationship between the ray and the bounding box corresponding to the virtual object, it is also possible to: display the target object and the resource path of the target object in a first preset style in a graphical user interface; in response to a second touch operation, determine the object to be displayed from the target object, and create a sub-user interface; in response to the second touch operation, determine the object to be displayed from the target object, obtain resource reference information of the object to be displayed based on the resource path of the object to be displayed, and create a sub-user interface for displaying the resource reference information of the object to be displayed.
[0063] Wherein, as an example but not limitation, before displaying the target object and the resource path of the target object in the first preset style in the graphical user interface, the resource path of the target object can be obtained, and the target object and the resource reference information of the target object can be stored in a preset list. The resource reference information of the target object is displayed in the graphical user interface in the first preset style of the stored list, wherein the first preset style can be the style of the list, and the preset list is a pre-created empty list for storing the relevant information of the current target object; a plurality of information interaction controls are distributed in the graphical user interface, each information interaction control corresponds to each object of the information in the stored list, and each information interaction control displays the information of the corresponding object in the stored list, for example, the instance of the class object (or the name of the class object) of each object in the target object is displayed in the graphical user interface, and its corresponding resource path is displayed. Wherein, the information in the stored list is the brief information of the target object. Alternatively, a list component containing multiple options emerges in the graphical user interface, and the list component is used to display the information in the stored list.
[0064] Among them, as an example but not limitation, the second touch operation can be a preset touch operation such as a click operation, a double-click operation, a long press operation, etc. for each information interaction control or each option in the graphical user interface. It can be set specifically according to needs and is not limited here. The object to be displayed is the object corresponding to the information interaction control of the second touch operation or the object corresponding to the option of the second touch operation. The second touch object can be any object in the displayed target object or the resource path corresponding to any object. For example, a preset touch operation such as a click operation, a double-click operation, a long press operation, etc. can be performed on the resource path of any object in the resource reference information of the target object displayed in the graphical user interface.
[0065] Among them, the sub-user interface is a three-rendering-two (3D rendering 2D interface) UI interface; the sub-user interface can be in the form of a pop-up window; the sub-user interface is used to display the sub-virtual object information corresponding to the object to be displayed, and the displayed information is used for users to troubleshoot problems.
[0066] By storing the resource reference information of the target object in a preset list, it is convenient to view and use the information of the subsequent target object, avoiding affecting the running objects. By displaying the information in the stored list in the graphical user interface, it is convenient to consult the information, and the visual presentation and interaction of the information are realized. The object to be displayed is determined by touch operation, and a sub-user interface is created, which improves the convenience and response speed of operation, and increases the situational adaptability and personalization of the application.
[0067] In one implementation, after displaying the resource reference information of the object to be displayed in the sub-user interface, it is also possible to: determine the touched target sub-virtual object in response to a touch operation on the sub-user interface, wherein each object in the virtual object corresponds to at least one sub-virtual object; load the resource information of the target sub-virtual object, and render based on the loaded resource information to display the resource file of the target sub-virtual object in the sub-user interface, wherein the resource file is used to store resource data.
[0068] Among them, the touch operation is a preset touch operation such as a click operation, a double-click operation, and a long press operation. It can be set specifically according to needs and is not limited here. The target child virtual object is a child virtual object hung on a socket on the selected parent virtual object, for example, a child special effect or other child model), for example, a child special effect or other child model hung on a socket on a model (parent virtual object), or a child special effect on a special effect (parent virtual object). Resource information includes but is not limited to resource paths, for example, all texture paths, click the thumbnail of the corresponding texture path. All child virtual objects of the object to be displayed and the information corresponding to all child virtual objects are displayed in the child user interface. The user troubleshoots the problem by consulting the resource file of the target child virtual object displayed in the child user interface. As an example and not a limitation, the resource file can be a texture map (Texture), a three-dimensional model (3D Models) and an animation sequence (Animation Sequences), icons (Icons), etc. of a character, environment, interface element, etc.
[0069] The object of the touch operation on the sub-user interface is any sub-virtual object of the object to be displayed.
[0070] As an example but not limitation, after loading the resource information of the target sub-virtual object and rendering based on the loaded resource information to display the resource file of the target sub-virtual object in the sub-user interface, you can: respond to a trigger operation on the resource information of the target sub-virtual object, determine the target resource path, load and render the resources of the resource path to the sub-user interface.
[0071] Through the touch operation of the sub-user interface, the resource file of the target sub-virtual object can be loaded and displayed in the sub-user interface, so that the specific resource reference situation can be quickly viewed when the program is running, and the on-demand loading of resources and dynamic content display are realized, which reduces the resource usage at runtime and facilitates the review and confirmation of information.
[0072] In one implementation, after loading the resource information of the target sub-virtual object and rendering based on the loaded resource information to display the resource information of the target sub-virtual object in the sub-user interface, it is also possible to: respond to a triggering operation of the first interactive control in the sub-user interface and locate the target resource file through a preset interface.
[0073] Among them, the first interactive control can be a button, a slider, etc., which can be set according to the needs and is not limited here. The trigger operation can be a preset touch operation such as a click operation, a double-click operation, and a long press operation. It can be set according to the needs and is not limited here. As an example but not a limitation, the first interactive control can be attached to the edge of the sub-user interface, or it can be displayed in the area where the specified information is located in the sub-user interface, wherein the specified information can be the target sub-virtual object, and it can also be the resource file path corresponding to the sub-virtual object.
[0074] As an example but not a limitation, when locating the corresponding target resource file through a preset interface in response to a triggering operation of the first interactive control in the sub-user interface, the following can be done: in response to the triggering operation of the first interactive control in the sub-user interface, determine the triggered target resource file path; locate the corresponding target resource file based on the target resource file path through the preset interface. As an example but not a limitation, the preset interface can be an interface (API) of the Windows system, and clicking the first interactive control can call the interface (API) of the Windows system to quickly open the folder and locate the corresponding target resource file.
[0075] By triggering the first interactive control in the sub-user interface, the preset interface is called to locate the target resource file, and other tools are provided to open and view the corresponding target resource file, which enhances adaptability and scalability, improves application response speed and user experience, enhances interface interactivity, and realizes flexible resource configuration.
[0076] In one implementation, after loading the resource information of the target sub-virtual object and rendering based on the loaded resource information to display the resource information of the target sub-virtual object in the sub-user interface, it is also possible to: determine the target resource path in response to a trigger operation on the sub-user interface, wherein the resource reference information of the object to be displayed includes at least one resource path of the object to be displayed; reacquire the original file information based on the target resource path; recursively search for resource information based on the original file information to obtain the reacquired resource reference information of the object to be displayed; and display the reacquired resource reference information of the object to be displayed in the sub-user interface.
[0077] Among them, the trigger operation is a preset touch operation such as a click operation, a double-click operation, and a long press operation. It can be set specifically according to needs and is not limited here. As an example but not a limitation, in response to a trigger operation on a sub-user interface, the resource path corresponding to the trigger operation is determined as the target resource path; the original file can be re-read based on the target resource path, and the information in the original file (the information of the original file includes but is not limited to the content and attributes of the source file) can be returned. Based on the original file information, the resource reference information is recursively searched, and the resource paths corresponding to the sub-effects and sub-models of all objects to be displayed are listed, so as to obtain the resource reference information re-acquired by the object to be displayed; the resource reference information re-acquired by the object to be displayed is loaded and rendered to the sub-user interface to display the resource reference information re-acquired by the object to be displayed in the sub-user interface. Among them, the original file can be understood as an original data file that creates and defines a three-dimensional model or a two-dimensional graphic of a virtual object in a target virtual scene, for example, a 3D model file, a 2D image resource, a texture map, and an animation file.
[0078] Among them, when the resource reference information of the object to be displayed includes a resource path of the object to be displayed, the target resource path is the resource path of the object to be displayed; when the resource reference information of the object to be displayed includes more than one resource path of the object to be displayed, the target resource path is any one of the more than one resource paths of the object to be displayed or a marked resource path (the marked resource path can be understood as a resource path that can reread the original file to recursively search for resource information). As an example but not a limitation, the application scenario of this solution can be: when the sub-user interface only displays the resource path of the object to be displayed, but cannot display the sub-virtual object and the resource metadata of the sub-virtual object, the resource path of the object to be displayed (i.e., the target resource path) can be clicked in the sub-user interface to re-acquire the original file information, and the resource information is recursively searched based on the original file information to obtain the resource reference information re-acquired by the object to be displayed (for example, all sub-effects and all sub-models corresponding to the object to be displayed, and the resource paths corresponding to all sub-effects and all sub-models), and the resource reference information re-acquired by the object to be displayed is displayed in the sub-user interface.
[0079] By triggering the target resource path in the sub-user interface, the resource reference information retrieved by the object to be displayed is loaded into the UI display of the target virtual scene. This can not affect the consultation of detailed information when the engine does not support other information outside the resource path. It can dynamically update the UI content, optimize resource management, enhance scalability and flexibility, and improve personalized experience.
[0080] In one implementation, after the resource reference information of the object to be displayed is displayed in the sub-user interface, it is also possible to: determine an abnormality detection result based on the resource reference information of the object to be displayed.
[0081] Among them, as an example but not limitation, the abnormal detection result may be a result identified by methods other than non-automatic detection (for example, an abnormal result of an object to be displayed obtained by manual detection of the resource reference information of the object to be displayed), or a result obtained by detecting the resource reference information of the object to be displayed based on preset detection rules, and may also include a result obtained by detecting the resource reference information of the object to be displayed based on preset detection rules and a result identified by methods other than non-automatic detection.
[0082] By determining the anomaly detection result based on the resource reference information of the object to be displayed, the user experience can be optimized, which is conducive to improving the troubleshooting and confirmation of problems.
[0083] In one implementation, after determining the abnormality detection result based on the resource reference information of the object to be displayed, it is also possible to: display the abnormality detection result in a second preset style in the sub-user interface to enhance the richness and comprehensiveness of information display. In addition, in addition to displaying the abnormality detection result in the second preset style in the sub-user interface, the resource reference information of the object to be displayed can also be displayed to facilitate the user to consult and interact with the resource reference information of the object to be displayed.
[0084] In one implementation, when determining an abnormality detection result based on resource reference information of an object to be displayed, it is possible to: detect the resource reference information of the object to be displayed based on preset detection rules to obtain an abnormality detection result, wherein the preset detection rules are used to detect display problems of the object to be displayed; after determining the abnormality detection result based on the resource reference information of the object to be displayed, it is also possible to: display the abnormality detection result in a second preset style in a sub-user interface.
[0085] Among them, rendering can be performed based on the resource reference information and the abnormality detection result of the object to be displayed, so as to display the resource reference information and the abnormality detection result of the object to be displayed in the sub-user interface.
[0086] Among them, the abnormal detection result includes the result obtained by detecting the resource reference information of the object to be displayed based on the preset detection rules. Through automated detection, the efficiency and convenience of troubleshooting can be improved. Among them, as an example but not limitation, the result obtained by detecting the resource reference information of the object to be displayed based on the preset detection rules is the result obtained by automated detection through artificial intelligence, and the preset detection rules are used to detect display problems of the object to be displayed. The detection content of the preset detection rules includes but is not limited to format, pixel and path validity. As an example but not limitation, through a preset detection algorithm, the resource reference information of the object to be displayed is detected based on the preset detection rules to obtain a first detection result, wherein the detection algorithm can be a regular expression matching algorithm, a path traversal algorithm, a hash check algorithm, a dependency graph algorithm, a pattern matching algorithm or a machine learning classification algorithm, which is not specifically limited here to ensure the accuracy and efficiency of the detection.
[0087] As an example but not a limitation, the second preset style may be a highlight display mode or a semi-transparent mask.
[0088] Through detection based on preset detection rules, automated detection is achieved, which improves the efficiency and convenience of troubleshooting. By displaying the abnormal detection results in the sub-user interface, the richness and comprehensiveness of information display can be achieved, which is conducive to improving the accuracy of problem troubleshooting and confirmation, thereby improving development efficiency.
[0089] Among them, in one implementation method, the abnormal detection result includes, in addition to the result obtained by detecting the resource reference information of the object to be displayed based on preset detection rules, also includes the result identified by methods other than non-automatic detection, that is, the abnormal detection result includes a first detection result and a second detection result, the first detection result is the result obtained by detecting the resource reference information of the object to be displayed based on the preset detection rules, and the second detection result is the result identified by methods other than non-automatic detection, that is, when determining the abnormal detection result based on the resource reference information of the object to be displayed, it is possible to: detect the resource reference information of the object to be displayed based on the preset detection rules to obtain the first detection result, wherein the preset detection rules are used to detect display problems of the object to be displayed; obtain the second detection result, wherein the second detection result is the result identified by methods other than non-automatic detection; and determine the first detection result and the second detection result as abnormal detection results.
[0090] Among them, the second detection result can be understood as a problem obtained by manual identification, and the content of the second detection result can be empty, that is, when manual identification is not required, the content of the second detection result is empty.
[0091] As an example but not limitation, when obtaining the second detection result, you can: obtain a marked item, where the marked item is an information item in the resource reference information that does not fully comply with the preset rules but is not sufficient to be clearly judged as an error; send the marked item to the review end to obtain the second detection result based on the marked item fed back by the review end.
[0092] Through the first test result and the second test result, a dual detection mechanism is realized, which ensures the comprehensiveness and accuracy of the detection while realizing automated detection to improve efficiency. It also helps to improve the richness and comprehensiveness of information display, helps to improve the efficiency and accuracy of problem troubleshooting, and thus helps to improve development efficiency.
[0093] Corresponding to the above method embodiment, see Figure 2 A schematic diagram of a virtual object processing device is shown, the device comprising:
[0094] A first generating module 201, configured to generate a bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene;
[0095] A first determining module 202, configured to determine, in response to a first touch operation, a touch position of the first touch operation on the graphical user interface;
[0096] A second generating module 203, configured to generate a ray in the target virtual scene based on the touch position and the position of the camera in the target virtual scene;
[0097] A second determination module 204 is used to determine the target object from the virtual object based on the positional relationship between the ray and the bounding box corresponding to the virtual object;
[0098] A third determining module 205, configured to determine an object to be displayed from the target object in response to the second touch operation, and to create a sub-user interface, wherein the object to be displayed is an object in the target object targeted by the second touch operation;
[0099] The first display module 206 is used to display resource reference information of the object to be displayed in the sub-user interface.
[0100] The above-mentioned virtual object processing device determines the target object by the positional relationship between the ray generated based on the touch position and the position of the camera in the target virtual scene and the bounding box corresponding to the virtual object, and displays the resource reference information of the object to be displayed in the target object in the sub-user interface. It can quickly and effectively lock the target object with problems and determine the object type and corresponding resources of the target object, avoiding the situation where the target object cannot be selected by clicking the screen due to occlusion and the problem of running back and forth to reproduce the process. At the same time, it will not affect the continued operation of the program, thereby improving development efficiency.
[0101] Optionally, the first generating module 201 may also be used for:
[0102] Based on the position of the virtual object in the target virtual scene, obtaining bounding box information corresponding to the virtual object from a preset object file, wherein the virtual object includes a model and a special effect, and the file stored in the preset object file includes a model file or a special effect file;
[0103] A bounding box corresponding to the virtual object is generated based on the bounding box information corresponding to the virtual object.
[0104] Optionally, the virtual object processing device further includes:
[0105] A reading module 207, used to read the bounding boxes of all objects in the virtual object when the resources of the virtual object are being produced or the target virtual scene is running;
[0106] A recording module 208, configured to determine the type of the bounding box based on the read bounding box, and record size information of the bounding box;
[0107] The storage module 209 is used to store the type and size information of all bounding boxes into a preset file to obtain a preset object file.
[0108] Optionally, the first generating module 201 may also be used for:
[0109] When it is detected that the target virtual scene is running and in an object interaction mode, traverse the virtual objects in the target virtual scene to obtain the positions of the virtual objects in the target virtual scene;
[0110] Taking the position of the virtual object in the target virtual scene as the center, read the bounding box information in the preset object file to obtain the bounding box information corresponding to the virtual object.
[0111] Optionally, the virtual object processing device further includes:
[0112] A second display module 210, configured to display the target object and the resource path of the target object in a first preset style in a graphical user interface;
[0113] The third determination module 205 may also be used for:
[0114] In response to the second touch operation, an object to be displayed is determined from the target object, resource reference information of the object to be displayed is acquired based on a resource path of the object to be displayed, and a sub-user interface for displaying the resource reference information of the object to be displayed is created.
[0115] Optionally, the virtual object processing device further includes:
[0116] A fourth determining module 211 is used to determine the touched target sub-virtual object in response to the touch operation on the sub-user interface, wherein each virtual object corresponds to at least one sub-virtual object;
[0117] The loading and rendering module 212 is used to load resource information of the target sub-virtual object and perform rendering based on the loaded resource information to display the resource file of the target sub-virtual object in the sub-user interface, wherein the resource file is used to store resource data.
[0118] Optionally, the virtual object processing device further includes:
[0119] The positioning module 213 is used to locate the corresponding target resource file through a preset interface in response to the triggering operation of the first interactive control in the sub-user interface.
[0120] Optionally, the virtual object processing device further includes:
[0121] A fifth determining module 214, configured to determine a target resource path in response to a triggering operation on the sub-user interface, wherein the resource reference information of the object to be displayed includes at least one resource path of the object to be displayed;
[0122] The acquisition module 215 is used to reacquire the original file information based on the target resource path;
[0123] A search module 216, used to recursively search for resource information based on the original file information to obtain resource reference information retrieved by the object to be displayed;
[0124] The third display module 217 is used to display the resource reference information retrieved by the object to be displayed in the sub-user interface.
[0125] Optionally, the virtual object processing device further includes:
[0126] The sixth determination module 218 is used to determine the abnormality detection result based on the resource reference information of the object to be displayed.
[0127] Optionally, the sixth determining module 218 may also be used to:
[0128] The resource reference information of the object to be displayed is detected based on preset detection rules to obtain an abnormal detection result, wherein the preset detection rules are used to detect display problems of the object to be displayed.
[0129] Optionally, the virtual object processing device further includes:
[0130] The fourth display module 219 is used to display the abnormality detection result in a second preset style in the sub-user interface.
[0131] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above virtual object processing method. The electronic device can be a server or a terminal device.
[0132] See also Figure 3 As shown, the electronic device includes a processor 300 and a memory 301 , wherein the memory 301 stores machine executable instructions that can be executed by the processor 300 , and the processor 300 executes the machine executable instructions to implement the above-mentioned virtual object processing method.
[0133] Further, Figure 3 The electronic device shown further includes a bus 302 and a communication interface 303 , and the processor 300 , the communication interface 303 and the memory 301 are connected via the bus 302 .
[0134] The memory 301 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 303 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 302 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0135] The processor 300 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 300. The above processor 300 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in this embodiment can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with this embodiment can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 301, and the processor 300 reads the information in the memory 301 and completes the following steps in combination with its hardware:
[0136] Providing a graphical user interface through a terminal device, the graphical user interface including virtual objects in a target virtual scene;
[0137] Based on the position of the virtual object in the target virtual scene, a bounding box corresponding to the virtual object is generated;
[0138] In response to the first touch operation, determining a touch position of the first touch operation on the graphical user interface;
[0139] Generate a ray in the target virtual scene based on the touch position and the position of the camera in the target virtual scene;
[0140] Determine the target object from the virtual object based on the positional relationship between the ray and the bounding box corresponding to the virtual object;
[0141] In response to the second touch operation, determining an object to be displayed from the target objects, and creating a sub-user interface, wherein the object to be displayed is an object in the target object targeted by the second touch operation;
[0142] The resource reference information of the object to be displayed is displayed in the sub-user interface.
[0143] The target object is determined by the positional relationship between the ray generated based on the touch position and the position of the camera in the target virtual scene and the bounding box corresponding to the virtual object, and the resource reference information of the object to be displayed in the target object is displayed in the sub-user interface. This can quickly and effectively lock the target object with problems, and determine the object type and corresponding resources of the target object, avoiding the problem of running back and forth to reproduce the process and improving development efficiency.
[0144] The step of generating a bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene includes:
[0145] Based on the position of the virtual object in the target virtual scene, obtaining bounding box information corresponding to the virtual object from a preset object file, wherein the virtual object includes a model and a special effect, and the file stored in the preset object file includes a model file or a special effect file;
[0146] A bounding box corresponding to the virtual object is generated based on the bounding box information corresponding to the virtual object.
[0147] Before the step of generating a bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene, the following steps are included:
[0148] When the resources of the virtual object are being created or the target virtual scene is running, the bounding boxes of all objects in the virtual object are read;
[0149] Determine the type of the bounding box based on the read bounding box, and record the size information of the bounding box;
[0150] The type and size information of all bounding boxes are stored in a preset file to obtain a preset object file.
[0151] The step of generating a bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene includes:
[0152] When it is detected that the target virtual scene is running and in an object interaction mode, traverse the virtual objects in the target virtual scene to obtain the positions of the virtual objects in the target virtual scene;
[0153] Taking the position of the virtual object in the target virtual scene as the center, read the bounding box information in the preset object file to obtain the bounding box information corresponding to the virtual object.
[0154] After the step of determining the target object from the virtual object based on the positional relationship between the ray and the bounding box corresponding to the virtual object, the method further includes:
[0155] Displaying the target object and the resource path of the target object in a first preset style in a graphical user interface;
[0156] The above step of determining the object to be displayed from the target object and creating a sub-user interface in response to the second touch operation includes:
[0157] In response to the second touch operation, an object to be displayed is determined from the target object, resource reference information of the object to be displayed is acquired based on a resource path of the object to be displayed, and a sub-user interface for displaying the resource reference information of the object to be displayed is created.
[0158] After the above step of displaying the resource reference information of the object to be displayed in the sub-user interface, the following steps are included:
[0159] In response to a touch operation on the sub-user interface, determining a touched target sub-virtual object, wherein each of the virtual objects corresponds to at least one sub-virtual object;
[0160] The resource information of the target child virtual object is loaded, and rendering is performed based on the loaded resource information to display the resource file of the target child virtual object in the sub-user interface, wherein the resource file is used to store resource data.
[0161] After the above steps of loading the resource information of the target child virtual object and rendering based on the loaded resource information to display the resource file of the target child virtual object in the child user interface, the method further includes:
[0162] In response to a triggering operation of the first interactive control in the sub-user interface, a corresponding target resource file is located through a preset interface.
[0163] After the above step of displaying the resource reference information of the object to be displayed in the sub-user interface, the method further includes:
[0164] In response to a trigger operation on the sub-user interface, determining a target resource path, wherein the resource reference information of the object to be displayed includes at least one resource path of the object to be displayed;
[0165] Re-obtain the original file information based on the target resource path;
[0166] Recursively search for resource information based on the original file information to obtain resource reference information retrieved by the object to be displayed;
[0167] The resource reference information retrieved by the object to be displayed is displayed in the sub-user interface.
[0168] After the above step of displaying the resource reference information of the object to be displayed in the sub-user interface, the method further includes:
[0169] An anomaly detection result is determined based on resource reference information of the object to be displayed.
[0170] The above step of determining the abnormality detection result based on the resource reference information of the object to be displayed includes:
[0171] Detecting resource reference information of the object to be displayed based on a preset detection rule to obtain an abnormality detection result, wherein the preset detection rule is used to detect display problems of the object to be displayed;
[0172] After the above step of determining the abnormality detection result based on the resource reference information of the object to be displayed, the following step is further included:
[0173] The anomaly detection result is displayed in the sub-user interface in a second preset style.
[0174] This embodiment further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the following steps of the virtual object processing method:
[0175] Providing a graphical user interface through a terminal device, the graphical user interface including virtual objects in a target virtual scene;
[0176] Based on the position of the virtual object in the target virtual scene, a bounding box corresponding to the virtual object is generated;
[0177] In response to the first touch operation, determining a touch position of the first touch operation on the graphical user interface;
[0178] Generate a ray in the target virtual scene based on the touch position and the position of the camera in the target virtual scene;
[0179] Determine the target object from the virtual object based on the positional relationship between the ray and the bounding box corresponding to the virtual object;
[0180] In response to the second touch operation, determining an object to be displayed from the target objects, and creating a sub-user interface, wherein the object to be displayed is an object in the target object targeted by the second touch operation;
[0181] The resource reference information of the object to be displayed is displayed in the sub-user interface.
[0182] The target object is determined by the positional relationship between the ray generated based on the touch position and the position of the camera in the target virtual scene and the bounding box corresponding to the virtual object, and the resource reference information of the object to be displayed in the target object is displayed in the sub-user interface. This can quickly and effectively lock the target object with problems, and determine the object type and corresponding resources of the target object, avoiding the problem of running back and forth to reproduce the process and improving development efficiency.
[0183] The step of generating a bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene includes:
[0184] Based on the position of the virtual object in the target virtual scene, obtaining bounding box information corresponding to the virtual object from a preset object file, wherein the virtual object includes a model and a special effect, and the file stored in the preset object file includes a model file or a special effect file;
[0185] A bounding box corresponding to the virtual object is generated based on the bounding box information corresponding to the virtual object.
[0186] Before the step of generating a bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene, the following steps are included:
[0187] When the resources of the virtual object are being created or the target virtual scene is running, the bounding boxes of all objects in the virtual object are read;
[0188] Determine the type of the bounding box based on the read bounding box, and record the size information of the bounding box;
[0189] The type and size information of all bounding boxes are stored in a preset file to obtain a preset object file.
[0190] The step of generating a bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene includes:
[0191] When it is detected that the target virtual scene is running and in an object interaction mode, traverse the virtual objects in the target virtual scene to obtain the positions of the virtual objects in the target virtual scene;
[0192] Taking the position of the virtual object in the target virtual scene as the center, read the bounding box information in the preset object file to obtain the bounding box information corresponding to the virtual object.
[0193] After the step of determining the target object from the virtual object based on the positional relationship between the ray and the bounding box corresponding to the virtual object, the method further includes:
[0194] Displaying the target object and resource reference information of the target object in a first preset style in a graphical user interface;
[0195] The above step of determining the object to be displayed from the target object and creating a sub-user interface in response to the second touch operation includes:
[0196] In response to the second touch operation, an object to be displayed is determined from the target object, resource reference information of the object to be displayed is acquired based on a resource path of the object to be displayed, and a sub-user interface for displaying the resource reference information of the object to be displayed is created.
[0197] After the above step of displaying the resource reference information of the object to be displayed in the sub-user interface, the following steps are included:
[0198] In response to a touch operation on the sub-user interface, determining a touched target sub-virtual object, wherein each of the virtual objects corresponds to at least one sub-virtual object;
[0199] The resource information of the target child virtual object is loaded, and rendering is performed based on the loaded resource information to display the resource file of the target child virtual object in the sub-user interface, wherein the resource file is used to store resource data.
[0200] After the above steps of loading the resource information of the target child virtual object and rendering based on the loaded resource information to display the resource file of the target child virtual object in the child user interface, the method further includes:
[0201] In response to a triggering operation of the first interactive control in the sub-user interface, a corresponding target resource file is located through a preset interface.
[0202] After the above step of displaying the resource reference information of the object to be displayed in the sub-user interface, the method further includes:
[0203] In response to a trigger operation on the sub-user interface, determining a target resource path, wherein the resource reference information of the object to be displayed includes at least one resource path of the object to be displayed;
[0204] Re-obtain the original file information based on the target resource path;
[0205] Recursively search for resource information based on the original file information to obtain resource reference information retrieved by the object to be displayed;
[0206] The resource reference information retrieved by the object to be displayed is displayed in the sub-user interface.
[0207] After the above step of displaying the resource reference information of the object to be displayed in the sub-user interface, the method further includes:
[0208] An anomaly detection result is determined based on resource reference information of the object to be displayed.
[0209] The above-mentioned step of determining the abnormality detection result based on the resource reference information of the object to be displayed includes:
[0210] Detect resource reference information of the object to be displayed based on a preset detection rule to obtain an abnormality detection result, wherein the preset detection rule is used to detect display problems of the object to be displayed;
[0211] After the above step of determining the abnormality detection result based on the resource reference information of the object to be displayed, the following step is further included:
[0212] The anomaly detection result is displayed in the sub-user interface in a second preset style.
[0213] The computer program product of the virtual object processing method, device, electronic device and storage medium provided in this embodiment includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.
[0214] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0215] In addition, in the description of this embodiment, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in this disclosure can be understood according to specific circumstances.
[0216] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0217] In the description of the present disclosure, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present disclosure and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present disclosure. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0218] Finally, it should be noted that the above embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art who is familiar with the technical field can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the present embodiments, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be based on the protection scope of the claims.
Claims
1. A virtual object processing method, characterized in that: A graphical user interface is provided by a terminal device, wherein the graphical user interface includes a virtual object in a target virtual scene, and the method includes: Based on the position of the virtual object in the target virtual scene, generating a bounding box corresponding to the virtual object; In response to a first touch operation, determining a touch position of the first touch operation on the graphical user interface; generating a ray in the target virtual scene based on the touch position and the position of the camera in the target virtual scene; Determine a target object from the virtual object based on a positional relationship between the ray and a bounding box corresponding to the virtual object; In response to the second touch operation, determining an object to be displayed from the target object, and creating a sub-user interface, wherein the object to be displayed is an object in the target object targeted by the second touch operation; The resource reference information of the object to be displayed is displayed in the sub-user interface.
2. The method according to claim 1, characterized in that The step of generating a bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene comprises: Based on the position of the virtual object in the target virtual scene, obtaining bounding box information corresponding to the virtual object from a preset object file, wherein the virtual object includes a model and a special effect, and the file stored in the preset object file includes a model file or a special effect file; A bounding box corresponding to the virtual object is generated based on the bounding box information corresponding to the virtual object.
3. The method according to claim 2, characterized in that Before the step of generating a bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene, the method includes: When the resources of the virtual object are being created or the target virtual scene is running, the bounding boxes of all objects in the virtual object are read; Determine the type of the bounding box based on the read bounding box, and record the size information of the bounding box; The type and size information of all bounding boxes are stored in a preset file to obtain a preset object file.
4. The method according to claim 2, characterized in that: The step of acquiring bounding box information corresponding to the virtual object from the preset object file based on the position of the virtual object in the target virtual scene comprises: When it is detected that the target virtual scene is running and in an object interaction mode, traversing the virtual objects in the target virtual scene to obtain positions of the virtual objects in the target virtual scene; Taking the position of the virtual object in the target virtual scene as the center, the bounding box information in the preset object file is read to obtain the bounding box information corresponding to the virtual object.
5. The method according to claim 1, characterized in that After the step of determining the target object from the virtual object based on the positional relationship between the ray and the bounding box corresponding to the virtual object, the method further includes: Displaying the target object and the resource path of the target object in the graphical user interface in a first preset style; The step of determining the object to be displayed from the target object and creating a sub-user interface in response to the second touch operation includes: In response to the second touch operation, an object to be displayed is determined from the target object, resource reference information of the object to be displayed is acquired based on a resource path of the object to be displayed, and a sub-user interface for displaying the resource reference information of the object to be displayed is created.
6. The method according to claim 1, characterized in that After the step of displaying the resource reference information of the object to be displayed in the sub-user interface, the method further comprises: In response to a touch operation on the sub-user interface, determining a touched target sub-virtual object, wherein each of the virtual objects corresponds to at least one sub-virtual object; The resource information of the target sub-virtual object is loaded, and rendering is performed based on the loaded resource information to display the resource file of the target sub-virtual object in the sub-user interface, wherein the resource file is used to store resource data.
7. The method according to claim 6, characterized in that After the step of loading the resource information of the target child virtual object and rendering based on the loaded resource information to display the resource file of the target child virtual object in the child user interface, the method further includes: In response to a triggering operation of the first interactive control in the sub-user interface, a corresponding target resource file is located through a preset interface.
8. The method according to claim 1, characterized in that After the step of displaying the resource reference information of the object to be displayed in the sub-user interface, the method further includes: In response to a trigger operation on the sub-user interface, determining a target resource path, wherein the resource reference information of the object to be displayed includes at least one resource path of the object to be displayed; Re-acquire the original file information based on the target resource path; Recursively searching for resource information based on the original file information to obtain resource reference information reacquired by the object to be displayed; The resource reference information retrieved by the object to be displayed is displayed in the sub-user interface.
9. The method according to any one of claims 1 to 8, characterized in that: After the step of displaying the resource reference information of the object to be displayed in the sub-user interface, the method further includes: An abnormality detection result is determined based on the resource reference information of the object to be displayed.
10. The method according to claim 9, characterized in that The step of determining the abnormality detection result based on the resource reference information of the object to be displayed includes: Detecting resource reference information of the object to be displayed based on a preset detection rule to obtain an abnormality detection result, wherein the preset detection rule is used to detect display problems of the object to be displayed; After the step of determining the abnormality detection result based on the resource reference information of the object to be displayed, the method further includes: The abnormality detection result is displayed in the sub-user interface in a second preset style.
11. A virtual object processing device, characterized in that: A graphical user interface is provided through a terminal device, wherein the graphical user interface includes virtual objects in a target virtual scene, and the virtual object processing device includes: A first generating module, configured to generate a bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene; A first determining module, configured to determine, in response to a first touch operation, a touch position of the first touch operation on the graphical user interface; A second generating module, configured to generate a ray in the target virtual scene based on the touch position and the position of the camera in the target virtual scene; A second determination module, configured to determine a target object from the virtual object based on a positional relationship between the ray and a bounding box corresponding to the virtual object; a third determining module, configured to determine, in response to the second touch operation, an object to be displayed from the target object, and create a sub-user interface, wherein the object to be displayed is an object in the target object targeted by the second touch operation; The first display module is used to display the resource reference information of the object to be displayed in the sub-user interface.
12. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the virtual object processing method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the virtual object processing method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Game virtual object locking method and device and electronic equipment
CN110548286A
Interactive data processing method and device in game
CN113101638A
Object selection method and device, equipment, medium and program product
CN114327057A
Content display method and device and electronic equipment
CN116681872A
Interaction control method and apparatus for audio playback, and electronic device
WO2024055558A1