Object adjustment method and device in virtual scene, equipment and storage medium
By playing files in a virtual scene and responding to editing operations, displaying adjustment models and real-time adjustment results, the problem of inefficient adjustment of virtual scene objects is solved, and more efficient virtual object editing is achieved.
Patent Information
- Application Number
- CN202411676371.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-02-28
AI Technical Summary
In the prior art, the adjustment efficiency of virtual scene objects is low and multiple iterations are required to meet the requirements of film and television producers.
It provides an object adjustment method in a virtual scene. By playing a virtual scene file, it makes the virtual scene in an editable state in response to the scene editing operation, selects the target virtual object and displays the adjustment model, and displays the adjustment results in response to the adjustment operation.
The adjustment efficiency of virtual objects is improved. Film and television producers can edit virtual objects in real time during real-time rehearsal, and make adjustments intuitively and accurately, reducing the need for multiple iterations in the development mode.
Smart Images

Figure CN119524403A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and storage medium for adjusting objects in a virtual scene. Background Art
[0002] With the rapid development of digital technology, virtual shooting technology has also been applied in the field of film and television production. For example, the computer renders the virtual scene image based on the virtual scene file in real time, uses a large LED (Light Emitting Diode) screen to display the virtual scene image in real time, the actors perform in front of the large LED screen, and the camera shoots the actors and the environment, thus obtaining a real shot image with a strong sense of reality.
[0003] In order to ensure the quality of film and television production, virtual scenes are usually evaluated in advance before actual shooting so that they can be adjusted based on the evaluation results. For example, film and television producers can watch the virtual preview screen of the virtual scene. If the film and television producers have any adjustment suggestions for virtual objects, they need to first feedback to the virtual environment developer, who will adjust the virtual objects in the virtual scene in the development mode. This process usually requires multiple iterations to obtain virtual objects that meet the requirements of the film and television producers, resulting in low efficiency in adjusting virtual objects. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, equipment and storage medium for adjusting objects in a virtual scene that can improve the adjustment efficiency of virtual objects in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for adjusting objects in a virtual scene. The method comprises:
[0006] Playing a virtual scene file; the virtual scene file is a file of a virtual scene used for virtual shooting;
[0007] In response to the scene editing operation, the virtual scene in the virtual scene file is in an editable state;
[0008] In response to a selection operation of a target virtual object in the virtual scene, displaying an adjustment model for object adjustment at a position of the target virtual object;
[0009] In response to an adjustment operation triggered based on the adjustment model, an adjustment result of the target virtual object is displayed according to the adjustment operation.
[0010] In a second aspect, the present application also provides a device for adjusting objects in a virtual scene. The device comprises:
[0011] A virtual scene playing module, used for playing a virtual scene file; the virtual scene file is a file of a virtual scene used for virtual shooting;
[0012] A state switching module, used for responding to a scene editing operation, the virtual scene in the virtual scene file is in an editable state;
[0013] An adjustment model display module, configured to display an adjustment model for object adjustment at a position of a target virtual object in the virtual scene in response to a selection operation on the target virtual object;
[0014] The adjustment module is used to respond to the adjustment operation triggered based on the adjustment model and display the adjustment result of the target virtual object according to the adjustment operation.
[0015] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0016] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0017] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.
[0018] The object adjustment method, device, computer equipment, storage medium and computer program product in the virtual scene can respond to the scene editing operation during the playback of the virtual scene file so that the virtual scene in the virtual scene file is in an editable state. When the virtual scene is in the editable state, in response to the selection operation of the target virtual object in the virtual scene, an adjustment model for object adjustment is displayed at the position of the target virtual object. In response to the adjustment operation triggered based on the adjustment model, the adjustment result of the target virtual object is displayed according to the adjustment operation. Through this solution, the film and television producer can enter the editing mode immediately during the real-time preview of the virtual scene and directly adjust the virtual object in the scene, thereby improving the adjustment efficiency of the virtual object. When the film and television producer selects a target virtual object for editing, the adjustment model for adjustment will be displayed at the position of the object. Through the adjustment model, the producer can adjust the target virtual object intuitively and accurately, further improving the adjustment efficiency of the virtual object. In the process of adjusting the target virtual object, the result of each adjustment can be seen immediately. The film and television producer can quickly adjust the target virtual object multiple times in one preview until a satisfactory effect is achieved, reducing the need for multiple iterative adjustments of the virtual scene in the development mode, thereby further improving the adjustment efficiency of the virtual object. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] FIG1 is a diagram showing an application environment of a method for adjusting objects in a virtual scene in one embodiment;
[0020] FIG2 is a schematic diagram of a flow chart of a method for adjusting objects in a virtual scene in one embodiment;
[0021] FIG3 is a schematic diagram of an editing page of a virtual scene in one embodiment;
[0022] FIG4 is a schematic diagram of an editing page of a virtual scene in another embodiment;
[0023] FIG5 is a schematic diagram of an editing page of a virtual scene in another embodiment;
[0024] FIG6 is a schematic diagram of an editing page of a virtual scene in another embodiment;
[0025] FIG7 is a schematic diagram of an editing page of a virtual scene in another embodiment;
[0026] FIG8 is a schematic diagram of adjusting the position of a target virtual object in one embodiment;
[0027] FIG9 is a schematic diagram of adjusting the position of a target virtual object in another embodiment;
[0028] FIG10 is a schematic diagram of a left-handed coordinate system in one embodiment;
[0029] FIG11 is a schematic diagram of determining an occlusion situation in one embodiment;
[0030] FIG12 is a schematic diagram of an editing page of a virtual scene in another embodiment;
[0031] FIG13 is a schematic diagram of an editing page of a virtual scene in another embodiment;
[0032] FIG14 is a schematic flow chart of a method for adjusting objects in a virtual scene in another embodiment;
[0033] FIG15 is a block diagram of a device for adjusting objects in a virtual scene according to an embodiment;
[0034] FIG. 16 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0036] The object adjustment method in the virtual scene provided by the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set separately, integrated on the server 104, or placed on the cloud or other devices. The object adjustment method in the virtual scene can be executed separately by the terminal 102, and can be interactively executed by the terminal 102 and the server 104. Taking the execution of the terminal 102 separately as an example, the terminal 102 plays the virtual scene file; the virtual scene file is a file of the virtual scene for virtual shooting; in response to the scene editing operation, the virtual scene in the virtual scene file is in an editable state; in response to the selection operation of the target virtual object in the virtual scene, the adjustment model for object adjustment is displayed at the position of the target virtual object; in response to the adjustment operation triggered based on the adjustment model, the adjustment result of the target virtual object is displayed according to the adjustment operation.
[0037] The terminals may be, but are not limited to, various desktop computers, laptops, smart phones, tablet computers, IoT devices, portable wearable devices, and network devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Network devices may be routers, switches, firewalls, load balancers, network storage, network adapters, etc.
[0038] The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal and the server may be directly or indirectly connected via wired or wireless communications, which is not limited in this application.
[0039] In one embodiment, the object adjustment method in the virtual scene is executed by a computer device, and the computer device may be, for example, the terminal 102 or the server 104 shown in FIG. 1 . Taking the object adjustment method in the virtual scene executed by the terminal 102 shown in FIG. 1 as an example, as shown in FIG. 2 , the method may include the following steps:
[0040] S202, playing a virtual scene file; the virtual scene file is a file of a virtual scene used for virtual shooting.
[0041] Among them, virtual scenes are three-dimensional environments constructed by computers. These environments can simulate real or imaginary places. These scenes can include static or dynamic elements, such as buildings, natural landscapes, weather conditions, people or any other visual elements.
[0042] A virtual scene file is an electronic file that stores all the data and properties of a virtual scene, including the scene's 3D (Three-Dimensional Model, three-dimensional) model, texture, animation, lighting settings, etc.
[0043] Virtual shooting refers to the process of using virtual scenes for film and television production. In virtual shooting, virtual scene files are loaded into a dedicated playback and rendering system, which is usually rendered and displayed in real time through high-performance computers and large LED screens. Actors perform in front of these LED screens, and cameras capture the interaction between actors and virtual backgrounds.
[0044] Specifically, 3D software is running on the terminal, and virtual scene files can be imported through the 3D software. The user can start the playback function or scene viewing function of the 3D software through the user interface of the 3D software. The terminal responds to the startup operation of the playback function or the scene viewing function, renders in real time based on the virtual scene file, obtains the scene picture of the virtual scene, and displays the rendered scene picture in real time, thereby realizing the playback of the virtual scene file.
[0045] Among them, 3D software can be 3D modeling and rendering software suitable for creating and editing virtual scenes, such as Blender, Maya, 3ds Max, or professional real-time rendering software such as Unreal Engine or Unity. The playback function refers to the process of starting an animation or preset action sequence in the 3D software, including but not limited to object actions, camera path animation, or interactive events in complex scenes. The scene viewing function refers to the ability to explore and inspect static or dynamic scenes in real time in the 3D software, allowing users to view virtual scenes from different angles and distances.
[0046] S204: In response to the scene editing operation, the virtual scene in the virtual scene file is in an editable state.
[0047] Among them, the scene editing operation is used to trigger the 3D software to switch from the normal scene viewing or playback mode to the editing mode. Specifically, it can be a trigger operation of the scene editing control, a trigger operation of a shortcut key, a gesture or voice control operation, etc.
[0048] It can be understood that, based on the startup operation of the playback function or the scene viewing function of the terminal, the virtual scene picture displayed when playing the virtual scene file is a static display of the virtual scene. In the scene editing mode for the played virtual scene file, the virtual scene in the virtual scene file is in an editable state. At this time, the virtual scene in the picture displayed by the terminal is no longer a static display, but a dynamic and interactive workspace. When the virtual scene is in an editable state, at least part of the elements in the virtual scene can be adjusted, such as adjusting the virtual objects in the virtual scene, wherein the overall virtual object adjustment of the virtual scene can specifically be to adjust at least one of the position, posture, and size of the virtual object, or to add, hide or delete virtual objects in the virtual scene.
[0049] In a virtual scene, virtual objects refer to all computer-generated three-dimensional (3D) elements that constitute the scene. Virtual objects can be digital models of any form. Virtual objects can be different types of scene elements such as buildings, bridges, roads, trees, flowers, water bodies, people, animals, furniture, decorations, vehicles, icons, signs, etc.
[0050] In one embodiment, when the terminal plays a virtual scene file through 3D software, a scene editing control is also displayed. In response to a trigger operation on the scene editing control, the 3D software enters a scene editing mode for the played virtual scene file. In this scene editing mode, the virtual scene in the virtual scene file is in an editable state.
[0051] S206 , in response to a selection operation on a target virtual object in the virtual scene, displaying an adjustment model for object adjustment at a position of the target virtual object.
[0052] Among them, the adjustment model can be a tool for adjusting the position and posture of the virtual object. The adjustment model can include at least one component, each component has its specific function, and at least one of the position and posture of the virtual object can be adjusted through the component.
[0053] The selection operation on the target virtual object can specifically be a click operation or a box selection operation on the target virtual object. The click operation refers to directly clicking a virtual object using a mouse or other pointer device, and the box selection operation refers to selecting a virtual object in an area by defining a selection box.
[0054] Specifically, a user can select a virtual object in an editable virtual scene displayed on the terminal. For example, the user uses a mouse or other pointer to select a target virtual object in the virtual scene in a user interface that displays the editable virtual scene. In response to the selection operation of the target virtual object in the virtual scene, the terminal loads a preset adjustment model, determines the position of the target virtual object in the virtual scene, and places the loaded preset adjustment model at the position of the target virtual object for display.
[0055] The loading of the preset adjustment model specifically includes adjusting the size of the adjustment model according to the size of the local target virtual object, so that the size of the adjustment model displayed at the position of the target virtual object is adapted to the size of the target virtual object.
[0056] S208 : In response to the adjustment operation triggered based on the adjustment model, display the adjustment result of the target virtual object according to the adjustment operation.
[0057] Among them, the adjustment operation refers to the operation used to adjust the target virtual object, which may specifically include a first adjustment operation and a second adjustment operation. The first adjustment operation may be a trigger operation on the adjustment model, specifically a trigger operation on different components of the adjustment model. The second adjustment operation is a screen interaction operation after triggering the adjustment model, that is, the second adjustment operation is a screen interaction operation after the first adjustment operation, such as a click operation, a drag operation, etc.
[0058] Specifically, the terminal starts the corresponding adjustment function in response to the adjustment operation triggered based on the adjustment model, and adjusts at least one of the position and posture of the target virtual object according to the started adjustment function and the operation information of the adjustment operation, obtains the adjustment result, and displays the adjustment result of the target virtual object.
[0059] In the object adjustment method in the above virtual scene, during the process of playing the virtual scene file, the virtual scene in the virtual scene file can be in an editable state in response to the scene editing operation. When the virtual scene is in the editable state, by responding to the selection operation of the target virtual object in the virtual scene, an adjustment model for object adjustment is displayed at the position of the target virtual object. In response to the adjustment operation triggered based on the adjustment model, the adjustment result of the target virtual object is displayed according to the adjustment operation. Through this solution, the film and television producer can enter the editing mode immediately during the real-time preview of the virtual scene and directly adjust the virtual object in the scene, thereby improving the adjustment efficiency of the virtual object. When the film and television producer selects a target virtual object for editing, the adjustment model for adjustment will be displayed at the position of the object. Through the adjustment model, the producer can adjust the target virtual object intuitively and accurately, further improving the adjustment efficiency of the virtual object. In the process of adjusting the target virtual object, the result of each adjustment can be seen immediately. The film and television producer can quickly adjust the target virtual object multiple times in one preview until a satisfactory effect is achieved, reducing the need for multiple iterative adjustments of the virtual scene in the development mode, thereby further improving the adjustment efficiency of the virtual object.
[0060] In one embodiment, the process in which the terminal displays an adjustment model for object adjustment at the location of the target virtual object in response to a selection operation on the target virtual object in the virtual scene includes the following steps: in response to a selection operation on the target virtual object in the virtual scene, displaying a candidate editing control; in response to a selection operation on a posture adjustment control, displaying an adjustment model for posture adjustment at the location of the target virtual object; the posture adjustment control is a control for posture adjustment among the candidate editing controls.
[0061] Among them, the candidate edit controls are a group of edit controls available for users to select, which may specifically include posture adjustment controls, copy controls, hiding controls, deletion controls, etc. The posture adjustment controls are controls used for posture adjustment. Pose refers to the position and posture of an object or a specific model in three-dimensional space. The copy controls are controls used to create one or more exact copies of the selected object. The hide controls are used to temporarily remove objects from the view. The hidden objects are still retained in the scene file and can be redisplayed at any time. The delete controls are used to permanently remove selected objects from the scene.
[0062] Specifically, the terminal responds to a selection operation on a target virtual object in a virtual scene by displaying a plurality of candidate editing controls at the position of the target virtual object. If a user wants to adjust the posture of the target virtual object, the user can select a posture adjustment control from the plurality of displayed candidate editing controls. The terminal responds to the selection operation on the posture adjustment control by obtaining a preset adjustment model and determining the position of the target virtual object in the virtual scene. If there are at least two preset adjustment models, one adjustment model can be selected from the at least two adjustment models, and the selected preset adjustment model can be placed at the position of the target virtual object for display.
[0063] As shown in Figure 3, multiple candidate editing controls are displayed at the location of the target virtual object. The candidate editing controls specifically include a posture adjustment control 302, a hide control 304, a copy control 306, and a delete control 308. In addition, a cancel selection control 310 is also displayed. The terminal can also cancel the selection of the target virtual object in response to a click operation on the cancel selection control 310.
[0064] In the above embodiment, the terminal displays a variety of candidate editing controls at the position of the target virtual object, so that the producer can intuitively see the specific operation of each candidate editing control on the target virtual object, thereby facilitating the producer to perform different editing operations on the target virtual object. In response to the selection operation of the posture adjustment control, an adjustment model for posture adjustment is displayed at the position of the target virtual object. Through the adjustment model, the producer can intuitively and accurately adjust the target virtual object, further improving the adjustment efficiency of the virtual object.
[0065] In one embodiment, the process in which the terminal displays an adjustment model for posture adjustment at the location of a target virtual object in response to a selection operation on a posture adjustment control includes the following steps: in response to a selection operation on the posture adjustment control, displaying a candidate mode control; in response to a control selection operation, marking a target mode control corresponding to the control selection operation as selected; the target mode control is a control among the candidate mode controls; and displaying an adjustment model for posture adjustment corresponding to the target mode control at the location of the target virtual object.
[0066] Among them, the candidate mode control is a control of the editing mode that can be selected by the user. Different mode controls correspond to different editing modes. The editing modes include basic mode and extended mode. The basic mode refers to the provision of basic editing functions, which may include simple position movement and rotation functions. The extended mode refers to the provision of more advanced editing functions, which may include complex or more comprehensive rotation functions. The basic mode corresponds to the basic adjustment model, through which basic editing of the target virtual object can be achieved. The extended mode corresponds to the extended adjustment model, through which advanced editing of the target virtual object can be achieved.
[0067] Specifically, the terminal obtains different adjustment modes in response to the selection operation of the posture adjustment control, generates candidate mode controls according to different adjustment modes, and displays the candidate mode controls. If the user wants to use basic editing functions, he can select the basic mode control in the candidate mode controls. The terminal responds to the selection operation of the basic mode control, marks the basic mode control as selected, and displays the basic adjustment model at the location of the target virtual object; if the user wants to use the extended editing function, he can select the extended mode control in the candidate mode controls. The terminal responds to the selection operation of the extended mode control, marks the extended mode control as selected, and displays the extended adjustment model at the location of the target virtual object.
[0068] For example, in response to a click operation on the posture adjustment control 302 in FIG. 3, the terminal displays the candidate mode control as shown in FIG. 4, and the candidate mode control includes a basic mode control 402 and an extended mode control 404. The display state of the basic mode control 402 in FIG. 4 is a selected state. When the basic mode control 402 is selected, a basic adjustment model corresponding to the basic mode is displayed at the position of the target virtual object. The basic adjustment includes an axial adjustment component 406a and a plane adjustment component 406b. If the user wants to use the extended editing function, the extended mode control 404 can be selected. The terminal responds to the click operation on the extended mode control The selection operation 404 marks the expansion mode control 404 as selected, and displays the expansion adjustment model at the position of the target virtual object, as shown in FIG5 . The marked expansion mode control 504 in FIG5 is in a selected state, and the expansion adjustment model displayed at the position of the target virtual object includes a first rotation component 506a, a second rotation component 506b, and a third rotation component 506c. It should be noted that the basic mode control 502 in FIG5 is the same control as the basic mode control 402 in FIG4 , and the expansion mode control 504 in FIG5 is the same control as the expansion mode control 404 in FIG4 .
[0069] In the above embodiment, the terminal displays a variety of candidate mode controls, so that the producer can accurately control the required posture adjustment mode. By responding to the control selection operation, the target mode control corresponding to the control selection operation is marked as selected, and the corresponding adjustment model is displayed at the position of the virtual object. This instant feedback mechanism allows the user to immediately see how the selected control will affect the posture of the virtual object, so as to make more effective decisions and adjustments.
[0070] In one embodiment, the object adjustment method in the above-mentioned virtual scene also includes the following steps: in response to a selection operation on a copy control, displaying an object copy of the target virtual object; in response to a selection operation on the object copy, displaying a candidate editing control; in response to a selection operation on a posture adjustment control, displaying an adjustment model for posture adjustment at the position of the object copy; the posture adjustment control is a control for posture adjustment in the candidate editing controls.
[0071] Specifically, in response to a selection operation on a target virtual object in a virtual scene, the terminal displays a plurality of candidate editing controls at the location of the target virtual object. If a user wants to copy the target virtual object, the user can select a copy control from the displayed plurality of candidate editing controls. In response to the selection operation on the copy control, the terminal creates an object copy of the target virtual object, and in response to a paste operation, displays the object copy of the target virtual object at the target location corresponding to the paste operation. The displayed object copy of the target virtual object is a new virtual object identical to the target virtual object. If the user wants to adjust the new virtual object, the user can select the new virtual object. In response to the selection operation on the new virtual object, the terminal displays candidate editing controls. In response to the selection operation on a posture adjustment control in the candidate editing controls, the terminal displays an adjustment model for posture adjustment at the location of the object copy, that is, the adjustment model for posture adjustment is displayed at the target location.
[0072] For example, in response to a click operation on the copy control 306 in FIG. 3 , the terminal displays an object copy 602 of the target virtual object in the virtual scene shown in FIG. 6 , and the object copy 602 of the target virtual object can be further edited.
[0073] In the above embodiment, the terminal allows the user to quickly generate a copy of the target virtual object through a copy control, thereby improving the speed of creating the virtual object. By displaying an editing control on the object copy, the posture of the virtual object created by copying can be adjusted, thereby further improving the efficiency of adjusting the virtual object.
[0074] In one embodiment, the object adjustment method in the above-mentioned virtual scene also includes the following steps: in response to a selection operation on a hiding control, hiding the target virtual object; in response to a list display operation, displaying a hidden object list; in response to a selection operation on the target virtual object in the hidden object list, displaying a cancel hiding control; in response to a selection operation on a cancel hiding control, restoring the display of the target virtual object.
[0075] The hidden object list is a list that records object information of virtual objects in a hidden state. The hidden object list may specifically record object names or identifiers of virtual objects in a hidden state.
[0076] Specifically, the terminal displays multiple candidate editing controls at the position of the target virtual object in response to a selection operation on a target virtual object in a virtual scene. If the user wants to hide the target virtual object, the user can select a hidden control from the multiple displayed candidate editing controls. The terminal hides the target virtual object in response to the selection operation on the hidden control. The hidden target virtual object still exists in the scene but is not displayed on the interface. If the user wants to restore the display of the virtual object that is already hidden, the user can trigger a list display button. The terminal displays a list of hidden objects in response to the triggering operation on the list display button. If the user wants to restore the display of the target virtual object that is already hidden, the object information of the target virtual object in the hidden object list can be triggered. The terminal displays a cancel hide control in response to the triggering operation on the object information of the target virtual object. In response to the selection operation on the cancel hide control, the display of the target virtual object is restored.
[0077] For example, the terminal hides the target virtual object in the virtual scene shown in FIG. 7 in response to a click operation on the hidden control 304 in FIG. 3 , and the terminal may subsequently respond to a cancel operation to restore display of the target virtual object.
[0078] In the above embodiment, the terminal hides virtual objects that do not need to be processed immediately or are temporarily irrelevant, so that the user can reduce interference in the current view and focus on the objects that are currently being edited or require special attention, thereby improving the efficiency of adjusting the virtual objects. By providing a hidden object list and allowing the user to select specific objects from it to display or continue to hide, the flexibility of scene management is enhanced.
[0079] In one embodiment, the object adjustment method in the virtual scene further includes the following steps: in response to a selection operation on a delete control, removing the target virtual object from the virtual scene; in response to undoing the delete operation, re-adding the target virtual object to the virtual scene.
[0080] Specifically, in response to a selection operation on a target virtual object in a virtual scene, the terminal displays multiple candidate editing controls at the location of the target virtual object. If the user wants to delete the target virtual object, the user can select a deletion control from the multiple displayed candidate editing controls. In response to the selection operation on the deletion control, the terminal removes the selected target virtual object from the scene, moves the target virtual object from an object list to a deleted object list, and displays an undo deletion button. If the user wants to undo deletion of the target virtual object, the user can trigger the undo deletion button. In response to the undo deletion operation, the target virtual object is moved from the deleted object list to the object list, and the target virtual object is re-added to the virtual scene and displayed.
[0081] For example, the terminal deletes the target virtual object in the virtual scene shown in FIG. 7 in response to a click operation on the delete control 308 in FIG. 3 , and the terminal may subsequently respond to undoing the delete operation to restore display of the target virtual object.
[0082] In the above embodiment, the terminal displays a delete control, and the user can easily remove unnecessary or erroneous objects from the scene through the delete control. This direct control improves the flexibility of editing. When editing complex virtual scenes, the ability to delete and undo deleted objects makes scene management more flexible.
[0083] In one embodiment, the terminal responds to an adjustment operation triggered based on an adjustment model, and the process of displaying the adjustment result of the target virtual object according to the adjustment operation includes the following steps: in response to a first adjustment operation triggered based on the adjustment model, selecting a target adjustment function; in response to a second adjustment operation triggered based on the adjustment model, displaying the adjustment result of the target virtual object according to the target adjustment function and the operation information corresponding to the second adjustment operation; the operation information includes the operation trajectory or trigger position of the second adjustment operation.
[0084] Among them, the first adjustment operation can be a trigger operation on the adjustment model, specifically, it can be a trigger operation on different components of the adjustment model. The trigger operation on different components can specifically be a moving function operation or a rotating function operation. The second adjustment operation is a screen interaction operation after triggering the adjustment model, that is, the second adjustment operation is a screen interaction operation after the first adjustment operation, such as a click operation, a drag operation, etc. The operation information includes the trigger position of the click operation or the operation trajectory of the drag operation. The trigger position is the screen coordinate point where the mouse is located when the user performs a click operation. The operation trajectory is a set of continuous screen coordinate points that the mouse passes through during the dragging operation, that is, the trigger position and the trajectory points in the operation trajectory can be represented by two-dimensional coordinates in the screen coordinate system.
[0085] The target adjustment function is an adjustment function that matches the components and trigger operations of the adjustment model. The adjustment function includes at least one of a movement function and a rotation function. The movement function may specifically be an axial movement function or a plane movement function. The rotation function may specifically be a plane rotation function. The axial movement function refers to a function that allows the user to control the target virtual object to move along a specific coordinate axis (such as the X-axis, Y-axis, or Z-axis). The plane movement function refers to a function that allows the user to control the target virtual object to move within a specific plane, such as moving on the plane where the X-axis and Y-axis are located, the plane where the X-axis and Z-axis are located, or the plane where the Y-axis and Z-axis are located. The plane rotation function refers to a function that allows the user to control the target virtual object to rotate around a certain axis within a specific plane, such as rotating around the X-axis, Y-axis, or Z-axis.
[0086] Specifically, in response to a first adjustment operation triggered based on an adjustment model, a target adjustment function matching the triggered first adjustment operation is determined, and the target adjustment function is enabled. After enabling the target adjustment function, the user can click or drag the mouse pointer in the virtual scene displayed by the terminal. The terminal obtains the trigger position of the click operation or the operation trajectory of the drag operation in response to the click operation or the drag operation of the mouse pointer, and processes the trigger position or the operation trajectory according to the target adjustment function to obtain at least one of the adjusted position and adjusted posture of the target virtual object, and adjusts the target virtual object according to at least one of the adjusted position and the adjusted posture to obtain an adjustment result, and displays the adjustment result of the target virtual object.
[0087] In the above embodiment, the terminal selects the target adjustment function in response to the first adjustment operation triggered based on the adjustment model, and displays the adjustment result of the target virtual object according to the operation information corresponding to the target adjustment function and the second adjustment operation in response to the second adjustment operation triggered based on the adjustment model. Through the adjustment model, the producer can adjust the target virtual object intuitively and accurately, thereby further improving the adjustment efficiency of the virtual object.
[0088] In one embodiment, the adjustment model is a basic adjustment model, and the basic adjustment model includes an axial adjustment component; the process in which the terminal selects a target adjustment function in response to a first adjustment operation triggered based on the adjustment model includes the following steps: in response to a movement function operation triggered based on the axial adjustment component, the axial movement function is selected; the process in which the terminal displays the adjustment result of the target virtual object according to the operation information corresponding to the target adjustment function and the second adjustment operation includes the following steps: according to the operation information corresponding to the axial movement function and the second adjustment operation, the movement result of the target virtual object on the coordinate axis corresponding to the axial adjustment component is displayed.
[0089] Among them, the axial adjustment component is a component used to control the movement of the virtual object along a specific coordinate axis, and can specifically be at least one of the axial adjustment component corresponding to the X-axis, the axial adjustment component corresponding to the Y-axis, and the axial adjustment component corresponding to the Z-axis. The X-axis, the Y-axis, and the Z-axis can specifically be the coordinate axes of a local coordinate system established with the target virtual object as the origin. The local coordinate system can specifically be a Cartesian coordinate system. The axis direction of the local coordinate system can be completely aligned with the axis direction of the world coordinate system, and it only moves with the movement of the virtual object, but does not rotate with the rotation of the virtual object. In some embodiments, the coordinate axes of the local coordinate system can also rotate with the rotation of the virtual object.
[0090] The movement function operation triggered by the axial adjustment component may specifically be a click operation on a specific part of the axial adjustment component. For example, the axial adjustment component is a Z-axis coordinate axis, and the click operation on the specific part of the axial adjustment component may specifically be a click operation on the positive half axis of the Z-axis.
[0091] Specifically, the terminal responds to a click operation on a specific part of the axial adjustment component and enables the axial movement function corresponding to the axial adjustment component. After enabling the axial movement function, the user can click or drag the mouse pointer in the virtual scene displayed by the terminal. The terminal responds to the click operation or the drag operation on the mouse pointer to obtain the trigger position of the click operation or the operation trajectory of the drag operation, and processes the trigger position or the operation trajectory according to the axial movement function to obtain the movement result of the target virtual object on the coordinate axis corresponding to the axial adjustment component, and displays the movement result of the target virtual object.
[0092] For example, the single-axis adjustment component 406a in Figure 4 is the axial adjustment component corresponding to the Z-axis. The user can click the arrow of the positive half axis of the single-axis adjustment component 406a to enable the axial movement function corresponding to the axial adjustment component. After enabling the axial movement function, the user can click or drag the mouse pointer in the virtual scene displayed by the terminal to control the movement of the target virtual object on the Z-axis.
[0093] In the above embodiment, the terminal selects the axial movement function in response to the movement function operation triggered by the axial adjustment component, and displays the movement result of the target virtual object on the coordinate axis corresponding to the axial adjustment component according to the operation information corresponding to the axial movement function and the second adjustment operation. Film and television producers can control the movement of the target virtual object along a specific coordinate axis based on the axial adjustment component, thereby improving the adjustment efficiency of the virtual object.
[0094] In one embodiment, the adjustment model is a basic adjustment model, and the basic adjustment model includes a plane adjustment component; the process in which the terminal selects a target adjustment function in response to a first adjustment operation triggered based on the adjustment model includes the following steps: in response to a movement function operation triggered based on the plane adjustment component, the plane movement function is selected; the process in which the terminal displays the adjustment result of the target virtual object according to the operation information corresponding to the target adjustment function and the second adjustment operation includes the following steps: according to the operation information corresponding to the plane movement function and the second adjustment operation, the movement result of the target virtual object in the plane corresponding to the plane adjustment component is displayed.
[0095] Among them, the plane adjustment component is a component used to control the movement of the virtual object along a specific plane, or to control the rotation of the virtual object around a certain axis within a specific plane. Specifically, it can be at least one of the plane adjustment component corresponding to the plane where the X-axis and Y-axis are located, the plane adjustment component corresponding to the plane where the Y-axis and Z-axis are located, and the plane adjustment component corresponding to the plane where the Z-axis and X-axis are located. The X-axis, Y-axis and Z-axis can specifically be the coordinate axes of the local coordinate system established with the target virtual object as the origin. The local coordinate system can specifically be a Cartesian coordinate system, and the coordinate axes of the local coordinate system rotate with the rotation of the virtual object.
[0096] The moving function operation triggered by the plane adjustment component can specifically be a click operation on the first part of the plane adjustment component, or it can be a click operation triggered within the first area divided by the plane adjustment component. For example, the plane adjustment component is a circular ring located in the plane where the X-axis and the Y-axis are located, and the center of the circular ring is the origin of the local coordinate system corresponding to the target virtual object. The click operation triggered within the first area divided by the plane adjustment component can specifically be a click operation inside the circular ring.
[0097] Specifically, the terminal responds to a click operation triggered within the first area divided by the plane adjustment component, which may be a click operation inside the circle, and enables the plane movement function corresponding to the plane adjustment component. After enabling the plane movement function, the user can click or drag the mouse pointer in the virtual scene displayed by the terminal. The terminal obtains the trigger position of the click operation or the operation trajectory of the drag operation in response to the click operation or the drag operation of the mouse pointer, and processes the trigger position or the operation trajectory according to the plane movement function to obtain the movement result of the target virtual object in the plane corresponding to the plane adjustment component, and displays the movement result.
[0098] For example, the plane where the plane adjustment component 406b in Figure 4 is located is the plane where the X-axis and the Y-axis are located. The user can click the inner area of the ring to enable the plane movement function corresponding to the plane adjustment component. After enabling the plane movement function, the user can click or drag the mouse pointer in the virtual scene displayed by the terminal to control the movement of the target virtual object in the plane where the X-axis and the Y-axis are located.
[0099] In the above embodiment, the terminal selects the plane movement function in response to the movement function operation triggered by the plane adjustment component, and displays the movement result of the target virtual object in the plane corresponding to the plane adjustment component according to the operation information corresponding to the plane movement function and the second adjustment operation. The film and television producer can control the movement of the target virtual object in a specific plane based on the plane adjustment component, thereby improving the adjustment efficiency of the virtual object.
[0100] In one embodiment, the process of the terminal selecting a target adjustment function in response to a first adjustment operation triggered based on an adjustment model includes the following steps: in response to a rotation function operation triggered on a plane adjustment component, selecting a plane rotation function; the process of the terminal displaying the adjustment result of the target virtual object according to the operation information corresponding to the target adjustment function and the second adjustment operation includes the following steps: according to the operation information corresponding to the plane rotation function and the second adjustment operation, displaying the rotation result of the target virtual object within the plane corresponding to the plane adjustment component and around the center of the plane adjustment component.
[0101] The rotation function operation triggered by the plane adjustment component may specifically be a click operation on the second part of the plane adjustment component, or may be a click operation triggered within the second area divided by the plane adjustment component. For example, the plane adjustment component is a circular ring located in the plane where the X-axis and the Y-axis are located, and the center of the circular ring is the origin of the local coordinate system corresponding to the target virtual object. The click operation triggered within the second area divided by the plane adjustment component may specifically be a click operation outside the circular ring.
[0102] Specifically, the terminal responds to a click operation triggered within the second area divided by the plane adjustment component, which may be a click operation outside the circle, and enables the plane rotation function corresponding to the plane adjustment component. After enabling the plane rotation function, the user can click or drag the mouse pointer in the virtual scene displayed by the terminal. The terminal obtains the trigger position of the click operation or the operation trajectory of the drag operation in response to the click operation or the drag operation of the mouse pointer, and processes the trigger position or the operation trajectory according to the plane rotation function to obtain the rotation result of the target virtual object in the plane corresponding to the plane adjustment component and around the center of the plane adjustment component, and displays the rotation result.
[0103] For example, the plane where the plane adjustment component 406b in Figure 4 is located is the plane where the X-axis and the Y-axis are located. The user can click the outer area of the ring to enable the plane rotation function corresponding to the plane adjustment component. After enabling the plane rotation function, the user can click or drag the mouse pointer in the virtual scene displayed by the terminal to control the target virtual object to rotate in the plane where the X-axis and the Y-axis are located and around the Z-axis.
[0104] In the above embodiment, the terminal selects the plane rotation function in response to the rotation function operation triggered by the plane adjustment component, and displays the rotation result of the target virtual object in the plane corresponding to the plane adjustment component and around the center of the plane adjustment component according to the operation information corresponding to the plane rotation function and the second adjustment operation. Film and television producers can control the rotation of the target virtual object in a specific plane and around a specific coordinate axis based on the plane adjustment component, thereby improving the adjustment efficiency of the virtual object.
[0105] In one embodiment, the adjustment model is an extended adjustment model, and the extended adjustment model includes a first rotation component, a second rotation component and a third rotation component; the process in which the terminal selects a target adjustment function in response to a first adjustment operation triggered based on the adjustment model includes the following steps: in response to a component selection operation, selecting a rotation function corresponding to the target rotation component specified by the component selection operation; the target rotation component is one of the first rotation component, the second rotation component and the third rotation component; the process in which the terminal displays the adjustment result of the target virtual object according to the operation information corresponding to the target adjustment function and the second adjustment operation includes the following steps: according to the rotation function corresponding to the target rotation component and the operation information corresponding to the second adjustment operation, displaying the rotation result of the target virtual object in the plane corresponding to the target rotation component and around the center of the target rotation component.
[0106] Among them, the first rotation component is a component used to control the virtual object to rotate around the first coordinate axis in the plane where the first rotation component is located, the second rotation component is a component used to control the virtual object to rotate around the second coordinate axis in the plane where the second rotation component is located, and the third rotation component is a component used to control the virtual object to rotate around the third coordinate axis in the plane where the third rotation component is located. The plane where the first rotation component is located, the plane where the second rotation component is located, and the plane where the third rotation component is located are perpendicular to each other. For example, the plane where the first rotation component is located, the plane where the second rotation component is located, and the plane where the third rotation component is located are respectively the plane where the X-axis and the Y-axis are located, the plane where the Y-axis and the Z-axis are located, and the plane where the Z-axis and the X-axis are located. The first rotation component controls the virtual object to rotate around the Z-axis in the plane where the X-axis and the Y-axis are located, and the Z-axis is the rotation axis corresponding to the first rotation component. The second rotation component controls the virtual object to rotate around the X-axis in the plane where the Y-axis and the Z-axis are located, and the X-axis is the rotation axis corresponding to the second rotation component. The third rotation component controls the virtual object to rotate around the Y-axis in the plane where the Z-axis and the X-axis are located, and the Y-axis is the rotation axis corresponding to the third rotation component.
[0107] The component selection operation can specifically be a click operation on the target rotation component. As shown in Figure 5, the first rotation component 506a, the second rotation component 506b and the third rotation component 506c are respectively a circle in the plane where the X-axis and Y-axis are located, a circle in the plane where the Y-axis and Z-axis are located, and a circle in the plane where the Z-axis and X-axis are located. If the user wants the target virtual object to rotate around the X-axis in the plane where the Z-axis and X-axis are located, the user can click the circle in the plane where the Z-axis and X-axis are located.
[0108] Specifically, after the terminal displays the extended adjustment model, the user can select the target rotation component he wants to use from the first rotation component, the second rotation component and the third rotation component of the extended adjustment model. The terminal responds to the selection operation of the target selection component and enables the rotation function corresponding to the target rotation component. After enabling the target rotation function, the user can click or drag the mouse pointer in the virtual scene displayed by the terminal. The terminal obtains the trigger position of the click operation or the operation trajectory of the drag operation in response to the click operation or the drag operation of the mouse pointer, and processes the trigger position or the operation trajectory according to the target rotation function to obtain the rotation result of the target virtual object in the plane corresponding to the target rotation component and around the center of the target rotation component, and displays the rotation result.
[0109] For example, the plane where the first rotation component 506b in Figure 5 is located is the plane where the X-axis and the Y-axis are located. The user can click the ring corresponding to the first rotation component 506b to enable the rotation function corresponding to the first rotation component. After enabling the rotation function corresponding to the first rotation component, the user can click or drag the mouse pointer in the virtual scene displayed on the terminal to control the target virtual object to rotate in the plane where the X-axis and the Y-axis are located and around the Z-axis.
[0110] In the above embodiment, the terminal responds to the component selection operation and selects the rotation function corresponding to the target rotation component specified by the component selection operation, wherein the target rotation component is one of the first rotation component, the second rotation component and the third rotation component. According to the rotation function corresponding to the target rotation component and the operation information corresponding to the second adjustment operation, the rotation result of the target virtual object in the plane corresponding to the target rotation component and around the center of the target rotation component is displayed. The film and television producer can control the rotation of the target virtual object in a specific plane and around a specific coordinate axis based on the target rotation component, thereby improving the adjustment efficiency of the virtual object.
[0111] In one embodiment, the process of the terminal displaying the adjustment result of the target virtual object according to the operation information corresponding to the target adjustment function and the second adjustment operation includes the following steps: performing coordinate conversion on the track point or trigger position in the operation track to obtain the three-dimensional coordinates of the corresponding interaction point in the virtual scene; from the three-dimensional coordinates, selecting the coordinates on the target axis according to the target adjustment function; adjusting the target virtual object based on the coordinates on the target axis to obtain the adjustment result of the target virtual object; and displaying the adjustment result of the target virtual object.
[0112] It can be understood that the trigger position is the screen coordinate point where the mouse is located when the user performs a click operation, and the operation trajectory is a collection of continuous screen coordinate points that the mouse passes through during the dragging operation. That is, the trigger position and the trajectory points in the operation trajectory can both be represented by two-dimensional coordinates in the screen coordinate system. Coordinate transformation of the trajectory points or trigger position in the operation trajectory refers to converting the screen operation into three-dimensional coordinates in the virtual scene.
[0113] Specifically, after obtaining the trajectory point or trigger position in the operation trajectory, the terminal can obtain the transformation matrix and perform an initial coordinate transformation on the trajectory point or trigger position in the operation trajectory to obtain the three-dimensional coordinates of the trajectory point or trigger position in the world coordinate system, and then obtain the camera parameters and the original three-dimensional coordinates of the target virtual object in the three-dimensional scene, and transform the three-dimensional coordinates of the trajectory point or trigger position in the world coordinate system based on the camera parameters and the original three-dimensional coordinates of the target virtual object in the three-dimensional scene to obtain the three-dimensional coordinates of the interaction point of the trajectory point or trigger position in the three-dimensional scene, and select the coordinates on the target axis from the three-dimensional coordinates based on the pre-selected target adjustment function, adjust the position or posture of the target virtual object in the virtual scene based on the coordinates on the target axis, and obtain the adjustment result of the target virtual object; and display the adjustment result of the target virtual object.
[0114] Among them, the camera parameters include the camera's position, orientation, and field of view (FoV). These parameters define the view transformation matrix and the projection matrix, which are used to determine how to project the three-dimensional scene onto the two-dimensional screen. The transformation matrix can specifically be an inverse projection matrix and an inverse view matrix. The inverse projection matrix can be used to convert the two-dimensional screen coordinates of the track point or trigger position in the operation track into three-dimensional coordinates relative to the camera, and then the inverse view matrix is used to convert the three-dimensional coordinates relative to the camera into three-dimensional coordinates in the global world coordinate system.
[0115] In one embodiment, the process of converting the three-dimensional coordinates of the track point or trigger position in the world coordinate system based on the camera parameters and the original three-dimensional coordinates of the target virtual object in the three-dimensional scene to obtain the three-dimensional coordinates of the interaction point of the track point or trigger position in the three-dimensional scene specifically includes the following steps: emitting a target ray from the position of the camera to the three-dimensional coordinates of the track point or trigger position in the world coordinate system, determining the target plane passing through the original three-dimensional coordinates of the target virtual object in the three-dimensional scene, determining the intersection between the target ray and the target plane, which is the interaction point of the track point or trigger position in the three-dimensional scene, and determining the three-dimensional coordinates of the interaction point. Among them, the normal vector of the target plane is the vector from the original three-dimensional coordinates of the target virtual object in the three-dimensional scene to the three-dimensional coordinates of the track point or trigger position in the world coordinate system.
[0116] In one embodiment, the target adjustment function is an axial movement function, and the operation information is a trigger position. After obtaining the three-dimensional coordinates of the trigger position in the virtual scene, the coordinates on the coordinate axis corresponding to the axial movement function are selected from the three-dimensional coordinates; and the object coordinates of the target virtual object in the world coordinate system of the virtual scene are obtained, and the object coordinates are adjusted according to the coordinates on the coordinate axis corresponding to the axial movement function to obtain the adjusted object coordinates of the target virtual object, and the target virtual object is displayed moved to the adjusted object coordinates.
[0117] For example, the axial adjustment component is an axial adjustment component of the Z axis, and the axial movement function selected based on the axial adjustment component of the Z axis is the axial movement function of the Z axis. After obtaining the three-dimensional coordinates (x1, y1, z1) of the interaction point corresponding to the trigger position in the virtual scene, the Z-axis coordinate z1 is selected from the three-dimensional coordinates (x1, y1, z1) of the interaction point, and the object coordinates (x0, y0, z0) of the target virtual object are adjusted to (x0, y0, z1).
[0118] In one embodiment, the target adjustment function is an axial movement function, and the operation information is a trigger position. The terminal can also perform coordinate conversion on the trigger position to obtain the three-dimensional coordinates of the trigger position in the world coordinate system, and determine the vector from the three-dimensional coordinates of the trigger position in the world coordinate system to the target virtual object, project the vector to a plane perpendicular to the coordinate axis corresponding to the axial movement function, obtain the projection vector, and construct a plane passing through the target virtual object with the projection vector as the normal vector, emit a ray from the camera position to the three-dimensional coordinates of the trigger position in the world coordinate system, determine the intersection of the ray and the constructed plane, and obtain the coordinates of the intersection on the coordinate axis corresponding to the axial movement function, adjust the object coordinates of the target virtual object based on the coordinates, obtain the adjusted object coordinates of the target virtual object, and display the target virtual object moved to the adjusted object coordinates.
[0119] For example, the axial adjustment component is an axial adjustment component of the Z axis, and the axial movement function selected based on the axial adjustment component of the Z axis is the axial movement function of the Z axis. After obtaining the three-dimensional coordinates (x2, y2, z2) of the trigger position in the world coordinate system, as shown in Figure 8, determine the vector from the three-dimensional coordinates of the trigger position in the world coordinate system to the target virtual object, project the vector to the plane where the X axis and the Y axis are located (i.e., plane a) to obtain the projection vector, and use the projection vector as the normal vector to construct a plane b passing through the target virtual object, emit a ray from the virtual camera position to the three-dimensional coordinates (x2, y2, z2), determine the intersection of the ray and plane b, obtain the coordinate z1 of the intersection on the Z axis, and adjust the three-dimensional coordinates (x0, y0, z0) of the target virtual object according to the coordinate z1 of the intersection on the Z axis to obtain the adjusted object coordinates (x0, y0, z1) of the target virtual object.
[0120] For example, the plane adjustment component is a plane adjustment component of the plane where the X-axis and the Y-axis are located, and the plane movement function selected by the plane adjustment component based on the Z-axis is the plane movement function of the plane where the X-axis and the Y-axis are located. After obtaining the three-dimensional coordinates (x1, y1, z1) of the interaction point of the trigger position in the virtual scene, the X-axis coordinate x1 is selected from the three-dimensional coordinates (x1, y1, z1) of the interaction point, and the Y-axis coordinate y1 is selected, and the object coordinates (x0, y0, z0) of the target virtual object are adjusted to (x1, y1, z0).
[0121] In one embodiment, the target adjustment function is a plane movement function, and the operation information is a trigger position. The terminal can also perform coordinate conversion on the trigger position to obtain the three-dimensional coordinates of the trigger position in the world coordinate system, and determine the plane corresponding to the plane movement function. Starting from the camera position, rays are emitted to the three-dimensional coordinates of the trigger position in the world coordinate system, and the plane corresponding to the ray and the plane movement function is determined, and the coordinates of the intersection corresponding to the coordinate axis in the plane are obtained. The object coordinates of the target virtual object are adjusted based on the coordinates to obtain the adjusted object coordinates of the target virtual object, and the target virtual object is displayed as moved to the adjusted object coordinates.
[0122] For example, the plane adjustment component is the plane adjustment component of the plane where the X-axis and the Y-axis are located. After obtaining the three-dimensional coordinates (x2, y2, z2) of the trigger position in the world coordinate system, as shown in Figure 9, the plane corresponding to the plane movement function is determined to be the plane where the X-axis and the Y-axis are located (horizontal plane), and a ray is emitted from the virtual camera position to the three-dimensional coordinates (x2, y2, z2), the intersection of the ray and the horizontal plane is determined, the coordinate x1 of the intersection on the X-axis, and the coordinate y1 of the intersection on the Y-axis are obtained, and the three-dimensional coordinates (x0, y0, z0) of the target virtual object are adjusted according to the coordinate x1 of the intersection on the X-axis and the coordinate y1 of the intersection on the Y-axis to obtain the adjusted object coordinates (x1, y1, z0) of the target virtual object.
[0123] In addition, it should be noted that when the Z-axis coordinate of the target virtual object changes, it is also necessary to first determine whether the Z-axis coordinate corresponding to the interaction point exceeds the preset threshold. If it does not exceed, the step of moving the target virtual object based on the Z-axis coordinate corresponding to the interaction point is executed; if it exceeds, it is determined to keep the object coordinate of the target virtual object unchanged.
[0124] In the above embodiment, the terminal obtains the three-dimensional coordinates of the corresponding interaction point in the virtual scene by performing coordinate conversion on the trajectory point or trigger position in the operation trajectory, selects the coordinates on the target axis from the three-dimensional coordinates according to the target adjustment function, adjusts the target virtual object based on the coordinates on the target axis, and obtains the adjustment result of the target virtual object, thereby achieving more precise control and adjustment of the target virtual object in the virtual scene.
[0125] In one embodiment, the target adjustment function is a rotation function, and the operation information is an operation trajectory. After obtaining the three-dimensional coordinates of the trajectory points of the operation trajectory in the virtual scene, the three-dimensional coordinates of the starting trajectory point and the three-dimensional coordinates of the ending trajectory point are selected from the three-dimensional coordinates of each trajectory point according to the rotation function, and the coordinates on the two target axes in the plane corresponding to the rotation function are selected from the three-dimensional coordinates of the starting trajectory point to obtain the first coordinate, and the coordinates on the two target axes in the plane corresponding to the rotation function are selected from the three-dimensional coordinates of the ending trajectory point to obtain the second coordinate, that is, the obtained coordinates on the target axis include the first coordinate and the second coordinate on the target axis; the terminal adjusts the target virtual object based on the coordinates on the target axis to obtain the adjustment result of the target virtual object, including the following steps: based on the first coordinate and the second coordinate, determining the rotation angle and the rotation direction; rotating the target virtual object according to the rotation angle and the rotation direction to obtain the adjustment result of the target virtual object.
[0126] The rotation angle refers to the specific reading of the rotation around a certain axis, which can be expressed as an angle (degrees) or radians. The rotation angle measures the degree of deviation of the object from its starting position to the end position of the rotation.
[0127] The rotation direction refers to whether the rotation of an object around the rotation axis is in a clockwise direction or a counterclockwise direction. For example, in 3D space, the rotation direction can be determined according to the right-hand rule. The right-hand rule means that if the four fingers of your right hand point to the starting direction of the rotation and the fingers are curled in the direction of the rotation axis, then the direction pointed by the thumb is the counterclockwise rotation direction. In the embodiment of the present application, a positive rotation angle can indicate that the object will rotate in a counterclockwise direction when viewed from the positive direction of the axis, and a negative rotation angle can indicate that the object will rotate in a clockwise direction when viewed from the positive direction of the axis.
[0128] Specifically, the terminal selects the coordinates of the two target axes in the plane corresponding to the rotation function from the three-dimensional coordinates of the starting trajectory point to obtain the first coordinate, and selects the coordinates of the two target axes in the plane corresponding to the rotation function from the three-dimensional coordinates of the ending trajectory point to obtain the second coordinate. The terminal can determine the first coordinate difference on the first target axis based on the first coordinate and the second coordinate on the first target axis, and determine the second coordinate difference of the second target axis based on the first coordinate and the second coordinate on the second target axis, and determine the rotation angle and rotation direction based on the first coordinate difference and the second coordinate difference. Then, the target virtual object is controlled to rotate in the plane corresponding to the selected rotation component and around the rotation axis corresponding to the rotation component according to the rotation angle and the rotation direction to obtain the rotation result of the target virtual object.
[0129] For example, the selected rotation component is the first rotation component, the plane where the first rotation component is located is the plane where the X-axis and the Y-axis are located, and the Z-axis is the rotation axis corresponding to the first rotation component. The three-dimensional coordinates (x0, y0, z0) of the starting trajectory point and the three-dimensional coordinates (x1, y1, z1) of the ending trajectory point are selected from the three-dimensional coordinates of each trajectory point. According to the rotation function around the Z-axis in the plane where the X-axis and the Y-axis are located corresponding to the first rotation component, the first coordinates (x0, y0) corresponding to the X-axis and the Y-axis and the first coordinates (x1, y1, z1) corresponding to the X-axis and the Y-axis are selected. 1, y1), determine the first coordinate difference Δx=x1-x0 corresponding to the X axis, determine the first coordinate difference Δy=y1-y0 corresponding to the Y axis, and use the two coordinate differences to calculate the rotation angle θ=arctan(Δy / Δx) through the inverse tangent function. The arctan function returns the angle between the point in the plane where the X axis and the Y axis are located and the positive direction of the X axis. The result range of arctan is usually between -90∘ and 90∘. In order to cover the full 360∘ rotation range, it is usually necessary to adjust the angle in combination with the sign of the coordinate difference.
[0130] In the above embodiment, the terminal defines the rotation by directly using the starting and ending points of the operation trajectory, imitating the natural way of rotation of objects in the real world, making the rotation adjustment of the target virtual object more intuitive and natural. By calculating the rotation parameters from the trajectory points, the need for users to manually set these parameters is reduced, thereby reducing errors in operation and improving the efficiency of the adjustment process.
[0131] In one embodiment, after the rotation angle and the rotation direction are determined, a quaternion may be constructed based on the rotation angle and the rotation direction, and the target virtual object may be rotated based on the constructed quaternion to obtain an adjustment result of the target virtual object.
[0132] A quaternion is an extended complex number represented by four components, usually written as q=w+xi+yj+zk, where w, x, y, z are real numbers and i, j, k are imaginary units.
[0133] Quaternions can be constructed from rotation axes and rotation angles. If there is a unit vector v=(x, y, z) as the rotation axis and an angle θ, the corresponding quaternion can be expressed as:
[0134]
[0135] Among them, cos(θ / 2) is the real part of the quaternion, and sin(θ / 2) (xi+yj+zk) is the imaginary part, which represents the axis and angle of rotation.
[0136] It should be noted that, in the 3D software involved in the embodiments of the present application, the coordinate system used when controlling the rotation of virtual objects based on quaternions can be a left-handed coordinate system, as shown in FIG10 . In the left-handed coordinate system, if you place the palm of your left hand at the origin, let your fingers point in the direction of the positive X-axis, and then roll your fingers from the wrist to the fingers in the direction of the positive Y-axis, then the direction in which your thumb points is the direction of the positive Z-axis.
[0137] In the above embodiment, the terminal constructs a quaternion based on the rotation angle and the rotation direction, and rotates the target virtual object based on the constructed quaternion to obtain an adjustment result of the target virtual object, thereby avoiding the gimbal lock problem during rotation. The gimbal lock is a situation that may be encountered when using Euler angles, in which certain rotation sequences may cause the direction to lose a degree of freedom, making it impossible for the system to access rotations in certain directions. The quaternion solves the gimbal lock problem by providing an additional rotation dimension.
[0138] In one embodiment, the process of the terminal displaying an adjustment model for object adjustment at the position of the target virtual object in response to a selection operation on the target virtual object in the virtual scene includes the following steps: in response to the selection operation, determining the screen position corresponding to the selection operation; determining the target ray based on the screen position and the camera position; determining a virtual object in the virtual scene that intersects with the target ray and whose distance from the starting point of the target ray meets a distance condition as the target virtual object; and displaying the adjustment model for object adjustment at the position of the target virtual object.
[0139] The screen position corresponding to the selection operation refers to the position of a pointer (such as a mouse cursor or a finger) when the user performs an interactive operation (such as clicking or touching) on the screen. The screen position can be represented by two-dimensional coordinates in a screen coordinate system.
[0140] Specifically, the terminal responds to the selection operation, determines the screen position corresponding to the selection operation, and obtains the transformation matrix, determines the three-dimensional coordinates of the screen position in the world coordinate system based on the transformation matrix, and obtains the camera position, emits a target ray from the camera position to the three-dimensional coordinates of the screen position in the world coordinate system, and determines the virtual object in the virtual scene that intersects with the target ray and has the smallest distance from the camera position as the target virtual object, and displays an adjustment model for object adjustment at the position of the target virtual object.
[0141] In the above embodiment, the terminal determines the screen position corresponding to the selection operation by responding to the selection operation; determines the target ray based on the screen position and the camera position; and determines the virtual object in the virtual scene that intersects with the target ray and whose distance from the starting point of the target ray meets the distance condition as the target virtual object, thereby accurately determining the selected target virtual object and avoiding incorrect selection.
[0142] In one embodiment, after displaying an adjustment model for object adjustment at the position of the target virtual object, the object adjustment method in the above-mentioned virtual scene also includes the following steps: in response to a perspective switching operation, displaying a scene picture of the virtual scene under the switched perspective; when the target virtual object is blocked by other virtual objects under the switched perspective, displaying the outline and adjustment model of the target virtual object on the scene picture.
[0143] The viewing angle is the way to observe a three-dimensional scene from a specific position and direction, which includes the viewing point (where to look from), the viewing direction (where to look towards), and the field of view width (the range of the scene that can be seen). The viewing angle in the embodiment of the present application refers to the camera viewing angle, which refers to the viewing angle controlled by the virtual camera. The viewing angle switching operation refers to the operation by which the user changes the position, viewing direction, or field of view width of the virtual camera.
[0144] It can be understood that in a three-dimensional graphics environment, the target virtual object is blocked by other virtual objects in the switched perspective, which means that after the user changes the viewing angle, other objects are located on the viewing path in the new perspective, thereby blocking the observation of the target virtual object.
[0145] The outline of the target virtual object refers to the outer edge line of the target virtual object, which is used to indicate the shape of the target virtual object.
[0146] Specifically, the terminal determines a new camera position, orientation or field of view (FOV) in response to a perspective switching operation, determines a perspective after switching based on the new camera position, orientation or field of view, and re-renders based on the virtual scene file according to the perspective after switching to obtain a scene screen showing the virtual scene under the perspective after switching. If the target virtual object is blocked by other virtual objects under the perspective after switching, the outline of the target virtual object is generated, and the outline and adjustment model of the target virtual object are displayed at the position corresponding to the target virtual object in the scene screen.
[0147] As shown in FIG11 , a ray is emitted from the new camera position to the target virtual object, and it is checked whether there are other virtual objects intersecting with the ray path. If the ray is blocked by object A before reaching the target virtual object, it means that the target virtual object is blocked, and the outline of the target virtual object is generated, and the outline and adjustment model of the target virtual object are displayed at the position corresponding to the target virtual object in the scene screen, as shown in FIG12 or FIG13 .
[0148] In the above embodiment, the terminal displays the scene screen of the virtual scene under the switched perspective in response to the perspective switching operation. When the target virtual object is blocked by other virtual objects under the switched perspective, the outline and adjustment model of the target virtual object are displayed on the scene screen. Even if the target virtual object is blocked by other objects under the new perspective, the outline and adjustment model are displayed to ensure that the user can still identify and operate the object, thereby improving the adjustment efficiency of the virtual object.
[0149] In one embodiment, the process of the terminal displaying the outline of the target virtual object and adjusting the model on the scene screen includes the following steps: stroking the target virtual object to obtain the outline of the target virtual object; displaying the outline of the target virtual object on the scene screen, and displaying the adjustment model at the corresponding position of the outline.
[0150] The stroke processing may also be called edge stroke or outline stroke, which is used to add a clearly visible edge or outline line to the virtual object.
[0151] Specifically, when the terminal determines that the target virtual object is obscured by other virtual objects under the switched viewing angle, it can perform edge detection on the rendered scene image under the switched viewing angle, identify the edge of the target virtual object, and stroke the detected edge to obtain the outline of the target virtual object; display the outline of the target virtual object on the scene image, and display the adjustment model at the corresponding position of the outline.
[0152] For example, a custom depth channel is set for the target virtual object, and the custom depth channel of the target virtual object is convolved with the convolution operator to obtain the edge of the target virtual object, and the detected edge is highlighted to obtain the outline of the target virtual object, and the outline of the target virtual object is displayed on the scene screen, and the adjustment model is displayed at the corresponding position of the outline. Among them, the custom depth channel records the distance from the target virtual object to the virtual camera, and the convolution operator can be a 4-neighborhood Laplacian operator as shown below:
[0153] | 0 -1 0 |
[0154] | -1 4 -1 |
[0155] | 0 -1 0 |
[0156] In the above embodiment, when the target virtual object is blocked by other objects, the terminal obtains the outline of the target virtual object by performing stroke processing on the target virtual object, displays the outline of the target virtual object on the scene screen, and displays the adjustment model at the corresponding position of the outline. The stroke processing strengthens the outline of the target virtual object so that it is still clearly visible in complex or crowded scenes, ensuring that the user can still identify and operate the object, thereby improving the efficiency of adjusting the virtual object.
[0157] In one embodiment, as shown in FIG. 14 , a method for adjusting an object in a virtual scene is further provided. The method for adjusting an object in a virtual scene is executed by a computer device, and the computer device may be, for example, the terminal 102 or the server 104 shown in FIG. 1 . Taking the interactive method executed by the terminal 102 shown in FIG. 1 as an example, the method includes the following steps:
[0158] S1402, playing a virtual scene file; the virtual scene file is a file of a virtual scene used for virtual shooting.
[0159] S1404: In response to the scene editing operation, the virtual scene in the virtual scene file is in an editable state.
[0160] S1406: In response to a selection operation on a target virtual object in the virtual scene, display a candidate editing control.
[0161] S1408, in response to a selection operation on a posture adjustment control, displaying a candidate mode control; the posture adjustment control is a control in the candidate editing control for posture adjustment.
[0162] S1410, in response to a control selection operation, marking a target mode control corresponding to the control selection operation as being in a selected state; the target mode control is a control in the candidate mode controls.
[0163] S1412, displaying an adjustment model for posture adjustment corresponding to the target mode control at the position of the target virtual object.
[0164] S1414: In response to a first adjustment operation triggered based on the adjustment model, select a target adjustment function.
[0165] In one embodiment, the adjustment model is a basic adjustment model, and the basic adjustment model includes an axial adjustment component and a plane adjustment component. S1414 includes the following steps: in response to a movement function operation triggered by the axial adjustment component, selecting the axial movement function; or, in response to a movement function operation triggered by the plane adjustment component, selecting the plane movement function; or, in response to a rotation function operation triggered by the plane adjustment component, selecting the plane rotation function.
[0166] In one embodiment, the adjustment model is an extended adjustment model, and the extended adjustment model includes a first rotation component, a second rotation component and a third rotation component; S1414 includes the following steps: in response to a component selection operation, selecting a rotation function corresponding to a target rotation component specified by the component selection operation; the target rotation component is one of the first rotation component, the second rotation component and the third rotation component.
[0167] S1416, in response to a second adjustment operation triggered based on the adjustment model, displaying an adjustment result of the target virtual object according to the target adjustment function and operation information corresponding to the second adjustment operation; the operation information includes an operation track or a trigger position of the second adjustment operation.
[0168] In one embodiment, S1416 includes the following steps: according to the operation information corresponding to the axial movement function and the second adjustment operation, displaying the movement result of the target virtual object on the coordinate axis corresponding to the axial adjustment component; or, according to the operation information corresponding to the plane movement function and the second adjustment operation, displaying the movement result of the target virtual object in the plane corresponding to the plane adjustment component; or, according to the operation information corresponding to the plane rotation function and the second adjustment operation, displaying the rotation result of the target virtual object in the plane corresponding to the plane adjustment component and around the center of the plane adjustment component.
[0169] In one embodiment, S1416 includes the following steps: according to the rotation function corresponding to the target rotation component and the operation information corresponding to the second adjustment operation, displaying the rotation result of the target virtual object in the plane corresponding to the target rotation component and around the center of the target rotation component.
[0170] In one embodiment, S1416 includes the following steps: performing coordinate conversion on the track points or trigger positions in the operation track to obtain the three-dimensional coordinates of the corresponding interaction points in the virtual scene; selecting the coordinates on the target axis from the three-dimensional coordinates according to the target adjustment function; adjusting the target virtual object based on the coordinates on the target axis to obtain the adjustment result of the target virtual object; and displaying the adjustment result of the target virtual object.
[0171] The present application also provides an application scenario, which applies the object adjustment method in the above-mentioned virtual scene. The object adjustment method in the virtual scene can be specifically applied to Unreal Engine (UE), and can be specifically integrated into the pre-production plug-in Previz of Unreal Engine. When playing the virtual scene file through the pre-production plug-in, the film and television producer can click the creation mode button on the user interface to enter the creation mode. In the creation mode, the virtual scene in the virtual scene file is in an editable state. In response to the selection operation of the target virtual object in the virtual scene, the terminal displays an adjustment model for object adjustment at the position of the target virtual object; in response to the adjustment operation triggered based on the adjustment model, the adjustment result of the target virtual object is displayed according to the adjustment operation.
[0172] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0173] Based on the same inventive concept, the embodiment of the present application also provides an object adjustment device in a virtual scene for implementing the object adjustment method in the virtual scene involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more object adjustment devices in virtual scenes provided below can refer to the limitations of the object adjustment method in the virtual scene above, and will not be repeated here.
[0174] In one embodiment, as shown in FIG. 15 , a device for adjusting objects in a virtual scene is provided, comprising: a virtual scene playing module 1502, a state switching module 1504, an adjustment model display module 1506 and an adjustment module 1508, wherein:
[0175] The virtual scene playing module 1502 is used to play the virtual scene file; the virtual scene file is a file of the virtual scene used for virtual shooting;
[0176] A state switching module 1504 is used to respond to the scene editing operation, and the virtual scene in the virtual scene file is in an editable state;
[0177] An adjustment model display module 1506, for displaying an adjustment model for object adjustment at the position of the target virtual object in response to a selection operation on the target virtual object in the virtual scene;
[0178] The adjustment module 1508 is configured to respond to an adjustment operation triggered based on the adjustment model and display an adjustment result of the target virtual object according to the adjustment operation.
[0179] In the above embodiment, during the process of playing the virtual scene file, the virtual scene in the virtual scene file can be in an editable state in response to the scene editing operation. When the virtual scene is in the editable state, in response to the selection operation of the target virtual object in the virtual scene, an adjustment model for object adjustment is displayed at the position of the target virtual object. In response to the adjustment operation triggered based on the adjustment model, the adjustment result of the target virtual object is displayed according to the adjustment operation. Through this solution, the film and television producer can enter the editing mode immediately during the real-time preview of the virtual scene and directly adjust the virtual object in the scene, thereby improving the adjustment efficiency of the virtual object. When the film and television producer selects a target virtual object for editing, the adjustment model for adjustment will be displayed at the object position. Through the adjustment model, the producer can adjust the target virtual object intuitively and accurately, further improving the adjustment efficiency of the virtual object. In the process of adjusting the target virtual object, the result of each adjustment can be seen immediately. The film and television producer can quickly adjust the target virtual object multiple times in one preview until a satisfactory effect is achieved, reducing the need for multiple iterative adjustments to the virtual scene in the development mode, thereby further improving the adjustment efficiency of the virtual object.
[0180] In one embodiment, the adjustment model display module 1506 is also used to: display a candidate editing control in response to a selection operation on a target virtual object in a virtual scene; display an adjustment model for posture adjustment at the position of the target virtual object in response to a selection operation on a posture adjustment control; the posture adjustment control is a control for posture adjustment among the candidate editing controls.
[0181] In one embodiment, the adjustment model display module 1506 is also used to: display candidate mode controls in response to a selection operation on a posture adjustment control; mark a target mode control corresponding to the control selection operation as selected in response to a control selection operation; the target mode control is a control among the candidate mode controls; and display an adjustment model for posture adjustment corresponding to the target mode control at the position of the target virtual object.
[0182] In one embodiment, the adjustment model display module 1506 is also used to: display an object copy of the target virtual object in response to a selection operation on the copy control; display a candidate editing control in response to a selection operation on the object copy; display an adjustment model for posture adjustment at the location of the object copy in response to a selection operation on the posture adjustment control; the posture adjustment control is a control in the candidate editing controls for posture adjustment.
[0183] In one embodiment, the adjustment model display module 1506 is also used to: hide the target virtual object in response to a selection operation on a hiding control; display a hidden object list in response to a list display operation; display a cancel hiding control in response to a selection operation on the target virtual object in the hidden object list; and restore display of the target virtual object in response to a selection operation on a cancel hiding control.
[0184] In one embodiment, the adjustment model display module 1506 is further used to: in response to a selection operation on a delete control, remove the target virtual object from the virtual scene; in response to undoing the delete operation, add the target virtual object back to the virtual scene.
[0185] In one embodiment, the adjustment module 1508 is also used to: select a target adjustment function in response to a first adjustment operation triggered based on the adjustment model; display the adjustment result of the target virtual object according to the operation information corresponding to the target adjustment function and the second adjustment operation in response to a second adjustment operation triggered based on the adjustment model; the operation information includes the operation trajectory or trigger position of the second adjustment operation.
[0186] In one embodiment, the adjustment model is a basic adjustment model, and the basic adjustment model includes an axial adjustment component; the adjustment module 1508 is also used to: select the axial movement function in response to the movement function operation triggered by the axial adjustment component; and display the movement result of the target virtual object on the coordinate axis corresponding to the axial adjustment component according to the operation information corresponding to the axial movement function and the second adjustment operation.
[0187] In one embodiment, the adjustment model is a basic adjustment model, and the basic adjustment model includes a plane adjustment component; the adjustment module 1508 is also used to: select a plane movement function in response to a movement function operation triggered based on the plane adjustment component; and display the movement result of the target virtual object in the plane corresponding to the plane adjustment component according to the operation information corresponding to the plane movement function and the second adjustment operation.
[0188] In one embodiment, the adjustment module 1508 is also used to: select a plane rotation function in response to a rotation function operation triggered by the plane adjustment component; and display the rotation result of the target virtual object in the plane corresponding to the plane adjustment component and around the center of the plane adjustment component according to the operation information corresponding to the plane rotation function and the second adjustment operation.
[0189] In one embodiment, the adjustment model is an extended adjustment model, which includes a first rotation component, a second rotation component and a third rotation component; the adjustment module 1508 is also used to: in response to a component selection operation, select a rotation function corresponding to a target rotation component specified by the component selection operation; the target rotation component is one of the first rotation component, the second rotation component and the third rotation component; according to the rotation function corresponding to the target rotation component and the operation information corresponding to the second adjustment operation, display the rotation result of the target virtual object in the plane corresponding to the target rotation component and around the center of the target rotation component.
[0190] In one embodiment, the adjustment module 1508 is also used to: perform coordinate conversion on the track point or trigger position in the operation track to obtain the three-dimensional coordinates of the corresponding interaction point in the virtual scene; select the coordinates on the target axis from the three-dimensional coordinates according to the target adjustment function; adjust the target virtual object based on the coordinates on the target axis to obtain the adjustment result of the target virtual object; and display the adjustment result of the target virtual object.
[0191] In one embodiment, the coordinates on the target axis include a first coordinate and a second coordinate on the target axis; the adjustment module 1508 is also used to: determine the rotation angle and the rotation direction based on the first coordinate and the second coordinate; rotate the target virtual object according to the rotation angle and the rotation direction to obtain the adjustment result of the target virtual object.
[0192] In one embodiment, the adjustment model display module 1506 is also used to: determine the screen position corresponding to the selection operation in response to the selection operation; determine the target ray based on the screen position and the camera position; determine the virtual object in the virtual scene that intersects with the target ray and the distance between the virtual object and the starting point of the target ray meets the distance condition as the target virtual object; and display the adjustment model for object adjustment at the position of the target virtual object.
[0193] In one embodiment, the adjustment model display module 1506 is also used to: in response to a perspective switching operation, display a scene screen of the virtual scene under the switched perspective; when the target virtual object is blocked by other virtual objects under the switched perspective, display the outline and adjustment model of the target virtual object on the scene screen.
[0194] In one embodiment, the adjustment model display module 1506 is further used to: perform stroke processing on the target virtual object to obtain the outline of the target virtual object; display the outline of the target virtual object on the scene screen, and display the adjustment model at the corresponding position of the outline.
[0195] Each module in the above-mentioned object adjustment device in the virtual scene can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0196] In one embodiment, a computer device is provided, and the computer device is described as a terminal as an example, and its internal structure diagram can be shown in Figure 16. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for adjusting objects in a virtual scene is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.
[0197] Those skilled in the art will understand that the structure shown in FIG. 16 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0198] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0199] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0200] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0201] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0202] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0203] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0204] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for adjusting objects in a virtual scene, characterized in that: The method comprises: Playing a virtual scene file; the virtual scene file is a file of a virtual scene used for virtual shooting; In response to the scene editing operation, the virtual scene in the virtual scene file is in an editable state; In response to a selection operation of a target virtual object in the virtual scene, displaying an adjustment model for object adjustment at a position of the target virtual object; In response to an adjustment operation triggered based on the adjustment model, an adjustment result of the target virtual object is displayed according to the adjustment operation.
2. The method according to claim 1, characterized in that In response to a selection operation on a target virtual object in the virtual scene, displaying an adjustment model for object adjustment at a position of the target virtual object includes: In response to a selection operation on a target virtual object in the virtual scene, displaying a candidate editing control; In response to a selection operation on a posture adjustment control, an adjustment model for posture adjustment is displayed at the position of the target virtual object; the posture adjustment control is a control for posture adjustment in the candidate editing controls.
3. The method according to claim 2, characterized in that In response to the selection operation of the posture adjustment control, displaying an adjustment model for posture adjustment at the position of the target virtual object includes: In response to a selection operation on a posture adjustment control, displaying a candidate mode control; In response to a control selection operation, marking a target mode control corresponding to the control selection operation as a selected state; the target mode control is a control in the candidate mode controls; At the position of the target virtual object, an adjustment model for posture adjustment corresponding to the target mode control is displayed.
4. The method according to claim 2, characterized in that: The method further comprises: In response to a selection operation on the copy control, displaying an object copy of the target virtual object; In response to a selection operation on the object copy, displaying a candidate edit control; In response to a selection operation on a posture adjustment control, an adjustment model for posture adjustment is displayed at the location of the object copy; the posture adjustment control is a control for posture adjustment in the candidate editing controls.
5. The method according to claim 2, characterized in that: The method further comprises: In response to a selection operation on a hidden control, hiding the target virtual object; In response to a list display operation, displaying a hidden object list; In response to a selection operation on the target virtual object in the hidden object list, displaying a unhide control; In response to a selection operation on the unhide control, the target virtual object is restored to display.
6. The method according to claim 2, characterized in that The method further comprises: In response to a selection operation on a delete control, removing the target virtual object from the virtual scene; In response to undoing the deletion operation, the target virtual object is added back to the virtual scene.
7. The method according to claim 1, characterized in that In response to the adjustment operation triggered based on the adjustment model, displaying the adjustment result of the target virtual object according to the adjustment operation includes: In response to a first adjustment operation triggered based on the adjustment model, selecting a target adjustment function; In response to a second adjustment operation triggered based on the adjustment model, an adjustment result of the target virtual object is displayed according to the target adjustment function and operation information corresponding to the second adjustment operation; the operation information includes an operation track or a trigger position of the second adjustment operation.
8. The method according to claim 7, characterized in that The adjustment model is a basic adjustment model, and the basic adjustment model includes an axial adjustment component; and in response to a first adjustment operation triggered based on the adjustment model, selecting a target adjustment function includes: In response to the movement function operation triggered by the axial adjustment assembly, selecting the axial movement function; The displaying the adjustment result of the target virtual object according to the target adjustment function and the operation information corresponding to the second adjustment operation includes: According to the axial movement function and the operation information corresponding to the second adjustment operation, the movement result of the target virtual object on the coordinate axis corresponding to the axial adjustment component is displayed.
9. The method according to claim 7, characterized in that: The adjustment model is a basic adjustment model, and the basic adjustment model includes a plane adjustment component; and in response to a first adjustment operation triggered based on the adjustment model, selecting a target adjustment function includes: In response to a movement function operation triggered by the plane adjustment component, selecting a plane movement function; The displaying the adjustment result of the target virtual object according to the target adjustment function and the operation information corresponding to the second adjustment operation includes: According to the plane movement function and the operation information corresponding to the second adjustment operation, the movement result of the target virtual object in the plane corresponding to the plane adjustment component is displayed.
10. The method according to claim 9, characterized in that The selecting a target adjustment function in response to a first adjustment operation triggered based on the adjustment model includes: In response to a rotation function operation triggered on the plane adjustment component, selecting a plane rotation function; The displaying the adjustment result of the target virtual object according to the target adjustment function and the operation information corresponding to the second adjustment operation includes: According to the plane rotation function and the operation information corresponding to the second adjustment operation, a rotation result of the target virtual object rotating within the plane corresponding to the plane adjustment component and around the center of the plane adjustment component is displayed.
11. The method according to claim 7, characterized in that The adjustment model is an extended adjustment model, and the extended adjustment model includes a first rotation component, a second rotation component and a third rotation component; The selecting a target adjustment function in response to a first adjustment operation triggered based on the adjustment model includes: In response to a component selection operation, selecting a rotation function corresponding to a target rotation component specified by the component selection operation; the target rotation component is one of the first rotation component, the second rotation component and the third rotation component; The displaying the adjustment result of the target virtual object according to the target adjustment function and the operation information corresponding to the second adjustment operation includes: According to the rotation function corresponding to the target rotation component and the operation information corresponding to the second adjustment operation, the rotation result of the target virtual object rotating around the center of the target rotation component in the plane corresponding to the target rotation component is displayed.
12. The method according to claim 7, characterized in that The displaying the adjustment result of the target virtual object according to the target adjustment function and the operation information corresponding to the second adjustment operation includes: Performing coordinate transformation on the track point in the operation track or the trigger position to obtain the three-dimensional coordinates of the corresponding interaction point in the virtual scene; From the three-dimensional coordinates, selecting coordinates on the target axis according to the target adjustment function; Adjust the target virtual object based on the coordinates on the target axis to obtain an adjustment result of the target virtual object; The adjustment result of the target virtual object is displayed.
13. The method according to claim 12, characterized in that The coordinates on the target axis include a first coordinate and a second coordinate on the target axis; and adjusting the target virtual object based on the coordinates on the target axis to obtain an adjustment result of the target virtual object includes: Determine a rotation angle and a rotation direction based on the first coordinate and the second coordinate; The target virtual object is rotated according to the rotation angle and the rotation direction to obtain an adjustment result of the target virtual object.
14. The method according to any one of claims 1 to 13, characterized in that In response to a selection operation on a target virtual object in the virtual scene, displaying an adjustment model for object adjustment at a position of the target virtual object includes: In response to a selection operation, determining a screen position corresponding to the selection operation; determining a target ray based on the screen position and the camera position; Determine a virtual object in the virtual scene that intersects with the target ray and whose distance from the starting point of the target ray meets a distance condition as a target virtual object; An adjustment model for object adjustment is displayed at the position of the target virtual object.
15. The method according to any one of claims 1 to 13, characterized in that After displaying the adjustment model for object adjustment at the position of the target virtual object, the method further includes: In response to the perspective switching operation, displaying a scene picture of the virtual scene under the switched perspective; When the target virtual object is blocked by other virtual objects in the switched viewing angle, the outline of the target virtual object and the adjustment model are displayed on the scene screen.
16. The method according to claim 15, characterized in that The step of displaying the outline of the target virtual object and the adjustment model on the scene screen includes: Performing a stroke process on the target virtual object to obtain a contour of the target virtual object; The outline of the target virtual object is displayed on the scene screen, and the adjustment model is displayed at a corresponding position of the outline.
17. An object adjustment device in a virtual scene, characterized in that: The device comprises: A virtual scene playing module, used for playing a virtual scene file; the virtual scene file is a file of a virtual scene used for virtual shooting; A state switching module, used for responding to a scene editing operation, the virtual scene in the virtual scene file is in an editable state; An adjustment model display module, configured to display an adjustment model for object adjustment at a position of a target virtual object in the virtual scene in response to a selection operation on the target virtual object; The adjustment module is used to respond to the adjustment operation triggered based on the adjustment model and display the adjustment result of the target virtual object according to the adjustment operation.
18. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 16 are implemented.
19. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 16 are implemented.
20. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 16 are implemented.