Game editing preview method and apparatus, storage medium, and electronic device
By displaying the outline or surface of the virtual collision object in the game editing interface, it solves the problem that users have difficulty understanding the physical information of scene components, realizes accurate editing and reasonable allocation of resources, and improves editing efficiency.
Patent Information
- Application Number
- PCT/CN2024/140729
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-09
- Filing Date
- 2024-12-19
- Publication Date
- 2025-07-17
AI Technical Summary
In the game editing state, it is difficult for users to intuitively understand the physical information of the scene components, resulting in inaccurate editing and unreasonable resource utilization.
A game editing preview method is provided, which displays the outline or surface of the virtual collision object of the target scene component by displaying the game editing scene in a graphical user interface and responding to the preview operation, so that the user can understand the collision area and resource occupancy.
Users can accurately edit the positional relationship of scene components, avoid overlap, reasonably allocate resource usage, and improve editing efficiency.
Smart Images

Figure CN2024140729_17072025_PF_FP_ABST
Abstract
Description
Game editing preview method, device, storage medium and electronic device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to a Chinese patent application filed on January 9, 2024, with application number 202410034062.8, entitled “Game Editing and Previewing Method, Device, Storage Medium and Electronic Device,” the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present disclosure relates to the technical field of computer and human-computer interaction, and in particular to a game editing and previewing method, a game editing and previewing device, a computer-readable storage medium, and an electronic device. Background Art
[0004] With the development of computer and human-computer interaction technology, some games offer the ability for users to customize game scenes (or maps). When editing game scenes, users typically place a large number of scene components, such as buildings, furniture, trees, and mechanisms. Scene components not only beautify the scene but also implement specific gameplay logic.
[0005] In related technologies, it is difficult for users to understand the physical information of scene components while editing. For example, in editing mode, users cannot see the physical collision effects caused by the overlap of different scene components. During game operation, the program may automatically adjust the position of one scene component so that it no longer overlaps with other scene components. However, this will change the information originally edited by the user, and may cause the actual game effect of the scene component or game scene to deviate from the expected. Summary of the Invention
[0006] The present disclosure provides a game editing preview method, a game editing preview device, a computer-readable storage medium and an electronic device, so as to at least to some extent solve the problem that it is difficult for users to understand the physical information of scene components in the editing state.
[0007] According to a first aspect of the present disclosure, a game editing preview method is provided, the method comprising: displaying a game editing scene in a graphical user interface provided by a running game program; the game editing scene comprising one or more scene components; the scene components being configured to generate corresponding virtual models in the game running scene; in response to a first preview operation, determining a first physical preview mode among multiple physical preview modes as a current physical preview mode for a target scene component, and displaying an outline of a target virtual collision object corresponding to the target scene component; wherein the target scene component is a scene component in the game editing scene; and the target virtual collision object being configured to detect a virtual object that collides with the target scene component.
[0008] According to a second aspect of the present disclosure, a game editing preview device is provided, comprising: a game editing scene display processing module configured to display a game editing scene in a graphical user interface provided by a running game program; the game editing scene comprises one or more scene components; the scene components are configured to generate corresponding virtual models in the game running scene; a physical preview processing module configured to respond to a first preview operation, determine a first physical preview mode among multiple physical preview modes as a current physical preview mode for a target scene component, and display an outline of a target virtual collision object corresponding to the target scene component; wherein the target scene component is a scene component in the game editing scene; and the target virtual collision object is configured to detect a virtual object that collides with the target scene component.
[0009] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the game editing preview method and possible implementation methods thereof of the first aspect are implemented.
[0010] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the game editing preview method and possible implementation methods of the above-mentioned first aspect by executing the executable instructions.
[0011] The technical solution disclosed in this disclosure has the following beneficial effects:
[0012] On the one hand, by providing a physical preview mode and displaying the target virtual collision object corresponding to the target scene component, users can intuitively understand the physical information such as the collision area of the target scene component, which is conducive to accurate editing by users. For example, using the target virtual collision object as a reference, the relative position relationship of multiple scene components can be accurately edited to avoid overlap. On the other hand, providing multiple physical preview modes allows users to flexibly choose to observe different information of the target virtual collision object. For example, in the first physical preview mode, users can see the outline of the target virtual collision object. This allows for a clearer understanding of the structural composition and resource usage of the target virtual collision object, facilitates the reasonable allocation of resource usage of scene components, and improves editing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] FIG1 shows a system architecture diagram of one of the exemplary embodiments;
[0014] FIG2 is a flowchart showing a method for game editing and previewing according to the exemplary embodiment;
[0015] FIG3 is a schematic diagram showing a game editing scene and scene component controls in this exemplary embodiment;
[0016] FIG4 is a schematic diagram showing a setting interface according to one exemplary embodiment of the present invention;
[0017] FIG5A is a schematic diagram showing a physical preview control for a specific scene component according to one exemplary embodiment of the present invention;
[0018] FIG5B shows a schematic diagram of a physical preview control for a global game editing scene according to one exemplary embodiment of the present invention;
[0019] FIG6A is a schematic diagram showing a first physical preview mode according to the exemplary embodiment;
[0020] FIG6B is a schematic diagram showing a first physical preview mode according to the exemplary embodiment;
[0021] FIG6C is a schematic diagram illustrating a second physical preview mode according to this exemplary embodiment;
[0022] FIG6D is a schematic diagram illustrating a second physical preview mode according to this exemplary embodiment;
[0023] FIG7A is a schematic diagram showing a contour line of a target virtual collision object according to one exemplary embodiment of the present invention;
[0024] FIG7B is a schematic diagram showing a surface of a target virtual collision object according to one exemplary embodiment of the present invention;
[0025] FIG8 is a schematic diagram showing one of the physical parameter settings in this exemplary embodiment;
[0026] FIG9 is a schematic structural diagram of a game editing and previewing device according to one exemplary embodiment of the present invention;
[0027] FIG. 10 is a schematic structural diagram of an electronic device according to the exemplary embodiment. DETAILED DESCRIPTION
[0028] Exemplary embodiments of the present disclosure will be described more fully hereinafter with reference to the accompanying drawings.
[0029] The accompanying drawings are schematic illustrations of the present disclosure and are not necessarily drawn to scale. Some of the block diagrams shown in the accompanying drawings may be functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, or in hardware modules or integrated circuits, or in networks, processors or microcontrollers. The embodiments can be implemented in various forms and should not be construed as being limited to the examples set forth herein. The features, structures or characteristics described in the present disclosure may be combined in one or more embodiments in any suitable manner. In the description below, many specific details are provided to provide a full description of the embodiments of the present disclosure. However, those skilled in the art will appreciate that one or more specific details may be omitted when implementing the technical solution of the present disclosure, or that other methods, components, devices, steps, etc. may be used to replace one or more specific details.
[0030] Physics information refers to information that affects the physical effects of scene components in the game (such as collisions, forces exerted on game characters, and the ability to be lifted by game characters). The inventors have discovered that in related game editing functions, it is difficult for users to intuitively understand the physical information of scene components, making it difficult to accurately edit. For example, if the physical collision body of a scene component is not exactly the same shape as that of the scene component, the user cannot see the positional relationship between the physical collision body of the scene component and the physical collision body of other scene components when editing, nor can they see any overlap between the physical collision bodies of different scene components. Due to the collision detection mechanism of the game program, one of the scene components will be automatically moved during the game running state to avoid positional overlap. However, this will change the information originally edited by the user, and may cause the actual gameplay effect of the scene component or game scene to deviate from the expected. In addition, the physical information of a scene component affects the resource usage of the scene component. For example, the more sophisticated and complex the physical information of a scene component is, the more computing power and storage resources it requires. Without understanding the physical information of the scene component, the user lacks understanding of the resource usage of the scene component or game scene being edited, and may edit a scene component that consumes too many resources or have difficulty balancing the resource allocation of different scene components.
[0031] In view of one or more of the above problems, exemplary embodiments of the present disclosure provide a game editing preview method.
[0032] Figure 1 shows the system architecture of the operating environment of this exemplary embodiment. This system architecture may include a terminal device 110 and a server 120. The terminal device may be a mobile phone, tablet computer, personal computer, smart wearable device, game console, or other device. It has a display function and is capable of displaying a graphical user interface (GUI). The GUI may include an operating system interface or an application interface, etc. A game program, such as an operating system client program for an online game, is installed on the terminal device 110. When the game program runs on the terminal device 110, game editing scenes and other scenes may be displayed in the GUI, allowing the user to perform editing operations. The server 120 generally refers to the backend system that provides the game service in this exemplary embodiment and may be a single server or a cluster of multiple servers. A game server program is deployed on the server 120 to perform server-side game data processing. The terminal device 110 and the server 120 may be connected via a wired or wireless communication link for data transmission. The game editing and preview method in this exemplary embodiment may be executed by any one or more of the terminal device 110 and the server 120.
[0033] In one embodiment, the game editing and previewing method can be implemented and executed based on a cloud interaction system. The cloud interaction system can be the system architecture described above. Various cloud applications, such as cloud gaming, can be run within the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program execution body and the game screen presentation body are separated. The storage and operation of the in-game control and interaction methods are completed on the cloud gaming server (such as the aforementioned server 120). The cloud gaming client (such as the aforementioned terminal device 110) is responsible for receiving and sending data and presenting 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 or editing a game scene, the user operates the cloud gaming client to send operation instructions to the cloud gaming server. The cloud gaming server runs the game according to the operation 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.
[0034] In one embodiment, the game editing and previewing method can be implemented in a stand-alone game. No server deployment is required, and the entire game program can be installed on the terminal device 110 and the game editing and previewing method can be executed.
[0035] In one embodiment, referring to FIG2 , the method may include the following steps S210 and S220:
[0036] Step S210: Displaying a game editing scene in a graphical user interface provided by the running game program; the game editing scene includes one or more scene components; the scene components are configured to generate corresponding virtual models in the game running scene;
[0037] Step S220, in response to the first preview operation, determining the first physical preview mode among the multiple physical preview modes as the current physical preview mode for the target scene component, and displaying the outline of the target virtual collision object corresponding to the target scene component; wherein the target scene component is a scene component in the game editing scene; the target virtual collision object is configured to detect a virtual object that collides with the target scene component.
[0038] In the method of FIG2 , on the one hand, by providing a physical preview mode and displaying the target virtual collision object corresponding to the target scene component, the user can intuitively understand the physical information such as the collision area of the target scene component, which is conducive to accurate editing by the user. For example, using the target virtual collision object as a reference, the user can accurately edit the relative position relationship of multiple scene components to avoid overlap. On the other hand, providing multiple physical preview modes allows the user to flexibly choose to observe different information of the target virtual collision object. For example, in the first physical preview mode, the user can see the outline of the target virtual collision object. This allows for a clearer understanding of the structural composition and resource usage of the target virtual collision object, facilitates the reasonable allocation of resource usage of scene components, and improves editing efficiency.
[0039] Each step in Figure 2 is described in detail below.
[0040] In step S210, a game editing scene is displayed in a graphical user interface provided by the running game program; the game editing scene includes one or more scene components; the scene components are configured to generate corresponding virtual models in the game running scene.
[0041] This exemplary embodiment provides a game editing function for players. The game program in step S210 can be the main game program. When the main game program is running, the user can select a specific option to enter the editor or editing interface and use the editing function. Alternatively, the game program in step S210 can be an editing program that is compatible with the main game program and can be run independently of the main game program. When the editing program is running, the user can use the editing function.
[0042] Users can use the editing function to edit game scenes. They can choose to create a new game scene and edit it, or they can choose to edit an existing game scene. A game editing scene is a game scene displayed in an edited state. A game editing scene consists of one or more scene components. These can be pre-installed (for example, a game program may provide multiple preset game scenes of different styles, and users can select a preset game scene to edit, which will initially have pre-installed scene components) or user-generated. Scene components are people or objects (or parts of people or objects) in the game scene, such as buildings, mechanisms, vehicles, furniture, etc. Scene components are objects generated, used, or edited during the game editing phase and are configured to generate corresponding virtual models in the game runtime scene (i.e., the stage where the game scene is actually played). In the game, scene components and corresponding virtual models typically have the same appearance and use the same model resources. Therefore, they can be considered the same object and are not specifically distinguished in this article. In the program, scene components and virtual models can be stored as different types of program objects. Virtual models can be configured with the following types of presentation effects: visual presentation effects and non-visual presentation effects. That is to say, during the game running stage, the virtual model corresponding to the scene component can be a visible object with a specific appearance, or it can be an invisible object (such as the "birth point", which is the initial area where the player character is located in the game, is a scene component, which has size and shape, but is invisible in the game). In this exemplary embodiment, multiple scene components can be combined into a scene component combination. For example, the block component can be combined onto the circular surface of the cylindrical component to form a mechanism component in the form of a roller. In this way, complex and diverse components of people or objects can be formed in the game. For ease of distinction, a single scene component can be referred to as a basic scene component, which cannot be separated and can be regarded as the smallest component unit in the game editing scene. Unless otherwise specified, the scene component mentioned in this article may refer to a basic scene component or a scene component combination.
[0043] In a game editing scene, users can edit the game scene's environment, such as background, weather, and lighting. They can also edit scene components, such as adding or deleting specific scene components and setting their properties. When displaying the game editing scene, multiple scene component controls can be provided to generate corresponding scene components in the game editing scene in response to user triggering operations. Scene component controls are used to generate existing scene components in the game program. Scene component controls can be divided into different component types. Figure 3 shows a schematic diagram of a game editing scene and scene component controls. As shown in Figure 3, scene component controls can be provided in the form of a list (including one or more levels of lists, with Figure 3 showing a second-level list), with the list showing one or more levels of component types. For example, "structure," "object," "environment," "mechanism," "creature," and "combination" are first-level component types. Each first-level component type can include one or more second-level component types. For example, the first-level component type "object" can include second-level component types such as "furniture," "interior decoration," and "lighting." Each secondary component type includes one or more scene component controls, such as the secondary component type "furniture" includes scene component controls such as "log coffee table", "round low table", "wooden small table", and "European table". The user can perform a first trigger operation on the scene component control, such as a click operation, a drag operation, etc., to generate a corresponding scene component in the game editing scene. For example, in Figure 3, the user drags the "round low table" scene component control to a certain position in the game editing scene, which can trigger the generation of a round low table scene component at that position. The present disclosure does not limit the form, appearance, etc. of the scene component control. The scene component control can display the name of the scene component or the icon of the scene component.
[0044] In one embodiment, a scene component control is configured with a corresponding scene component template, which includes pre-edited scene component parameters. Scene component parameters may include one or more parameters such as shape, color, texture, transparency, material, size, and orientation, and may also include other parameters. When users edit a scene component in a game editing scene, they need to set the scene component parameters for the scene component. When a scene component is generated in the game editing scene using the scene component control, the scene component parameters in the scene component template corresponding to the scene component control can be called to quickly generate the scene component based on these parameters. It can be understood that the scene component control is a pre-edited, templated scene component. The scene component parameters are configured in the form of a template and provided to the user in the form of a scene component control. When users use the scene component control, they are effectively applying the scene component template. This improves editing efficiency. Of course, after a scene component is generated, its scene component parameters can be modified, such as by scaling, changing its size, rotating, and changing its orientation, or by color setting, changing its color and transparency.
[0045] Game programs can include built-in scene component controls, such as game developers pre-editing scene component templates and configuring them as scene component controls for players to use. Furthermore, players can also be allowed to configure scene component controls. For example, players can model scene components in the game editing scene or other editing interface and save the scene component parameters to form a scene component template and configure it as a scene component control.
[0046] In one embodiment, users can edit and update scene component controls. For example, they can modify the scene component template corresponding to the scene component control, modify the scene component parameters therein, save the changes, and then update the scene component template corresponding to the scene component control. When subsequently generating a scene component in a game editing scene using the scene component control, the scene component parameters in the updated scene component template can be used to generate the scene component.
[0047] In one embodiment, corresponding scene component controls can also be configured for scene component combinations. For example, a user can combine a block component onto the circular surface of a cylinder component to form a wheel-shaped mechanism component. Based on the scene component parameters of this mechanism component, a new scene component control can be configured. Subsequently, the user can use this scene component control to generate a mechanism component in the game editing scene. This allows for one-click generation of scene component combinations, which is very convenient.
[0048] In one embodiment, a virtual camera may be provided in the game editing scene. A virtual camera is a shooting tool in the game program that simulates a real camera and can be used to shoot to form the picture in the game editing scene. The virtual camera can be set at any position in the game editing scene and shoot the scene from any perspective, that is, it can have any posture, and its posture can be fixed or dynamically changing. In addition, any number of virtual cameras can be provided in the game editing scene, and different virtual cameras can shoot different game scene pictures. For example, two virtual cameras are provided in the game editing scene, one of which is used to shoot the main picture in the game editing scene, and the other is used to shoot the auxiliary picture in the game editing scene. When the main picture shows the front of a scene component, the auxiliary picture can show the side or back of the scene component, etc., to help the user see more comprehensive information.
[0049] The game editing scene can present two different perspectives, namely the observation perspective and the game perspective. The user can set which perspective to use in the game editing scene. For example, Figure 4 shows the setting interface of the game editing scene. The interface provides an option control for the perspective, and the user can choose to use the observation perspective or the game perspective. The observation perspective refers to observing the game editing scene from a third-person perspective. In the observation perspective, the user can not control the game character in the game editing scene, but directly control the virtual camera to move the perspective (the virtual camera is not displayed). The game perspective refers to observing the game editing scene from a first-person perspective. In the game perspective, the user can control a certain game character in the game editing scene. The game character can be bound to the virtual camera, that is, the positional relationship between the game character and the virtual camera is fixed. For example, the game character can be located at the focus of the virtual camera. When the user controls the game character to move, the virtual camera moves synchronously, thereby moving the perspective. Of course, in the observation perspective, it is also possible to set an invisible game character in the game editing scene, which is equivalent to hiding the game character in the game perspective. When the user moves the perspective, the virtual camera can be moved by moving the game character. In the observation perspective or game perspective, a virtual joystick, up or down controls, etc. can be set in the game editing scene. The user can move the virtual camera or move the game character by operating these controls.
[0050] In addition, other setting controls may be provided in the setting interface of the game editing scene, such as a "grid display" setting control for setting the grid display mode in the game editing scene, a "lens speed" setting control for setting the movement speed of the virtual camera or the movement speed of the virtual object controlled by the player in the game running scene, etc. This disclosure is not particularly limited.
[0051] Continuing with reference to Figure 2, in step S220, in response to the first preview operation, the first physical preview mode among the multiple physical preview modes is determined as the current physical preview mode for the target scene component, and the outline of the target virtual collision object corresponding to the target scene component is displayed; wherein, the target scene component is a scene component in the game editing scene; the target virtual collision object is configured to detect virtual objects that collide with the target scene component.
[0052] In this exemplary embodiment, a physical preview function is provided in the editor for previewing the virtual collision objects corresponding to the scene components, and the physical information of the scene components is reflected through the virtual collision objects. The virtual collision object is a virtual object with a collision volume, which can be understood as an area where collision detection will occur in the game running scene. The virtual collision object is configured to detect virtual objects that collide with the corresponding scene components. Exemplarily, in the game running scene, when two virtual collision objects are detected to be in contact (such as when two virtual collision objects are detected to have an intersection area of at least one point), a collision effect can be applied to the two scene components corresponding to the two virtual collision objects according to the collision result. The collision effect may include but is not limited to any one or more of the following: preventing at least one of the scene components from moving in the direction in which the two are approaching each other; applying a reaction force to at least one of the scene components, the direction of which may be opposite to the direction in which the two are approaching each other; applying deformation to at least one of the scene components to show the effect of deformation due to collision; presenting sound effects or text information of the collision.
[0053] The scene component and the corresponding virtual collision object have a fixed relative position relationship. For example, the first reference point of the scene component (referring to a representative point on the scene component, such as the geometric center, boundary point, corner point, etc. of the scene component, and the number of the first reference point can be multiple) and the second reference point of the virtual collision object (referring to a representative point on the virtual collision object, such as the geometric center, boundary point, corner point, etc. of the virtual collision object, and the number of the second reference point can also be multiple, one-to-one corresponding to the first reference point) maintain position overlap. When the scene component is moved or rotated, the virtual collision object can move or rotate synchronously.
[0054] The scene component and the corresponding virtual collision object also have the same or similar shape and size, so that the virtual collision object can simulate the appearance of the scene component, and the game program performs collision detection through the boundary of the virtual collision object, so that the user can perceive the collision effect of the scene component. In one embodiment, the scene component and the corresponding virtual collision object have the same shape and size, such as the scene component is composed of basic shapes or patches, and the virtual collision object is composed of the same basic shapes or patches, and the boundaries of the two completely overlap or are almost the same, so that the collision detection performed by the virtual collision object can completely or almost completely simulate the collision effect of the scene component, so that the collision effect perceived by the user is real and comfortable. In another embodiment, the shape of the virtual collision object is a simplified shape of the scene component, and the sizes of the two are the same or similar, such as the scene component as a whole can be equivalent to an approximate shape, or the scene component can be divided into multiple parts and each part can be equivalent to an approximate shape, and the virtual collision object is generated according to the approximate shape. For example, if the scene component is a chair, the entire chair can be equated to a cuboid, where the length and width of the cuboid are equal to the length and width of the chair's projection on the horizontal plane, and the height of the cuboid is equal to the total height of the chair. A corresponding cuboid collision object is generated, which is the virtual collision object corresponding to the chair scene component. Alternatively, the chair consists of a backrest, a seat, armrests, and legs. The backrest is equated to a cuboid, where the length, width, and height of the cuboid are respectively the width, thickness, and height of the backrest. The seat, armrests, and legs are equated to another cuboid, which can be the bounding box of the seat, armrests, and legs. The length, width, and height of the cuboid can also be determined by the size of the seat, armrests, and legs. A collision object consisting of two cuboids is generated, which is the virtual collision object corresponding to the chair scene component. Thus, by using virtual collision objects with simplified shapes to approximate the shape and boundaries of the scene components, a near-real collision effect can be achieved. Generally speaking, the closer the virtual collision object is to the appearance of the scene component, the more refined its model is, the better the collision effect that can be achieved, and the higher the corresponding resource usage.
[0055] The target scene component can be any one or more scene components in the game editing scene, such as the scene component currently selected by the user. The target virtual collision object is the virtual collision object corresponding to the target scene component. The present disclosure does not limit the timing of generating the target virtual collision object. For example, when the target scene component is generated in the game editing scene, the target virtual collision object is generated. Of course, since it may take a certain amount of time to generate the target virtual collision object, the generation process of the target virtual collision object can be started in the background when the target scene component is generated, and it is not required to generate the target virtual collision object immediately when the target scene component is generated. Alternatively, when a physical preview of the target scene component is required (such as detecting a first preview operation or a second preview operation), the target virtual collision object is generated, so that virtual collision objects may not be generated for scene components that do not require physical preview, thereby reducing computing power and storage overhead in the game editing scene.
[0056] The editor provides multiple physics preview modes. These modes display virtual collision objects in different forms, reflecting physics information in different ways or aspects. The first preview mode displays the outlines of virtual collision objects.
[0057] In one embodiment, the first preview operation includes a physical preview trigger operation and a first selection operation; in response to the first preview operation, determining a first physical preview mode among multiple physical preview modes as a current physical preview mode for the target scene component and displaying an outline of a target virtual collision object corresponding to the target scene component may include the following steps:
[0058] In response to the physical preview trigger operation, a physical preview mode selection control is provided;
[0059] In response to a first selection operation on the physical preview mode selection control, a first physical preview mode among the multiple physical preview modes is determined as a current physical preview mode for the target scene component, and an outline of a target virtual collision object corresponding to the target scene component is displayed.
[0060] Among them, the physical preview trigger operation is an operation that triggers a physical preview. For example, a physical preview control can be provided, and the user's trigger operation on the control is a physical preview trigger operation. The physical preview mode selection control is used to select the physical preview mode, and can include options corresponding to multiple physical preview modes. The first selection operation is the operation of selecting the first physical preview mode through the physical preview mode selection control, such as the operation of clicking the option corresponding to the first physical preview mode in the physical preview mode selection control. Figures 5A and 5B respectively show schematic diagrams of two physical preview trigger operations. Referring to Figure 5A, the user can perform a physical preview trigger operation and a first selection operation when a specific scene component is selected. For example, when the user selects the round low table scene component 501, a physical preview control 502 for the round low table scene component 501 is provided. The physical preview control 502 can be provided in the editing interface of the round low table scene component 501, and the operation of the user clicking the physical preview control 502 is a physical preview trigger operation. With reference to FIG5B , when the user has not selected a specific scene component, a global physical preview control 503 for the game editing scene is provided. For example, the physical preview control 503 can be provided in the functional interface of the game editing scene, and the user clicking the physical preview control 503 is a physical preview trigger operation. With reference to FIG6A , FIG6B , FIG6C , or FIG6D , when the user performs a physical preview trigger operation, a physical preview mode selection control 601 can be provided in the game editing scene, and the user can select and switch among multiple physical preview modes. If the first physical preview mode (i.e., the "wireframe mode" in FIG6A , FIG6B , FIG6C , or FIG6D ) is selected, the outline of the target virtual collision object corresponding to the target scene component is displayed in the first physical preview mode.
[0061] The editing interface of a scene component can also display other information. For example, the editing interface of the round low table scene component 501 shown in FIG5A displays a resource usage value of 25. Furthermore, the editing interface of a scene component can be used to implement other editing operations. For example, as shown in FIG5A , the resistance properties, external force properties, and center of gravity of the round low table scene component 501 can be edited in the editing interface of the round low table scene component 501.
[0062] In one embodiment, the first physical preview mode among multiple physical preview modes may be determined as the current physical preview mode in response to the first selection operation, and then the outline of the target virtual collision object corresponding to the target scene component may be displayed in response to the physical preview trigger operation.
[0063] In one embodiment, the game program may automatically select a physics preview mode, such as selecting the first physics preview mode as the current physics preview mode by default, or selecting the last selected physics preview mode as the current physics preview mode. The first preview operation may be a physics preview triggering operation performed by the user when the game program automatically selects the first physics preview mode as the current physics preview mode. For example, after the user triggers the physics preview operation using the physics preview control 502 in Figure 5A or Figure 5B, the outline of the target virtual collision object is displayed when the first physics preview mode is selected by default.
[0064] In one embodiment, in response to the first preview operation, determining the first physical preview mode among the multiple physical preview modes as the current physical preview mode for the target scene component may include the following steps:
[0065] In response to a first preview operation on a specific scene component in a game editing scene, the specific scene component is used as a target scene component, and a first physical preview mode among multiple physical preview modes is determined as a current physical preview mode for the target scene component.
[0066] Among them, the first preview operation can be an operation for a specific scene component, in which case the specific scene component is used as the target scene component, and a physical preview is performed on the target scene component, while no physical preview is performed on other scene components. For example, referring to Figures 5A and 6A above, when the user selects the round low table scene component 501, a physical preview control 502 for the round low table scene component 501 is provided, and the user can perform a first preview operation through the physical preview control 502 (such as triggering the physical preview control 502, and then performing a first selection operation through the physical preview mode selection control 601), triggering the display of the outline of the target virtual collision object 602 corresponding to the round low table scene component 501 in the first physical preview mode.
[0067] In one embodiment, in response to the first preview operation, determining the first physical preview mode among the multiple physical preview modes as the current physical preview mode for the target scene component may include the following steps:
[0068] In response to a first preview operation globally for the game editing scene, at least a scene component of a current field of view in the game editing scene is used as a target scene component, and a first physical preview mode among multiple physical preview modes is determined as a current physical preview mode for the target scene component.
[0069] The first preview operation may not be directed at a specific scene component, but rather at the entire game editing scene. In response to the first preview operation, the scene component in the current field of view in the game editing scene is used as the target scene component, or the current field of view is expanded to a certain extent, and the scene component in the expanded area is used as the target scene component. A physical preview is performed on the target scene component.
[0070] The current field of view is the current shooting area of the virtual camera in the game editing scene. That is, if the user performs a first preview operation for the entire game editing scene, a physical preview is performed in the first physical preview mode for the scene components currently visible to the user in the game editing scene. For example, referring to Figures 5B and 6B above, a round low table scene component 501 and a spherical scene component 504 are present in the current field of view. If the user has not selected a specific scene component, a physical preview control 503 for the entire game editing scene is provided. The user can perform a first preview operation through the physical preview control 503 (e.g., triggering the physical preview control 503 and then performing a first selection operation through the physical preview mode selection control 601), triggering the display of the outline of the target virtual collision object 602 corresponding to the round low table scene component 501 and the outline of the target virtual collision object 603 corresponding to the spherical scene component 504 in the first physical preview mode. In one embodiment, in the first physical preview mode, when the user adjusts the viewing angle, the target scene component is updated as the current field of view changes, and the scene component in the current field of view is always used as the target scene component. For example, a scene component that was not originally in the current field of view but enters the current field of view as the viewing angle is adjusted is added as the target scene component, and the outline of its corresponding target virtual collision object is displayed.
[0071] The above describes how users can trigger the first physics preview mode through interactive operations. In the first physics preview mode, the outline of the target virtual collision object is displayed. The outline outlines the shape and boundaries of the target virtual collision object, allowing users to intuitively see the collision physics information of the target scene component.
[0072] In one embodiment, the contour line of the target virtual collision object includes the boundary line on each surface of the target virtual collision object. The surface of the target virtual collision object can be each plane on its outer surface, or it can be the facets that make up the target virtual collision object. For example, the target virtual collision object is a cuboid, and its outer surface includes 6 rectangular planes. The boundary line of each rectangular plane can be used as the contour line of the target virtual collision object. Alternatively, the boundary line of the triangular facets that make up these rectangular planes can be used as the contour line of the target virtual collision object.
[0073] In one embodiment, the above-mentioned displaying the outline of the target virtual collision object corresponding to the target scene component may include the following steps:
[0074] A basic shape constituting a target virtual collision object is obtained, a contour line of the target virtual collision object is determined according to a feature line pre-configured for the basic shape, and the contour line of the target virtual collision object is displayed.
[0075] The basic shapes can be a series of relatively regular preset three-dimensional solids, such as cubes, cuboids, spheres, cylinders, tetrahedrons, etc. The target virtual collision object can be formed by combining the basic shapes. For example, if the target scene component is a chair, its corresponding target virtual collision object can be composed of two cuboids (one cuboid simulates the shape of the backrest, and the other cuboid simulates the shape of the seat, armrests, and legs).
[0076] For each basic shape, its feature lines can be pre-configured. Feature lines are used to represent the basic shape's shape and boundary features. In one embodiment, the boundary lines of each surface of the basic shape can be used as its feature lines, and diagonal lines can also be added as feature lines based on the boundary lines. For example, for a basic shape such as a cuboid, the boundary lines of each surface can be used as its feature lines, and the cuboid has 12 feature lines. Alternatively, a diagonal line can be added to each surface as a feature line, and the cuboid has 18 feature lines (including 6 diagonals).
[0077] If the feature lines of the basic shapes are preconfigured, the contour of the target virtual collision object can be determined based on the feature lines of the basic shapes that make up the target virtual collision object. For example, the feature lines of the basic shapes can be directly used as the contour of the target virtual collision object, or the feature lines of different basic shapes can be deduplicated or simplified to obtain the contour of the target virtual collision object. The contour of the target virtual collision object is then displayed in the first physical preview mode. This allows users to see the features of the basic shapes that make up the target virtual collision object and intuitively perceive the target virtual collision object's shape, boundaries, and structural composition.
[0078] In one embodiment, the game editing preview method may further include the following steps:
[0079] Detect the distance or coordinate difference between the virtual object and the basic shape, and compare it with the size of the basic shape. According to the comparison result, determine whether the virtual object and the basic shape are in contact, and determine whether the virtual object in contact with the basic shape collides with the target scene component.
[0080] Among them, collision detection can be performed in one or more situations of the game running scene, the game test scene, and the physical preview mode. If the target virtual collision object is composed of basic shapes, in the collision detection for the target scene component, it is possible to detect whether other virtual objects are in contact with the basic shape based on the size of the basic shape in the target virtual collision object. Exemplarily, a third reference point (referred to as the third reference point here to distinguish the above-mentioned first and second reference points) can be determined in each basic shape, which can be a geometric center (such as the center of a sphere), a corner point (such as any corner point of a cuboid), etc., to determine the distance or coordinate difference between other virtual objects and the third reference point, and compare it with the size of the basic shape, and judge whether other virtual objects are in contact with the basic shape based on the comparison results. For example, for the basic shape of a cuboid, the corner point with the smallest x, y, and z coordinate values is used as the third reference point. The x, y, and z coordinate values of other virtual objects are subtracted from the x, y, and z coordinate values of the third reference point to obtain the x, y, and z coordinate differences, which are compared with the length, width, and height of the cuboid. If the x, y, and z coordinate differences are less than or equal to the length, width, and height of the cuboid, respectively, it means that the virtual object is in contact with the cuboid. For the basic shape of a sphere, the center of the sphere is used as the third reference point, and the distance between other virtual objects and the center of the sphere is calculated and compared with the radius of the sphere. If the distance is less than or equal to the radius, it means that the virtual object is in contact with the sphere. In this way, the virtual objects that collide or contact with each foundation can be detected, and it can be determined that these virtual objects collide with the target scene components, thereby realizing collision detection of the target scene components.
[0081] In one embodiment, the above-mentioned displaying the outline of the target virtual collision object corresponding to the target scene component may include the following steps:
[0082] Obtain the facets constituting the target virtual collision object, determine the contour line of the target virtual collision object according to the boundary lines of the facets, and display the contour line of the target virtual collision object.
[0083] The facets can be two-dimensional graphics of any regular shape, such as triangular or quadrilateral facets. The facets can be stitched together to form the surface of the target virtual collision object, thereby forming the target virtual collision object. If the target virtual collision object is composed of facets, the contour of the target virtual collision object can be determined based on the facet boundary lines. For example, the facet boundary lines can be directly used as the contour of the target virtual collision object, or the boundary lines of different facets can be deduplicated or simplified to obtain the contour of the target virtual collision object. The contour of the target virtual collision object is then displayed in the first physical preview mode. This allows users to see the shape, boundaries, and structural composition of the target virtual collision object. Generally, the higher the model precision of the target virtual collision object, the more facets it contains. Users can see the specific facets in the first physical preview mode, providing an intuitive understanding of the model precision of the target virtual collision object, facilitating understanding of the resource usage of the target scene components, and thus enabling adjustments and accurate editing of resource usage in the game editing scene.
[0084] In one embodiment, the game editing preview method may further include the following steps:
[0085] Whether the virtual object is in contact with the patch is determined based on the coordinates of the virtual object and the patch, and whether the virtual object in contact with the patch collides with the target scene component is determined.
[0086] Among them, if the target virtual collision object is composed of patches, in the collision detection for the target scene component, it is possible to detect whether the points of the virtual object fall within the coordinate range of the patch based on the coordinates of the virtual object and the coordinates of the patch (such as the points of the virtual object are coplanar with the patch and satisfy the inequality group defined by the boundary line of the patch), thereby detecting whether there is an intersection between the virtual object and the patch. If the virtual object and the patch have an intersection of at least one point, the two are in contact. Since the target virtual collision object is usually composed of a large number of patches, each virtual object used for detection can be traversed and calculated with each patch separately. If the virtual object is in contact with at least one of the patches, it is determined that the virtual object has collided with the target scene component.
[0087] It should be understood that the above-mentioned virtual object used to detect collision with the target scene component is a virtual object with a collision volume, which can be other virtual collision objects in the game running scene except the target virtual collision object, that is, it can be virtual collision objects corresponding to other scene components (or game characters) except the target scene component.
[0088] In one embodiment, in the first physics preview mode, contour information of the target virtual collision object can be obtained, including the endpoint coordinates of each contour line. Based on the endpoint coordinates, a contour line between the endpoints is generated in the game editing scene and rendered in a specific color, thereby displaying the contour line of the target virtual collision object.
[0089] In one embodiment, when displaying the outline of the target virtual collision object corresponding to the target scene component, the target scene component can be continuously displayed. This allows the user to see the outline of the target virtual collision object and the target scene component simultaneously, making it easier to match the target scene component with the outline and more easily perceive the collision boundary of the target scene component.
[0090] In one embodiment, the above-mentioned displaying the outline of the target virtual collision object corresponding to the target scene component may include the following steps:
[0091] Determine the target color based on the physical type of the target scene component;
[0092] Displays the target virtual collision object's outline in the target color.
[0093] Among them, the physical type of the target scene component refers to the type of component attribute that the target scene component has when the game is running the scene, for example, it can be a physical attribute type, a functional attribute type, etc. In one embodiment, the component attribute type can be the type of physical interaction between the target scene component and other virtual objects, such as a static type (indicating that the target scene component will not be subjected to physical forces, such as it will not move under the action of physical collision), a force-bearing type (indicating that the target scene component can be subjected to physical forces from other virtual objects, such as it can be lifted), a triggerable type (or a trigger type, indicating that the target scene component can be triggered by a specified action or operation to produce a specific behavior), etc. Different physical types can be associated with different colors. In the first physical preview mode, the corresponding target color is determined according to the physical type of the target scene component, and then the outline of the target virtual collision object is displayed using the target color. In this way, in the physical preview mode, users can intuitively distinguish scene components of different physical types by color. It should be noted that during the game editing stage, some component attributes of the target scene component are not configured with specific values, or the corresponding attributes are not configured, and these attributes will only be set during the game running stage. For example, in the game editing stage, the target scene component set in the game editing scene is a static property component. However, when the game map is run according to the map data in the game editing stage, the target scene component will generate the actual properties corresponding to the game running stage, and the actual properties may be different from the component properties in the game editing stage. For example, it may be a force-bearing type component or a trigger type component.
[0094] In one embodiment, a physical type attribute can be set for the target virtual collision object. In the game editing scene, the physical type of the target virtual collision object can be determined according to the physical type of the target scene component, such as synchronizing the physical type data of the target scene component to the physical type data of the target virtual collision object so that the two remain the same. And the target virtual collision object color attribute (including outline color, or surface, filler color, etc.) is associated with its physical type attribute, so that the target color of the outline of the target virtual collision object, etc. can be easily determined according to the physical type of the target scene component. In addition, in the game editing scene, when the user changes the physical type of the target scene component, the changed data can be synchronized to the physical type data of the target virtual collision object, thereby updating the outline color of the target virtual collision object, etc. In this way, when the user previews the target virtual collision object of the target scene component in the game editing stage, the physical type corresponding to the target scene component in the game running stage can be reflected.
[0095] In one embodiment, the game editing preview method may further include the following steps:
[0096] In response to the second preview operation, a second physical preview mode among the multiple physical preview modes is determined as a current physical preview mode for the target scene component, and a surface or a filling volume of a target virtual collision object corresponding to the target scene component is displayed.
[0097] The second preview operation is a physical preview operation using a second physical preview mode, wherein the second physical preview mode displays the surface or filler of the target virtual collision object. By displaying the surface or filler, the user can see the physical form of the target virtual collision object.
[0098] In one embodiment, the second preview operation includes a physical preview trigger operation and a second selection operation; in response to the second preview operation, determining a second physical preview mode among the multiple physical preview modes as the current physical preview mode for the target scene component, and displaying the surface or filler of the target virtual collision object corresponding to the target scene component may include the following steps:
[0099] In response to the physical preview trigger operation, a physical preview mode selection control is provided;
[0100] In response to a second selection operation on the physical preview mode selection control, a second physical preview mode among the multiple physical preview modes is determined as a current physical preview mode for the target scene component, and a surface or a filler volume of a target virtual collision object corresponding to the target scene component is displayed.
[0101] 6A , 6B , 6C or 6D , when the user performs a physical preview trigger operation, a physical preview mode selection control 601 may be provided in the game editing scene, and the user may select and switch among multiple physical preview modes. If the second physical preview mode (i.e., the “solid mode” in FIG. 6A , 6B , 6C or 6D ) is selected, the surface or filler body of the target virtual collision object corresponding to the target scene component may be displayed in the second physical preview mode.
[0102] In one embodiment, the second selection operation may be responded to first to determine the second physical preview mode among the multiple physical preview modes as the current physical preview mode, and then the physical preview trigger operation may be responded to to display the outline of the target virtual collision object corresponding to the target scene component.
[0103] In one embodiment, the game program may automatically select the physics preview mode, such as selecting the second physics preview mode as the current physics preview mode by default, or selecting the last selected physics preview mode as the current physics preview mode. The second preview operation may be a physics preview triggering operation performed by the user when the game program automatically selects the second physics preview mode as the current physics preview mode. For example, after the user triggers the physics preview operation using the physics preview control 502 in Figure 5A or Figure 5B, the surface or filler of the target virtual collision object is displayed when the second physics preview mode is selected by default.
[0104] In one embodiment, in response to a second preview operation for a specific scene component in a game editing scene, the specific scene component can be used as the target scene component, and the second physical preview mode in multiple physical preview modes can be determined as the current physical preview mode for the target scene component. Wherein, the second preview operation can be an operation for a specific scene component, then the specific scene component is used as the target scene component, and a physical preview is performed on the target scene component, while no physical preview is performed on other scene components. For example, with reference to Figures 5A and 6C above, when the user selects the round low table scene component 501, a physical preview control 502 for the round low table scene component 501 is provided, and the user can perform a second preview operation through the physical preview control 502 (such as triggering the physical preview control 502, and then performing a second selection operation through the physical preview mode selection control 601), triggering the display of the surface or filling body of the target virtual collision object 602 corresponding to the round low table scene component 501 in the second physical preview mode.
[0105] In one embodiment, in response to a second preview operation targeting the entire game editing scene, at least a scene component in the current field of view within the game editing scene may be used as a target scene component, and a second physical preview mode among multiple physical preview modes may be determined as the current physical preview mode for the target scene component. The second preview operation may not target a specific scene component, but rather target the entire game editing scene. In response to this second preview operation, the scene component in the current field of view within the game editing scene may be used as the target scene component, or the current field of view may be expanded to a certain extent, with the scene component in the expanded area used as the target scene component. A physical preview is performed on the target scene component. For example, referring to Figures 5B and 6D above, a round low table scene component 501 and a spherical scene component 504 are present in the current field of view. If the user has not selected a specific scene component, a physical preview control 503 is provided for the global game editing scene. The user can perform a second preview operation through the physical preview control 503 (e.g., triggering the physical preview control 503 and then performing a second selection operation through the physical preview mode selection control 601), thereby triggering the display of the surface or filler of the target virtual collision object 602 corresponding to the round low table scene component 501, and the surface or filler of the target virtual collision object 603 corresponding to the spherical scene component 504, in the second physical preview mode. In one embodiment, in the second physical preview mode, when the user adjusts the viewing angle, the target scene components are updated as the current field of view changes, and the scene components in the current field of view are always used as the target scene components. For example, a scene component that was not originally in the current field of view but enters the current field of view as the viewing angle is adjusted can be added as a target scene component, and the surface or filler of its corresponding target virtual collision object can be displayed.
[0106] The above explains how users can trigger the second physics preview mode through interactive operations. In this mode, the surface of the target virtual collision object can be colored or filled with patterns or textures, or the entire 3D volume of the target virtual collision object can be colored or filled with patterns or textures, thereby displaying the 3D volume of the target virtual collision object, allowing users to intuitively see the collision physics information of the target scene components.
[0107] The difference between the first physical preview mode and the second physical preview mode can be further seen in Figures 7A and 7B. Figure 7A shows the outlines of the virtual collision objects corresponding to the three scene components of a sphere, a hemispherical shell, and a hemisphere in the first physical preview mode. Figure 7B shows the surfaces of the virtual collision objects corresponding to the three scene components of a sphere, a hemispherical shell, and a hemisphere in the second physical preview mode. It can be seen that in the first physical preview mode, more detailed graphic composition information can be seen, such as the boundary lines of each triangular facet, so that the user can intuitively understand the physical structure of the target scene component and have a clearer understanding of the resource usage of the target scene component. In the second physical preview mode, each surface of the target virtual collision object is colored and displayed. Compared with the first physical preview mode, such fine outlines are not displayed. The entire target virtual collision object is reflected as a three-dimensional entity. The user can more intuitively see its three-dimensional shape and thus perceive the collision area of the target scene component.
[0108] It should be understood that this exemplary embodiment is not limited to the above-mentioned two physical preview modes. More different physical preview modes can be set as needed to display different physical information or different forms of the target virtual collision object. For example, a third physical preview mode can be set, and in response to a third preview operation, the third physical preview mode can be determined as the current physical preview mode to display the internal key points of the target virtual collision object (such as the center of gravity, the connection points between different internal parts, etc.); or, a fourth physical preview mode can be set, and in response to a fourth preview operation, the fourth physical preview mode can be determined as the current physical preview mode to display the deformation model corresponding to the target scene component to reflect the effect of the target scene component being deformed by the collision.
[0109] In one embodiment, the game editing preview method may further include the following steps:
[0110] Hide the target scene component when displaying the surface or filler volume of the target virtual collision object corresponding to the target scene component.
[0111] Since the surface or filler of the target virtual collision object is displayed in the second physical preview mode, visual occlusion will occur for the target scene component. In order to simplify the screen of the game editing scene, the target scene component is hidden so that the user can see the target virtual collision object more clearly.
[0112] In one embodiment, when exiting the second physical preview mode, the hidden target scene component may be restored to display.
[0113] In one embodiment, the above-mentioned display of the surface or filling volume of the target virtual collision object corresponding to the target scene component may include the following steps:
[0114] Determine the target color based on the physical type of the target scene component;
[0115] Displays the target virtual collision object's surface or fill in the target color.
[0116] The physical type of the target scene component can be found in the description above. The target color is determined based on the physical type of the target scene component, and the surface or 3D volume of the target virtual collision object is dyed with the target color to display the surface or fill volume in the target color. This allows users to intuitively distinguish scene components of different physical types by color in the second physics preview mode.
[0117] In one embodiment, before displaying the outline of the target virtual collision object corresponding to the target scene component, or displaying the surface or filler of the target virtual collision object corresponding to the target scene component, the game editing preview method may further include the following steps:
[0118] Get the target virtual collision object corresponding to the target scene component according to the physical parameters of the target scene component.
[0119] Among them, the physical parameters are physical-related information about the scene components, such as physical complexity, physical type, etc. As shown in Figure 8, the user can set physical parameters such as "no physics", "simple physics", "complex physics", and "bounding box physics" for the target scene component to affect the fineness and complexity of the target virtual collision object. Exemplarily, if the physical parameter of the target scene component is "no physics", the corresponding target virtual collision object is empty; if the physical parameter of the target scene component is "simple physics", the corresponding target virtual collision object is a simple shape; if the physical parameter of the target scene component is "complex physics", the corresponding target virtual collision object is a complex shape, and so on. Therefore, according to the physical parameters of the target scene component, the target virtual collision object corresponding to the physical parameters can be obtained.
[0120] In one embodiment, the above-mentioned obtaining the target virtual collision object corresponding to the target scene component according to the physical parameters of the target scene component may include the following steps:
[0121] According to the physical parameters of the target scene component, the target virtual collision object corresponding to the target scene component is read from the physical resource path corresponding to the physical parameters.
[0122] Among them, for the target scene component, target virtual collision objects corresponding to different physical parameters can be provided in advance (such as pre-edited by the developer) and stored in different physical resource paths. In the game editing scene, when the user sets the physical parameters, the data of the target virtual collision object can be read from the physical resource path corresponding to the physical parameters, thereby generating the target virtual collision object in the game editing scene. Exemplarily, if the user switches the physical parameters in the first or second physical preview mode, the target virtual collision objects under different physical resource paths are quickly switched and displayed in the game editing scene, so that the user can compare the collision information under different physical parameters. In this way, there is no need to generate the target virtual collision object from scratch in the game editing scene, which is conducive to improving editing efficiency and user experience.
[0123] In one embodiment, the above-mentioned obtaining the target virtual collision object corresponding to the target scene component according to the physical parameters of the target scene component may include the following steps:
[0124] If the physical parameters of the multiple target scene components are the first parameters, a three-dimensional volume surrounding the multiple target scene components is generated as a target virtual collision object corresponding to the multiple target scene components.
[0125] As shown in reference figure 8, when multiple scene components are selected as target scene components, the physical parameters of these target scene components can be set to "bounding box physics" (i.e., the first parameter) to trigger the generation of a three-dimensional body surrounding these target scene components as the target virtual collision object corresponding to these target scene components. Under the first parameter, the multiple target scene components are regarded as a whole to generate corresponding target virtual collision objects, which can be in the shape of a rectangular bounding box, etc., or can be the smallest three-dimensional body that surrounds all target scene components, or can be a three-dimensional body after the smallest three-dimensional body is appropriately enlarged (such as 1.1 times enlarged), etc. By setting the first parameter, batch physical parameter setting of multiple target scene components is realized, and compared with the case where a target virtual collision object is generated separately for each target scene component, resource usage can be reduced.
[0126] In one embodiment, the above-mentioned obtaining the target virtual collision object corresponding to the target scene component according to the physical parameters of the target scene component may include the following steps:
[0127] If the physical parameter of the target scene component is the second parameter, then obtain the target virtual collision object corresponding to the target scene component formed by the combination of M basic graphic elements;
[0128] If the physical parameter of the target scene component is the third parameter, then obtain the target virtual collision object corresponding to the target scene component formed by the combination of N basic graphic elements; M is greater than N.
[0129] Among them, the second parameter and the third parameter are two parameters with different physical complexities, and the physical complexity corresponding to the second parameter is higher than the physical complexity corresponding to the first parameter. As shown in reference figure 8, the second parameter can be "complex physics" and the third parameter can be "simple physics". Under the setting of "complex physics", the target virtual collision object corresponding to the target scene component is composed of M basic graphic elements. Basic graphic elements can be patches (such as triangular patches, quadrilateral patches), basic shapes (such as cuboids, spheres, cylinders), etc. The more basic graphic elements the target virtual collision object contains, the higher its complexity and precision, and the more conducive it is to achieving realistic physical effects, but the corresponding resource occupation is also more. Under the setting of "simple physics", the target virtual collision object corresponding to the target scene component is composed of N basic graphic elements, which is less than the M basic graphic elements under "complex physics". Users can make flexible settings based on their own needs and the overall situation of the game editing scene. For example, for scene components that have less interaction with player characters in the game, their physical parameters can be set to the third parameter to reduce resource usage. For scene components that occupy important positions in the game and interact more with player characters, their physical parameters can be set to the second parameter to enhance the physical game effect.
[0130] In one embodiment, the game editing preview method may further include the following steps:
[0131] In a case where an outline of a target virtual collision object corresponding to the target scene component is displayed, or a surface or a filling volume of the target virtual collision object corresponding to the target scene component is displayed, responding to an operation of changing a physical parameter of the target scene component, and re-acquiring the target virtual collision object corresponding to the target scene component according to the changed physical parameter;
[0132] Displays the outline of the recovered target virtual collider, or displays the surface or filled volume of the recovered target virtual collider.
[0133] For example, the physical parameter of a target scene component is set to the second parameter, and in the first physical preview mode, the outline of the corresponding target virtual collision object is displayed, or in the second physical preview mode, the surface or filler of the target virtual collision object is displayed. If the user changes the physical parameter of the target scene component to the third parameter at this time, the target virtual collision object can be retrieved from the corresponding physical resource path according to the third parameter, and the outline, surface or filler of the retrieved target virtual collision object can be rendered and redisplayed in the game editing scene. This achieves the effect that the user can switch the physical parameters in the physical preview mode and simultaneously see the switched target virtual collision object.
[0134] In one embodiment, the game editing preview method may further include the following steps:
[0135] Provides multiple setting options for the physical parameters of the target scene components and displays the resource usage value corresponding to each setting option.
[0136] As shown in reference figure 8, if the user sets the physical parameters, multiple setting options can be provided, including "no physics", "simple physics", "complex physics", "bounding box physics", etc., and the resource usage value corresponding to each setting option is provided, such as the resource usage value corresponding to "no physics" is 0, the resource usage value corresponding to "simple physics" is 15, and so on. This makes it easier for users to accurately grasp the resource usage of setting scene components and game editing scenes when editing. In one embodiment, the resource usage value corresponding to each setting option displayed above can be a relative resource usage value, such as the resource usage value relative to the parameter "no physics". This makes it easier for users to compare the resource usage of different physical parameters.
[0137] In one embodiment, the game editing preview method may further include the following steps:
[0138] When the outline of the target virtual collision object corresponding to the target scene component is displayed, or the surface or filler body of the target virtual collision object corresponding to the target scene component is displayed, the preset interface in the game editing scene is closed.
[0139] The preset interface may be a setting interface for a game editing scene, an editing interface for a scene component, an operation control interface, etc. In the first or second physical preview mode, the preset interface is closed so that the graphical user interface mainly displays the target virtual collision object for easy observation by the user.
[0140] In one embodiment, the game editing preview method may further include the following steps:
[0141] In response to the preview end operation, the outline of the target virtual collision object is removed or the surface or filling body of the target virtual collision object is removed, and the preset interface that was closed when the outline of the target virtual collision object or the surface or filling body of the target virtual collision object was displayed is reopened.
[0142] The preview end operation can be performed by closing the physical preview controls 502 and 503, or by providing a dedicated close control in the graphical user interface in physical preview mode, through which the user can end the preview. When the user ends the preview, the physical preview mode is exited, the displayed content of the target virtual collision object (such as the outline, or the surface or filler) is removed, and the preset interface that was closed when entering the physical preview mode is reopened. In other words, the editing state is restored to the state before entering the physical preview mode, allowing the user to conveniently continue editing the previously edited content.
[0143] In one embodiment, the game editing preview method may further include the following steps:
[0144] When displaying the outline of the target virtual collision object corresponding to the target scene component, or displaying the surface or filling volume of the target virtual collision object corresponding to the target scene component, respond to the editing operation on the target virtual collision object and edit the target scene component according to the editing operation.
[0145] Among them, editing operations on the target virtual collision object may include but are not limited to: moving operations, rotating operations, scaling operations, property setting operations, etc. It should be noted that in the first physical preview mode, the user's editing operations on the outline of the target virtual collision object can be regarded as editing operations on the target virtual collision object. For example, when the user clicks on the outline to move it, the target virtual collision object can be moved as a whole. The user's editing operations on the target virtual collision object can act on the target scene component. For example, when the user moves the target virtual collision object, the target scene component can be moved synchronously. After exiting the physical preview mode, the moved target scene component can be displayed. This makes it convenient for the user to edit the target scene component from different angles in the physical preview mode. For example, in the physical preview mode, the user can see the collision area of the target scene component. If the collision area feels too small, the user can directly zoom in, which makes it easier to enlarge it to the desired level.
[0146] In one embodiment, it can also be set that in the physical preview mode, the target virtual collision object is in a non-editable state, for example, the target virtual collision object cannot be moved, rotated, scaled, etc., to avoid the user from performing erroneous editing operations.
[0147] In one embodiment, after performing relevant operations for establishing or publishing a game scene through a terminal device (such as clicking the "Publish Map" control in Figure 4), game scene information corresponding to the game editing scene can be generated. The game scene information can be saved in a preset location, which can be a map file. The map file can not only save the game scene information, but also save other map information (including but not limited to screenshots, map names, logs, etc.). After the map file saves the game scene information, it can be uploaded to the server. After the server reviews and approves it, the game scene generated by the game scene information can be published in the preset map pool, so that the terminal device connected to the server can download the corresponding game scene information from the server, and generate the corresponding game scene according to the downloaded game scene information through the game program, and then experience the game in the game scene. This method can publish the game scene information in the game editor and be experienced by other players, thereby realizing a fast UGC (User Generated Content) function.
[0148] The exemplary embodiment of the present disclosure further provides a game editing and previewing device. Referring to FIG9 , the game editing and previewing device 900 may include the following program modules:
[0149] The game editing scene display processing module 910 is configured to display the game editing scene in the graphical user interface provided by the running game program; the game editing scene includes one or more scene components; the scene components are configured to generate corresponding virtual models in the game running scene;
[0150] The physical preview processing module 920 is configured to execute a response to a first preview operation, determine a first physical preview mode among multiple physical preview modes as the current physical preview mode for the target scene component, and display the outline of a target virtual collision object corresponding to the target scene component; wherein the target scene component is a scene component in the game editing scene; the target virtual collision object is configured to detect a virtual object that collides with the target scene component.
[0151] In one embodiment, the physical preview processing module 920 is further configured to execute: when displaying the outline of the target virtual collision object corresponding to the target scene component, continuously display the target scene component.
[0152] In one embodiment, displaying the contour line of the target virtual collision object corresponding to the target scene component includes: obtaining the basic shape of the target virtual collision object, determining the contour line of the target virtual collision object based on the feature line pre-configured for the basic shape, and displaying the contour line of the target virtual collision object.
[0153] In one embodiment, the game editing and previewing device 900 may further include a collision detection processing module, which is configured to perform the following: detecting the distance or coordinate difference between the virtual object and the basic shape, and comparing it with the size of the basic shape, determining whether the virtual object is in contact with the basic shape based on the comparison result, and determining whether the virtual object in contact with the basic shape collides with the target scene component.
[0154] In one embodiment, displaying the outline of the target virtual collision object corresponding to the target scene component includes: obtaining the facets constituting the target virtual collision object, determining the outline of the target virtual collision object according to the boundary lines of the facets, and displaying the outline of the target virtual collision object.
[0155] In one embodiment, the game editing and previewing device 900 may further include a collision detection processing module configured to perform: judging whether the virtual object is in contact with the patch based on the coordinates of the virtual object and the coordinates of the patch, and determining whether the virtual object in contact with the patch collides with the target scene component.
[0156] In one embodiment, the contour line of the target virtual collision object includes a boundary line on each surface of the target virtual collision object.
[0157] In one embodiment, in response to a first preview operation, determining a first physical preview mode among multiple physical preview modes as a current physical preview mode for a target scene component includes: in response to a first preview operation for a specific scene component in a game editing scene, taking the specific scene component as a target scene component, determining the first physical preview mode among multiple physical preview modes as the current physical preview mode for the target scene component.
[0158] In one embodiment, in response to a first preview operation, determining a first physical preview mode among multiple physical preview modes as a current physical preview mode for a target scene component includes: in response to a first preview operation for a global game editing scene, at least taking a scene component in a current field of view area in the game editing scene as a target scene component, and determining the first physical preview mode among multiple physical preview modes as the current physical preview mode for the target scene component.
[0159] In one embodiment, the first preview operation includes a physical preview trigger operation and a first selection operation; in response to the first preview operation, the first physical preview mode among multiple physical preview modes is determined as the current physical preview mode for the target scene component, and the outline of the target virtual collision object corresponding to the target scene component is displayed, including: in response to the physical preview trigger operation, providing a physical preview mode selection control; in response to the first selection operation on the physical preview mode selection control, the first physical preview mode among multiple physical preview modes is determined as the current physical preview mode for the target scene component, and the outline of the target virtual collision object corresponding to the target scene component is displayed.
[0160] In one embodiment, the physical preview processing module 920 is further configured to perform: in response to a second preview operation, determine a second physical preview mode among multiple physical preview modes as the current physical preview mode for the target scene component, and display the surface or filling body of the target virtual collision object corresponding to the target scene component.
[0161] In one embodiment, the second preview operation includes a physical preview trigger operation and a second selection operation; in response to the second preview operation, the second physical preview mode among multiple physical preview modes is determined as the current physical preview mode for the target scene component, and the surface or filling body of the target virtual collision object corresponding to the target scene component is displayed, including: in response to the physical preview trigger operation, a physical preview mode selection control is provided; in response to the second selection operation on the physical preview mode selection control, the second physical preview mode among multiple physical preview modes is determined as the current physical preview mode for the target scene component, and the surface or filling body of the target virtual collision object corresponding to the target scene component is displayed.
[0162] In one embodiment, the physical preview processing module 920 is further configured to execute: when displaying the surface or filler volume of the target virtual collision object corresponding to the target scene component, hiding the target scene component.
[0163] In one embodiment, displaying the surface or filling body of the target virtual collision object corresponding to the target scene component includes: determining a target color according to the physical type of the target scene component; and displaying the surface or filling body of the target virtual collision object using the target color.
[0164] In one embodiment, displaying the outline of the target virtual collision object corresponding to the target scene component includes: determining a target color according to the physical type of the target scene component; and displaying the outline of the target virtual collision object using the target color.
[0165] In one embodiment, the physical preview processing module 920 is further configured to execute: before displaying the outline of the target virtual collision object corresponding to the target scene component, or displaying the surface or filling body of the target virtual collision object corresponding to the target scene component, obtaining the target virtual collision object corresponding to the target scene component according to the physical parameters of the target scene component.
[0166] In one embodiment, obtaining a target virtual collision object corresponding to the target scene component according to the physical parameters of the target scene component includes: reading the target virtual collision object corresponding to the target scene component from a physical resource path corresponding to the physical parameters according to the physical parameters of the target scene component.
[0167] In one embodiment, a target virtual collision object corresponding to the target scene component is obtained according to the physical parameters of the target scene component, including: if the physical parameters of multiple target scene components are first parameters, a three-dimensional body surrounding the multiple target scene components is generated as the target virtual collision object corresponding to the multiple target scene components.
[0168] In one embodiment, a target virtual collision object corresponding to the target scene component is obtained according to the physical parameters of the target scene component, including: if the physical parameter of the target scene component is a second parameter, then the target virtual collision object corresponding to the target scene component formed by a combination of M basic graphic elements is obtained; if the physical parameter of the target scene component is a third parameter, then the target virtual collision object corresponding to the target scene component formed by a combination of N basic graphic elements is obtained; M is greater than N.
[0169] In one embodiment, the physical preview processing module 920 is further configured to perform: in response to an operation of changing the physical parameters of the target scene component, while displaying the outline of the target virtual collision object corresponding to the target scene component, or displaying the surface or filling body of the target virtual collision object corresponding to the target scene component, re-acquire the target virtual collision object corresponding to the target scene component according to the changed physical parameters; display the outline of the re-acquired target virtual collision object, or display the surface or filling body of the re-acquired target virtual collision object.
[0170] In one embodiment, the game editing scene display processing module 910 is further configured to perform: providing multiple setting options for physical parameters of the target scene component, and displaying the resource usage value corresponding to each setting option.
[0171] In one embodiment, the physical preview processing module 920 is further configured to execute: when displaying the outline of the target virtual collision object corresponding to the target scene component, or displaying the surface or filling body of the target virtual collision object corresponding to the target scene component, close the preset interface in the game editing scene.
[0172] In one embodiment, the physical preview processing module 920 is further configured to perform: in response to the preview end operation, remove the outline of the target virtual collision object or remove the surface or filling body of the target virtual collision object, and reopen the preset interface that was closed when the outline of the target virtual collision object was displayed or the surface or filling body of the target virtual collision object was displayed.
[0173] In one embodiment, the physical preview processing module 920 is further configured to perform: while displaying the outline of the target virtual collision object corresponding to the target scene component, or displaying the surface or filling body of the target virtual collision object corresponding to the target scene component, responding to an editing operation on the target virtual collision object, and editing the target scene component according to the editing operation.
[0174] The specific details of each part of the above-mentioned device have been described in detail in the implementation method part. The undisclosed details can be found in the implementation method part, so they will not be repeated here.
[0175] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium, which can be implemented in the form of a program product, comprising program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute (more specifically, enable the processor of the electronic device to execute) the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification, such as the game editing preview method in the exemplary embodiment, which includes the following steps: displaying a game editing scene in a graphical user interface provided by a running game program; the game editing scene includes one or more scene components; the scene component is configured to generate a corresponding virtual model in the game running scene; in response to a first preview operation, determining a first physical preview mode among multiple physical preview modes as the current physical preview mode for a target scene component, and displaying the outline of a target virtual collision object corresponding to the target scene component; wherein the target scene component is a scene component in the game editing scene; the target virtual collision object is configured to detect a virtual object that collides with the target scene component.
[0176] In one embodiment, the method further includes: continuously displaying the target scene component when displaying the outline of the target virtual collision object corresponding to the target scene component.
[0177] In one embodiment, displaying the contour line of the target virtual collision object corresponding to the target scene component includes: obtaining the basic shape of the target virtual collision object, determining the contour line of the target virtual collision object based on the feature line pre-configured for the basic shape, and displaying the contour line of the target virtual collision object.
[0178] In one embodiment, the method further includes: detecting the distance or coordinate difference between the virtual object and the basic shape, and comparing it with the size of the basic shape, judging whether the virtual object is in contact with the basic shape based on the comparison result, and determining whether the virtual object in contact with the basic shape collides with the target scene component.
[0179] In one embodiment, displaying the outline of the target virtual collision object corresponding to the target scene component includes: obtaining the facets constituting the target virtual collision object, determining the outline of the target virtual collision object according to the boundary lines of the facets, and displaying the outline of the target virtual collision object.
[0180] In one embodiment, the method further includes: determining whether the virtual object is in contact with the patch based on the coordinates of the virtual object and the coordinates of the patch, and determining whether the virtual object in contact with the patch collides with the target scene component.
[0181] In one embodiment, the contour line of the target virtual collision object includes a boundary line on each surface of the target virtual collision object.
[0182] In one embodiment, in response to a first preview operation, determining a first physical preview mode among multiple physical preview modes as a current physical preview mode for a target scene component includes: in response to a first preview operation for a specific scene component in a game editing scene, taking the specific scene component as a target scene component, determining the first physical preview mode among multiple physical preview modes as the current physical preview mode for the target scene component.
[0183] In one embodiment, in response to a first preview operation, determining a first physical preview mode among multiple physical preview modes as a current physical preview mode for a target scene component includes: in response to a first preview operation for a global game editing scene, at least taking a scene component in a current field of view area in the game editing scene as a target scene component, and determining the first physical preview mode among multiple physical preview modes as the current physical preview mode for the target scene component.
[0184] In one embodiment, the first preview operation includes a physical preview trigger operation and a first selection operation; in response to the first preview operation, the first physical preview mode among multiple physical preview modes is determined as the current physical preview mode for the target scene component, and the outline of the target virtual collision object corresponding to the target scene component is displayed, including: in response to the physical preview trigger operation, providing a physical preview mode selection control; in response to the first selection operation on the physical preview mode selection control, the first physical preview mode among multiple physical preview modes is determined as the current physical preview mode for the target scene component, and the outline of the target virtual collision object corresponding to the target scene component is displayed.
[0185] In one embodiment, the method further includes: in response to a second preview operation, determining a second physical preview mode among the multiple physical preview modes as a current physical preview mode for the target scene component, and displaying a surface or a filling volume of a target virtual collision object corresponding to the target scene component.
[0186] In one embodiment, the second preview operation includes a physical preview trigger operation and a second selection operation; in response to the second preview operation, the second physical preview mode among multiple physical preview modes is determined as the current physical preview mode for the target scene component, and the surface or filling body of the target virtual collision object corresponding to the target scene component is displayed, including: in response to the physical preview trigger operation, a physical preview mode selection control is provided; in response to the second selection operation on the physical preview mode selection control, the second physical preview mode among multiple physical preview modes is determined as the current physical preview mode for the target scene component, and the surface or filling body of the target virtual collision object corresponding to the target scene component is displayed.
[0187] In one embodiment, the method further includes: hiding the target scene component when displaying the surface or filler volume of the target virtual collision object corresponding to the target scene component.
[0188] In one embodiment, displaying the surface or filling body of the target virtual collision object corresponding to the target scene component includes: determining a target color according to the physical type of the target scene component; and displaying the surface or filling body of the target virtual collision object using the target color.
[0189] In one embodiment, displaying the outline of the target virtual collision object corresponding to the target scene component includes: determining a target color according to the physical type of the target scene component; and displaying the outline of the target virtual collision object using the target color.
[0190] In one embodiment, before displaying the outline of the target virtual collision object corresponding to the target scene component, or displaying the surface or filling body of the target virtual collision object corresponding to the target scene component, the method also includes: obtaining the target virtual collision object corresponding to the target scene component according to the physical parameters of the target scene component.
[0191] In one embodiment, obtaining a target virtual collision object corresponding to the target scene component according to the physical parameters of the target scene component includes: reading the target virtual collision object corresponding to the target scene component from a physical resource path corresponding to the physical parameters according to the physical parameters of the target scene component.
[0192] In one embodiment, a target virtual collision object corresponding to the target scene component is obtained according to the physical parameters of the target scene component, including: if the physical parameters of multiple target scene components are first parameters, a three-dimensional body surrounding the multiple target scene components is generated as the target virtual collision object corresponding to the multiple target scene components.
[0193] In one embodiment, a target virtual collision object corresponding to the target scene component is obtained according to the physical parameters of the target scene component, including: if the physical parameter of the target scene component is a second parameter, then the target virtual collision object corresponding to the target scene component formed by a combination of M basic graphic elements is obtained; if the physical parameter of the target scene component is a third parameter, then the target virtual collision object corresponding to the target scene component formed by a combination of N basic graphic elements is obtained; M is greater than N.
[0194] In one embodiment, the method also includes: in response to an operation of changing the physical parameters of the target scene component, while displaying the outline of the target virtual collision object corresponding to the target scene component, or displaying the surface or filling body of the target virtual collision object corresponding to the target scene component, re-acquiring the target virtual collision object corresponding to the target scene component according to the changed physical parameters; displaying the outline of the re-acquired target virtual collision object, or displaying the surface or filling body of the re-acquired target virtual collision object.
[0195] In one embodiment, the method further includes: providing multiple setting options for physical parameters of the target scene component, and displaying a resource usage value corresponding to each setting option.
[0196] In one embodiment, the method further includes: closing the preset interface in the game editing scene while displaying the outline of the target virtual collision object corresponding to the target scene component, or displaying the surface or filling body of the target virtual collision object corresponding to the target scene component.
[0197] In one embodiment, the method also includes: in response to the preview end operation, removing the outline of the target virtual collision object or removing the surface or filling body of the target virtual collision object, and reopening the preset interface that was closed when the outline of the target virtual collision object was displayed or the surface or filling body of the target virtual collision object was displayed.
[0198] In one embodiment, the method also includes: while displaying the outline of the target virtual collision object corresponding to the target scene component, or displaying the surface or filling body of the target virtual collision object corresponding to the target scene component, responding to an editing operation on the target virtual collision object, and editing the target scene component according to the editing operation.
[0199] The above method is implemented based on a computer-readable storage medium. On the one hand, by providing a physical preview mode and displaying the target virtual collision object corresponding to the target scene component, the user can intuitively understand the physical information such as the collision area of the target scene component, which is conducive to accurate editing by the user. For example, using the target virtual collision object as a reference, the relative position relationship of multiple scene components can be accurately edited to avoid overlap. On the other hand, providing multiple physical preview modes allows the user to flexibly choose to observe different information of the target virtual collision object. For example, in the first physical preview mode, the user can see the outline of the target virtual collision object. This allows for a clearer understanding of the structural composition and resource usage of the target virtual collision object, facilitates the reasonable allocation of resource usage of scene components, and improves editing efficiency.
[0200] In an alternative embodiment, the program product can be implemented as a portable compact disc read-only memory (CD-ROM) and includes program code, and can be run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0201] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0202] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0203] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0204] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0205] The exemplary embodiments of the present disclosure further provide an electronic device, such as the terminal device 110 or the server 120 described above. The electronic device may include a processor and a memory. The memory stores executable instructions for the processor, such as program code. The processor executes the executable instructions to perform the method of the exemplary embodiment. The electronic device may also include a display for displaying a graphical user interface.
[0206] 10 , an electronic device is exemplarily described in the form of a general-purpose computing device. It should be understood that the electronic device 1000 shown in FIG10 is merely an example and should not limit the functionality and scope of use of the embodiments of the present disclosure.
[0207] As shown in FIG. 10 , the electronic device 1000 may include a processor 1010 , a memory 1020 , a bus 1030 , an I / O (input / output) interface 1040 , a network adapter 1050 , and a display 1060 .
[0208] Memory 1020 may include volatile memory, such as RAM 1021 and cache unit 1022, and non-volatile memory, such as ROM 1023. Memory 1020 may also include one or more program modules 1024. Such program modules 1024 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. For example, program modules 1024 may include the modules described above.
[0209] The processor 1010 may include one or more processing units, for example: the processor 1010 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc.
[0210] The processor 1010 can be used to execute executable instructions stored in the memory 1020, such as the game editing preview method in this exemplary embodiment, which includes the following steps: displaying a game editing scene in a graphical user interface provided by a running game program; the game editing scene includes one or more scene components; the scene component is configured to generate a corresponding virtual model in the game running scene; in response to a first preview operation, determining a first physical preview mode among multiple physical preview modes as the current physical preview mode for the target scene component, and displaying the outline of a target virtual collision object corresponding to the target scene component; wherein the target scene component is a scene component in the game editing scene; the target virtual collision object is configured to detect a virtual object that collides with the target scene component.
[0211] In one embodiment, the method further includes: continuously displaying the target scene component when displaying the outline of the target virtual collision object corresponding to the target scene component.
[0212] In one embodiment, displaying the contour line of the target virtual collision object corresponding to the target scene component includes: obtaining the basic shape of the target virtual collision object, determining the contour line of the target virtual collision object based on the feature line pre-configured for the basic shape, and displaying the contour line of the target virtual collision object.
[0213] In one embodiment, the method further includes: detecting the distance or coordinate difference between the virtual object and the basic shape, and comparing it with the size of the basic shape, judging whether the virtual object is in contact with the basic shape based on the comparison result, and determining whether the virtual object in contact with the basic shape collides with the target scene component.
[0214] In one embodiment, displaying the outline of the target virtual collision object corresponding to the target scene component includes: obtaining the facets constituting the target virtual collision object, determining the outline of the target virtual collision object according to the boundary lines of the facets, and displaying the outline of the target virtual collision object.
[0215] In one embodiment, the method further includes: determining whether the virtual object is in contact with the patch based on the coordinates of the virtual object and the coordinates of the patch, and determining whether the virtual object in contact with the patch collides with the target scene component.
[0216] In one embodiment, the contour line of the target virtual collision object includes a boundary line on each surface of the target virtual collision object.
[0217] In one embodiment, in response to a first preview operation, determining a first physical preview mode among multiple physical preview modes as a current physical preview mode for a target scene component includes: in response to a first preview operation for a specific scene component in a game editing scene, taking the specific scene component as a target scene component, determining the first physical preview mode among multiple physical preview modes as the current physical preview mode for the target scene component.
[0218] In one embodiment, in response to a first preview operation, determining a first physical preview mode among multiple physical preview modes as a current physical preview mode for a target scene component includes: in response to a first preview operation for a global game editing scene, at least taking a scene component in a current field of view area in the game editing scene as a target scene component, and determining the first physical preview mode among multiple physical preview modes as the current physical preview mode for the target scene component.
[0219] In one embodiment, the first preview operation includes a physical preview trigger operation and a first selection operation; in response to the first preview operation, the first physical preview mode among multiple physical preview modes is determined as the current physical preview mode for the target scene component, and the outline of the target virtual collision object corresponding to the target scene component is displayed, including: in response to the physical preview trigger operation, providing a physical preview mode selection control; in response to the first selection operation on the physical preview mode selection control, the first physical preview mode among multiple physical preview modes is determined as the current physical preview mode for the target scene component, and the outline of the target virtual collision object corresponding to the target scene component is displayed.
[0220] In one embodiment, the method further includes: in response to a second preview operation, determining a second physical preview mode among the multiple physical preview modes as a current physical preview mode for the target scene component, and displaying a surface or a filling volume of a target virtual collision object corresponding to the target scene component.
[0221] In one embodiment, the second preview operation includes a physical preview trigger operation and a second selection operation; in response to the second preview operation, the second physical preview mode among multiple physical preview modes is determined as the current physical preview mode for the target scene component, and the surface or filling body of the target virtual collision object corresponding to the target scene component is displayed, including: in response to the physical preview trigger operation, a physical preview mode selection control is provided; in response to the second selection operation on the physical preview mode selection control, the second physical preview mode among multiple physical preview modes is determined as the current physical preview mode for the target scene component, and the surface or filling body of the target virtual collision object corresponding to the target scene component is displayed.
[0222] In one embodiment, the method further includes: hiding the target scene component when displaying the surface or filler volume of the target virtual collision object corresponding to the target scene component.
[0223] In one embodiment, displaying the surface or filling body of the target virtual collision object corresponding to the target scene component includes: determining a target color according to the physical type of the target scene component; and displaying the surface or filling body of the target virtual collision object using the target color.
[0224] In one embodiment, displaying the outline of the target virtual collision object corresponding to the target scene component includes: determining a target color according to the physical type of the target scene component; and displaying the outline of the target virtual collision object using the target color.
[0225] In one embodiment, before displaying the outline of the target virtual collision object corresponding to the target scene component, or displaying the surface or filling body of the target virtual collision object corresponding to the target scene component, the method also includes: obtaining the target virtual collision object corresponding to the target scene component according to the physical parameters of the target scene component.
[0226] In one embodiment, obtaining a target virtual collision object corresponding to the target scene component according to the physical parameters of the target scene component includes: reading the target virtual collision object corresponding to the target scene component from a physical resource path corresponding to the physical parameters according to the physical parameters of the target scene component.
[0227] In one embodiment, a target virtual collision object corresponding to the target scene component is obtained according to the physical parameters of the target scene component, including: if the physical parameters of multiple target scene components are first parameters, a three-dimensional body surrounding the multiple target scene components is generated as the target virtual collision object corresponding to the multiple target scene components.
[0228] In one embodiment, a target virtual collision object corresponding to the target scene component is obtained according to the physical parameters of the target scene component, including: if the physical parameter of the target scene component is a second parameter, then the target virtual collision object corresponding to the target scene component formed by a combination of M basic graphic elements is obtained; if the physical parameter of the target scene component is a third parameter, then the target virtual collision object corresponding to the target scene component formed by a combination of N basic graphic elements is obtained; M is greater than N.
[0229] In one embodiment, the method also includes: in response to an operation of changing the physical parameters of the target scene component, while displaying the outline of the target virtual collision object corresponding to the target scene component, or displaying the surface or filling body of the target virtual collision object corresponding to the target scene component, re-acquiring the target virtual collision object corresponding to the target scene component according to the changed physical parameters; displaying the outline of the re-acquired target virtual collision object, or displaying the surface or filling body of the re-acquired target virtual collision object.
[0230] In one embodiment, the method further includes: providing multiple setting options for physical parameters of the target scene component, and displaying a resource usage value corresponding to each setting option.
[0231] In one embodiment, the method further includes: closing the preset interface in the game editing scene while displaying the outline of the target virtual collision object corresponding to the target scene component, or displaying the surface or filling body of the target virtual collision object corresponding to the target scene component.
[0232] In one embodiment, the method also includes: in response to the preview end operation, removing the outline of the target virtual collision object or removing the surface or filling body of the target virtual collision object, and reopening the preset interface that was closed when the outline of the target virtual collision object was displayed or the surface or filling body of the target virtual collision object was displayed.
[0233] In one embodiment, the method also includes: while displaying the outline of the target virtual collision object corresponding to the target scene component, or displaying the surface or filling body of the target virtual collision object corresponding to the target scene component, responding to an editing operation on the target virtual collision object, and editing the target scene component according to the editing operation.
[0234] The above method is implemented based on electronic device 1000. On the one hand, by providing a physical preview mode and displaying the target virtual collision object corresponding to the target scene component, the user can intuitively understand the physical information such as the collision area of the target scene component, which is conducive to the user's accurate editing. For example, using the target virtual collision object as a reference, the user can accurately edit the relative position relationship of multiple scene components to avoid overlap. On the other hand, providing multiple physical preview modes allows the user to flexibly choose to observe different information of the target virtual collision object. For example, in the first physical preview mode, the user can see the outline of the target virtual collision object. This allows for a clearer understanding of the structural composition and resource usage of the target virtual collision object, facilitates the reasonable allocation of resource usage of scene components, and improves editing efficiency.
[0235] The bus 1030 is used to realize the connection between different components of the electronic device 1000 and may include a data bus, an address bus, and a control bus.
[0236] The electronic device 1000 can communicate with one or more external devices 1100 (eg, a keyboard, a mouse, an external controller, etc.) through the I / O interface 1040 .
[0237] The electronic device 1000 can communicate with one or more networks via the network adapter 1050. For example, the network adapter 1050 can provide mobile communication solutions such as 3G / 4G / 5G, or wireless communication solutions such as wireless LAN, Bluetooth, and near-field communication. The network adapter 1050 can communicate with other modules of the electronic device 1000 via the bus 1030.
[0238] The electronic device 1000 can display a graphical user interface through the display 1060, such as displaying a game editing scene.
[0239] Although not shown in FIG. 10 , other hardware and / or software modules may be provided in the electronic device 1000 , including but not limited to microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0240] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0241] It will be understood by those skilled in the art that various aspects of the present disclosure can be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation method combining hardware and software aspects, which can be collectively referred to as "circuit", "module" or "system" here. After considering the specification and practicing the invention disclosed herein, those skilled in the art will easily think of other embodiments of the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The description and implementation methods are to be regarded as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims. It should be understood that the present disclosure is not limited to the precise structure described above and shown in the drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A game editing preview method, the method comprising: Displaying a game editing scene in a graphical user interface provided by a running game program; The game editing scene includes one or more scene components; The scene components are configured to generate corresponding virtual models in a game running scene; In response to a first preview operation, determining a first physical preview mode among a plurality of physical preview modes as the current physical preview mode for a target scene component, and displaying a contour line of a target virtual collision object corresponding to the target scene component; wherein, the target scene component is a scene component in the game editing scene; the target virtual collision object is configured to detect virtual objects that collide with the target scene component.
2. The method according to claim 1, wherein The method further includes: When displaying the contour line of the target virtual collision object corresponding to the target scene component, continuously displaying the target scene component.
3. The method according to claim 1, wherein The displaying the contour line of the target virtual collision object corresponding to the target scene component includes: Obtaining a basic shape that makes up the target virtual collision object, determining the contour line of the target virtual collision object according to feature lines pre-configured for the basic shape, and displaying the contour line of the target virtual collision object.
4. The method according to claim 3, wherein The method further includes: Detecting the distance or coordinate difference between a virtual object and the basic shape, comparing it with the size of the basic shape, and judging whether the virtual object contacts the basic shape according to the comparison result, and determining that the virtual object contacting the basic shape collides with the target scene component.
5. The method according to claim 1, wherein, The displaying the contour line of the target virtual collision object corresponding to the target scene component includes: Obtaining patches that make up the target virtual collision object, determining the contour line of the target virtual collision object according to the boundary lines of the patches, and displaying the contour line of the target virtual collision object.
6. The method according to claim 5, wherein, The method further includes: Judging whether a virtual object contacts a patch according to the coordinates of the virtual object and the coordinates of the patch, and determining that the virtual object contacting the patch collides with the target scene component.
7. The method according to claim 1, wherein The contour line of the target virtual collision object includes boundary lines on each surface of the target virtual collision object.
8. The method according to claim 1, wherein The responding to the first preview operation and determining the first physical preview mode among a plurality of physical preview modes as the current physical preview mode for the target scene component includes: Responding to a first preview operation for a specific scene component in the game editing scene, taking the specific scene component as the target scene component, and determining the first physical preview mode among a plurality of physical preview modes as the current physical preview mode for the target scene component.
9. The method according to claim 1, wherein The responding to the first preview operation and determining the first physical preview mode among a plurality of physical preview modes as the current physical preview mode for the target scene component includes: Responding to a first preview operation for the entire game editing scene, taking at least the scene components in the current viewing area of the game editing scene as the target scene components, and determining the first physical preview mode among a plurality of physical preview modes as the current physical preview mode for the target scene components.
10. The method according to claim 1, wherein, The first preview operation includes a physical preview trigger operation and a first selection operation; in response to the first preview operation, determining a first physical preview mode among multiple physical preview modes as the current physical preview mode for a target scene component, and displaying an outline of a target virtual collision object corresponding to the target scene component, includes: In response to the physical preview trigger operation, providing a physical preview mode selection control; In response to the first selection operation on the physical preview mode selection control, determining a first physical preview mode among multiple physical preview modes as the current physical preview mode for a target scene component, and displaying an outline of a target virtual collision object corresponding to the target scene component.
11. The method according to claim 1, wherein, The method further includes: In response to a second preview operation, determining a second physical preview mode among multiple physical preview modes as the current physical preview mode for a target scene component, and displaying a surface or a filled body of a target virtual collision object corresponding to the target scene component.
12. The method according to claim 11, wherein, The second preview operation includes a physical preview trigger operation and a second selection operation; in response to the second preview operation, determining a second physical preview mode among multiple physical preview modes as the current physical preview mode for a target scene component, and displaying a surface or a filled body of a target virtual collision object corresponding to the target scene component, includes: In response to the physical preview trigger operation, providing a physical preview mode selection control; In response to the second selection operation on the physical preview mode selection control, determining a second physical preview mode among multiple physical preview modes as the current physical preview mode for a target scene component, and displaying a surface or a filled body of a target virtual collision object corresponding to the target scene component.
13. The method according to claim 11, wherein, The method further includes: When displaying a surface or a filled body of a target virtual collision object corresponding to the target scene component, hiding the target scene component.
14. The method according to claim 11, wherein, The displaying a surface or a filled body of a target virtual collision object corresponding to the target scene component includes: Determining a target color according to the physical type of the target scene component; Displaying the surface or the filled body of the target virtual collision object with the target color.
15. The method according to claim 1, wherein The displaying an outline of a target virtual collision object corresponding to the target scene component includes: Determining a target color according to the physical type of the target scene component; Displaying the outline of the target virtual collision object with the target color.
16. The method according to any one of claims 1 to 15, wherein Before displaying an outline of a target virtual collision object corresponding to the target scene component, or displaying a surface or a filled body of a target virtual collision object corresponding to the target scene component, the method further includes: Obtaining a target virtual collision object corresponding to the target scene component according to the physical parameters of the target scene component.
17. The method according to claim 16, wherein The obtaining a target virtual collision object corresponding to the target scene component according to the physical parameters of the target scene component includes: Reading, according to the physical parameters of the target scene component, a target virtual collision object corresponding to the target scene component from a physical resource path corresponding to the physical parameters.
18. The method according to claim 16, wherein, The obtaining a target virtual collision object corresponding to the target scene component according to the physical parameters of the target scene component includes: If the physical parameters of multiple target scene components are the first parameter, a three-dimensional body surrounding the multiple target scene components is generated as the target virtual collision object corresponding to the multiple target scene components.
19. The method according to claim 16, wherein, The obtaining of the target virtual collision object corresponding to the target scene component according to the physical parameters of the target scene component includes: If the physical parameters of the target scene component are the second parameter, the target virtual collision object corresponding to the target scene component formed by combining M basic graphic elements is obtained; If the physical parameters of the target scene component are the third parameter, the target virtual collision object corresponding to the target scene component formed by combining N basic graphic elements is obtained; M is greater than N.
20. The method according to claim 16, wherein, The method further includes: When the contour line of the target virtual collision object corresponding to the target scene component is displayed, or when the surface or filling body of the target virtual collision object corresponding to the target scene component is displayed, in response to an operation of changing the physical parameters of the target scene component, the target virtual collision object corresponding to the target scene component is re-obtained according to the changed physical parameters; The contour line of the re-obtained target virtual collision object is displayed, or the surface or filling body of the re-obtained target virtual collision object is displayed.
21. The method according to claim 16, wherein The method further includes: A plurality of setting options for the physical parameters of the target scene component are provided, and the resource occupancy values corresponding to each setting option are displayed.
22. The method according to any one of claims 1 to 15, wherein, The method further includes: When the contour line of the target virtual collision object corresponding to the target scene component is displayed, or when the surface or filling body of the target virtual collision object corresponding to the target scene component is displayed, the preset interface in the game editing scene is closed.
23. The method according to claim 22, wherein The method further includes: In response to the preview end operation, the contour line of the target virtual collision object is removed or the surface or filling body of the target virtual collision object is removed, and the preset interface closed when the contour line of the target virtual collision object is displayed or the surface or filling body of the target virtual collision object is displayed is reopened.
24. The method according to any one of claims 1 to 15, wherein The method further includes: When the contour line of the target virtual collision object corresponding to the target scene component is displayed, or when the surface or filling body of the target virtual collision object corresponding to the target scene component is displayed, in response to an editing operation on the target virtual collision object, the target scene component is edited according to the editing operation.
25. A game editing preview device, the device includes: A game editing scene display processing module configured to execute displaying a game editing scene in a graphical user interface provided by a game program; The game editing scene includes one or more scene components; The scene component is configured to generate a corresponding virtual model in the game running scene; A physical preview processing module, configured to execute in response to a first preview operation, determine a first physical preview mode among a plurality of physical preview modes as the current physical preview mode for a target scene component, and display an outline of a target virtual collision object corresponding to the target scene component; wherein, the target scene component is a scene component in the game editing scene; and the target virtual collision object is configured to detect a virtual object that collides with the target scene component.
26. A computer-readable storage medium, having stored thereon a computer program, which when executed by a processor, implements the method according to any one of claims 1 to 24.
27. An electronic device, comprising: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to execute the method according to any one of claims 1 to 24 by executing the executable instructions.
Citation Information
Patent Citations
Collision detection method and device in game scene
CN112245923A
Game object editing method and device, equipment and medium
CN115487504A
Game scene editing method and device, storage medium and electronic equipment
CN115779413A
Method and device for setting collision volume of virtual article, equipment and storage medium
CN117180754A
Game editing preview method and device, storage medium and electronic equipment
CN117839223A