Virtual scene editing processing method and device, electronic equipment and storage medium

By switching the rotation center of the virtual camera to the reference point of the target object and adjusting the viewing angle in virtual scene editing, the problem of inefficient editing in the prior art is solved, and more efficient virtual scene editing is achieved.

CN120437593APending Publication Date: 2025-08-08NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510812413.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-17
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In the existing virtual scene editing method, creators need to repeatedly move the virtual camera and rotate the viewing angle to position the virtual object, resulting in inefficient editing.

Method used

By selecting the virtual object, switch the rotation center of the virtual camera to the object's reference point, and adjust the viewing angle based on the distance between the object and the camera, so that the camera includes the target object in the adjusted viewing angle.

Benefits of technology

Simplifies the virtual scene editing process, reduces redundant operations, and improves editing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120437593A_ABST
    Figure CN120437593A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual scene editing processing method and device, electronic equipment and a storage medium, a game editing interface can be displayed, and the game editing interface comprises a to-be-edited virtual scene shot by a virtual camera and a plurality of virtual objects in the virtual scene; in response to a selection operation on the target virtual object, switching a rotation center of the virtual camera to a first reference point of the target virtual object; determining a target distance between the virtual camera and the target virtual object; and in response to the first view angle adjustment event, controlling rotation of the virtual camera based on the first reference point and the target distance to adjust the view angle, so that a virtual scene shot by the virtual camera under the adjusted view angle contains the target virtual object. On the basis, the creator can edit the virtual scene only by executing the operations of selecting the virtual object and rotating the virtual camera, and does not need to execute redundant operation processes such as moving the virtual camera, rotating the visual angle and positioning the virtual object, so that the editing efficiency of the virtual scene is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of game technology, and in particular to a virtual scene editing and processing method, device, electronic device and storage medium. Background Art

[0002] Games have become one of the important ways for people to relax and entertain themselves in their daily lives. In some games, in order to enhance the players' gaming experience, it is necessary to edit the virtual scenes.

[0003] Existing methods for editing virtual scenes require creators to repeatedly rotate the virtual camera's perspective to edit and model the scene. This rotation is always based on the position of a virtual character, rotating the camera horizontally and vertically around that character. When modeling and editing distant virtual objects within the virtual scene from multiple angles, creators must repeatedly perform the redundant steps of moving the virtual camera, rotating the perspective, and positioning the virtual objects, severely impacting editing efficiency.

[0004] Therefore, the existing virtual scene editing processing solutions have the problem of low editing efficiency. Summary of the Invention

[0005] The embodiments of the present application provide a virtual scene editing and processing method, apparatus, electronic device, and storage medium. By selecting a virtual object, the rotation center of a virtual camera can be switched to a reference point corresponding to the virtual object. The rotation of the virtual camera can be controlled in combination with the reference point and the distance between the virtual object and the virtual camera to adjust the viewing angle, so that the virtual scene captured by the virtual camera at the adjusted viewing angle includes the virtual object. That is, during the virtual scene editing and processing process, the creator only needs to perform the operations of selecting the virtual object and rotating the virtual camera, without having to repeatedly perform redundant operations such as moving the virtual camera, rotating the viewing angle, and positioning the virtual object, thereby improving the efficiency of virtual scene editing.

[0006] In a first aspect, an embodiment of the present application provides a virtual scene editing processing method, the method comprising:

[0007] Displaying a game editing interface, wherein the game editing interface includes a virtual scene to be edited captured by a virtual camera, and the virtual scene includes a plurality of virtual objects;

[0008] In response to a selection operation of a target virtual object among the multiple virtual objects, controlling the rotation center of the virtual camera to switch to a first reference point corresponding to the target virtual object;

[0009] determining a target distance between the virtual camera and the target virtual object;

[0010] In response to a first viewing angle adjustment event for the virtual camera, the rotation of the virtual camera is controlled based on the first reference point and the target distance to adjust the viewing angle, so that the virtual scene captured by the virtual camera at the adjusted viewing angle includes the target virtual object.

[0011] In a second aspect, an embodiment of the present application provides a virtual scene editing and processing device, comprising:

[0012] A display module is configured to display a game editing interface, wherein the game editing interface includes a virtual scene to be edited captured by a virtual camera, and the virtual scene includes a plurality of virtual objects;

[0013] a switching module, configured to control the switching of the rotation center of the virtual camera to a first reference point corresponding to the target virtual object in response to a selection operation on a target virtual object among the multiple virtual objects;

[0014] a distance determination module, configured to determine a target distance between the virtual camera and the target virtual object;

[0015] A perspective control module is configured to, in response to a first perspective adjustment event for the virtual camera, control the rotation of the virtual camera based on the first reference point and the target distance to adjust the perspective so that the virtual scene captured by the virtual camera at the adjusted perspective includes the target virtual object.

[0016] In a third aspect, an embodiment of the present application further provides an electronic device comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any virtual scene editing processing method.

[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any virtual scene editing processing method.

[0018] In a fifth aspect, an embodiment of the present application also provides a computer program product, comprising a computer program, which is stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device performs any step of the virtual scene editing processing method provided in the embodiment of the present application.

[0019] Using the solution of the embodiment of the present application, a game editing interface can be displayed, wherein the game editing interface includes a virtual scene to be edited captured by a virtual camera, the virtual scene including multiple virtual objects; in response to a selection operation of a target virtual object among the multiple virtual objects, the rotation center of the virtual camera is controlled to switch to a first reference point corresponding to the target virtual object; a target distance between the virtual camera and the target virtual object is determined; and in response to a first perspective adjustment event for the virtual camera, the rotation of the virtual camera is controlled based on the first reference point and the target distance to adjust the perspective, so that the virtual scene captured by the virtual camera at the adjusted perspective includes the target virtual object. Based on this, by selecting a virtual object, the rotation center of the virtual camera is switched to the reference point corresponding to the virtual object, and the rotation of the virtual camera is controlled based on the reference point and the distance between the virtual object and the virtual camera to adjust the perspective, so that the virtual scene captured by the virtual camera at the adjusted perspective includes the virtual object. In other words, during the virtual scene editing process, the creator only needs to perform the operations of selecting the virtual object and rotating the virtual camera, without having to repeatedly perform redundant operations such as moving the virtual camera, rotating the perspective, and positioning the virtual object, thereby improving the efficiency of virtual scene editing. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 This is a schematic diagram of an implementation environment scenario of the virtual scene editing processing method provided in the embodiment of the present application;

[0022] Figure 2 This is a flow chart of an embodiment of a virtual scene editing method provided in an embodiment of the present application;

[0023] Figure 3 1 is a schematic diagram of a game editing interface of a virtual scene editing processing method provided in an embodiment of the present application;

[0024] Figure 4 Schematic diagram of the field of view of a virtual camera in an existing virtual scene editing method provided in an embodiment of the present application;

[0025] Figure 5 Schematic diagram of the adjusted field of view of a virtual camera in an existing virtual scene editing method provided in an embodiment of the present application;

[0026] Figure 6This is a schematic diagram of an interface of a game editing interface where a virtual scene captured by an adjusted virtual camera is located according to an existing virtual scene editing processing method provided in an embodiment of the present application;

[0027] Figure 7 Schematic diagram of the field of view of a virtual camera in the virtual scene editing method provided in an embodiment of the present application;

[0028] Figure 8 Schematic diagram of the adjusted field of view of a virtual camera in the virtual scene editing method provided in an embodiment of the present application;

[0029] Figure 9 1 is a schematic diagram of a game editing interface of a virtual scene captured by an adjusted virtual camera in a virtual scene editing processing method provided in an embodiment of the present application;

[0030] Figure 10 Schematic diagram of the structure of the virtual scene editing and processing device provided in an embodiment of the present application;

[0031] Figure 11 It is a structural diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0032] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application. At the same time, in the description of the embodiments of the present application, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0033] Embodiments of the present application provide a virtual scene editing processing method, device, electronic device, and computer-readable storage medium.

[0034] Specifically, this embodiment will be described from the perspective of a virtual scene editing and processing device. The virtual scene editing and processing device can be integrated into an electronic device. That is, the virtual scene editing and processing method of the embodiment of the present application can be executed by an electronic device. Optionally, the electronic device can include a terminal device. The terminal device can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, game console, or personal computer (PC).

[0035] The virtual scene editing and processing method provided in the embodiments of the present application can be applied, for example, to a virtual scene editing and processing system. The virtual scene editing and processing system can include a terminal device and a server. The terminal device can be a device that includes both receiving and transmitting hardware, i.e., a device that has receiving and transmitting hardware capable of performing two-way communication over a two-way communication link. The player terminal device and the server can communicate bidirectionally via a network.

[0036] Optionally, the server may be a standalone server, or a server network or server cluster consisting of servers, including but not limited to a computer, a network host, a single network server, a set of multiple network servers, or a cloud server consisting of multiple servers. A cloud server is composed of a large number of computers or network servers based on cloud computing.

[0037] In one embodiment of the present application, the virtual scene editing processing method can be run on a local terminal device or a server. When the virtual scene editing processing method is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.

[0038] For example, when the virtual scene editing processing method is run on a terminal, the terminal device may be a mobile phone, tablet computer, personal computer, smart wearable device, game console or other device, which has a display function and can display a graphical user interface, which may include an operating system interface or an application interface, etc. A game program is installed on the terminal device, such as a client program for an online game. When the terminal device runs the game program, the game editing scene can be displayed in the graphical user interface, and the user can edit virtual objects in the game editing scene. The server generally refers to the background system that provides the game service in this exemplary embodiment, which can be a single server or a cluster of multiple servers. The server is deployed with a server-side program for the online game, which is used to perform game data processing on the server side. The terminal device and the server can be connected via a wired or wireless communication link for data transmission. The virtual scene editing processing method can be executed independently by the terminal device or jointly by the terminal device and the server.

[0039] For example, when the virtual scene editing and processing method runs on a server, it can be a cloud game. Cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the operating body of the game application and the main body presenting the game screen are separated. The storage and operation of the virtual scene editing and processing method are completed on the cloud gaming server. The game screen is presented on the cloud gaming client. The cloud gaming client is mainly used to receive and send game data and present the game screen. In the cloud gaming operating mode, the operating body of the game program and the main body presenting the game screen are separated. The storage and operation of the scene editing and processing method in the game are completed on the cloud gaming server (which can be the server mentioned above). The cloud gaming client (which can be the terminal device mentioned above) is used to receive and send data and present the game screen. For example, the cloud gaming client can be a display device with data transmission capabilities close to the user, such as a mobile terminal, television, computer, or PDA; while the cloud gaming server in the cloud performs information processing. When playing a game, the user operates the cloud gaming client to send operational instructions to the cloud gaming server. The cloud gaming server runs the game according to the operational instructions, encodes and compresses the game screen and other data, and returns it to the cloud gaming client via the network. Finally, the cloud gaming client decodes and outputs the game screen. In one embodiment, the virtual scene editing processing method can be implemented in a stand-alone game. Without the need for server deployment, the entire game program can be installed on the terminal device and the virtual scene editing processing method can be executed.

[0040] See also Figure 1 , taking the virtual scene editing and processing device integrated into the electronic device as an example, Figure 1A schematic diagram of an implementation scenario of a virtual scene editing processing method provided in an embodiment of the present application, wherein the electronic device can be a terminal device, which displays a game editing interface, wherein the game editing interface includes a virtual scene to be edited captured by a virtual camera, and the virtual scene includes multiple virtual objects; in response to a selection operation of a target virtual object among the multiple virtual objects, the rotation center of the virtual camera is controlled to switch to a first reference point corresponding to the target virtual object; the target distance between the virtual camera and the target virtual object is determined; in response to a first perspective adjustment event for the virtual camera, the rotation of the virtual camera is controlled based on the first reference point and the target distance to adjust the perspective, so that the virtual scene captured by the virtual camera at the adjusted perspective includes the target virtual object. Based on this, by selecting a virtual object, the rotation center of the virtual camera is switched to the reference point corresponding to the virtual object, and the rotation of the virtual camera is controlled in combination with the reference point and the distance between the virtual object and the virtual camera to adjust the perspective, so that the virtual scene captured by the virtual camera at the adjusted perspective includes the virtual object. That is, during the virtual scene editing process, the creator only needs to select the virtual object and rotate the virtual camera. There is no need to repeatedly perform redundant operations such as moving the virtual camera, rotating the view angle, and positioning the virtual object, thereby improving the editing efficiency of the virtual scene.

[0041] It should be noted that Figure 1 The illustrated schematic diagram of the implementation environment of the virtual scene editing method is merely an example. The implementation environment of the virtual scene editing method described in the embodiment of this application is intended to more clearly illustrate the technical solution of the embodiment of this application and does not constitute a limitation on the technical solution provided by the embodiment of this application. It will be appreciated by those skilled in the art that with the evolution of data processing and the emergence of new business scenarios, the technical solution provided in this application is equally applicable to similar technical problems.

[0042] The solutions provided in the embodiments of the present application are specifically described by the following embodiments. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments.

[0043] This embodiment will be described from the perspective of a virtual scene editing and processing device. The virtual scene editing and processing device may be integrated into an electronic device, which may be a terminal and / or a server, and this application does not impose any restrictions thereon.

[0044] See also Figure 2 , Figure 2 The virtual scene editing processing method provided by the embodiment of the present application may include the following steps 101 to 104:

[0045] Step 101: Display a game editing interface, wherein the game editing interface includes a virtual scene to be edited captured by a virtual camera, and the virtual scene includes multiple virtual objects.

[0046] Among them, the game editing interface is a user interaction interface. For example, the game editing interface can be as follows Figure 3 shown.

[0047] It should be noted that the game editing interface is used to create, modify, and manage game content, including but not limited to game levels, game characters, props, virtual scenes, virtual objects within virtual scenes, and other elements. This game editing interface provides users with a range of tools and options so that they can design and adjust various aspects of the game in an intuitive and efficient manner. This application uses virtual objects as an example for explanation.

[0048] In some embodiments, the game editing interface may include a toolbar that provides various operating tools, such as a selection tool, a drawing tool, a moving tool, a zoom tool, a rotation tool, etc. The game editing interface may also include a property panel for displaying the properties (such as position, size, color, animation parameters, etc.) of the target virtual object, which is editable by the user. The game editing interface may also include a game view, which displays the game content in a real-time preview mode through the game view, and the user may directly operate the game elements in the view. The game editing interface may also include a resource manager, which lists all available game resources (such as pictures, audio, scripts, etc.) in the resource manager, from which the user may select and add them to the virtual scene. The game editing interface may also include a virtual camera control panel for adjusting the parameters of the virtual camera, such as position, direction, focal length, etc., so that the user can observe and edit the virtual scene from different perspectives. The content included in the game editing interface may be adjusted according to actual conditions, and the embodiments of the present application are not limited thereto.

[0049] It should be noted that the content displayed on the game editing interface can be obtained by executing a software application on the processor of a mobile terminal or other terminal and rendering it on the display. The game editing interface can present the entire virtual scene or only a portion of the virtual scene. The virtual scene includes multiple virtual objects, specifically including the ground, mountains, rocks, vegetation, buildings, etc. When the virtual scene is relatively large, the game editing interface of the terminal device may only display the content of the virtual scene during the game.

[0050] The virtual camera is a virtual device used within the game editing interface to capture and display virtual scenes. It simulates the functionality of a real camera, allowing users to observe and edit virtual scenes from different perspectives. The virtual camera has a position and orientation in three-dimensional space, which can be adjusted by using the virtual camera control panel within the game editing interface or by dragging the camera within the interface.

[0051] Step 102 : In response to a selection operation on a target virtual object among a plurality of virtual objects, control the rotation center of the virtual camera to switch to a first reference point corresponding to the target virtual object.

[0052] The target virtual object refers to the virtual object triggered by the selection operation in the virtual scene, that is, the target virtual object is the virtual object selected from multiple virtual objects and needs to be edited. Figure 3 The selected ship model.

[0053] There are many ways to select the target virtual object, which can be adjusted according to actual conditions and are not limited in the embodiments of this application.

[0054] In some embodiments, the above-mentioned process of controlling the rotation center of the virtual camera to switch to the first reference point corresponding to the target virtual object in response to a selection operation of the target virtual object among multiple virtual objects may include: controlling the rotation center of the virtual camera to switch to the first reference point corresponding to the target virtual object in response to a voice selection operation of the target virtual object among multiple virtual objects.

[0055] Voice selection is a user-generated command issued through a voice input device such as a microphone. For example, a user might say, "Select the ship model on the game editing interface." Upon receiving the user's voice command, the system performs speech recognition, converts the speech into text, and performs semantic analysis on the text to extract key information (such as the color, location, and type of the target virtual object). Based on this key information, the system then determines the target virtual object from among multiple virtual objects.

[0056] In some embodiments, the above-mentioned process of controlling the rotation center of the virtual camera to switch to the first reference point corresponding to the target virtual object in response to a selection operation of a target virtual object among multiple virtual objects may also include: controlling the rotation center of the virtual camera to switch to the first reference point corresponding to the target virtual object in response to a touch operation on the target virtual object among the multiple virtual objects.

[0057] Among them, the touch operation may include a click operation, a double-click operation, and a long press operation on the game editing interface based on a mouse, or a click operation, a double-click operation, and a long press operation on the game editing interface based on a user's finger. The touch operation can also be based on the attribute configuration interface, and an identifier associated with the target virtual object is input to realize the selection operation of the target virtual object among multiple virtual objects. The specific operation can be based on actual conditions. For example, in response to a click operation on any one of the multiple virtual objects displayed on the game editing interface, the virtual object corresponding to the click operation is determined to be the target virtual object. For another example, in response to a long press operation on any one of the multiple virtual objects displayed on the game editing interface, the virtual object corresponding to the long press operation is determined to be the target virtual object.

[0058] The virtual camera's rotation center refers to the fixed point or axis around which the virtual camera rotates. It's a crucial parameter in virtual camera motion, determining how the camera's perspective changes during rotation. The position and orientation of the rotation center directly impact the user's viewing angle and range of the virtual scene within the game editing interface.

[0059] Among them, the first reference point can refer to the center point of the target virtual object, the point where the center of mass is located, the point where the center of gravity is located, etc., and the determination method can be adjusted according to the actual situation and the specific type of the reference point, and the embodiments of the present application do not limit it. For example, the first reference point is the center point of the target virtual object, and the minimum coordinate information and maximum coordinate information of the bounding box of the target virtual object can be obtained. The difference obtained by subtracting the X coordinate in the minimum coordinate information from the X coordinate in the maximum coordinate information is divided by 2 to obtain the X coordinate of the center point of the target virtual object, and the difference obtained by subtracting the Y coordinate in the minimum coordinate information from the Y coordinate in the maximum coordinate information is divided by 2 to obtain the Y coordinate of the center point of the target virtual object. According to the X coordinate and Y coordinate of the center point of the target virtual object, the coordinates of the center point of the target virtual object are determined, and the coordinates are used as the first reference point.

[0060] Among them, there can be multiple ways to control the process of switching the rotation center of the virtual camera to the first reference point corresponding to the target virtual object, which can be adjusted according to actual conditions and is not limited in the embodiments of the present application.

[0061] In some embodiments, the above-mentioned process of controlling the rotation center of the virtual camera to switch to the first reference point corresponding to the target virtual object in response to the selection operation of the target virtual object among multiple virtual objects may include: in response to the selection operation of the target virtual object among multiple virtual objects, determining that the target virtual object is in a selected state, and when the target virtual object is in the selected state, controlling the rotation center of the virtual camera to switch to the first reference point corresponding to the target virtual object.

[0062] Specifically, when the target virtual object is in a selected state, the rotation center of the virtual camera is switched to the first reference point corresponding to the target virtual object. When the target virtual object is not in a selected state, the rotation center of the virtual camera is not switched to the first reference point corresponding to the target virtual object.

[0063] In some embodiments, the above-mentioned process of controlling the switching of the rotation center of the virtual camera to the first reference point corresponding to the target virtual object in response to the selection operation of the target virtual object among multiple virtual objects may also include: in response to the selection operation of the target virtual object among multiple virtual objects, obtaining the first reference point corresponding to the target virtual object, and recording the first reference point in the system, so as to switch the rotation center of the virtual camera to the first reference point corresponding to the target virtual object through system control.

[0064] Step 103: Determine the target distance between the virtual camera and the target virtual object.

[0065] The target distance refers to the distance between the virtual camera and the target virtual object. The distance may refer to the distance difference between the virtual camera and the target virtual object in three-dimensional space or the distance difference between the virtual camera and the target virtual object in a two-dimensional plane.

[0066] The target distance can be determined based on actual conditions and is not limited in the present embodiment. For example, the target distance refers to the distance difference between the virtual camera and the target virtual object in a two-dimensional plane, where the two-dimensional plane is the XZ plane. The target distance is obtained by performing a Euclidean distance calculation based on the XZ coordinates of the virtual camera in the XZ plane and the XZ coordinates of the target virtual object in the XZ plane.

[0067] In some embodiments, a rotation radius of the virtual camera is determined based on the target distance.

[0068] The rotation radius of the virtual camera refers to the distance from the rotation center to the position of the virtual camera when the virtual camera rotates around the rotation center in the spherical coordinate system.

[0069] Step 104 : In response to the first viewing angle adjustment event for the virtual camera, control the rotation of the virtual camera based on the first reference point and the target distance to adjust the viewing angle so that the virtual scene captured by the virtual camera at the adjusted viewing angle includes the target virtual object.

[0070] Among them, the first perspective adjustment event refers to an event used to control the rotation of the virtual camera to adjust the perspective of the virtual camera. Its specific content can be adjusted according to actual conditions and is not limited in the embodiments of the present application.

[0071] For example, a first perspective adjustment event refers to a perspective adjustment event triggered by user interaction, where user interaction includes but is not limited to a user rotating the rotation axis using a mouse, a user rotating the rotation axis using a keyboard arrow key or a shortcut key, or a user rotating the rotation axis on a touch screen. For another example, a first perspective adjustment event refers to a perspective adjustment event automatically triggered by the system, where automatic system triggering includes but is not limited to the system automatically adjusting the perspective of the virtual camera when a user triggers a specific event (such as entering a certain area).

[0072] In some embodiments, before responding to a first perspective adjustment event for the virtual camera and controlling the rotation of the virtual camera based on the first reference point and the target distance to adjust the perspective, the virtual scene editing and processing method also includes: constructing a spherical coordinate system for the virtual camera with the first reference point as the origin of the coordinate system; determining the first position of the virtual camera in the spherical coordinate system based on the first azimuth information, the first elevation information and the target distance, wherein the first azimuth information includes the current azimuth of the virtual camera on the target plane, the first elevation information includes the current elevation of the virtual camera relative to the target plane, and the target plane refers to a plane perpendicular to the rotation axis of the virtual camera.

[0073] The spherical coordinate system is a three-dimensional coordinate system that uses three parameters to describe the position of a virtual camera in three-dimensional space: target distance, azimuth, and elevation. The azimuth angle refers to the rotation angle of the virtual camera on the target plane, and the elevation angle refers to the vertical tilt angle of the virtual camera relative to the target plane.

[0074] The first azimuth angle information indicates the current rotation angle of the virtual camera on the target plane, the first elevation angle information indicates the current vertical tilt angle of the virtual camera relative to the target plane, and the first position information indicates the current position of the virtual camera in the spherical coordinate system under the current rotation angle, current vertical tilt angle, and target distance.

[0075] Based on this, the above-mentioned process of controlling the rotation of the virtual camera to adjust the viewing angle based on the first reference point and the target distance in response to the first viewing angle adjustment event for the virtual camera may also include: obtaining azimuth change information and elevation change information in response to the first viewing angle adjustment event for the virtual camera; determining the adjusted second azimuth information based on the azimuth change information and the first azimuth information, and determining the adjusted second elevation information based on the elevation change information and the first elevation information; determining the second position of the rotated virtual camera in the spherical coordinate system based on the second azimuth information, the second elevation information and the target distance, and rotating the virtual camera from the first position to the second position to adjust the viewing angle.

[0076] The azimuth angle change information refers to the azimuth angle change parameters before and after the viewing angle is adjusted, and the elevation angle change information refers to the elevation angle change parameters before and after the viewing angle is adjusted.

[0077] The second azimuth angle information indicates the rotation angle of the virtual camera on the target plane after the adjusted viewing angle, and the second elevation angle information indicates the vertical tilt angle of the virtual camera relative to the target plane after the adjusted viewing angle. The second position information indicates the adjusted position of the virtual camera in the spherical coordinate system based on the rotation angle after the adjusted viewing angle, the vertical tilt angle after the adjusted viewing angle, and the target distance.

[0078] There are many ways to obtain azimuth angle change information and elevation angle change information, which can be adjusted according to actual conditions and are not limited in the embodiments of this application.

[0079] In some embodiments, the above-mentioned virtual scene editing processing method includes: obtaining a selection cancellation event for the target virtual object; determining a second reference point as the new rotation center of the virtual camera, and controlling the rotation center of the virtual camera to switch from the first reference point to the second reference point.

[0080] Among them, the selection cancellation event refers to an event that cancels the selection operation of the target virtual object. The specific event can be adjusted according to actual conditions and is not limited in the embodiments of the present application. For example, the selection cancellation event may include a triggering operation on a scene area in the virtual scene where no virtual object is displayed. For another example, the selection cancellation event may also include a touch operation on other virtual objects in the virtual scene other than the target virtual object.

[0081] The second reference point is a reference point used as a new rotation center of the virtual camera. There are many ways to determine the second reference point, which can be adjusted according to actual conditions and are not limited in this embodiment.

[0082] In some embodiments, the above-mentioned multiple virtual objects include a default virtual object, and the above-mentioned selection cancellation event includes a triggering operation on a scene area in the virtual scene where no virtual object is displayed. The reference point corresponding to the default virtual object can be determined as the second reference point of the new rotation center of the virtual camera.

[0083] In some embodiments, the above-mentioned selection cancellation event includes a touch operation on other virtual objects in the virtual scene except the target virtual object, and the reference point corresponding to the other virtual object corresponding to the touch operation can be determined as the second reference point of the new rotation center of the virtual camera.

[0084] Among them, the second reference point can refer to the center point of the new virtual object, the point where the center of mass is located, the point where the center of gravity is located, etc., and the determination method can be adjusted according to the actual situation and the specific type of the reference point, and the embodiment of the present application does not limit it. For example, the second reference point is the center point of the new virtual object, and the minimum coordinate information and maximum coordinate information of the bounding box of the new virtual object can be obtained. The difference obtained by subtracting the X coordinate in the maximum coordinate information from the X coordinate in the minimum coordinate information is divided by 2 to obtain the X coordinate of the center point of the new virtual object, and the difference obtained by subtracting the Y coordinate in the maximum coordinate information from the Y coordinate in the minimum coordinate information is divided by 2 to obtain the Y coordinate of the center point of the new virtual object. According to the X coordinate and Y coordinate of the center point of the new virtual object, the coordinates of the center point of the new virtual object are determined, and the coordinates are used as the second reference point.

[0085] It should be noted that the new virtual object may be a new virtual object selected based on a touch operation from among multiple virtual objects, or may be a default virtual object.

[0086] In some embodiments, the virtual scene editing processing method further includes: generating a perspective movement animation corresponding to the rotation center of the virtual camera switching from the first reference point to the second reference point, and playing the perspective movement animation.

[0087] The perspective movement animation refers to an animation used for smooth transitions. The specific generation process can be adjusted according to actual conditions and is not limited in the embodiments of the present application. For example, the perspective movement animation can be generated by linear interpolation in a spherical coordinate system based on the quaternion difference between the current direction of the virtual camera and the lens direction after switching to the fourth reference point.

[0088] In some embodiments, the above-mentioned virtual scene editing processing method also includes: responding to a second perspective adjustment event for the virtual camera, controlling the translation of the virtual camera to adjust the perspective, and determining whether to control the rotation center of the virtual camera to maintain the first reference point.

[0089] The second perspective adjustment event refers to an event used to control the translation of the virtual camera to adjust the perspective of the virtual camera. The specific content of the event can be adjusted according to actual conditions and is not limited in the embodiments of the present application. For example, the second perspective adjustment event includes but is not limited to user operations such as clicking and moving a mouse, and user operations such as clicking and moving a touch screen to trigger the translation of the virtual camera.

[0090] The above process of determining whether to control the rotation center of the virtual camera to maintain the first reference point may include: determining whether to control the rotation center of the virtual camera to maintain the first reference point based on whether the bounding box of the target virtual object intersects with the viewing cone of the virtual camera after adjusting the viewing angle, or based on whether the target ray passes through the bounding box of the target virtual object, wherein the direction of the target ray points from the virtual camera after adjusting the viewing angle to the direction of the third reference point of the game editing interface.

[0091] Among them, there are many ways to determine whether the bounding box of the target virtual object intersects with the viewing frustum of the virtual camera after adjusting the viewing angle. The specific methods can be adjusted according to actual conditions and are not limited in the embodiments of the present application. For example, a frustum clipping algorithm is used to determine whether the bounding box of the target virtual object intersects with the viewing frustum of the virtual camera after adjusting the viewing angle. For another example, a geometric method is used to calculate the geometric relationship between the virtual object and the viewing frustum to determine whether the bounding box of the target virtual object intersects with the viewing frustum of the virtual camera after adjusting the viewing angle:

[0092] In some embodiments, the process of determining whether the bounding box of the target virtual object intersects with the viewing frustum of the virtual camera after adjusting the viewing angle may include obtaining bounding box information of the target virtual object; and determining whether the bounding box of the target virtual object intersects with the viewing frustum of the virtual camera based on the bounding box information of the target virtual object and plane information of multiple planes of the viewing frustum of the virtual camera.

[0093] Among them, the bounding box information includes information such as the size, specifications, coordinates, etc. of the bounding box, which can be adjusted according to actual conditions and is not limited in the embodiments of the present application.

[0094] By performing an intersection test between the model bounding box of the target virtual object and the six planes of the virtual camera's viewing cone, it is determined whether the target virtual object is visible to the virtual camera.

[0095] For example, the user clicks on the ship model in the virtual scene through the game editing interface, and the virtual scene editing processing system performs a lock detection on the ship model to detect whether the ship model is within the viewing cone of the current virtual camera. Figure 4 As shown, the ship model is Model B, and the arrow indicates the field of view of the current virtual camera. The geometric center coordinates of the ship model are recorded. Based on these coordinates, a model bounding box of the target virtual object is generated. Intersection tests are performed between the target virtual object's model bounding box and the six planes of the virtual camera's viewing frustum to determine whether the target virtual object is visible to the virtual camera. If the target virtual object is visible to the virtual camera, the target virtual object is determined to be selected; otherwise, the target virtual object is determined to be unselected.

[0096] Based on this, the process of determining whether to control the rotation center of the virtual camera to maintain the first reference point according to whether the bounding box of the target virtual object intersects with the viewing frustum of the virtual camera after adjusting the viewing angle may include: if the bounding box of the target virtual object intersects with the viewing frustum of the virtual camera after adjusting the viewing angle, then determining to control the rotation center of the virtual camera to maintain the first reference point; if the bounding box of the target virtual object does not intersect with the viewing frustum of the virtual camera after adjusting the viewing angle, then determining not to control the rotation center of the virtual camera to maintain the first reference point, and the rotation center of the virtual camera may be controlled to switch from the first reference point to a second reference point. The second reference point may be a reference point corresponding to a default virtual object, or a reference point corresponding to a new virtual object triggered by a touch operation.

[0097] Among them, the above-mentioned process based on whether the target ray passes through the bounding box of the target virtual object can include: emitting rays to the three-dimensional space where the spherical coordinate system is located through the third reference point of the game editing interface, and judging whether the target ray passes through the bounding box of the target virtual object, wherein the direction of the target ray is pointed from the virtual camera after adjusting the viewing angle to the direction of the third reference point of the game editing interface.

[0098] Among them, the third reference point refers to the center point of the game editing interface, the point where the center of mass is located, the point where the center of gravity is located, etc. The method of determining it can be adjusted according to the actual situation and the specific type of the reference point, and the embodiment of the present application does not limit it. For example, the third reference point is the center point of the game editing interface. The minimum coordinate information and maximum coordinate information of the game editing interface can be obtained. The difference obtained by subtracting the X coordinate in the maximum coordinate information from the X coordinate in the minimum coordinate information is divided by 2 to obtain the X coordinate of the center point of the game editing interface. The difference obtained by subtracting the Y coordinate in the maximum coordinate information from the Y coordinate in the minimum coordinate information is divided by 2 to obtain the Y coordinate of the center point of the game editing interface. According to the X coordinate and Y coordinate of the center point of the game editing interface, the coordinates of the center point of the game editing interface are determined, and the coordinates are used as the third reference point.

[0099] Based on this, the process of determining whether to control the rotation center of the virtual camera to maintain the first reference point based on whether the target ray passes through the bounding box of the target virtual object may include: if the target ray passes through the bounding box of the target virtual object, determining to control the rotation center of the virtual camera to maintain the first reference point; if the target ray does not pass through the bounding box of the target virtual object, triggering a selection cancellation event for the target virtual object to control the rotation center of the virtual camera to switch from the first reference point to a second reference point. The second reference point can be a reference point corresponding to a default virtual object, or a reference point corresponding to a new virtual object triggered by a touch operation.

[0100] Specifically, before rendering each frame, a reverse ray detection is performed from the center point of the screen to detect whether the target ray hits the bounding box of the target virtual object. If the target ray hits the bounding box of the target virtual object, it indicates that the viewing angle adjustment range of the virtual camera is still within the allowable range, and the rotation center of the virtual camera is determined to be controlled to maintain the first reference point. If the ray hits the bounding box of the target virtual object, it indicates that the viewing angle adjustment range of the virtual camera exceeds the allowable range, and there is no need to ensure that the virtual scene captured by the virtual camera under the adjusted viewing angle includes the target virtual object, and the rotation center of the virtual camera is determined not to maintain the first reference point. The reference point corresponding to the default virtual object can be restored, or if a virtual object is newly triggered by a touch operation, the reference point corresponding to the newly triggered virtual object is switched to.

[0101] In some embodiments, when the target ray passes through the bounding box of the target virtual object, the virtual scene editing and processing method also includes: obtaining the intersection between the target ray and the bounding box of the target virtual object; calculating the offset information between the intersection and the first reference point, and determining whether the offset information exceeds a preset offset threshold, wherein the offset information includes azimuth offset information and elevation offset information; when the offset information exceeds the preset offset threshold, determining the azimuth compensation information according to the azimuth offset information and the target distance, and determining the elevation compensation information according to the elevation offset information and the target distance; correcting the second azimuth information according to the azimuth compensation information, and correcting the second elevation information according to the elevation compensation information.

[0102] The offset information refers to the offset between the intersection point and the first reference point in different coordinate axes. The offset information can include the offset on the coordinate axis corresponding to the azimuth angle (i.e., azimuth offset information) and the offset on the coordinate axis corresponding to the elevation angle (i.e., elevation offset information).

[0103] The preset offset threshold can be adjusted according to actual conditions, and the present application embodiment does not limit this. For example, based on pixels, the preset offset threshold is two coordinate units.

[0104] There are many ways to determine the azimuth compensation information based on the azimuth offset information and the target distance, and to determine the elevation compensation information based on the elevation offset information and the target distance. The specific methods can be adjusted according to actual conditions and are not limited in the embodiments of the present application.

[0105] For example, θ_compensation=arctan(ΔP.x / R), φ_compensation=arcsin(ΔP.y / R).

[0106] Where θ_compensation refers to the azimuth compensation information, φ_compensation refers to the elevation compensation information, ΔP.x refers to the offset on the coordinate axis corresponding to the azimuth angle, R is the target distance, and ΔP.y refers to the offset on the coordinate axis corresponding to the elevation angle.

[0107] Based on this, the above process of determining the second position of the rotated virtual camera in the spherical coordinate system based on the second azimuth information, the second elevation information and the target distance may also include: determining the second position of the rotated virtual camera in the spherical coordinate system based on the corrected second azimuth information, the corrected second elevation information and the target distance.

[0108] When it is detected that the offset information exceeds a preset offset threshold, the second azimuth information and the second elevation information required for correction are automatically calculated, and the angle of the virtual camera is fine-tuned to align the target virtual object with the center of the virtual camera, ensuring that the virtual camera rotates toward the target virtual object.

[0109] In some embodiments, the above-mentioned process of obtaining azimuth change information and elevation change information in response to the first viewing angle adjustment event for the virtual camera may include: if a drag operation based on the game editing interface is detected, obtaining the sliding distance corresponding to the drag operation, wherein the sliding distance includes the horizontal sliding distance and the vertical sliding distance on the target plane; determining the azimuth change information based on the horizontal sliding distance and the first sensitivity coefficient, wherein the first sensitivity coefficient is based on the baseline sensitivity coefficient and the distance between the first reference point and the third reference point of the virtual camera in the horizontal direction; determining the elevation change information based on the vertical sliding distance and the second sensitivity coefficient, wherein the second sensitivity coefficient is based on the baseline sensitivity coefficient and the distance between the first reference point and the fourth reference point of the virtual camera in the vertical direction.

[0110] The dragging operation includes a rotation operation and / or a translation operation on the virtual camera.

[0111] The first sensitivity coefficient refers to a sensitivity coefficient for adjusting the azimuth angle, and the second sensitivity coefficient refers to a sensitivity coefficient for adjusting the elevation angle.

[0112] The reference sensitivity coefficient refers to a reference coefficient for adjusting the viewing angle of the virtual camera, which can be set according to an empirical value, or manually set or experimentally set.

[0113] Among them, the fourth reference point can refer to the center point of the virtual camera, the point where the center of mass is located, the point where the center of gravity is located, etc., and the method of determining it can be adjusted according to the actual situation and the specific type of the reference point, and the embodiment of the present application does not limit it. For example, the fourth reference point is the center point of the virtual camera, and the minimum coordinate information and maximum coordinate information of the bounding box of the virtual camera can be obtained. The difference obtained by subtracting the X coordinate in the maximum coordinate information from the X coordinate in the minimum coordinate information is divided by 2 to obtain the X coordinate of the center point of the virtual camera, and the difference obtained by subtracting the Y coordinate in the maximum coordinate information from the Y coordinate in the minimum coordinate information is divided by 2 to obtain the Y coordinate of the center point of the virtual camera. According to the X coordinate and Y coordinate of the center point of the virtual camera, the coordinates of the center point of the virtual camera are determined, and the coordinates are used as the fourth reference point.

[0114] Specifically, the two-dimensional input of the user's drag operation based on the game editing interface, such as the screen sliding distance Δx and Δy, is obtained, and the two-dimensional input is converted into the parameter change in the spherical coordinate system. For example, the horizontal sliding distance Δx of the screen is converted into the azimuth change information Δθ=k1*Δx in the spherical coordinate system, where Δθ is the azimuth change information, k1 is the first sensitivity coefficient, and Δx is the horizontal sliding distance. For another example, the vertical sliding distance Δy of the screen is converted into the elevation change information Δφ=k2*Δy in the spherical coordinate system, where Δφ is the elevation change information, k2 is the second sensitivity coefficient, and Δy is the vertical sliding distance.

[0115] It should be noted that the above sensitivity coefficient is affected by the distance between the target virtual object and the virtual camera, that is, the sensitivity coefficient is proportional to the distance between the target virtual object and the virtual camera.

[0116] Specifically, the smaller the distance between the target virtual object and the virtual camera, the closer the virtual camera is to the target virtual object, and the sensitivity coefficient decreases. The larger the distance between the target virtual object and the virtual camera, the farther the virtual camera is from the target virtual object, and the sensitivity coefficient increases.

[0117] Using the solution of the embodiment of the present application, a game editing interface can be displayed, wherein the game editing interface includes a virtual scene to be edited captured by a virtual camera, the virtual scene including multiple virtual objects; in response to a selection operation of a target virtual object among the multiple virtual objects, the rotation center of the virtual camera is controlled to switch to a first reference point corresponding to the target virtual object; a target distance between the virtual camera and the target virtual object is determined; and in response to a first perspective adjustment event for the virtual camera, the rotation of the virtual camera is controlled based on the first reference point and the target distance to adjust the perspective, so that the virtual scene captured by the virtual camera at the adjusted perspective includes the target virtual object. Based on this, by selecting a virtual object, the rotation center of the virtual camera is switched to the reference point corresponding to the virtual object, and the rotation of the virtual camera is controlled based on the reference point and the distance between the virtual object and the virtual camera to adjust the perspective, so that the virtual scene captured by the virtual camera at the adjusted perspective includes the virtual object. In other words, during the virtual scene editing process, the creator only needs to perform the operations of selecting the virtual object and rotating the virtual camera, without having to repeatedly perform redundant operations such as moving the virtual camera, rotating the perspective, and positioning the virtual object, thereby improving the efficiency of virtual scene editing.

[0118] The embodiment of the present application is explained below with reference to a specific embodiment.

[0119] Specifically, current content editors face limitations in camera manipulation during 3D scene editing. Existing technologies employ a fixed-character-centered camera rotation mechanism, meaning the camera rotates around a fixed virtual object. This approach presents significant drawbacks in practical applications: when users perform multi-angle modeling and editing of distant objects, rotation operations centered around a fixed virtual object can easily cause the target object to move out of the camera's field of view. To maintain the edited object within the visible area, users must repeatedly perform the redundant "move camera - rotate viewpoint - reposition the object" process, significantly reducing editing efficiency and increasing operational complexity. This severely impacts the user experience, particularly in highly detailed modeling scenarios.

[0120] For example, see Figure 3 , Figure 3 The virtual object where the rotation axis is located is a fixed virtual object. Figures 4 and 5 Schematic diagram of the field of view of the virtual camera. Figures 3 to 5 It can be seen that the virtual object C is a fixed virtual object around which the virtual camera rotates. Figure 4 and Figure 5 The circle can be understood as a spherical coordinate system constructed with the geometric center of the default virtual object C as the origin. Assume that virtual object A is the virtual object to be edited, that is, virtual object A is Figure 3In response to the user's movement operation on the virtual camera, the virtual object A will be moved out of the visual area of the virtual camera, that is, Figure 5 As shown in the figure, part or all of the virtual object A is outside the visual area of the virtual camera. This will result in Figure 6 The displayed ship model is partially or completely outside the visual area of the virtual camera, so the user needs to adjust the viewing angle of the virtual camera again to edit the ship model.

[0121] To address the above-mentioned issues, the present application provides a virtual scene editing and processing method. By selecting a virtual object, the rotation center of a virtual camera is switched to a reference point corresponding to the virtual object. The rotation of the virtual camera is controlled in combination with the reference point and the distance between the virtual object and the virtual camera to adjust the viewing angle, so that the virtual scene captured by the virtual camera at the adjusted viewing angle includes the virtual object. In other words, during the virtual scene editing process, the creator only needs to perform the operations of selecting the virtual object and rotating the virtual camera, without having to repeatedly perform redundant operations such as moving the virtual camera, rotating the viewing angle, and positioning the virtual object, thereby improving the efficiency of virtual scene editing.

[0122] Specifically, when the user does not select any virtual object, the rotation of the virtual camera rotates around the default virtual object, e.g. Figure 4 The default virtual object shown is virtual object C. In this process, in response to user input events, such as touch screen sliding, the rotation direction of the virtual camera is calculated using Euler angles, and the position of the virtual camera is updated based on the center point of the character coordinate system.

[0123] When the user clicks on the ship model in the scene, that is, virtual object A, the virtual scene editing and processing system performs target lock detection on virtual object A to detect whether the virtual object is within the current virtual camera's viewing cone, which can be determined specifically by the viewing cone clipping algorithm. If virtual object A is within the current virtual camera's viewing cone, it is determined that virtual object A is within the virtual camera's visible area. When performing target lock detection on virtual object A, the geometric center coordinates of virtual object A can be recorded. When it is determined that virtual object A is within the virtual camera's visible area, it is determined that virtual object A is in a selected state, and the rotation center of the virtual camera is switched from virtual object C to virtual object A. The reference point for updating the virtual object's rotation matrix is the center point of virtual object A, and subsequent rotation operations are all based on the center point of virtual object A as the central axis.

[0124] In addition, it is also necessary to calculate the Euclidean distance between the virtual camera and the virtual object A in the horizontal plane (XZ plane) as the rotation radius of the virtual camera.

[0125] The virtual camera rotates around the center point of virtual object A. The implementation process is to construct a spherical coordinate system with the geometric center of virtual object A as the origin. The position of the virtual camera after rotation is determined by three parameters: the rotation radius of the virtual camera, the rotation angle of the virtual camera in the horizontal plane (i.e., the azimuth angle), and the vertical tilt angle of the virtual camera relative to the horizontal plane (i.e., the elevation angle). For details, please refer to Figure 7 and Figure 8 , Figure 7 and Figure 8 The circle can be understood as a spherical coordinate system constructed with the geometric center of the virtual object A as the origin. The effect of rotating the virtual camera around the center point of the virtual object A can be shown as follows: Figure 9 shown.

[0126] Before rendering each frame, it is also necessary to perform reverse ray detection of the center point of the screen, and emit a ray into the three-dimensional space through the center point of the screen to detect whether the ray hits the bounding box of the virtual object A, that is, Figure 7 The box around virtual object A is shown. If the hit is successful, the offset between the current hit point and the geometric center of virtual object A is recorded. When the offset exceeds the threshold, the required elevation and azimuth adjustments are automatically calculated, and the virtual camera angle is fine-tuned to align virtual object A with its center. If the hit is unsuccessful, the virtual camera's rotation center is switched to the default center point corresponding to virtual object C.

[0127] During this period, the sensitivity coefficients corresponding to the elevation and azimuth angles can be adjusted. This is adaptive sensitivity, which can automatically reduce the sensitivity coefficients corresponding to the elevation and azimuth angles when the virtual camera approaches the center point of the target virtual object, ensuring that the virtual camera rotates toward the target virtual object.

[0128] When the user unchecks the ship model in the scene, or selects other objects, a perspective movement animation can be obtained to ensure a smooth transition of the virtual camera's rotation center during the switching process. The transition time is usually controlled at 0.3-0.5 seconds, which can be adjusted according to actual conditions, and is not limited in the embodiments of the present application. For example, when the virtual camera's rotation center switches from the target virtual object back to the default virtual object, a smooth transition animation is generated. The smooth transition animation calculates the direction of the current virtual camera and the quaternion difference of the target direction of the virtual camera, and generates an intermediate frame through spherical linear interpolation, thereby eliminating the sense of perspective jump. Among them, the target direction refers to the direction the virtual object faces before changing the rotation center.

[0129] This approach, through target lock detection and dynamic center switching, eliminates object deviation issues associated with traditional solutions due to a fixed rotation center and reduces redundant lens resetting operations. Secondly, adaptive radius calculation automatically maintains the optimal viewing distance, eliminating time-consuming manual distance adjustment. Furthermore, intelligent perspective maintains real-time calibration through reverse projection, avoiding misoperations caused by rotation offsets. Quaternion interpolation transitions ensure zero dizziness when switching between modes, improving operational consistency. The overall solution simplifies the complex 3D editing process into a single "select-rotate" operation, improving the efficiency of virtual scene editing.

[0130] This embodiment further provides a virtual scene editing and processing device, which can be integrated into a terminal device.

[0131] For example, Figure 10 As shown, the virtual scene editing and processing device may include:

[0132] A display module 201 is used to display a game editing interface, wherein the game editing interface includes a virtual scene to be edited captured by a virtual camera, and the virtual scene includes multiple virtual objects;

[0133] a switching module 202 for controlling the switching of the rotation center of the virtual camera to a first reference point corresponding to the target virtual object in response to a selection operation on a target virtual object among the multiple virtual objects;

[0134] A distance determination module 203 is used to determine a target distance between the virtual camera and the target virtual object;

[0135] The perspective control module 204 is used to control the rotation of the virtual camera to adjust the perspective based on the first reference point and the target distance in response to the first perspective adjustment event for the virtual camera, so that the virtual scene captured by the virtual camera at the adjusted perspective includes the target virtual object.

[0136] In some embodiments, the switching module 202 controls the switching of the rotation center of the virtual camera to the first reference point corresponding to the target virtual object in response to a selection operation of the target virtual object among the multiple virtual objects, including:

[0137] The first switching unit is configured to control the switching of the rotation center of the virtual camera to a first reference point corresponding to the target virtual object in response to a touch operation on the target virtual object among the multiple virtual objects.

[0138] In some embodiments, the virtual scene editing and processing device further includes:

[0139] A cancel unit, used to obtain a selection cancel event of a target virtual object;

[0140] The second switching unit is used to determine a second reference point as a new rotation center of the virtual camera, and control the rotation center of the virtual camera to switch from the first reference point to the second reference point.

[0141] In some embodiments, the plurality of virtual objects include a default virtual object, and the selection-cancel event includes a triggering operation on a scene area in the virtual scene where no virtual object is displayed.

[0142] Based on this, the second switching unit determines the second reference point as the new rotation center of the virtual camera, including:

[0143] The reference point corresponding to the default virtual object is determined as the second reference point of the new rotation center of the virtual camera.

[0144] In some embodiments, the selection cancellation event includes a touch operation on other virtual objects in the virtual scene except the target virtual object.

[0145] Based on this, the second switching unit determines the second reference point as the new rotation center of the virtual camera, including:

[0146] The reference point corresponding to the other virtual object corresponding to the touch operation is determined as the second reference point of the new rotation center of the virtual camera.

[0147] In some embodiments, the virtual scene editing and processing device further includes:

[0148] The playback unit is configured to generate a perspective movement animation corresponding to the rotation center of the virtual camera switching from the first reference point to the second reference point, and to play the perspective movement animation.

[0149] In some embodiments, the virtual scene editing and processing device further includes:

[0150] The perspective control unit is configured to control the translation of the virtual camera to adjust the perspective in response to a second perspective adjustment event for the virtual camera, and determine whether to control the rotation center of the virtual camera to maintain the first reference point.

[0151] In some embodiments, the viewing angle control unit determines whether to control the rotation center of the virtual camera to maintain the first reference point, including:

[0152] Depending on whether the bounding box of the target virtual object intersects with the viewing cone of the virtual camera after adjusting the viewing angle, or depending on whether the target ray passes through the bounding box of the target virtual object, determine whether to control the rotation center of the virtual camera to maintain the first reference point, wherein the direction of the target ray points from the virtual camera after adjusting the viewing angle to the direction of the third reference point of the game editing interface.

[0153] Using the solution of the embodiment of the present application, a game editing interface can be displayed through the display module 201, wherein the game editing interface includes a virtual scene to be edited captured by a virtual camera, and the virtual scene includes multiple virtual objects; the switching module 202 controls the virtual camera's rotation center to switch to a first reference point corresponding to the target virtual object in response to a selection operation of a target virtual object among the multiple virtual objects; the distance determination module 203 determines a target distance between the virtual camera and the target virtual object; the perspective control module 204 controls the rotation of the virtual camera based on the first reference point and the target distance in response to a first perspective adjustment event for the virtual camera to adjust the perspective, so that the virtual scene captured by the virtual camera at the adjusted perspective includes the target virtual object. Based on this, by selecting a virtual object, the virtual camera's rotation center is switched to the reference point corresponding to the virtual object, and the virtual camera's rotation is controlled in combination with the reference point and the distance between the virtual object and the virtual camera to adjust the perspective, so that the virtual scene captured by the virtual camera at the adjusted perspective includes the virtual object. That is, during the virtual scene editing process, the creator only needs to select the virtual object and rotate the virtual camera. There is no need to repeatedly perform redundant operations such as moving the virtual camera, rotating the view angle, and positioning the virtual object, thereby improving the editing efficiency of the virtual scene.

[0154] Accordingly, an embodiment of the present application further provides an electronic device, which may be a terminal, such as a smartphone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC), a personal digital assistant (PDA), or the like. Alternatively, the electronic device may be a server.

[0155] like Figure 11 As shown, Figure 11 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. It will be understood by those skilled in the art that the electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0156] The processor 301 is the control center of the electronic device 300. It connects the various parts of the entire electronic device 300 using various interfaces and lines. By running or loading software programs and / or units stored in the memory 302 and calling data stored in the memory 302, it executes various functions of the electronic device 300 and processes data, thereby monitoring the entire electronic device 300. The processor 301 can be a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc., and can implement or execute the various methods, steps, and logic blocks disclosed in the embodiments of this application.

[0157] In the embodiment of the present application, the processor 301 in the electronic device 300 loads instructions corresponding to one or more application processes into the memory 302 according to the following steps, and the processor 301 runs the application stored in the memory 302 to implement various functions, such as:

[0158] Displaying a game editing interface, wherein the game editing interface includes a virtual scene to be edited captured by a virtual camera, and the virtual scene includes a plurality of virtual objects;

[0159] In response to a selection operation of a target virtual object among the multiple virtual objects, controlling the rotation center of the virtual camera to switch to a first reference point corresponding to the target virtual object;

[0160] determining a target distance between the virtual camera and a target virtual object;

[0161] In response to a first viewing angle adjustment event for the virtual camera, the rotation of the virtual camera is controlled based on the first reference point and the target distance to adjust the viewing angle, so that the virtual scene captured by the virtual camera at the adjusted viewing angle includes the target virtual object.

[0162] The electronic device provided by the embodiment of the present application can display a game editing interface, wherein the game editing interface includes a virtual scene to be edited captured by a virtual camera, the virtual scene including multiple virtual objects; in response to a selection operation of a target virtual object among the multiple virtual objects, the rotation center of the virtual camera is controlled to switch to a first reference point corresponding to the target virtual object; a target distance between the virtual camera and the target virtual object is determined; and in response to a first perspective adjustment event for the virtual camera, the rotation of the virtual camera is controlled based on the first reference point and the target distance to adjust the perspective so that the virtual scene captured by the virtual camera at the adjusted perspective includes the target virtual object. Based on this, by selecting a virtual object, the rotation center of the virtual camera is switched to the reference point corresponding to the virtual object, and the rotation of the virtual camera is controlled based on the reference point and the distance between the virtual object and the virtual camera to adjust the perspective so that the virtual scene captured by the virtual camera at the adjusted perspective includes the virtual object. In other words, during the virtual scene editing process, the creator only needs to perform the operations of selecting the virtual object and rotating the virtual camera, without having to repeatedly perform redundant operations such as moving the virtual camera, rotating the perspective, and positioning the virtual object, thereby improving the efficiency of virtual scene editing.

[0163] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0164] Optional, such as Figure 11 As shown, the electronic device 300 further includes: a touch screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. Among them, the processor 301 is electrically connected to the touch screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307 respectively. Those skilled in the art will understand that Figure 11 The electronic device structure shown in the figure does not constitute a limitation to the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0165] The touch display screen 303 can be used to display a graphical user interface and receive user operations generated by the graphical user interface. The touch display screen 303 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, a liquid crystal display (LCD), an organic light emitting diode (OLED) or the like can be used to configure the display panel. The touch panel can be used to collect user touch operations on or near it (such as operations performed by the user using any suitable object or accessory such as a finger, stylus or the like on or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 301, and can receive the command sent by the processor 301 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 301 to determine the type of touch event, and then the processor 301 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 303 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 303 can also be used as part of the input unit 306 to realize the input function.

[0166] The radio frequency circuit 304 may be used to transmit and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to transmit and receive signals with the network device or other electronic devices.

[0167] The audio circuit 305 can be used to provide an audio interface between the user and the electronic device through a speaker and microphone. The audio circuit 305 can convert the received audio data into an electrical signal and transmit it to the speaker, which then converts it into a sound signal for output. On the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 305 and converted into audio data. The audio data is then output to the processor 301 for processing, and then sent to another electronic device through the radio frequency circuit 304, or the audio data is output to the memory 302 for further processing. The audio circuit 305 may also include an earphone jack to provide communication between external headphones and the electronic device.

[0168] The input unit 306 may be configured to receive a virtual object selected or input by a user, or an editing operation performed by a user on a virtual object, or a dragging operation performed by a user on a game editing interface.

[0169] Power supply 307 is used to supply power to various components of electronic device 300. Optionally, power supply 307 can be logically connected to processor 301 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. Power supply 307 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0170] although Figure 11 Not shown in the figure, the electronic device 300 may further include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0171] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0172] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0173] To this end, an embodiment of the present application provides a computer-readable storage medium storing a plurality of computer programs, which can be loaded by a processor to execute any of the virtual scene editing methods provided in the embodiments of the present application. The computer program can execute the following steps of the virtual scene editing method:

[0174] Displaying a game editing interface, wherein the game editing interface includes a virtual scene to be edited captured by a virtual camera, and the virtual scene includes a plurality of virtual objects;

[0175] In response to a selection operation of a target virtual object among the multiple virtual objects, controlling the rotation center of the virtual camera to switch to a first reference point corresponding to the target virtual object;

[0176] determining a target distance between the virtual camera and a target virtual object;

[0177] In response to a first viewing angle adjustment event for the virtual camera, the rotation of the virtual camera is controlled based on the first reference point and the target distance to adjust the viewing angle, so that the virtual scene captured by the virtual camera at the adjusted viewing angle includes the target virtual object.

[0178] Using the computer-readable storage medium provided in an embodiment of the present application, a game editing interface can be displayed, wherein the game editing interface includes a virtual scene to be edited captured by a virtual camera, the virtual scene including multiple virtual objects; in response to a selection operation of a target virtual object among the multiple virtual objects, the rotation center of the virtual camera is controlled to switch to a first reference point corresponding to the target virtual object; a target distance between the virtual camera and the target virtual object is determined; and in response to a first perspective adjustment event for the virtual camera, the rotation of the virtual camera is controlled based on the first reference point and the target distance to adjust the perspective so that the virtual scene captured by the virtual camera at the adjusted perspective includes the target virtual object. Based on this, by selecting a virtual object, the rotation center of the virtual camera is switched to the reference point corresponding to the virtual object, and the rotation of the virtual camera is controlled based on the reference point and the distance between the virtual object and the virtual camera to adjust the perspective so that the virtual scene captured by the virtual camera at the adjusted perspective includes the virtual object. In other words, during the virtual scene editing process, the creator only needs to perform the operations of selecting the virtual object and rotating the virtual camera, without having to repeatedly perform redundant operations such as moving the virtual camera, rotating the perspective, and positioning the virtual object, thereby improving the efficiency of virtual scene editing.

[0179] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0180] The computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0181] Since the computer program stored in the computer-readable storage medium can execute any of the virtual scene editing and processing methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any of the virtual scene editing and processing methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0182] According to one aspect of the present application, a computer program product or computer program is also provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in various optional implementations of the above embodiments.

[0183] In the above-described embodiments of the virtual scene editing and processing device, computer-readable storage medium, electronic device, and computer program product, the descriptions of each embodiment have different emphases. For portions not described in detail in a particular embodiment, reference can be made to the relevant descriptions of other embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes and beneficial effects of the above-described virtual scene editing and processing device, computer-readable storage medium, computer program product, electronic device, and their corresponding units can be referred to in the description of the virtual scene editing and processing method in the above embodiments, and the details will not be repeated here.

[0184] The above is a detailed introduction to a virtual scene editing and processing method, device, electronic device, computer-readable storage medium and computer program product provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A virtual scene editing method, characterized in that: The method comprises: Displaying a game editing interface, wherein the game editing interface includes a virtual scene to be edited captured by a virtual camera, and the virtual scene includes a plurality of virtual objects; In response to a selection operation of a target virtual object among the multiple virtual objects, controlling the rotation center of the virtual camera to switch to a first reference point corresponding to the target virtual object; determining a target distance between the virtual camera and the target virtual object; In response to a first viewing angle adjustment event for the virtual camera, the rotation of the virtual camera is controlled based on the first reference point and the target distance to adjust the viewing angle, so that the virtual scene captured by the virtual camera at the adjusted viewing angle includes the target virtual object.

2. The virtual scene editing method according to claim 1, characterized in that: In response to a selection operation of a target virtual object among the multiple virtual objects, controlling the rotation center of the virtual camera to switch to a first reference point corresponding to the target virtual object includes: In response to a touch operation on a target virtual object among the multiple virtual objects, the rotation center of the virtual camera is controlled to switch to a first reference point corresponding to the target virtual object.

3. The virtual scene editing method according to claim 1, characterized in that: The method further comprises: Obtain a selection cancellation event for the target virtual object; A second reference point is determined as a new rotation center of the virtual camera, and the rotation center of the virtual camera is controlled to switch from the first reference point to the second reference point.

4. The virtual scene editing method according to claim 3, characterized in that: The plurality of virtual objects include a default virtual object, and the selection cancellation event includes a triggering operation on a scene area in the virtual scene where no virtual object is displayed; The determining of the second reference point as the new rotation center of the virtual camera includes: The reference point corresponding to the default virtual object is determined as the second reference point of the new rotation center of the virtual camera.

5. The virtual scene editing method according to claim 3, characterized in that: The selection cancellation event includes a touch operation on other virtual objects in the virtual scene except the target virtual object; The determining of the second reference point as the new rotation center of the virtual camera includes: The reference point corresponding to the other virtual object corresponding to the touch operation is determined as the second reference point of the new rotation center of the virtual camera.

6. The virtual scene editing method according to claim 3, characterized in that: The method further comprises: Generate a perspective movement animation corresponding to the virtual camera's rotation center switching from the first reference point to the second reference point, and play the perspective movement animation.

7. The virtual scene editing method according to any one of claims 1 to 6, characterized in that: The method further comprises: In response to a second viewing angle adjustment event for the virtual camera, the translation of the virtual camera is controlled to adjust the viewing angle, and it is determined whether the rotation center of the virtual camera is controlled to maintain the first reference point.

8. The virtual scene editing method according to claim 7, characterized in that: The determining whether to control the rotation center of the virtual camera to maintain the first reference point includes: Whether to control the rotation center of the virtual camera to maintain the first reference point is determined based on whether the bounding box of the target virtual object intersects with the viewing cone of the virtual camera after adjusting the viewing angle, or based on whether the target ray passes through the bounding box of the target virtual object, wherein the direction of the target ray points from the virtual camera after adjusting the viewing angle to the direction of the third reference point of the game editing interface.

9. A virtual scene editing and processing device, characterized in that: The device comprises: A display module is configured to display a game editing interface, wherein the game editing interface includes a virtual scene to be edited captured by a virtual camera, and the virtual scene includes a plurality of virtual objects; a switching module, configured to control the switching of the rotation center of the virtual camera to a first reference point corresponding to the target virtual object in response to a selection operation on a target virtual object among the multiple virtual objects; a distance determination module, configured to determine a target distance between the virtual camera and the target virtual object; A perspective control module is configured to, in response to a first perspective adjustment event for the virtual camera, control the rotation of the virtual camera based on the first reference point and the target distance to adjust the perspective so that the virtual scene captured by the virtual camera at the adjusted perspective includes the target virtual object.

10. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program. When the computer program is executed by the processor, the processor executes the steps of the virtual scene editing method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that The method comprises a computer program. When the computer program is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of the virtual scene editing method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Image processing method and device, medium and product

    CN121616730A