Control method, device and storage medium of three-dimensional model in game editor
By generating editing controls covering the three-dimensional model in the game editor, and moving, rotating and scaling directly in response to the drag operation, the problems of low control efficiency and control occlusion of the three-dimensional model are solved, improving editing efficiency and operation convenience.
Patent Information
- Application Number
- CN202111327684.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-10
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2041-11-10
AI Technical Summary
The control efficiency of the three-dimensional model in the existing game editor is low, and it is necessary to frequently switch the controls and the controls block the game scene, affecting the editing efficiency.
By generating editing controls covering the three-dimensional model in the graphical user interface, including the moving control hot zone, the rotation control hot zone and the scaling control hot zone, the movement, rotation and scaling of the three-dimensional model are directly controlled according to the drag operation, and the control shape is dynamically displayed. Reduce the frequency of operation switching and associate the control function with multiple projected areas of the target 3D model to reduce picture occlusion.
It realizes the reduction of operation switching frequency, improves game editing efficiency, and reduces the obstruction of game scenes while taking into account operation convenience.
Smart Images

Figure CN113926190B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of game technology, and in particular to a control method, device and storage medium for a three-dimensional model in a game editor. Background Art
[0002] In game editing products with user-generated content (UGC) attributes, placing a 3D model in a scene is a basic function, the purpose of which is to place the 3D model in a desired position with a suitable size and angle. There are two main types of 3D models in the prior art: one is that when a 3D model is selected, the user first places it in the scene, such as Figure 1 In the toolbar shown, select the control button of the "move", "rotate", and "scale" command to call out the corresponding operation control, and then drag the control to perform the corresponding operation. However, when the user makes fine adjustments to the 3D model, the above method requires frequent control switching, which is cumbersome and has low editing efficiency.
[0003] Another method is to generate a control bar around the target 3D model after clicking it. Although the above method eliminates the operational inconvenience caused by the distance problem between the control toolbar and the target 3D model to a certain extent, the control bar will block the editing screen and affect the editing of the surrounding area, thereby affecting the editing efficiency.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present disclosure provide a method, device and storage medium for controlling a three-dimensional model in a game editor, so as to at least solve the technical problems of low efficiency in controlling the three-dimensional model and obstruction of the game scene screen due to the need to frequently switch operating controls in the prior art.
[0006] According to one aspect of an embodiment of the present disclosure, a method for controlling a three-dimensional model in a game editor is provided, wherein a graphical user interface of the game editor is provided through an electronic device, and the method comprises: responding to a virtual game scene editing trigger instruction, loading and displaying the virtual game scene in the graphical user interface; responding to an add operation on a target three-dimensional model, adding the target three-dimensional model to the virtual game scene; responding to a selection operation on the target three-dimensional model, generating an editing control according to the shape and position of the target three-dimensional model, wherein the editing control comprises: a movement control hot zone at least partially covering a first projection area of the target three-dimensional model, and a geometric transformation control hot zone set in a second projection area of the target three-dimensional model, wherein the geometric transformation control The heating area includes: a rotation control hot area and a scaling control hot area, the first projection area is a projection of the target three-dimensional model on the graphical user interface, and the second projection area is a projection of the bounding box of the target three-dimensional model on the designated plane of the virtual game scene; in response to a first drag operation on the movement control hot area, the target three-dimensional model is controlled to move in the virtual game scene according to the first drag operation; in response to a second drag operation on the rotation control hot area, the orientation of the target three-dimensional model in the virtual game scene is controlled according to the second drag operation; in response to a third drag operation on the scaling control hot area, the target three-dimensional model is controlled to scale in the virtual game scene according to the third drag operation.
[0007] According to another aspect of an embodiment of the present disclosure, a control device for a three-dimensional model in a game editor is also provided, wherein a graphical user interface of the game editor is provided through an electronic device, and the device comprises: a display module for responding to a virtual game scene editing trigger instruction, and loading and displaying the virtual game scene in the graphical user interface; an adding module for responding to an adding operation on a target three-dimensional model, and adding the target three-dimensional model to the virtual game scene; a generating module for responding to a selecting operation on the target three-dimensional model, and generating an editing control according to the shape and position of the target three-dimensional model, wherein the editing control comprises: a moving control hot zone at least partially covering a first projection area of the target three-dimensional model, and a geometric transformation control hot zone set in a second projection area of the target three-dimensional model, and the geometric transformation control hot zone It includes: a rotation control hot zone and a scaling control hot zone, the first projection area is a projection of the target three-dimensional model on the graphical user interface, and the second projection area is a projection of the bounding box of the target three-dimensional model on a specified plane of the virtual game scene; a first control module, for responding to a first drag operation on the movement control hot zone, and controlling the target three-dimensional model to move in the virtual game scene according to the first drag operation; a second control module, for responding to a second drag operation on the rotation control hot zone, and controlling the orientation of the target three-dimensional model in the virtual game scene according to the second drag operation; a third control module, for responding to a third drag operation on the scaling control hot zone, and controlling the scaling of the target three-dimensional model in the virtual game scene according to the third drag operation.
[0008] According to another aspect of an embodiment of the present disclosure, a non-volatile storage medium is further provided, characterized in that a computer program is stored in the storage medium, wherein the computer program is configured to execute any of the above-mentioned methods for controlling a three-dimensional model in the game editor when running.
[0009] According to another aspect of an embodiment of the present disclosure, an electronic device is also provided, including a memory and a processor, characterized in that a computer program is stored in the memory, and the processor is configured to run the computer program to execute the control method of the three-dimensional model in the game editor mentioned in any one of the above items.
[0010] In the disclosed embodiment, by responding to the virtual game scene editing trigger instruction, the virtual game scene is loaded and displayed in the above-mentioned graphical user interface; in response to the adding operation of the target three-dimensional model, the target three-dimensional model is added to the above-mentioned virtual game scene; in response to the selection operation of the above-mentioned target three-dimensional model, an editing control is generated according to the shape and position of the above-mentioned target three-dimensional model; in response to the first drag operation of the above-mentioned movement control hot zone, the above-mentioned target three-dimensional model is controlled to move in the above-mentioned virtual game scene according to the above-mentioned first drag operation; in response to the second drag operation of the above-mentioned rotation control hot zone, the orientation of the above-mentioned target three-dimensional model in the above-mentioned virtual game scene is controlled according to the above-mentioned second drag operation; in response to the third drag operation of the above-mentioned zoom control hot zone, the above-mentioned target three-dimensional model is controlled to zoom in the above-mentioned virtual game scene according to the above-mentioned third drag operation. On the one hand, by selecting the target three-dimensional model, the three-in-one operation control is directly called out, and the control form is dynamically displayed according to the operation requirements, thereby achieving the technical effect of reducing the frequency of operation switching and improving the efficiency of game editing; on the other hand, the function of the operation control is associated with the projection areas of multiple different dimensions of the target three-dimensional model, which can reduce the occlusion of the game scene screen while taking into account the convenience of operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present application. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:
[0012] Figure 1 It is a schematic diagram of a control interface of a three-dimensional model in a game editor according to the prior art;
[0013] Figure 2 is a flow chart of a method for controlling a three-dimensional model in a game editor according to an embodiment of the present disclosure;
[0014] Figure 3 is a schematic diagram of a control interface of a three-dimensional model in an optional game editor according to an embodiment of the present disclosure;
[0015] Figure 4 is a schematic diagram of a control interface of a three-dimensional model in another optional game editor according to an embodiment of the present disclosure;
[0016] Figure 5 is a schematic diagram of a control interface of a three-dimensional model in another optional game editor according to an embodiment of the present disclosure;
[0017] Figure 6 is a schematic diagram of a control interface of a three-dimensional model in another optional game editor according to an embodiment of the present disclosure;
[0018] Figure 7 is a schematic diagram of a control interface of a three-dimensional model in another optional game editor according to an embodiment of the present disclosure;
[0019] Figure 8 It is a structural schematic diagram of a control device for a three-dimensional model in a game editor according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the scheme of the present disclosure, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present disclosure.
[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. In order to better understand the method of controlling a three-dimensional model in a game editor of the present disclosure, the game editor is first introduced. The game editor is a software designed based on the level creation of electronic games. The editor can be written in a language supported by the native engine, or it can be written in the form of an engine plus an embedded scripting language. Existing game editors usually provide a visual editing interface, through which game developers can edit terrain, scene objects, decorations, environmental areas, lighting effects and environmental sound effects. For example, in the editing interface, they can perform operations such as rotating, scaling and moving virtual models to generate virtual game scenes in the game. The operation is intuitive and simple, and the resource management function of the editor allows map resources to be reused in multiple maps, greatly reducing the workload of map production and modification.
[0022] According to an embodiment of the present disclosure, an embodiment of a method for controlling a three-dimensional model in a game editor is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0023] The technical solution of the embodiment of the method can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, the mobile terminal can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, and a mobile Internet device (Mobile Internet Devices, referred to as MID), a PAD and other terminal devices. The mobile terminal may include one or more processors (the processor may include but is not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microprocessor (MCU), a programmable logic device (FPGA), a neural network processor (NPU), a tensor processor (TPU), an artificial intelligence (AI) type processor, etc.) and a memory for storing data. Optionally, the mobile terminal may also include a transmission device, an input and output device, and a display device for communication functions. It can be understood by those of ordinary skill in the art that the above structural description is only illustrative and does not limit the structure of the above mobile terminal. For example, the mobile terminal may also include more or fewer components than the above structural description, or have a configuration different from the above structural description.
[0024] The memory can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the control method of the three-dimensional model in the game editor in the embodiment of the present disclosure. The processor executes various functional applications and data processing by running the computer program stored in the memory, that is, the control method of the three-dimensional model in the game editor described above is realized. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0025] The display device may be, for example, a touch screen type liquid crystal display (LCD) and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), and a user may interact with the GUI by finger contacts and / or gestures on a touch-sensitive surface, wherein the human-computer interaction functions here may optionally include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for executing the above human-computer interaction functions are configured / stored in a computer program product executable by one or more processors or a readable computer-readable storage medium.
[0026] According to an embodiment of the present disclosure, an embodiment of a method for controlling a three-dimensional model in a game editor is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0027] Figure 2 is a flow chart of a method for controlling a three-dimensional model in a game editor according to an embodiment of the present disclosure, such as Figure 2 As shown, a graphical user interface of a game editor is provided by an electronic device, and the method comprises the following steps:
[0028] Step S102, responding to the virtual game scene editing trigger instruction, loading and displaying the virtual game scene in the above-mentioned graphical user interface;
[0029] Step S104, in response to the adding operation of the target three-dimensional model, adding the target three-dimensional model to the virtual game scene;
[0030] Step S106, in response to the selection operation of the target three-dimensional model, generating an editing control according to the shape and position of the target three-dimensional model;
[0031] Step S108, in response to a first drag operation on the movement control hot zone, controlling the target three-dimensional model to move in the virtual game scene according to the first drag operation;
[0032] Step S110, in response to a second drag operation on the rotation control hot zone, controlling the orientation of the target three-dimensional model in the virtual game scene according to the second drag operation;
[0033] Step S112, in response to a third drag operation on the zoom control hot zone, controlling the target three-dimensional model to be zoomed in the virtual game scene according to the third drag operation.
[0034] In the disclosed embodiment, by responding to the virtual game scene editing trigger instruction, the virtual game scene is loaded and displayed in the above-mentioned graphical user interface; in response to the adding operation of the target three-dimensional model, the target three-dimensional model is added to the above-mentioned virtual game scene; in response to the selection operation of the above-mentioned target three-dimensional model, an editing control is generated according to the shape and position of the above-mentioned target three-dimensional model; in response to the first drag operation of the above-mentioned movement control hot zone, the above-mentioned target three-dimensional model is controlled to move in the above-mentioned virtual game scene according to the above-mentioned first drag operation; in response to the second drag operation of the above-mentioned rotation control hot zone, the orientation of the above-mentioned target three-dimensional model in the above-mentioned virtual game scene is controlled according to the above-mentioned second drag operation; in response to the third drag operation of the above-mentioned zoom control hot zone, the above-mentioned target three-dimensional model is controlled to zoom in the above-mentioned virtual game scene according to the above-mentioned third drag operation. On the one hand, by selecting the target three-dimensional model, the three-in-one operation control is directly called out, and the control form is dynamically displayed according to the operation requirements, thereby achieving the technical effect of reducing the frequency of operation switching and improving the efficiency of game editing; on the other hand, the function of the operation control is associated with the projection areas of multiple different dimensions of the target three-dimensional model, which can reduce the occlusion of the game scene screen while taking into account the convenience of operation.
[0035] Optionally, the electronic device may be, but not limited to, a mobile terminal, a computer terminal, etc. The mobile terminal may be, but not limited to, a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID for short), a PAD, and other terminal devices.
[0036] Optionally, before editing the above-mentioned three-dimensional model, it is necessary to add the three-dimensional model to the virtual game scene, that is, it is necessary to respond to the virtual game scene editing trigger instruction, load and display the virtual game scene in the above-mentioned graphical user interface; respond to the addition operation of the target three-dimensional model, and add the above-mentioned target three-dimensional model to the above-mentioned virtual game scene.
[0037] Optionally, the editing control includes: a movement control hot zone that at least partially covers the first projection area of the target three-dimensional model, and a geometric transformation control hot zone set in the second projection area of the target three-dimensional model, the geometric transformation control hot zone includes: a rotation control hot zone and a scaling control hot zone, the first projection area is the projection of the target three-dimensional model on the graphical user interface, and the second projection area is the projection of the bounding box of the target three-dimensional model on the designated plane of the virtual game scene.
[0038] It should be noted that in the embodiment of the present disclosure, different projection areas correspond to different control hot zones, that is, by associating the functions of the operating controls with projection areas of multiple different dimensions of the target three-dimensional model, the technical effect of reducing the obstruction of the game scene screen while taking into account the convenience of operation is achieved.
[0039] Optionally, the above-mentioned bounding box is used to describe the contour information of the above-mentioned target three-dimensional model. The above-mentioned bounding box may be, but is not limited to, an AABB bounding box, a bounding sphere, a directional bounding box OBB, a fixed-directional convex hull FDH, and the like.
[0040] Optionally, the above-mentioned editing control (ie, three-in-one control) is a UI layer model control, and its size will not scale with the zoom of the lens.
[0041] In an optional embodiment, the designated plane includes one of the following: a cross section of the bounding box of the target three-dimensional model; or a plane parallel to the cross section of the bounding box of the target three-dimensional model; or a longitudinal section of the bounding box of the target three-dimensional model; or a plane parallel to the longitudinal section of the bounding box of the target three-dimensional model.
[0042] Optionally, a three-dimensional coordinate xyz is established with the geometric center of the target three-dimensional model as the origin, wherein the x-axis represents the horizontal axis, the y-axis represents the vertical axis, and the z-axis represents the vertical axis. The first projection area is the projection of the target three-dimensional model on the graphical user interface, which can be understood as the first projection area being the projection of the target three-dimensional model on the xz plane; the second projection area is related to the cross-section or longitudinal section of the bounding box of the target three-dimensional model; wherein the cross-section can be the xy plane, the longitudinal section can be the yz plane or the xz plane, and the longitudinal section / cross-section is perpendicular to the rotation axis of the target three-dimensional model, and the rotation axis can be any one of the x-axis, y-axis or z-axis. For example, Figure 3 The second projection area of the target three-dimensional model shown is the projection of the bounding box of the target three-dimensional model on the cross section (or the plane parallel to the cross section of the bounding box of the target three-dimensional model), the rotation axis of the target three-dimensional model is the z-axis, and the second projection area is the projection of the model on the horizontal plane parallel to the xy plane; Figure 4 The second projection area of the target three-dimensional model shown is the projection of the bounding box of the target three-dimensional model on the longitudinal section (or a plane parallel to the longitudinal section of the bounding box of the target three-dimensional model), and the rotation axis of the target three-dimensional model is the x-axis. Figure 4 The circular ring located in the yz plane shown in FIG. 1 is the second projection area mentioned above.
[0043] As an optional embodiment, after adding the target three-dimensional model to the virtual game scene, the target three-dimensional model is selected, and the following image is generated at the position where the target three-dimensional model sits: Figure 5 The edit control shown in the figure is a three-in-one edit control. The control form is dynamically displayed according to different control hotspots. The edit control can be dynamically changed according to the operation requirements of "rotate", "zoom" and "move". For example, in the mobile control hotspot (i.e. Figure 5 The hot zone a) corresponding to the target three-dimensional model in the above-mentioned editing control displays the moving operation form of the above-mentioned editing control, and controls the above-mentioned target three-dimensional model to move in the above-mentioned virtual game scene; in the zoom control hot zone (i.e. Figure 5 The hot zone b) corresponding to the round button in the middle displays the zoom operation form of the above-mentioned editing control, controlling the above-mentioned target three-dimensional model to be zoomed in the above-mentioned virtual game scene; in the rotation control hot zone (i.e. Figure 5 The hot zone c) corresponding to the middle sector displays the rotation operation form of the above-mentioned editing control, and controls the orientation of the above-mentioned target three-dimensional model in the above-mentioned virtual game scene.
[0044] Optional, still as Figure 5 As shown, in the normal display state of the above-mentioned editing control (i.e., the three-in-one control), the hot zone corresponding to the above-mentioned target three-dimensional model is recorded as a, the hot zone corresponding to the circular button is recorded as b, and the hot zone corresponding to the fan is recorded as c, and the triggering of the selection operation of the above-mentioned hot zones a, b, and c is recorded as P0a, P0b, and P0c respectively, and the hot zone corresponding to the cancellation of the above-mentioned selection operation is recorded as P1, wherein, in the P0a-P1 stage, the above-mentioned editing control is in the moving control state; in the P0b-P1 stage, the above-mentioned editing control is in the zooming control state; in the P0c-P1 stage, the above-mentioned editing control is in the rotating control state.
[0045] Optionally, the above-mentioned editing control is in a three-in-one control state under the normal display state, that is, the movement control hot area, the rotation control hot area and the zoom control hot area are displayed at the same time; when the above-mentioned editing control triggers the selection operation of a certain hot area, only the control state of a certain hot area is displayed; when the selection operation of the hot area is canceled, the above-mentioned editing control is restored to the three-in-one control state.
[0046] In an optional embodiment, the second projection area is divided into an outer area and an inner area, and the rotation control hot area includes: a first sub-control hot area and a second sub-control hot area, wherein the first sub-control hot area is located in the inner area, and the second sub-control area is located in the outer area, and the second projection area is perpendicular to the specified direction axis, the specified direction axis is the rotation axis of the target three-dimensional model, and the specified direction axis is perpendicular to the specified plane.
[0047] Optionally, the specified direction axis is a rotation axis, wherein the rotation axis is perpendicular to the second projection area, and the specified plane is a cross section / longitudinal section of the bounding box of the target three-dimensional model, or a plane parallel to the cross section / longitudinal section of the bounding box of the target three-dimensional model. Figure 3 The second projection area of the target three-dimensional model shown is the projection of the bounding box of the target three-dimensional model on the cross section (or the plane parallel to the cross section of the bounding box of the target three-dimensional model), the rotation axis of the target three-dimensional model is the z-axis, the second projection area is the projection of the model on the horizontal plane parallel to the xy plane, and the designated plane is the horizontal plane; Figure 4 The second projection area of the target three-dimensional model shown is the projection of the bounding box of the target three-dimensional model on the longitudinal section (or a plane parallel to the longitudinal section of the bounding box of the target three-dimensional model), and the rotation axis of the target three-dimensional model is the x-axis. Figure 4 The circular ring shown in the yz plane is the second projection area, and the designated plane is the plane where the circular ring is located.
[0048] Optional, such as Figure 3 As shown, the first sub-control hot zone corresponds to the initial orientation of the target three-dimensional model, that is, the hot zone c1 corresponding to the circular ring of the second projection area; the second projection area corresponds to any rotation termination orientation in the target three-dimensional model, for example, the hot zone c2 corresponding to the circular ring of the second projection area.
[0049] In an optional embodiment, controlling the target three-dimensional model to move in the virtual game scene according to the first drag operation includes:
[0050] Step S202, determining the dragging direction and dragging distance of the first dragging operation;
[0051] Step S204: controlling the target three-dimensional model to move in the virtual game scene according to the dragging direction and the dragging distance.
[0052] Optional, such as Figure 6 As shown, in response to the first drag operation on the above-mentioned mobile control hot zone, a cross cursor e appears in the hot zone a, the initial state of the above-mentioned target three-dimensional model is recorded as P0a, the drag direction and drag distance of the first drag operation are determined, and the above-mentioned cross cursor e is dragged to the target hot zone P1 according to the above-mentioned drag direction and the above-mentioned drag distance, and the selection operation of the above-mentioned cross cursor e is canceled, thereby completing the control of the above-mentioned target three-dimensional model to perform a moving operation in the above-mentioned virtual game scene.
[0053] In an optional embodiment, the second dragging operation on the rotation control hot zone includes:
[0054] Step S302: performing a directional drag operation from the first sub-control hot zone to the second sub-control hot zone.
[0055] Optional, such as Figure 3 As shown, the first sub-control hot zone corresponds to the initial orientation of the target three-dimensional model, that is, the hot zone c1 corresponding to the circular ring in the second projection area. Dragging the cursor d from the hot zone c1 along the circular ring in the second projection area (drag clockwise or counterclockwise) is a directional dragging operation from the first sub-control hot zone to the second sub-control hot zone.
[0056] In an optional embodiment, controlling the orientation of the target three-dimensional model in the virtual game scene according to the second drag operation includes:
[0057] Step S402, determining a rotation angle of the first sub-control hot zone according to the directional dragging operation;
[0058] Step S404: controlling the orientation of the target three-dimensional model in the virtual game scene according to the rotation angle.
[0059] Optionally, the above-mentioned rotation angle is the angle at which the above-mentioned target three-dimensional model is rotated relative to the initial direction. The angle of clockwise rotation of the above-mentioned target three-dimensional model relative to the initial direction is recorded as a negative angle, and the angle of counterclockwise rotation of the above-mentioned target three-dimensional model relative to the initial direction is recorded as a positive angle. The above-mentioned rotation angle can be but is not limited to -15°-15°.
[0060] Optional, still as Figure 3 As shown, the first sub-control hot zone corresponds to the initial orientation of the target three-dimensional model, that is, the hot zone c1 corresponding to the circular ring of the second projection area; determine the rotation angle of the first sub-control hot zone, for example, rotate 15 degrees counterclockwise along the direction corresponding to the hot zone c1, that is, rotate 15°; drag the cursor d from the hot zone c1 along the circular ring in the second projection area to the hot zone c3 position, at which time the target three-dimensional model has been rotated to the target orientation.
[0061] In an optional embodiment, the zoom control hot zone includes: a third sub-control hot zone, wherein the third sub-control hot zone is located in the outer zone; the third drag operation on the zoom control hot zone includes: a directional drag operation from the third sub-control hot zone toward the geometric center of the outer zone; or, a directional drag operation from the third sub-control hot zone away from the geometric center of the outer zone.
[0062] Optionally, the directional dragging operation toward the geometric center of the outer area is a shrinking operation on the target three-dimensional model; the directional dragging operation away from the geometric center of the outer area is a zooming operation on the target three-dimensional model. Optionally, the degree of zooming in or out is proportional to the dragging distance. For example, dragging the zoom control hot zone by 2 cm toward the geometric center of the outer area will reduce the target three-dimensional model to half of its original size; dragging the zoom control hot zone by 2 cm away from the geometric center of the outer area will enlarge the target three-dimensional model to twice its original size.
[0063] In an optional embodiment, controlling the target three-dimensional model to be scaled in the virtual game scene according to the third drag operation includes:
[0064] Step S502, determining the dragging direction and dragging distance according to the above-mentioned directional dragging operation;
[0065] Step S504: controlling the target three-dimensional model to be scaled in the virtual game scene according to the dragging direction and the dragging distance.
[0066] Optional, such as Figure 7 As shown, triggering the above zoom control hot zone b (i.e. Figure 5 The hot zone b) corresponding to the circular button in the middle is selected, and the zoom control hot zone b is dragged according to the predetermined drag direction and drag distance, and dragged to the target position, so as to complete the zoom operation of the target three-dimensional model in the virtual game scene. For example, the selection operation of the zoom control hot zone b is triggered, and the zoom control hot zone b is dragged 2cm toward the geometric center f of the outer zone, and the selection operation is canceled. At this time, the target three-dimensional model is reduced to half of the original; the selection operation of the zoom control hot zone b is triggered, and the zoom control hot zone b is dragged 2cm away from the geometric center f of the outer zone, and the selection operation is canceled. At this time, the target three-dimensional model is enlarged to twice the original.
[0067] In an optional embodiment, the above method further includes:
[0068] Step S602: Generate a target virtual game scene according to the target three-dimensional model after executing the first drag operation, and / or the second drag operation, and / or the third drag operation.
[0069] In the disclosed embodiment, the first drag operation, the second drag operation, and the third drag operation respectively correspond to the movement control state, rotation control state, and scaling control state of the target three-dimensional model by the editing control. The editing control can dynamically change according to the operation requirements of "rotation", "scaling", and "movement". Only one editing control can be used to complete the "rotation", "scaling", and "movement" editing operations of the target three-dimensional model, generate the target virtual game scene, and thus achieve the purpose of improving game editing efficiency.
[0070] According to an embodiment of the present disclosure, there is also provided an embodiment of a device for implementing the control method of the three-dimensional model in the game editor. Figure 8 is a schematic diagram of a structure of a control device for a three-dimensional model in a game editor according to an embodiment of the present disclosure, such as Figure 8 As shown, the control device of the three-dimensional model in the above-mentioned game editor includes: a display module 700, an adding module 702, a generating module 704, a first control module 706, a second control module 708, and a third control module 710, wherein:
[0071] The display module 700 is used to respond to the virtual game scene editing trigger instruction, load and display the virtual game scene in the graphical user interface;
[0072] The adding module 702 is used to respond to the adding operation of the target three-dimensional model and add the target three-dimensional model to the virtual game scene;
[0073] The generating module 704 is used to generate an editing control according to the shape and position of the target 3D model in response to the selection operation of the target 3D model, wherein the editing control includes: a movement control hot zone that at least partially covers the first projection area of the target 3D model, and a geometric transformation control hot zone that is set in the second projection area of the target 3D model, the geometric transformation control hot zone includes: a rotation control hot zone and a scaling control hot zone, the first projection area is the projection of the target 3D model on the graphical user interface, and the second projection area is the projection of the bounding box of the target 3D model on the designated plane of the virtual game scene;
[0074] The first control module 706 is configured to respond to a first drag operation on the movement control hot zone and control the target three-dimensional model to move in the virtual game scene according to the first drag operation;
[0075] The second control module 708 is used to control the orientation of the target three-dimensional model in the virtual game scene in response to a second drag operation on the rotation control hot zone according to the second drag operation;
[0076] The third control module 710 is used to respond to a third drag operation on the zoom control hot zone and control the target three-dimensional model to be zoomed in the virtual game scene according to the third drag operation.
[0077] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0078] It should be noted that the display module 700, the adding module 702, the generating module 704, the first control module 706, the second control module 708, and the third control module 710 correspond to steps S102 to S112 in the method embodiment, and the examples and application scenarios implemented by the modules and the corresponding steps are the same, but are not limited to the contents disclosed in the method embodiment. It should be noted that the modules as part of the device can be run in a computer terminal.
[0079] It should be noted that the optional or preferred implementation modes of this embodiment can refer to the relevant description in the method embodiment, which will not be repeated here.
[0080] The control device of the three-dimensional model in the above-mentioned game editor may also include a processor and a memory. The above-mentioned display module 700, adding module 702, generating module 704, first control module 706, second control module 708, third control module 710, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0081] The processor includes a kernel, which retrieves the corresponding program unit from the memory. The kernel may be one or more. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. The memory includes at least one memory chip.
[0082] According to an embodiment of the present application, a computer-readable storage medium embodiment is also provided. Optionally, in this embodiment, the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned methods for controlling a three-dimensional model in a game editor.
[0083] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group, and the computer-readable storage medium includes a stored program.
[0084] Optionally, when the program is running, the device where the computer-readable storage medium is located is controlled to perform the following functions: responding to a virtual game scene editing trigger instruction, loading and displaying the virtual game scene in the above-mentioned graphical user interface; responding to an add operation on a target three-dimensional model, adding the above-mentioned target three-dimensional model to the above-mentioned virtual game scene; responding to a selection operation on the above-mentioned target three-dimensional model, generating an editing control according to the shape and position of the above-mentioned target three-dimensional model; responding to a first drag operation on the above-mentioned movement control hot zone, controlling the above-mentioned target three-dimensional model to move in the above-mentioned virtual game scene according to the above-mentioned first drag operation; responding to a second drag operation on the above-mentioned rotation control hot zone, controlling the orientation of the above-mentioned target three-dimensional model in the above-mentioned virtual game scene according to the above-mentioned second drag operation; responding to a third drag operation on the above-mentioned zoom control hot zone, controlling the above-mentioned target three-dimensional model to zoom in the above-mentioned virtual game scene according to the above-mentioned third drag operation.
[0085] Optionally, when the program is running, the device where the computer-readable storage medium is located is controlled to perform the following functions: determine the drag direction and drag distance of the first drag operation; and control the target three-dimensional model to move in the virtual game scene according to the drag direction and the drag distance.
[0086] Optionally, when the program is running, the device where the computer-readable storage medium is located is controlled to perform the following function: a directional drag operation from the first sub-control hot zone to the second sub-control hot zone.
[0087] Optionally, when the program is running, the device where the computer-readable storage medium is located is controlled to perform the following functions: determine the rotation angle of the above-mentioned first sub-control hot zone according to the above-mentioned directional drag operation; according to the above-mentioned rotation angle, control the orientation of the above-mentioned target three-dimensional model in the above-mentioned virtual game scene.
[0088] Optionally, when the program is running, the device where the computer-readable storage medium is located is controlled to perform the following functions: a directional dragging operation from the above-mentioned third sub-control hot zone toward the geometric center of the above-mentioned outer zone; or, a directional dragging operation from the above-mentioned third sub-control hot zone away from the geometric center of the above-mentioned outer zone.
[0089] Optionally, when the program is running, the device where the computer-readable storage medium is located is controlled to perform the following functions: determine the drag direction and drag distance according to the above-mentioned directional drag operation; control the above-mentioned target three-dimensional model to be scaled in the above-mentioned virtual game scene according to the above-mentioned drag direction and the above-mentioned drag distance.
[0090] Optionally, when the program is running, the device where the computer-readable storage medium is located is controlled to perform the following functions: generate a target virtual game scene based on the target three-dimensional model after executing the above-mentioned first drag operation, and / or the above-mentioned second drag operation, and / or the above-mentioned third drag operation.
[0091] According to an embodiment of the present application, a processor embodiment is also provided. Optionally, in this embodiment, the processor is used to run a program, wherein when the program is run, any one of the above-mentioned methods for controlling a three-dimensional model in a game editor is executed.
[0092] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any one of the above-mentioned methods for controlling a three-dimensional model in a game editor.
[0093] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: responding to a virtual game scene editing trigger instruction, loading and displaying the virtual game scene in the above-mentioned graphical user interface; responding to an add operation on a target three-dimensional model, adding the above-mentioned target three-dimensional model to the above-mentioned virtual game scene; responding to a selection operation on the above-mentioned target three-dimensional model, generating an editing control according to the shape and position of the above-mentioned target three-dimensional model; responding to a first drag operation on the above-mentioned movement control hot zone, controlling the above-mentioned target three-dimensional model to move in the above-mentioned virtual game scene according to the above-mentioned first drag operation; responding to a second drag operation on the above-mentioned rotation control hot zone, controlling the orientation of the above-mentioned target three-dimensional model in the above-mentioned virtual game scene according to the above-mentioned second drag operation; responding to a third drag operation on the above-mentioned zoom control hot zone, controlling the above-mentioned target three-dimensional model to zoom in the above-mentioned virtual game scene according to the above-mentioned third drag operation.
[0094] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: determining the dragging direction and dragging distance of a first dragging operation; and controlling the target three-dimensional model to move in the virtual game scene according to the above dragging direction and the above dragging distance.
[0095] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: a directional drag operation from the above-mentioned first sub-control hot zone to the above-mentioned second sub-control hot zone.
[0096] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: determining the rotation angle of the above-mentioned first sub-control hot zone according to the above-mentioned directional dragging operation; and controlling the orientation of the above-mentioned target three-dimensional model in the above-mentioned virtual game scene according to the above-mentioned rotation angle.
[0097] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: a directional dragging operation from the above-mentioned third sub-control hot zone toward the geometric center of the above-mentioned outer zone; or, a directional dragging operation from the above-mentioned third sub-control hot zone away from the geometric center of the above-mentioned outer zone.
[0098] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: determining the dragging direction and the dragging distance based on the above-mentioned directional dragging operation; and controlling the above-mentioned target three-dimensional model to scale in the above-mentioned virtual game scene according to the above-mentioned dragging direction and the above-mentioned dragging distance.
[0099] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: generating a target virtual game scene based on the target three-dimensional model after executing the above-mentioned first drag operation, and / or the above-mentioned second drag operation, and / or the above-mentioned third drag operation.
[0100] The serial numbers of the above-mentioned embodiments of the present disclosure are only for description and do not represent the advantages or disadvantages of the embodiments.
[0101] In the above embodiments of the present disclosure, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0102] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0103] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0104] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0105] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0106] The above is only a preferred embodiment of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present disclosure. These improvements and modifications should also be regarded as the scope of protection of the present disclosure.
Claims
1. A method for controlling a three-dimensional model in a game editor, characterized in that: Providing a graphical user interface of a game editor by an electronic device, the method comprising: In response to a virtual game scene editing trigger instruction, the virtual game scene is loaded and displayed in the graphical user interface; In response to an operation of adding a target three-dimensional model, adding the target three-dimensional model to the virtual game scene; In response to the selection operation of the target three-dimensional model, an editing control is generated according to the shape and position of the target three-dimensional model, wherein the editing control includes: a movement control hot zone that at least partially covers the first projection area of the target three-dimensional model, and a geometric transformation control hot zone set in the second projection area of the target three-dimensional model, the geometric transformation control hot zone includes: a rotation control hot zone and a scaling control hot zone, the first projection area is the projection of the target three-dimensional model on the graphical user interface, and the second projection area is the projection of the bounding box of the target three-dimensional model on the specified plane of the virtual game scene, wherein the specified plane includes one of the following: a cross section of the bounding box of the target three-dimensional model; or a plane parallel to the cross section of the bounding box of the target three-dimensional model; or a longitudinal section of the bounding box of the target three-dimensional model; or a plane parallel to the longitudinal section of the bounding box of the target three-dimensional model; In response to a first drag operation on the movement control hot zone, controlling the target three-dimensional model to move in the virtual game scene according to the first drag operation; In response to a second drag operation on the rotation control hot zone, controlling the orientation of the target three-dimensional model in the virtual game scene according to the second drag operation; In response to a third drag operation on the zoom control hot zone, the target three-dimensional model is controlled to be zoomed in the virtual game scene according to the third drag operation.
2. The method for controlling a three-dimensional model in a game editor according to claim 1, characterized in that: The second projection area is divided into an outer area and an inner area, and the rotation control hot zone includes: a first sub-control hot zone and a second sub-control hot zone, wherein the first sub-control hot zone is located in the inner area, and the second sub-control hot zone is located in the outer area, and the second projection area is perpendicular to the specified direction axis, the specified direction axis is the rotation axis of the target three-dimensional model, and the specified direction axis is perpendicular to the specified plane.
3. The method for controlling a three-dimensional model in a game editor according to claim 1, characterized in that: Controlling the target three-dimensional model to move in the virtual game scene according to the first drag operation includes: Determining a drag direction and a drag distance of a first drag operation; According to the dragging direction and the dragging distance, the target three-dimensional model is controlled to move in the virtual game scene.
4. The method for controlling a three-dimensional model in a game editor according to claim 2, characterized in that: The second dragging operation on the rotation control hot zone includes: A directional drag operation from the first sub-control hot zone to the second sub-control hot zone.
5. The method for controlling a three-dimensional model in a game editor according to claim 4, characterized in that: Controlling the orientation of the target three-dimensional model in the virtual game scene according to the second drag operation includes: Determining a rotation angle of the first sub-control hot zone according to the directional drag operation; According to the rotation angle, the orientation of the target three-dimensional model in the virtual game scene is controlled.
6. The method for controlling a three-dimensional model in a game editor according to claim 2, characterized in that: The zoom control hot zone includes: a third sub-control hot zone, wherein the third sub-control hot zone is located in the outer zone; The third drag operation on the zoom control hot zone includes: Directional dragging operation from the third sub-control hot zone toward the geometric center of the outer zone; or A directional drag operation is performed from the third sub-control hot zone away from the geometric center of the outer zone.
7. The method for controlling a three-dimensional model in a game editor according to claim 6, characterized in that: Controlling the target three-dimensional model to scale in the virtual game scene according to the third drag operation includes: Determine a drag direction and a drag distance according to the directional drag operation; According to the dragging direction and the dragging distance, the target three-dimensional model is controlled to be scaled in the virtual game scene.
8. The method for controlling a three-dimensional model in a game editor according to claim 1, characterized in that: The method comprises: A target virtual game scene is generated according to the target three-dimensional model after executing the first drag operation, and / or the second drag operation, and / or the third drag operation.
9. A control device for a three-dimensional model in a game editor, characterized in that: A graphical user interface for a game editor is provided by an electronic device, the device comprising: A display module, configured to respond to a virtual game scene editing trigger instruction, and load and display the virtual game scene in the graphical user interface; An adding module, used for responding to an adding operation on a target three-dimensional model, and adding the target three-dimensional model to the virtual game scene; A generation module, for responding to a selection operation on the target three-dimensional model, generating an editing control according to the shape and position of the target three-dimensional model, wherein the editing control includes: a movement control hot zone that at least partially covers a first projection area of the target three-dimensional model, and a geometric transformation control hot zone set in a second projection area of the target three-dimensional model, wherein the geometric transformation control hot zone includes: a rotation control hot zone and a scaling control hot zone, wherein the first projection area is a projection of the target three-dimensional model on the graphical user interface, and the second projection area is a projection of a bounding box of the target three-dimensional model on a designated plane of the virtual game scene, wherein the designated plane includes one of the following: a cross section of the bounding box of the target three-dimensional model; or a plane parallel to the cross section of the bounding box of the target three-dimensional model; or a longitudinal section of the bounding box of the target three-dimensional model; or a plane parallel to the longitudinal section of the bounding box of the target three-dimensional model; A first control module, configured to respond to a first drag operation on the movement control hot zone and control the target three-dimensional model to move in the virtual game scene according to the first drag operation; A second control module, configured to respond to a second drag operation on the rotation control hot zone and control the orientation of the target three-dimensional model in the virtual game scene according to the second drag operation; A third control module is used to respond to a third drag operation on the zoom control hot zone and control the target three-dimensional model to be zoomed in the virtual game scene according to the third drag operation.
10. A non-volatile storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method for controlling a three-dimensional model in a game editor as described in any one of claims 1 to 8 when running.
11. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for controlling a three-dimensional model in a game editor as described in any one of claims 1 to 8.
