Virtual object processing method and apparatus, electronic device, and storage medium
By generating bounding boxes and rays of virtual objects to determine target objects and displaying resource reference information in the sub-user interface, the low development efficiency of resource loading and rendering in virtual scenes is solved, enabling rapid locking and resource determination, and improving development efficiency.
Patent Information
- Application Number
- CN202411488906.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2044-10-23
AI Technical Summary
In virtual scenarios, resource loading and rendering issues lead to low development efficiency, especially when skill effects are abnormal during skill release. Manual troubleshooting is cumbersome and time-consuming, making it impossible to quickly identify problematic effects or models.
By generating bounding boxes for virtual objects, generating rays based on touch and camera positions, identifying target objects, and displaying resource reference information in the sub-user interface, the system can quickly locate problematic objects, avoid click failures caused by occlusion, and resolve existing issues.
It improves development efficiency, quickly identifies the problem object and determines the object type and resources, avoids click failures and reproduction issues caused by occlusion, and does not affect program operation.
Smart Images

Figure CN119701335B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and particularly to a virtual object processing method and device, electronic equipment and storage medium. BACKGROUND
[0002] In some virtual scenes, there may be resource loading problems or rendering problems of objects, which need to be investigated. For example, abnormal skill special effects appear when skills are released, such as black blocks in the map, etc. The abnormal skill special effects need to be identified by humans, and then recorded log verification is performed, and the specific special effects are found through skill reverse, and then the sub-special effects of the found special effects are confirmed, and the sub-special effects are tested one by one. The whole process needs to be investigated manually and is complicated, and a long time is consumed, which leads to low development efficiency. SUMMARY
[0003] Therefore, the purpose of the present disclosure is to provide a virtual object processing method and device, electronic equipment and storage medium, which determines a target object based on the position relationship between a ray generated based on a touch position and the position of a camera in a target virtual scene and a bounding box corresponding to a virtual object, and displays resource reference information of an object to be displayed in the target object in a 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, avoid the situation that the target object cannot be selected by clicking the screen due to occlusion and the problem of back and forth running process reproduction, and at the same time, the continuous running of the program is not affected, and the development efficiency is improved.
[0004] In a first aspect, an embodiment of the present disclosure provides a virtual object processing method, which provides a graphical user interface through a terminal device, the graphical user interface including virtual objects in a target virtual scene, and the virtual object processing method includes:
[0005] Generating a bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene;
[0006] In response to a first touch operation, determining a touch position of the first touch operation in the graphical user interface;
[0007] Generating a ray in the target virtual scene based on the touch position and the position of a camera in the target virtual scene;
[0008] Determining a target object from the virtual object based on the position relationship between the ray and the bounding box corresponding to the virtual object;
[0009] determine a target object from the virtual objects based on a position relationship between the ray and a bounding box corresponding to the virtual objects, and create a sub user interface;
[0010] display resource reference information of the target object in the sub user interface.
[0011] In a second aspect, the embodiments of the present disclosure provide a virtual object processing apparatus, which provides a graphical user interface including virtual objects in a target virtual scene through a terminal device, and the virtual object processing apparatus includes:
[0012] a first generating module configured to generate a bounding box corresponding to the virtual object based on a position of the virtual object in the target virtual scene;
[0013] a first determining module configured to determine a touch position of a first touch operation on the graphical user interface in response to the first touch operation;
[0014] a second generating module configured to generate a ray in the target virtual scene based on the touch position and a position of a camera in the target virtual scene;
[0015] a second determining module configured to determine a target object from the virtual objects based on a position relationship between the ray and a bounding box corresponding to the virtual objects;
[0016] a third determining module configured to determine a target object from the virtual objects based on a position relationship between the ray and a bounding box corresponding to the virtual objects, and create a sub user interface;
[0017] a first displaying module configured to display resource reference information of the target object in the sub user interface.
[0018] In a third aspect, the embodiments of the present disclosure provide an electronic device including a processor and a memory, the memory storing machine executable instructions capable of being executed by the processor, and the processor executes the machine executable instructions to implement the virtual object processing method.
[0019] In a fourth aspect, the embodiments of the present disclosure provide a computer readable storage medium storing computer executable instructions, and the computer executable instructions, when invoked and executed by a processor, cause the processor to implement the virtual object processing method.
[0020] The embodiments of the present disclosure have the following beneficial effects:
[0021] The virtual object processing method, device, electronic device and storage medium generate a bounding box corresponding to the virtual object based on a position of the virtual object in the target virtual scene; in response to a first touch operation, a touch position of the first touch operation in the graphical user interface is determined; a ray is generated in the target virtual scene based on the touch position and a position of a camera in the target virtual scene; a target object is determined from the virtual object based on a positional relationship between the ray and the bounding box corresponding to the virtual object; in response to a second touch operation, a to-be-displayed object is determined from the target object, and a sub-user interface is created, wherein the to-be-displayed object is an object in the target object that is targeted by the second touch operation; and resource reference information of the to-be-displayed object is displayed in the sub-user interface. In this method, the target object is determined based on 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 to-be-displayed object in the target object is displayed in the sub-user interface, so that the target object that has a problem can be quickly and effectively locked, and the object type and corresponding resources of the target object can be determined, avoiding the situation that the target object cannot be selected by clicking the screen due to occlusion and the problem of back-and-forth process reproduction, while the continuous running of the program is not affected, and the development efficiency is improved.
[0022] Other features and advantages of the present disclosure will be set forth in the descriptions below, and in part will become apparent to those skilled in the art, or will be learned by practice of the present disclosure. The objects and other advantages of the present disclosure will be realized and achieved by the structures particularly pointed out in the description, claims, and drawings.
[0023] In order to make the above objectives, characteristics and advantages of the present disclosure more obvious and easy to understand, the following preferred embodiments are specifically described below, and the accompanying drawings are described in detail. BRIEF DESCRIPTION OF DRAWINGS
[0024] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present disclosure, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0025] Figure 1 An embodiment schematic diagram of a virtual object processing method provided by the embodiments of the present disclosure;
[0026] Figure 2 An embodiment schematic diagram of a virtual object processing device provided by the embodiments of the present disclosure;
[0027] Figure 3A schematic diagram of an electronic device is provided for the embodiments of the present disclosure. DETAILED DESCRIPTION
[0028] To make the objectives, technical solutions and advantages of the embodiments clearer, the technical solutions of the present disclosure will be described clearly and completely below with reference to the drawings. Obviously, the described embodiments are some, but not all, of the embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present disclosure.
[0029] In some virtual scenes (for example, in a game virtual scene), there may be resource loading problems or rendering problems of objects, which need to be investigated. For example, when a skill effect abnormality occurs during skill release, for example, when a black block appears on a map, etc., the skill effect needs to be investigated. In this case, the abnormal skill effect is always identified by the naked eye, and then recorded in the log for verification. Then, the specific effect is found by reversing the skill, and the sub-effects of the found effect are confirmed, and the sub-effects are tested one by one.
[0030] However, in the above method, there are a large number of effects and models in the actual virtual scene (for example, a game battle), which need to be selected and investigated one by one on the editor list, and the desired effect or model cannot be quickly locked. Moreover, during the running of the virtual scene, playing an effect usually takes only a few seconds. The conventional manual investigation in the editor needs to run back and forth to reproduce the problem, or log is printed on the script code according to the situation. In addition, in the editor mode of some game engines (for example, the unreal engine and the unity game engine), some objects (for example, models or effects) can be selected, and detailed information of the models or effects can be viewed, but they need to be manually selected or searched in the editor list. The whole process needs manual investigation and is complicated, and it takes a long time. When the virtual scene is running, it is not possible to select a certain object or effect that is blocked by clicking the screen, thereby resulting in low development efficiency.
[0031] Based on the above problems, the present embodiment provides a virtual object processing method, device, electronic device and storage medium. It can be applied to a virtual object resource information review scene, especially a virtual object resource information review scene in a game virtual scene.
[0032] The virtual object processing method in one of the embodiments of the present disclosure can run on a terminal device or a server. The terminal device can be a local terminal device. When the virtual object processing method runs on the 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, this invention provides a virtual object processing method that provides a graphical user interface through a terminal device. The terminal device can be either the aforementioned local terminal device or a client device in the aforementioned cloud interaction system. The graphical user interface includes virtual objects in a target virtual scene.
[0034] For ease of understanding, the specific process of this embodiment is described below. Please refer to [link / reference]. Figure 1 One embodiment of the virtual object processing method in this example includes the following steps:
[0035] Step 101: Generate the 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 can be any virtual scene requiring anomaly detection of virtual objects, such as a game. Virtual objects can be any entity (object or element) created within the target virtual scene, such as characters, character models, or special effects. As an example, and not a limitation, the bounding box can be an axisymmetric bounding box. Bounding boxes can be used in two dimensions or three dimensions; in this embodiment, the bounding box corresponding to the virtual object is three-dimensional.
[0037] By way of example, and not limitation, it is possible to: acquire the pose information and geometric data of a virtual object, wherein the pose information includes, but is not limited to, rotation information and scaling state information; determine the bounding box type of the virtual object based on its shape and characteristics, wherein the bounding box type is, for example, an axisymmetric bounding box (AABB bounding box) or a directed bounding box (OBB bounding box); acquire the bounding box information of the virtual object based on its bounding box type; determine the center point of the bounding box of the virtual object based on its position in the target virtual scene; and generate the bounding box corresponding to the virtual object based on its pose information, geometric data, bounding box information, and the center point of the bounding box. The generation of the bounding box can be parallelized using the multi-core capabilities of the processor, thus improving the efficiency and accuracy of bounding box generation.
[0038] As an example, and not a limitation, it is suggested that after generating the bounding box corresponding to the virtual object, the bounding box of the virtual object is cached to avoid repeatedly calculating the bounding box of the same object, thus saving processing time.
[0039] Step 102: In response to the first touch operation, determine the touch position of the first touch operation in the graphical user interface;
[0040] The first touch operation can be a preset touch operation such as a click operation, a double-click operation, a long-press operation, or the like. The first touch operation can be set according to requirements, and is not limited herein. As an example but not limitation, the region of the first touch operation can be a region in which a virtual object is located in the graphical user interface, and the object of the first touch operation is a virtual object in the target virtual scene. The region of the first touch operation includes at least one virtual object.
[0041] As an example but not limitation, in response to the first touch operation, a screen coordinate corresponding to the first touch operation is obtained; the screen coordinate is adjusted according to the pixel density of the screen of the terminal device to obtain an adjusted screen coordinate, so as to ensure that the coordinates are consistent under different resolutions, and the touch position of the first touch operation in the graphical user interface is obtained.
[0042] In step 103, a ray is generated in the target virtual scene based on the touch position and the position of the camera in the target virtual scene.
[0043] The ray is a ray that starts from the position of the camera and passes through the touch position. As an example but not limitation, the touch position is converted into normalized device coordinates; the position of the camera is taken as a starting point; the normalized device coordinates are converted into a direction vector in a world coordinate system through a projection matrix and a 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] In step 104, a target object is determined from the virtual object based on the positional relationship between the ray and the 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 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 coordinates, intersection point quantity, and intersection point type; the virtual object that intersects with the ray is determined based on the intersection point information; and 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, at least one virtual object (virtual object) can be selected by the first touch operation (for example, clicking the screen) in the running process, which avoids the situation that the target object cannot be selected by clicking the screen due to occlusion.
[0047] In response to the second touch operation, determining a to-be-displayed object from the target objects, and creating a sub-user interface, wherein the to-be-displayed object is an object in the target objects based on the second touch operation.
[0048] The second touch operation can be a preset touch operation such as a click operation, a double-click operation, or a long-press operation. The second touch operation can be set according to requirements, and is not limited herein. By way of example but not limitation, the region of the second touch operation can be a display region corresponding to the target objects in the graphical user interface, and the object of the second touch operation can be the target objects and / or resource reference information corresponding to the target objects.
[0049] By way of example but not limitation, the to-be-displayed object can be an object corresponding to a touch position of the second touch operation in the graphical user interface, or the to-be-displayed object can be an object of a third interactive control corresponding to the second touch operation in the graphical user interface, and the third interactive control corresponds to each object in the target objects one by one.
[0050] By way of example but not limitation, the display region of the sub-user interface can be smaller than or equal to the display region of the graphical user interface. The sub-user interface can be displayed on the graphical user interface in the form of a modal dialog box, a pop-up window, or a floating layer.
[0051] By way of example but not limitation, a sub-interface class or a sub-interface component is created based on a preset layout structure and elements. Required user interface (UI) elements are added and configured in the sub-interface class or the sub-interface component, and each UI element is set with an appropriate position, size, and interaction behavior. An event listener or a callback function is added to process user input or interface changes.
[0052] In the sub-user interface, displaying resource reference information of the to-be-displayed object.
[0053] The resource reference information of the to-be-displayed object includes resource metadata, and can also include other types of data in addition to the resource metadata. The resource reference information of the to-be-displayed object can include resource metadata of a sub-virtual object of the to-be-displayed object, and can also include resource metadata of the to-be-displayed object. The resource metadata can include a resource path, and can also include class object information. The class object information can include, but is not limited to, an instance and a name of a class object. The content of the resource metadata is set according to content supported by an applied engine. For example, if the engine supports a resource path and class object information, the resource metadata includes the class object information and the resource path. If the engine only supports a resource path, the resource metadata is the resource path.
[0054] As an example but not limitation, the resource reference information of each object in the to-be-displayed objects is displayed in the form of an interactive control in the sub-user interface. By displaying the resource reference information of the to-be-displayed objects in the sub-user interface, the user can confirm whether the currently selected virtual object is the target object.
[0055] The virtual object processing method can quickly and effectively lock the target object that has a problem, and determine the object type and corresponding resource of the target object, thereby avoiding the situation that the target object cannot be selected by clicking the screen due to occlusion and the problem of back-and-forth running of the process for reproduction, while not affecting the continuous running of the program, and improving the development efficiency.
[0056] In an implementation manner, when the bounding box corresponding to the virtual object is generated based on the position of the virtual object in the target virtual scene, the bounding box information corresponding to the virtual object can be obtained from a preset object file based on the position of the virtual object in the target virtual scene, the virtual object includes a model and a special effect, the file stored in the preset object file includes a model file or a special effect file, and the 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 the bounding box corresponding to the virtual object is generated 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 the efficiency and accuracy of the determination of the target object are improved.
[0058] In an implementation manner, before the bounding box information corresponding to the virtual object is obtained from the preset object file based on the position of the virtual object in the target virtual scene, the information of the bounding box of the virtual object can also be stored offline. Specifically, the bounding boxes of all objects in the virtual object (model and / or special effect) can be read when the resources of the virtual object are produced or when the target virtual scene is running; the type of the bounding box is determined based on the read bounding box, and the size information (for example, length, width, and height) of the bounding box is recorded; the type and size information of the bounding box are stored in the preset file to obtain the preset object file. By creating the preset object file to store the information of the bounding box, the quick query of the bounding box information can be facilitated.
[0059] In an implementation manner, the function of establishing the bounding box in the target virtual scene running is only used in the test process, and the bounding box is established when the object interaction mode (for example, the object selection mode) is started in the running, that is, when the bounding box information corresponding to the virtual object is obtained from the preset object file based on the position of the virtual object in the target virtual scene, the following can be performed: when it is detected that the target virtual scene is running and in the object interaction mode, virtual objects (for example, models or special effects) in the target virtual scene are traversed to obtain the positions of the virtual objects in the target virtual scene, wherein the virtual object is an object of the parent node itself (that is, a parent virtual object), and the virtual object also has a child virtual object; and the bounding box information in the preset object file is read based on the position of the virtual object in the target virtual scene as the center 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 in the running, the dynamic adaptability can be enhanced, and the accuracy of the automatic determination of the target object can be improved.
[0060] In the implementation manner, the virtual object is an object of the parent node itself, and the virtual object also has a child virtual object, for example, a model can be bound with some special effects or other models, and a special effect can have multiple child special effects, and the virtual object in the target virtual scene refers to the parent node of the model or the special effect.
[0061] In an implementation manner, after the first touch operation is determined to be at the touch position of the graphical user interface, the following can also be performed: a mask or a highlight mark is displayed in a display area of the touch position of the graphical user interface, and the mask or the highlight mark is used to highlight the touch position. The mask or the highlight mark is used to highlight the touch position, the visual effect of the touch position is enhanced, and the accuracy of the touch position is ensured.
[0062] In an implementation manner, after the target object is determined from the virtual object based on the positional relationship between the ray and the bounding box corresponding to the virtual object, the following can also be performed: the target object and a resource path of the target object are displayed in the graphical user interface in a first preset style; when the to-be-displayed object is determined from the target object and a sub-user interface is created in response to a second touch operation, the following can be performed: the to-be-displayed object is determined from the target object in response to the second touch operation, resource reference information of the to-be-displayed object is obtained based on a resource path of the to-be-displayed object, and a sub-user interface for displaying the resource reference information of the to-be-displayed object is created.
[0063] 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 acquired, and the target object and the resource reference information of the target object are stored in a preset list. The resource reference information of the target object is displayed in the first preset style of the stored list in the graphical user interface, wherein the first preset style can be the style of the list, and the preset list is an empty list created in advance for storing the related information of the current target object; the graphical user interface is distributed with a plurality of information interaction controls, each information interaction control corresponds to each object in the stored list, and each information interaction control displays the information of the corresponding object in the stored list, for example, the instances of the class objects (or the names of the class objects) in the target object are displayed in the graphical user interface, and the corresponding resource paths are displayed. Wherein, the information in the stored list is the brief information of the target object. Alternatively, a list component containing a plurality of options is displayed in the graphical user interface, and the list component is used to display the information in the stored list.
[0064] 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. on each information interaction control or each option in the graphical user interface. It can be set according to the needs, which 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. on the resource path of any object in the resource reference information of the target object displayed in the graphical user interface.
[0065] The sub-user interface is a 3D rendering 2D interface UI interface; the form of the sub-user interface can be 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 the user to troubleshoot problems.
[0066] By storing the resource reference information of the target object in the preset list, it is convenient for subsequent information viewing and use of the target object, and the running object is avoided from being affected. By displaying the information in the stored list in the graphical user interface, it is convenient for information searching, realizing the visual presentation and interaction of the information, determining the object to be displayed through touch operation, creating a sub-user interface, improving the convenience and response speed of operation, and increasing the context adaptability and personalization degree of the application.
[0067] In one implementation, after displaying the resource reference information of the object to be displayed in the sub-user interface, the user may further: in response to a touch operation on the sub-user interface, determine the target sub-virtual object that was touched, 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] Touch operations include preset touch operations such as click, double-click, and long-press. Specific settings can be customized as needed and are not limited here. The target sub-virtual object is a sub-virtual object attached to a socket on the selected parent virtual object (e.g., a sub-effect or other sub-model). Resource information includes, but is not limited to, resource paths, such as all texture paths and thumbnails of the corresponding texture paths. The sub-user interface displays all sub-virtual objects of the object to be displayed, along with information corresponding to each sub-virtual object. Users troubleshoot problems by reviewing the resource files of the target sub-virtual object displayed in the sub-user interface. As an example, and not a limitation, resource files can include textures, 3D models, animation sequences, icons, etc., for characters, environments, and interface elements.
[0069] In this context, the object of the touch operation for the sub-user interface is any sub-virtual object of the object to be displayed.
[0070] As an example, and not a 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, it is possible to: in response to a triggering operation on the resource information of the target sub-virtual object, determine the target resource path, load the resources of the resource path, and render them to the sub-user interface.
[0071] The touch operation of the sub-user interface can load and display the resource files of the target sub-virtual object, enabling quick viewing of specific resource references during program runtime. It also enables on-demand loading of resources and dynamic content display, reducing runtime resource consumption and facilitating information retrieval and confirmation.
[0072] In an implementation manner, 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 can also be: in response to the triggering operation of the first interaction control in the sub-user interface, the target resource file is located through the preset interface.
[0073] The first interaction control can be a button, a slider, etc., and can be set according to requirements, which is not limited here. The triggering operation can be a click operation, a double-click operation, a long-press operation, etc. The preset touch operation can be set according to requirements, which is not limited here. As an example but not limitation, the first interaction control can be attached to the edge of the sub-user interface, or can be displayed in the area where the specified information of the sub-user interface is located, wherein the specified information can be the target sub-virtual object or the resource file path corresponding to the sub-virtual object.
[0074] As an example but not limitation, when the corresponding target resource file is located through the preset interface in response to the triggering operation of the first interaction control in the sub-user interface, it can be: in response to the triggering operation of the first interaction control in the sub-user interface, the triggered target resource file path is determined; the corresponding target resource file is located based on the target resource file path through the preset interface. As an example but not limitation, the preset interface can be the interface (API) of the Windows system, and clicking the first interaction 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 interaction control in the sub-user interface to call the preset interface to locate the target resource file, other tools are provided to open and view the corresponding target resource file, which enhances the adaptability and expandability, improves the application response speed and user experience, enhances the interface interactivity, and realizes flexible resource configuration.
[0076] In an implementation manner, 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 can also be: in response to the triggering operation of the first interaction control in the sub-user interface, the target resource file is located through the preset interface.
[0077] The trigger operation is a preset touch operation such as a click operation, a double-click operation, or a long-press operation. The trigger operation can be set according to requirements, and is not limited herein. By way of example but not limitation, in response to the trigger operation on the 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, the information in the original file (the information in the original file includes but is not limited to the content and attributes of the source file) is obtained, the resource reference information is recursively found based on the original file information, the resource paths corresponding to all sub-effects and sub-models of the to-be-displayed object are listed, and the resource reference information re-acquired by the to-be-displayed object is obtained; and the resource reference information re-acquired by the to-be-displayed object is loaded and rendered to the sub-user interface, so as to display the resource reference information re-acquired by the to-be-displayed object in the sub-user interface. The original file can be understood as an original data file of a three-dimensional model or a two-dimensional graph that creates and defines a virtual object in the target virtual scene, for example, a 3D model file, a 2D image resource, a texture map, and an animation file.
[0078] When the resource reference information of the to-be-displayed object includes one resource path of the to-be-displayed object, the target resource path is the resource path of the to-be-displayed object; when the resource reference information of the to-be-displayed object includes more than one resource path of the to-be-displayed object, the target resource path is any one of the more than one resource path of the to-be-displayed object or a marked resource path (the marked resource path can be understood as a resource path that can re-read the original file to recursively find resource information). By way of example but not limitation, the application scenario of this scheme can be: in a case where the sub-user interface only displays the resource path of the to-be-displayed object and cannot display the sub-virtual object and the resource metadata of the sub-virtual object, the resource reference information re-acquired by the to-be-displayed object (for example, all sub-effects and all sub-models corresponding to the to-be-displayed object, and the resource paths corresponding to all sub-effects and all sub-models) can be obtained by clicking the resource path of the to-be-displayed object (that is, the target resource path) in the sub-user interface, re-acquiring the original file information, recursively finding the resource information based on the original file information, and displaying the resource reference information re-acquired by the to-be-displayed object in the sub-user interface.
[0079] By triggering the target resource path in the sub-user interface, the resource reference information re-acquired by the to-be-displayed object is loaded to the UI display of the target virtual scene, which can not affect the review of detailed information in a case where the engine does not support other information in addition to the resource path, can dynamically update the UI content, optimizes resource management, enhances expandability and flexibility, and improves personalized experience.
[0080] In an implementation manner, after displaying the resource reference information of the to-be-displayed object in the sub-user interface, the abnormality detection result can be determined based on the resource reference information of the to-be-displayed object.
[0081] The abnormality detection result may be a result identified by a manner other than automatic detection (for example, a result of manually identifying an abnormality of the to-be-displayed object based on the resource reference information of the to-be-displayed object), a result of detecting the resource reference information of the to-be-displayed object based on a preset detection rule, or a result including the result of detecting the resource reference information of the to-be-displayed object based on the preset detection rule and the result identified by the manner other than automatic detection.
[0082] By determining the abnormality detection result based on the resource reference information of the to-be-displayed object, the user experience can be optimized, and the problem can be confirmed.
[0083] In an implementation manner, after the abnormality detection result is determined based on the resource reference information of the to-be-displayed object, the abnormality detection result can be displayed in the sub-user interface in a second preset manner. The information display is enriched and comprehensive. In addition, the resource reference information of the to-be-displayed object can also be displayed in the sub-user interface in the second preset manner, so as to facilitate the user to check and interact with the resource reference information of the to-be-displayed object.
[0084] In an implementation manner, when the abnormality detection result is determined based on the resource reference information of the to-be-displayed object, the resource reference information of the to-be-displayed object can be detected based on a preset detection rule to obtain the abnormality detection result, where the preset detection rule is used to detect a display problem of the to-be-displayed object. After the abnormality detection result is determined based on the resource reference information of the to-be-displayed object, the abnormality detection result can be displayed in the sub-user interface in a second preset manner.
[0085] The resource reference information of the to-be-displayed object and the abnormality detection result can be rendered based on the resource reference information of the to-be-displayed object and the abnormality detection result, and displayed in the sub-user interface.
[0086] The abnormality detection result includes a result obtained by detecting the resource reference information of the to-be-displayed object based on a preset detection rule. Through automatic detection, the efficiency and convenience of problem troubleshooting can be improved. As an example but not limitation, the result obtained by detecting the resource reference information of the to-be-displayed object based on the preset detection rule is a result obtained by automatic detection through artificial intelligence, and the preset detection rule is used to detect display problems of the to-be-displayed object. The detection content of the preset detection rule includes but is not limited to format, pixel, and path validity. As an example but not limitation, the resource reference information of the to-be-displayed object is detected based on the preset detection rule through a preset detection algorithm to obtain a first detection result. 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 limited in detail to ensure the accuracy and efficiency of detection.
[0087] As an example but not limitation, the second preset style can be a highlight display mode, which can be a semi-transparent mask.
[0088] Through detection based on the preset detection rule, automatic detection is realized, and the efficiency and convenience of problem troubleshooting are improved. Through display of the abnormality detection result in the sub-user interface, the richness and comprehensiveness of information display can be realized, which is beneficial to improve the accuracy of problem troubleshooting and verification, and thus improve the development efficiency.
[0089] In an implementation manner, the abnormality detection result includes a result obtained by detecting the resource reference information of the to-be-displayed object based on a preset detection rule, and also includes a result identified by other ways than automatic detection. That is, the abnormality detection result includes a first detection result and a second detection result. The first detection result is a result obtained by detecting the resource reference information of the to-be-displayed object based on a preset detection rule. The second detection result is a result identified by other ways than automatic detection. That is, when the abnormality detection result is determined based on the resource reference information of the to-be-displayed object, the first detection result can be obtained by detecting the resource reference information of the to-be-displayed object based on a preset detection rule, the second detection result can be obtained, and the first detection result and the second detection result can be determined as the abnormality detection result.
[0090] The second detection result can be understood as a problem identified by manual identification. The content of the second detection result can be empty, that is, the content of the second detection result is empty without manual identification.
[0091] As an example but not limitation, when the second detection result is acquired, the marked item can be acquired, where the marked item is an information item in the resource reference information that does not fully comply with the preset rule but is not enough to be determined as an error; and the marked item is sent to the review end to acquire the second detection result based on the marked item and fed back by the review end.
[0092] Through the first detection result and the second detection result, a double detection mechanism is realized, which improves the efficiency while ensuring the comprehensiveness and accuracy of detection, and also helps to improve the richness and comprehensiveness of information display, and helps to improve the efficiency and accuracy of problem troubleshooting, and thus helps to improve the development efficiency.
[0093] Corresponding to the above method embodiment, referring to Figure 2 a schematic diagram of a virtual object processing apparatus is shown, the apparatus comprising:
[0094] The first generation module 201 is 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] The first determination module 202 is configured to determine the touch position of the first touch operation on the graphical user interface in response to the first touch operation.
[0096] The second generation module 203 is 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] The second determination module 204 is configured to determine a target object from the virtual object based on the positional relationship between the ray and the bounding box corresponding to the virtual object.
[0098] The third determination module 205 is configured to determine a to-be-displayed object from the target object in response to the second touch operation, and create a sub-user interface, where the to-be-displayed object is an object in the target object based on the second touch operation.
[0099] The first display module 206 is configured to display the resource reference information of the to-be-displayed object in the sub-user interface.
[0100] The above virtual object processing apparatus determines the target object based on 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 to-be-displayed object in the target object in the sub-user interface, which 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 of not being able to click on the target object due to occlusion and the problem of going back and forth to reproduce the process, while not affecting the continuous running of the program, improving the development efficiency.
[0101] Optionally, the first generation module 201 can be further configured to:
[0102] based on the position of the virtual object in the target virtual scene, obtain the bounding box information corresponding to the virtual object from a preset object file, wherein the virtual object comprises a model and a special effect, and the file stored in the preset object file comprises a model file or a special effect file;
[0103] generate the bounding box corresponding to the virtual object based on the bounding box information corresponding to the virtual object.
[0104] Optionally, the virtual object processing apparatus further comprises:
[0105] The reading module 207 is configured to read the bounding boxes of all objects in the virtual object when the resources of the virtual object are made or when the target virtual scene is running;
[0106] The recording module 208 is configured to determine the type of the bounding box based on the read bounding box, and record the size information of the bounding box;
[0107] The storage module 209 is configured to store the type and size information of all the bounding boxes into a preset file to obtain a preset object file.
[0108] Optionally, the first generation module 201 can be further configured to:
[0109] When it is detected that the target virtual scene is running and in the 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] read the bounding box information in the preset object file with the position of the virtual object in the target virtual scene as the center to obtain the bounding box information corresponding to the virtual object.
[0111] Optionally, the virtual object processing apparatus further comprises:
[0112] The second display module 210 is 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 can be further configured to:
[0114] In response to the second touch operation, determine the to-be-displayed object from the target object, obtain the resource reference information of the to-be-displayed object based on the resource path of the to-be-displayed object, and create a sub-user interface for displaying the resource reference information of the to-be-displayed object.
[0115] Optionally, the virtual object processing apparatus further comprises:
[0116] The fourth determining module 211 is configured to determine a target sub-virtual object being touched in response to a 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 configured to load resource information of the target sub-virtual object, and perform rendering based on the loaded resource information to display a 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 apparatus further comprises:
[0119] The positioning module 213 is configured to position a corresponding target resource file through a preset interface in response to a triggering operation of a first interaction control in the sub-user interface.
[0120] Optionally, the virtual object processing apparatus further comprises:
[0121] The fifth determining module 214 is 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 to-be-displayed object comprises at least one resource path of the to-be-displayed object.
[0122] The obtaining module 215 is configured to reobtain original file information based on the target resource path.
[0123] The searching module 216 is configured to recursively search resource information based on the original file information to obtain reobtained resource reference information of the to-be-displayed object.
[0124] The third displaying module 217 is configured to display the reobtained resource reference information of the to-be-displayed object in the sub-user interface.
[0125] Optionally, the virtual object processing apparatus further comprises:
[0126] The sixth determining module 218 is configured to determine an abnormality detection result based on the resource reference information of the to-be-displayed object.
[0127] Optionally, the sixth determining module 218 can be further configured to:
[0128] detect the resource reference information of the to-be-displayed object based on a preset detection rule to obtain the abnormality detection result, wherein the preset detection rule is used to detect a display problem of the to-be-displayed object.
[0129] Optionally, the virtual object processing apparatus further comprises:
[0130] The fourth displaying module 219 is configured to display the abnormality detection result in the sub-user interface in a second preset style.
[0131] The embodiment also provides an electronic device, comprising a processor and a memory, the memory storing machine executable instructions capable of being executed by the processor, and the processor executes the machine executable instructions to implement the virtual object processing method. The electronic device can be a server or a terminal device.
[0132] Referring to Figure 3 The electronic device shown in the figure comprises a processor 300 and a memory 301, the memory 301 storing machine executable instructions capable of being executed by the processor 300, and the processor 300 executes the machine executable instructions to implement the virtual object processing method.
[0133] Further, Figure 3 The electronic device shown in the figure further comprises a bus 302 and a communication interface 303, and the processor 300, the communication interface 303 and the memory 301 are connected through the bus 302.
[0134] The memory 301 can contain a high-speed random access memory (RAM, Random Access Memory) and can also include a non-volatile memory, for example at least one disk memory. 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 can be wired or wireless), and the Internet, a wide area network, a local area network, a metropolitan area network, etc. can be used. The bus 302 can be an ISA bus, a PCI bus or an EISA bus, etc. The bus can 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 figure to represent the bus, but it does not mean that there is only one bus or only one type of bus.
[0135] The processor 300 can be an integrated circuit chip with processing capability. In implementation process, each step of the above method can be completed by integrated logic circuit of hardware in the processor 300 or by instructions in the form of software. The processor 300 described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component. Each method, step and logic block in the embodiments disclosed can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in 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 in the art. The storage medium is located in the memory 301, and the processor 300 reads the information in the memory 301, and combines the hardware to complete the following steps:
[0136] A graphical user interface is provided by the terminal device, and the graphical user interface includes a virtual object 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, the touch position of the first touch operation on the graphical user interface is determined;
[0139] Based on the touch position and the position of the camera in the target virtual scene, a ray is generated in the target virtual scene;
[0140] Based on the positional relationship between the ray and the bounding box corresponding to the virtual object, a target object is determined from the virtual object;
[0141] In response to the second touch operation, a to-be-displayed object is determined from the target object, and a sub-user interface is created, wherein the to-be-displayed object is an object in the target object based on the second touch operation;
[0142] Resource reference information of the to-be-displayed object is displayed in the sub-user interface.
[0143] The target object is determined by the position 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, so that the target object with problems can be quickly and effectively locked, and the object type and corresponding resource of the target object are determined, thereby avoiding the problem of back-and-forth running of the process and improving the development efficiency.
[0144] The step of generating the bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene comprises:
[0145] The bounding box information corresponding to the virtual object is obtained from the preset object file based on the position of the virtual object in the target virtual scene, wherein the virtual object comprises a model and a special effect, and the file stored in the preset object file comprises a model file or a special effect file;
[0146] The bounding box corresponding to the virtual object is generated based on the bounding box information corresponding to the virtual object.
[0147] The step of generating the bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene comprises:
[0148] The bounding boxes of all objects in the virtual object are read during the resource production of the virtual object or during the running of the target virtual scene;
[0149] The type of the bounding box is determined based on the read bounding box, and the size information of the bounding box is recorded;
[0150] The type and size information of all the bounding boxes are stored in the preset file to obtain the preset object file.
[0151] The step of generating the bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene comprises:
[0152] When it is detected that the target virtual scene is running and in the object interaction mode, the virtual objects in the target virtual scene are traversed to obtain the position of the virtual object in the target virtual scene;
[0153] The bounding box information in the preset object file is read with the position of the virtual object in the target virtual scene as the center to obtain the bounding box information corresponding to the virtual object.
[0154] The step of determining the target object from the virtual object based on the position relationship between the ray and the bounding box corresponding to the virtual object further comprises:
[0155] The target object and the resource path of the target object are displayed in the graphical user interface in a first preset style.
[0156] The step of determining the to-be-displayed object from the target object and creating a sub-user interface in response to the second touch operation includes:
[0157] The step of determining the to-be-displayed object from the target object, obtaining resource reference information of the to-be-displayed object based on a resource path of the to-be-displayed object, and creating a sub-user interface for displaying the resource reference information of the to-be-displayed object in response to the second touch operation.
[0158] The step of displaying the resource reference information of the to-be-displayed object in the sub-user interface includes:
[0159] In response to a touch operation on the sub-user interface, a target sub-virtual object that is touched is determined, wherein each virtual object in the virtual object corresponds to at least one sub-virtual object.
[0160] Resource information of the target sub-virtual object is loaded, and rendering is performed based on the loaded resource information to display a resource file of the target sub-virtual object in the sub-user interface, wherein the resource file is used to store resource data.
[0161] The step of loading the resource information of the target sub-virtual object and performing rendering based on the loaded resource information to display the resource file of the target sub-virtual object in the sub-user interface includes:
[0162] In response to a trigger operation of a first interaction control in the sub-user interface, a corresponding target resource file is located through a preset interface.
[0163] The step of displaying the resource reference information of the to-be-displayed object in the sub-user interface includes:
[0164] In response to a trigger operation on the sub-user interface, a target resource path is determined, wherein the resource reference information of the to-be-displayed object includes at least one resource path of the to-be-displayed object.
[0165] Original file information is reacquired based on the target resource path.
[0166] Resource information is recursively searched based on the original file information to obtain reacquired resource reference information of the to-be-displayed object.
[0167] The reacquired resource reference information of the to-be-displayed object is displayed in the sub-user interface.
[0168] The step of displaying the resource reference information of the to-be-displayed object in the sub-user interface includes:
[0169] An abnormality detection result is determined based on the resource reference information of the to-be-displayed object.
[0170] The step of determining the exception detection result based on the resource reference information of the to-be-displayed object comprises:
[0171] detecting the resource reference information of the to-be-displayed object based on a preset detection rule to obtain an exception detection result, wherein the preset detection rule is used to detect display problems of the to-be-displayed object;
[0172] After the step of determining the exception detection result based on the resource reference information of the to-be-displayed object, the method further comprises:
[0173] displaying the exception detection result in the sub-user interface in a second preset style.
[0174] The embodiment also 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 cause 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 comprising virtual objects in a target virtual scene;
[0176] generating a bounding box corresponding to the virtual objects based on positions of the virtual objects in the target virtual scene;
[0177] in response to a first touch operation, determining a touch position of the first touch operation on the graphical user interface;
[0178] generating a ray in the target virtual scene based on the touch position and a position of a camera in the target virtual scene;
[0179] determining a target object from the virtual objects based on a positional relationship between the ray and the bounding box corresponding to the virtual objects;
[0180] in response to a second touch operation, determining a to-be-displayed object from the target object and creating a sub-user interface, wherein the to-be-displayed object is an object in the target object that is targeted by the second touch operation;
[0181] displaying resource reference information of the to-be-displayed object in the sub-user interface.
[0182] The target object is determined based on 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 objects, and the resource reference information of the to-be-displayed object in the target object is displayed in the sub-user interface, so that the target object with problems can be quickly and effectively locked, and the object type and corresponding resources of the target object are determined, thereby avoiding the problem of repeated process reproduction and improving the development efficiency.
[0183] The step of generating the bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene comprises:
[0184] The bounding box information corresponding to the virtual object is obtained from a preset object file based on the position of the virtual object in the target virtual scene, wherein the virtual object comprises a model and a special effect, and the file stored in the preset object file comprises a model file or a special effect file.
[0185] The bounding box corresponding to the virtual object is generated based on the bounding box information corresponding to the virtual object.
[0186] The step of generating the bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene comprises:
[0187] The bounding boxes of all objects in the virtual object are read during resource production of the virtual object or during running of the target virtual scene.
[0188] The type of the bounding box is determined based on the read bounding box, and the size information of the bounding box is recorded.
[0189] The type and size information of all the bounding boxes are stored in a preset file to obtain a preset object file.
[0190] The step of generating the bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene comprises:
[0191] When it is detected that the target virtual scene is running and in an object interaction mode, the virtual objects in the target virtual scene are traversed to obtain the positions of the virtual objects in the target virtual scene.
[0192] The bounding box information in the preset object file is read with the position of the virtual object in the target virtual scene as the center to obtain the bounding box information corresponding to the virtual object.
[0193] 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 further comprises:
[0194] The target object and the resource reference information of the target object are displayed in a first preset style in a graphical user interface.
[0195] 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 comprises:
[0196] The object to be displayed is determined from the target object in response to the second touch operation, the resource reference information of the object to be displayed is obtained based on the 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 step of displaying the resource reference information of the to-be-displayed object in the sub-user interface, the method further includes:
[0198] In response to a touch operation on the sub-user interface, a target sub-virtual object that is touched is determined, wherein each of the virtual objects corresponds to at least one sub-virtual object;
[0199] Resource information of the target sub-virtual object is loaded, and the target sub-virtual object is rendered based on the loaded resource information to display a resource file of the target sub-virtual object in the sub-user interface, wherein the resource file is used to store resource data.
[0200] After the step of loading the resource information of the target sub-virtual object and rendering the target sub-virtual object based on the loaded resource information to display the resource file of the target sub-virtual object in the sub-user interface, the method further includes:
[0201] In response to a triggering operation of a first interaction control in the sub-user interface, a corresponding target resource file is located through a preset interface.
[0202] After the step of displaying the resource reference information of the to-be-displayed object in the sub-user interface, the method further includes:
[0203] In response to a triggering operation on the sub-user interface, a target resource path is determined, wherein the resource reference information of the to-be-displayed object includes at least one resource path of the to-be-displayed object;
[0204] The original file information is reacquired based on the target resource path;
[0205] Resource information is recursively searched based on the original file information to obtain reacquired resource reference information of the to-be-displayed object;
[0206] The reacquired resource reference information of the to-be-displayed object is displayed in the sub-user interface.
[0207] After the step of displaying the resource reference information of the to-be-displayed object in the sub-user interface, the method further includes:
[0208] An abnormality detection result is determined based on the resource reference information of the to-be-displayed object.
[0209] The step of determining the abnormality detection result based on the resource reference information of the to-be-displayed object includes:
[0210] The resource reference information of the to-be-displayed object is detected based on a preset detection rule to obtain the abnormality detection result, wherein the preset detection rule is used to detect a display problem of the to-be-displayed object;
[0211] After the step of determining the abnormality detection result based on the resource reference information of the to-be-displayed object, the method further includes:
[0212] Display the anomaly detection result in a second preset style in the sub-user interface.
[0213] The virtual object processing method and device, the electronic device, and the computer program product of the storage medium provided in the embodiments can be used to execute the method described in the foregoing method embodiments, and the specific implementation can be referred to the method embodiments, which will not be described here again.
[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 foregoing method embodiments, which will not be described here again.
[0215] In addition, in the description of the embodiments, unless explicitly specified and limited, the terms "mount", "connect", "connection" should be understood in a broad sense, for example, can be fixed connection, can also be detachable connection, or integrally connected; can be mechanical connection, can also be electrical connection; can be directly connected, can also be indirectly connected through an intermediate medium, can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present disclosure can be understood according to the specific circumstances.
[0216] The functions if realized in the form of software function units and sold or used as independent products can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present disclosure essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of software products. The computer software product is stored in a storage medium, includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in various embodiments of the present disclosure. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and various media that can store program codes.
[0217] In the description of the present disclosure, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present disclosure and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present disclosure. In addition, the terms "first", "second", "third" are only for the purpose of description, and cannot be understood as indicating or implying relative importance.
[0218] Finally, it should be noted that the above embodiments are merely specific implementations of the present disclosure, and are used to illustrate the technical solutions of the present disclosure, rather than limit the scope of protection of the present disclosure. Although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art who is familiar with the technology in the art can still make modifications or easily think of changes to the technical solutions described in the foregoing embodiments, or make equivalent replacements to some of the technical features; and these modifications, changes or replacements do not cause the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments, and should be covered within the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be subject to the scope of protection of the claims.
Claims
1. A method for processing virtual objects, characterized in that, The method includes providing a graphical user interface (GUI) via a terminal device, the GUI including virtual objects in a target virtual scene, and the method comprising: Based on the position of the virtual object in the target virtual scene, a bounding box corresponding to the virtual object is generated; In response to a first touch operation, the touch position of the first touch operation in the graphical user interface is determined; Based on the touch location and the camera position in the target virtual scene, a ray is generated in the target virtual scene; Based on the positional relationship between the ray and the bounding box corresponding to the virtual object, the target object is determined from the virtual object; In response to a second touch operation, an object to be displayed is determined from the target object, and a sub-user interface is created, wherein the object to be displayed is the 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; 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: The target object and its resource path are displayed 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 a 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 obtained based on the resource path of the object to be displayed, and a sub-user interface is created to display the resource reference information of the object to be displayed.
2. The method according to claim 1, characterized in that, The step of generating the bounding box corresponding to the virtual object based on the position of the virtual object in the target virtual scene includes: Based on the position of the virtual object in the target virtual scene, the bounding box information corresponding to the virtual object is obtained from the preset object file, wherein the virtual object includes a model and special effects, and the file stored in the preset object file includes a model file or a special effects file; The 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 the 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: When creating virtual object resources or when running the target virtual scene, read the bounding boxes of all objects in the virtual object; The type of bounding box is determined based on the read bounding box, and the size information of the bounding box is recorded; Store the type and size information of all bounding boxes to a preset file to obtain a preset object file.
4. The method according to claim 2, characterized in that, The step of obtaining the bounding box information corresponding to the virtual object from a preset object file based on the position of the virtual object in the target virtual scene includes: When it is detected that the target virtual scene is running and in object interaction mode, the virtual objects in the target virtual scene are traversed to obtain the position of the virtual objects in the target virtual scene; Using 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 displaying the resource reference information of the object to be displayed in the sub-user interface, the following steps are included: In response to a touch operation on the sub-user interface, a target sub-virtual object is determined, wherein each object in the virtual object 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.
6. The method according to claim 5, characterized in that, After the step of 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, the method further includes: In response to the triggering operation of the first interactive control in the sub-user interface, the corresponding target resource file is located through a preset interface.
7. 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, a target resource path is determined, wherein the resource reference information of the object to be displayed includes at least one resource path of the object to be displayed; Retrieve the original file information based on the target resource path; Based on the original file information, resource information is recursively searched to obtain the resource reference information of the object to be displayed. The resource reference information that the object to be displayed has been reacquired is displayed in the sub-user interface.
8. The method according to any one of claims 1-7, 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: The anomaly detection result is determined based on the resource reference information of the object to be displayed.
9. The method according to claim 8, characterized in that, The step of determining the anomaly detection result based on the resource reference information of the object to be displayed includes: Based on preset detection rules, the resource reference information of the object to be displayed is detected to obtain anomaly detection results. The preset detection rules are used to detect display problems of the object to be displayed. After the step of determining the anomaly detection result based on the resource reference information of the object to be displayed, the method further includes: The anomaly detection results are displayed in the sub-user interface in a second preset style.
10. A virtual object processing device, characterized in that, A graphical user interface is provided via a terminal device, the graphical user interface including virtual objects in a target virtual scene, and the virtual object processing device includes: The first generation module is used 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 is configured to determine the touch position of the first touch operation in the graphical user interface in response to a first touch operation. The second generation module is used 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; The second determining module 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. The third determining module is used to determine the object to be displayed from the target object in response to the second touch operation and create a sub-user interface, wherein the object to be displayed is the object targeted by the second touch operation in the target object; A first display module is used to display resource reference information of the object to be displayed in the sub-user interface; The virtual object processing device further includes: The second display module is used to display the target object and the resource path of the target object in a first preset style in the graphical user interface; The third determining module can also be used for: In response to the second touch operation, the object to be displayed is determined from the target object, the resource reference information of the object to be displayed is obtained based on the resource path of the object to be displayed, and a sub-user interface is created to display the resource reference information of the object to be displayed.
11. An electronic device, characterized in that, It includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the virtual object processing method according to any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the virtual object processing method according to any one of claims 1-9.
Citation Information
Patent Citations
Game virtual object locking method and device and electronic equipment
CN110548286A
Interactive data processing method and device in game
CN113101638A