Component generation method and apparatus in game scene, storage medium, and electronic device

Through the graphical user interface, the problem of inefficient game scene component generation in the existing technology is solved, and the rapid and coordinated component generation is achieved, and the efficiency and user experience of game scene editing is improved.

WO2024255597A1PCT designated stage expired Publication Date: 2024-12-19NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/096124
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-15
Filing Date
2024-05-29
Publication Date
2024-12-19

AI Technical Summary

Technical Problem

In the prior art, the generation of game scene components relies on manual operations, resulting in inefficiency, consuming a lot of manpower and time, and it is difficult to quickly generate picture walls that coordinate with game scene style.

Method used

The game editing scene is displayed through the graphical user interface, providing scene component selection controls and image import portals, automatically dividing image areas and generating corresponding scene components, forming a combination with the initial image, and simplifying the component generation process.

Benefits of technology

This greatly reduces the component generation time and improves efficiency. Users can quickly generate image walls and other components that meet the style of the game scene to meet personalized needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024096124_19122024_PF_FP_ABST
    Figure CN2024096124_19122024_PF_FP_ABST
Patent Text Reader

Abstract

A component generation method and apparatus in a game scene, a storage medium, and electronic device, relating to the technical field of computer graphics. The method comprises: displaying a graphical user interface provided for running a game program, and displaying a game editing scene to be edited and a plurality of scene component selection controls in the graphical user interface, the scene component selection controls being used for generating scene components in the game editing scene in response to and according to operation instructions; providing an image import entrance in the graphical user interface, and receiving an initial image imported by the image import entrance; dividing the initial image into a plurality of image areas, and determining scene components corresponding to the image areas, and information about the scene components; and according to the information about the scene components corresponding to the image areas, generating, in the game editing scene, the scene components corresponding to the image areas, and forming a scene component combination corresponding to the initial image. According to an imported image, a corresponding scene component combination is generated in a game scene, so that the component generation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Component generation method, device, storage medium and electronic device in game scene

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to a Chinese patent application filed on June 15, 2023, with application number 202310718159.6, entitled “Component Generation Method, Device, Storage Medium and Electronic Device in Game Scenes,” the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present disclosure relates to the field of computer graphics technology, and in particular to a method for generating components in a game scene, a device for generating components in a game scene, a computer-readable storage medium, and an electronic device. Background Art

[0004] Game scenes are usually composed of a certain number of components (or models), each of which may be an object or a person in the game scene. Modeling and editing objects or people in the game scene is one of the main tasks in building a game scene.

[0005] Currently, modeling and editing in game scenes primarily relies on manual effort. For example, the process of generating a single component typically involves manually editing its shape, adjusting its size and position, and rendering its color and textures to ultimately generate the desired component. This approach is labor-intensive and time-consuming, resulting in low efficiency.

[0006] Summary of the Invention

[0007] The present disclosure provides a component generation method in a game scene, a component generation device in a game scene, a computer-readable storage medium, and an electronic device.

[0008] According to a first aspect of the present disclosure, a method for generating components in a game scene is provided, the method comprising: displaying a graphical user interface provided by running a game program, displaying a game editing scene to be edited and a plurality of scene component selection controls in the graphical user interface, the scene component selection controls being used to respond to and generate corresponding scene components in the game editing scene according to operation instructions; providing an image import entry in the graphical user interface, and accepting an initial image imported based on the image import entry; dividing the initial image into a plurality of image areas, determining the scene components corresponding to the image areas and information of the scene components; generating the scene components corresponding to the image areas in the game editing scene according to the information of the scene components corresponding to the image areas, to form a scene component combination corresponding to the initial image.

[0009] According to a second aspect of the present disclosure, a device for generating components in a game scene is provided, the device comprising: a graphical user interface processing module, configured to display a graphical user interface provided by running a game program, displaying a game editing scene to be edited and a plurality of scene component selection controls in the graphical user interface, the scene component selection controls being used to respond to and generate corresponding scene components in the game editing scene according to operation instructions; an information acquisition module, configured to provide an image import entry in the graphical user interface, and accept an initial image imported based on the image import entry; a scene component determination module, configured to divide the initial image into a plurality of image areas, determine the scene components corresponding to the image areas and information about the scene components; a component generation module, configured to generate the scene components corresponding to the image areas in the game editing scene according to the information about the scene components corresponding to the image areas, to form a scene component combination corresponding to the initial image.

[0010] 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 component generation method in the game scene of the first aspect and its possible implementation methods are implemented.

[0011] 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 component generation method in the game scene of the above-mentioned first aspect and its possible implementation method by executing the executable instructions. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] FIG1 is a schematic diagram showing a game editing scene and scene component selection controls according to one exemplary embodiment of the present invention;

[0013] FIG2 is a schematic diagram showing a perspective for setting a game editing scene according to one of the exemplary embodiments;

[0014] FIG3A is a schematic diagram showing one of the viewing angles of this exemplary embodiment;

[0015] FIG3B is a schematic diagram showing one of the game perspectives of this exemplary embodiment;

[0016] FIG4 shows a flowchart of a method for generating components in a game scene according to one exemplary embodiment;

[0017] FIG5 is a schematic diagram showing one of the steps of importing an initial image according to the present exemplary embodiment;

[0018] FIG6 shows a flowchart of determining a scene component and information about the scene component according to one exemplary embodiment;

[0019] FIG7 is a schematic diagram showing a generation queue according to one of the exemplary embodiments;

[0020] FIG8 is a schematic diagram showing a generated partial scene component according to one of the exemplary embodiments;

[0021] FIG9 is a schematic diagram showing all scene components generated according to one of the exemplary embodiments;

[0022] FIG10 is a schematic diagram showing one embodiment of the present exemplary embodiment of moving a scene component combination;

[0023] FIG11 is a schematic diagram showing scaling of a scene component combination according to one of the exemplary embodiments;

[0024] FIG12 is a schematic diagram showing one embodiment of rotating a scene component combination;

[0025] FIG13 shows a system architecture diagram of an operating environment according to one exemplary embodiment of the present invention;

[0026] FIG14 is a schematic structural diagram showing a component generation device in a game scene according to one of the exemplary embodiments;

[0027] FIG. 15 is a schematic structural diagram of an electronic device according to one of the exemplary embodiments. 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] Setting up a variety of components in the game scene can enrich the game scene and enhance the player's gaming experience. Among them, a picture wall is a component that can present image content. In related technologies, the original image is placed directly on the wall surface of the wall component in the game scene. When the player's perspective in the game is aimed at the wall, the original image can be seen, thereby realizing the wall component as a picture wall. However, if the image is inconsistent with the style of the game scene, such as the image is a photo taken in the real world and the game scene is in an animation style, such a picture wall will cause a visual abruptness to the player, that is, the picture wall will not look like a part of the game scene.

[0031] To create a photo wall that matches the style of the game scene, personnel may need to manually edit, adjust colors, and splice each section of the photo wall using elements from the game scene. Since the image content is often complex, presenting or approximating the image content on the photo wall can be time-consuming. Furthermore, each time a new photo is created for a photo wall, these steps must be manually performed, resulting in low efficiency.

[0032] In view of the above problems, an exemplary embodiment of the present disclosure provides a component generation method in a game scene, which can improve the generation efficiency of components such as picture walls.

[0033] In this exemplary embodiment, a graphical user interface (GUI) can be displayed by a terminal device. The terminal device can be a mobile phone, personal computer, tablet computer, smart wearable device, game console, etc., which has a display function and can display a GUI. The GUI may include a screen of the terminal device running an operating system, such as a desktop, system settings interface, application program interface, etc. When the terminal device runs a game program, the GUI may display a game editing scene provided by the running game program. The game program may be a main game program, which provides a game scene editing function (such as a game editor built into the game program). When the user uses this function, the game program can enter the game editing scene. Alternatively, the game program can be a game scene editing program associated with the main game program, such as a game editor that can run independently without relying on the main game program. The user can choose to create a new game scene and edit it, or they can choose to edit an existing game scene. When the user uses the game program to edit a game scene, as shown in Figure 1, the GUI may display the game editing scene to be edited and multiple scene component selection controls. The game editing scene may include the scene background and generated components. The scene component selection controls may include controls such as "block component", "cylinder component", "semi-cylinder component", etc. When the user uses these controls to perform operations, such as when the user clicks the "block component" control, the corresponding block component can be generated in the game editing scene.

[0034] This exemplary embodiment supports players to customize and edit scenes. Therefore, the user in this article can refer to the game production staff (such as artists) of the game manufacturer, or the player.

[0035] In one embodiment, a virtual camera can be set up in the game editing scene. A virtual camera is a tool within the game program that simulates a real camera to capture the game scene. It can be set up anywhere in the game editing scene and capture the game scene from any perspective. In other words, the virtual camera can have any position within the game scene, and its position can be fixed or dynamically changing. Furthermore, any number of virtual cameras can be set up in the game editing scene, and different virtual cameras can capture different game scene images.

[0036] As shown in Figure 2, the game editing scene can present two different perspectives: observation perspective and game perspective. The observation perspective refers to observing the game editing scene from a third-person perspective. As shown in Figure 3A, in the observation perspective, the user can directly control the virtual camera to move the perspective instead of controlling the game character in the game editing scene. The game perspective refers to observing the game editing scene from a first-person perspective. As shown in Figure 3B, in the game perspective, the user can control a 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. In the observation perspective or game perspective, the game editing scene can be set with a virtual joystick, up or down controls, etc. The user can move the virtual camera or move the game character by operating these controls.

[0037] The game program provides multiple different scene components, as can be illustrated by the scene component selection control in Figure 1. Scene components are virtual models that make up the game scene and can be objects, people, or parts of objects or people. The scene components provided by the game program can include basic scene components and basic scene component combinations. Basic scene components refer to indivisible scene components and can be considered the smallest units that make up the game scene. For example, in a three-dimensional game scene, basic scene components can include block components, rectangular components, cylinder components, sphere components, etc. When a user edits a basic scene component, the information of the entire basic scene component is changed; it is not possible to change only the partial information of the basic scene component. A basic scene component combination is a scene component composed of multiple basic scene components. For example, a block component or a rectangular component can be combined with the circular surface of a cylinder component to form a roller-shaped scene mechanism, which is a combination of basic scene components.

[0038] In one embodiment, the game program may come with a plurality of different scene components, which may be pre-configured by artists and stored in the game program, so that players can conveniently use these scene components to edit scenes.

[0039] In one embodiment, players can pre-configure scene components. Players can create scene components not originally included in the game program by modeling them in the game scene editor or other editing interfaces. Player-configured scene components can include base scene components and base scene component combinations. For example, if a player configures a scene component as an indivisible whole, the scene component is considered a base scene component; otherwise, it is considered a base scene component combination. Player-configured scene components can be used only by the player or shared with other players.

[0040] When pre-configuring scene components, you can configure one or more of their information, such as size, position, orientation, color, texture, and shape. This allows users to directly access these configured information when using them in game editing scenes, making them very convenient and efficient. Of course, users can also adjust the configured information within a scene component, such as adjusting one or more of the above information, to better suit their needs and preferences.

[0041] FIG4 shows an exemplary process of a component generation method in a game scene, which may include the following steps S410 to S440:

[0042] Step S410: Displaying a graphical user interface provided by the running game program, wherein the graphical user interface displays a game editing scene to be edited and a plurality of scene component selection controls, wherein the scene component selection controls are used to generate corresponding scene components in the game editing scene in response to and according to an operation instruction;

[0043] Step S420, providing an image import entry in the graphical user interface, and accepting an initial image imported based on the image import entry;

[0044] Step S430, dividing the initial image into a plurality of image regions, and determining scene components corresponding to the image regions and information about the scene components;

[0045] Step S440: generating a scene component corresponding to the image area in the game editing scene according to the information of the scene component corresponding to the image area, and forming a scene component combination corresponding to the initial image.

[0046] Among them, the scene component combination is a combined virtual model formed by multiple scene components, and the scene component combination itself can be regarded as a model. The scene component combination is a virtual model used to present the initial image in the game scene. In this article, presenting the initial image (or other images such as sampled images, target images, etc.) can be a complete presentation of the initial image, or it can be an approximate presentation of the initial image. The approximate presentation can refer to presenting a pattern after the initial image is blurred. The scene component combination has a corresponding relationship with the initial image, and this corresponding relationship is reflected in the fact that the two are the same or similar in pattern, and is also reflected in the fact that the scene component combination is the component finally generated in response to the instruction to import the initial image.

[0047] The scene component combination has at least one surface that can present an initial image. In one embodiment, the scene component combination can be a wall or a wall-like model, such as a picture wall, a pixel image, etc. The present disclosure does not specifically limit the appearance of the scene component combination. Exemplarily, the surface of the scene component combination used to present the initial image can be a flat plane, such as the scene component combination can be a rectangular parallelepiped, and the two surfaces with the largest surface area can be used to present the initial image. Alternatively, the surface of the scene component combination used to present the initial image can be a non-flat surface, such as the coordinates of each scene component in the scene component combination on the normal axis of the surface are not exactly the same, presenting an effect that each scene component has a certain undulation on the surface, which can create a visual sense of three-dimensionality.

[0048] Based on the method in Figure 4, on the one hand, a solution is provided for generating a scene component combination (i.e., a virtual model) by importing corresponding images. The corresponding scene components and scene component information are determined based on the image area in the imported initial image, and then the scene components are automatically generated and formed into a scene component combination. There is no need for the user to manually edit, which greatly reduces the manpower and time costs and improves the efficiency of component generation. On the other hand, the user can import the initial image according to their own needs and preferences, and ultimately generate a scene component combination of the corresponding pattern. That is, the generated scene component combination is used to present the imported initial image, thereby obtaining a virtual model in the form of a picture wall, pixel image, etc. in the game scene, which can enrich the game scene and meet the personalized needs of the user.

[0049] Each step in FIG4 is described in detail below.

[0050] Referring to Figure 4, in step S410, the graphical user interface provided by the running game program is displayed, and the game editing scene to be edited and multiple scene component selection controls are displayed in the graphical user interface. The scene component selection controls are used to respond and generate corresponding scene components in the game editing scene according to operation instructions.

[0051] The game editing scene to be edited can be a newly created game editing scene or a stored game editing scene. The scene component selection control can be as shown in Figure 1, but is not limited to the scene component types shown in Figure 1. When the user operates the scene component selection control, the corresponding scene component can be generated in the game editing scene. As shown in Figure 1, the user can press and hold the "block component" control and drag it to the game editing scene to generate the corresponding block component in the game editing scene. Then, the user can also edit and adjust the size, position, direction, color, texture, shape, etc. of the block component.

[0052] Continuing to refer to FIG. 4 , in step S420 , an image import portal is provided in the graphical user interface, and an initial image imported based on the image import portal is accepted.

[0053] Among them, the image import entrance can be provided in the relevant game editing interface. For example, in the game editing scene, you can select the generator option to trigger the opening of the generator interface. The interface can be shown in Figure 5, in which an image import entrance is provided. The user can select the initial image based on the image import entrance and import it into the current game scene to be edited. Alternatively, the user can import the initial image through the image import entrance provided in other interfaces of the game program without opening the game editing scene. When importing, the game scene can be selected. The game program can also open the game editing scene and load the game scene selected by the user. Alternatively, the game program can automatically select the initial image and import it into the game editing scene.

[0054] The initial image is used to provide pattern information for the final generated scene component combination, so that the scene component combination can present the initial image. The initial image can be an imported original image, or it can be an image after the original image is processed. For example, the original image can be processed to a specified size to obtain the initial image. The present disclosure does not limit the source, format, content, etc. of the initial image. For example, the initial image can come from the photo album of the terminal device or from the Internet. Users can select an initial image of any content according to their needs and preferences.

[0055] In one embodiment, after the user imports the initial image, the server may review the initial image to ensure that the content of the initial image meets relevant requirements.

[0056] Continuing to refer to FIG. 4 , in step S430 , the initial image is divided into a plurality of image regions, and scene components corresponding to the image regions and information about the scene components are determined.

[0057] In the game editing scene, scene components are used to represent image regions of the initial image, thereby modeling the entire initial image as a combination of scene components. Before generating scene components, the image region can be divided and the corresponding scene components and scene component information can be determined.

[0058] When dividing an image region, adjacent pixels of the same or similar color can be grouped into a single image region. This means that each image region appears to be a single color or a monochromatic system. This facilitates determining information such as color or texture for each scene component corresponding to the image region. Alternatively, the image region can be divided based on pre-set information such as the size, number, or shape of the image region.

[0059] After obtaining the image area, it is possible to determine which scene component each image area corresponds to. For example, based on the shape of the image area, if the image area is square, the scene component corresponding to the image area is determined to be a square component; if the image area is rectangular, the scene component corresponding to the image area is determined to be a cuboid component. Furthermore, information about the scene component corresponding to each image area can be determined, including but not limited to size, position, direction, color, texture, morphology, etc., so that the scene component subsequently generated based on this information can present the appearance or morphological effect of the image area. For example, the size of the scene component corresponding to the image area can be determined based on the size of the image area. For example, a mapping relationship between the size of the image area and the size of the scene component can be pre-established, and the size of the scene component corresponding to the size of the image area can be calculated based on the mapping relationship. The position of the scene component corresponding to the image area can be determined based on the position of the image area in the initial image. The color or texture of the scene component corresponding to the image area can be determined based on the color or texture of the image area. For example, a main color can be extracted from the color of the image area (which can be the average color calculated from the color values ​​of all pixels in the image area) and the main color can be used as the color of the scene component, or texture features can be extracted from the image area and the texture of the scene component can be generated based on the texture features.

[0060] In one embodiment, the component generation method may further include the following steps:

[0061] Gets the resource quantization parameters of the scene component combination.

[0062] Among them, the resource quantization parameter characterizes the amount of game resources used by the scene component combination, which can be quantified by the number of game resources, or by the amount of data, memory, etc. of the game resources. The resource quantization parameter can be an exact numerical value or a numerical range. If the resource quantization parameter is a numerical range, it means that the quantized value of the game resources used by the scene component combination should be within the numerical range. Exemplarily, the resource quantization parameter may include the number of scene components of the scene component combination, which can be a numerical value or a numerical range, indicating the number or number range of scene components contained in the scene component combination. The user can set the resource quantization parameter for the scene component combination. Referring to Figure 5 above, the maximum number of scene components of the scene component combination (i.e., the maximum occupancy value in Figure 5) can be set to 3425, indicating that the number of scene components contained in the scene component combination does not exceed 3425. Alternatively, the user can set resource quantification parameters for the current game scene to be edited, indicating the amount of game resources used by the game scene, and then determine the resource quantification parameters of the scene component combination based on the resource quantification parameters of the game scene, such as subtracting the resource quantification parameters of other generated models from the resource quantification parameters of the game scene to obtain the resource quantification parameters of the scene component combination, or multiplying the resource quantification parameters of the game scene by a certain ratio (expressed as the resource ratio allocated to the scene component combination) to obtain the resource quantification parameters of the scene component combination. Of course, the resource quantification parameters of the scene component combination can also be automatically determined by the game program, such as calculating the resource quantification parameters of the scene component combination based on the user's permissions, the amount of cached data of the game level, the resource status of the terminal device (such as the remaining memory), etc., or first calculating the resource quantification parameters of the game scene, and then calculating the resource quantification parameters of the scene component combination based on the resource quantification parameters of the game scene.

[0063] Generally, a larger resource quantization parameter indicates that a scene component combination is allowed to use more game resources. That is, a scene component combination is allowed to contain more scene components, resulting in a more refined scene component combination. This allows for a finer division of the initial image into image regions, resulting in a greater number of image regions. Therefore, in one embodiment, the number of image regions can be determined based on the resource quantization parameter, and the initial image can then be divided into multiple image regions based on the number of image regions.

[0064] In one embodiment, referring to FIG6 , the above-mentioned dividing the initial image into multiple image regions and determining the scene components and information of the scene components corresponding to the image regions may include the following steps S610 and S620:

[0065] Step S610, sampling the initial image based on the resource quantization parameter, and obtaining the target image based on the sampling result;

[0066] Step S620: Taking the pixels of the target image as an image area, determining the scene components corresponding to the image area and the information of the scene components.

[0067] Sampling the initial image can be either downsampling or upsampling. If a relatively large resource quantization parameter is set, and the corresponding scene component combination has a fineness that exceeds that of the initial image, the initial image can be upsampled. If a relatively small resource quantization parameter is set, and the corresponding scene component combination has a fineness that is less than that of the initial image, the initial image can be downsampled. The resource quantization parameter can be used to determine the number of image regions, that is, the number of pixels after sampling.

[0068] In one embodiment, the resource quantization parameter of the scene component combination includes the number of scene components in the scene component combination, and the number of scene components can be an exact numerical value. The above-mentioned sampling of the initial image based on the resource quantization parameter and obtaining the target image based on the sampling result can include the following steps:

[0069] The initial image is sampled using the number of scene components of the scene component combination as the number of pixels after sampling, and a target image is obtained based on the sampling result.

[0070] Among them, the number of pixels after sampling can be equivalent to the number of image areas. The pre-set number of scene components is used as the number of pixels after sampling, so that the number of image areas is equal to the number of scene components, thereby accurately controlling the number of scene components in the scene component combination.

[0071] After upsampling the initial image, the resulting image is called the sampled image. If upsampling is used, the sampled image is finer than the initial image. If downsampling is used, the sampled image is blurrier than the initial image. The sampled image can be further preprocessed, such as by color optimization or simplification, to obtain the target image. Alternatively, the sampled image can be used directly as the target image.

[0072] Each pixel of the target image can be used as an image region, which is equivalent to dividing the initial image into image regions through sampling. This is a simple and efficient division method. Furthermore, the corresponding scene component and its information can be determined based on the information of each pixel of the target image.

[0073] In one embodiment, the above-mentioned determination of the scene components and the scene component information corresponding to the image region by taking the pixels of the target image as an image region may include the following steps:

[0074] Determine the initial size of the scene component combination according to the number of pixels of the target image and the initial size of the scene component;

[0075] If the initial size of the scene component combination is within the preset size range, the initial size of the scene component remains unchanged;

[0076] If the initial size of the scene component combination exceeds the preset size range, the initial size of the scene component is adjusted so that the initial size of the scene component combination is within the preset size range after the initial size adjustment.

[0077] Among them, the scene component has an initial size, which can be a default size pre-configured by the game program. If the size of the scene component is not set or adjusted, the initial size is used by default, that is, when the scene component is generated in the game editing scene, the size of the scene component is equal to the initial size. The number of pixels of the target image is the number of scene components in the scene component combination. By multiplying this number by the initial size of the scene component, the size of the scene component combination formed using the initial size of the scene component can be calculated, which is recorded as the initial size of the scene component combination. It should be noted that since the scene component and the scene component combination have not yet been generated at this time, the initial size of the scene component combination calculated here is an estimated size.

[0078] A preset size range is a permissible size range set for a scene component combination, preventing it from being too large or too small. The user can pre-set the preset size range, or the game program can automatically set it. For example, the preset size range can be determined based on the type of scene component combination, or based on the size of the game scene. For example, a preset size range of 0 to 20 meters can be set for the width and height of a scene component combination, meaning that neither the width nor the height of the scene component combination can exceed 20 meters. If the initial size of the scene component combination is within the preset size range, the initial size of the scene component can be maintained. If the initial size of the scene component combination exceeds the preset size range, the initial size of the scene component can be adjusted. For example, if the initial size of the scene component combination is too large, the initial size of the scene component can be adjusted downward; if the initial size of the scene component combination is too small, the initial size of the scene component can be adjusted upward. After adjusting the initial size, the initial size of the scene component combination can be recalculated to ensure it is within the preset size range. This allows for quick and accurate size determination for scene components, and the initial size or adjusted size can be used as the size for subsequently generated scene components, eliminating the need for the user to manually set the size each time. Furthermore, by adjusting the initial size mechanism, it is possible to ensure that the size of the subsequently generated scene component combination is within a preset size range, thereby controlling the size of the scene component combination at an appropriate level.

[0079] In one embodiment, the component generation method may further include the following steps:

[0080] Gets the target color number of the scene component combination.

[0081] The target color quantity indicates how many colors the scene component combination has. This allows you to control the color of the scene component combination to avoid it being too complex or too simple.

[0082] Users can set a target number of colors for a scene component combination. As shown in Figure 5 above, this can be set when importing the initial image. For example, setting it to 12 means the scene component combination has no more than 12 colors. Alternatively, the game program can automatically set the target number of colors, for example, based on user permissions, game scene resources, and level of detail.

[0083] In one embodiment, the above-mentioned sampling of the initial image based on the resource quantization parameter and obtaining the target image based on the sampling result may include the following steps:

[0084] Sampling the initial image based on the resource quantization parameter to obtain a sampled image;

[0085] Color mapping is performed on the pixel color values ​​of the sampled image based on the target color quantity to obtain the target image.

[0086] The number of colors in the sampled image is usually not equal to the target number of colors set for the scene component combination. For example, the color distribution of the sampled image may be complex, while the scene component combination only needs to approximate the sampled image or the initial image, and its colors do not need to be as complex. Therefore, the target number of colors is usually smaller than the number of colors in the sampled image. By performing color mapping on the pixel color values ​​of the sampled image, the number of colors in the sampled image can be increased or decreased to equal the target number of colors.

[0087] The present disclosure does not limit the specific method of color mapping. The following two specific methods are exemplified:

[0088] Method 1: Color mapping by clustering pixel color values. Specifically, the above-mentioned color mapping of the pixel color values ​​of the sampled image based on the number of target colors to obtain the target image may include the following steps:

[0089] Cluster the pixel color values ​​of the sampled image based on the number of target colors to obtain multiple color categories, where the number of color categories is equal to the number of target colors;

[0090] Map the pixel color value in a color category to the preset color closest to the color category.

[0091] Preset colors can be optional colors for scene components provided by the game program. For example, the game program can provide a set of optional colors for scene components, such as 12 or 24 primary colors, as preset colors. When determining or editing the color of a scene component, you need to select from the preset colors. This prevents scene components from appearing in colors other than the preset colors, helping to simplify the complexity and resource requirements of the game scene and further improve component generation efficiency.

[0092] For example, if the number of target colors is 12, the pixel color values ​​of the sampled image can be clustered into 12 color categories, such as by using the K-Means algorithm with K being 12 for clustering. Then, the preset color closest to each color category is determined among the preset colors, such as the preset color with the smallest distance from the cluster center color of the color category. Finally, the pixel color values ​​in each color category are mapped to the preset color closest to the color category. The cluster center color of the color category can be the center color of the color category (such as the center point color in the color space), or it can be the cluster center color calculated by weighting the pixel color values ​​in the color category (such as determining the weight according to the number of pixels of the pixel color value, and using the weight to weight the pixel color value).

[0093] Method 2: Determine the target color number of preset colors that match the color distribution of the sampled image from all preset colors, and map the pixel color value of the sampled image to the closest preset color.

[0094] For example, the color space can be pre-divided into multiple color intervals based on all preset colors, with each preset color corresponding to a color interval. For example, the preset color can be the center color of the color interval. The color distribution of the sampled image is statistically analyzed, and each pixel is divided into its corresponding color interval to determine the number of pixels in each color interval. If the number of target colors is 12, the preset colors in the 12 color intervals with the largest number of pixels are selected, thereby determining 12 preset colors. The color value of each pixel in the sampled image is mapped to the preset color closest to it among the 12 preset colors.

[0095] Color mapping can achieve the conversion between the color of the sampled image and the color of the scene component. Further, in one embodiment, the above-mentioned determination of the scene component corresponding to the image area and the information of the scene component can include the following steps:

[0096] The color value of the pixel of the target image is used as the color value of the scene component corresponding to the pixel.

[0097] Because the color value of each pixel in the target image is already a preset color for the scene component, the color value of each pixel can be directly used as the color value of the scene component corresponding to each pixel without further processing the color value of the scene component. This process is convenient and efficient. This ensures that the color of the target image, the color of the scene component, and the color style of the game scene itself are coordinated.

[0098] In one embodiment, the above-mentioned multiple scene component selection controls include a first scene component selection control and a second scene component selection control, and the shape of the second scene component corresponding to the second scene component selection control corresponds to the shape of the component spliced ​​together by the first scene components corresponding to a preset number of first scene component selection controls. For example, the first scene component can be a square component or a rectangular component, the shape of the square component is a cube, and the shape of the rectangular component is a rectangular parallelepiped. The second scene component can be a rectangular parallelepiped component, a stepped component, a cross component, etc., and its shape can be a rectangular parallelepiped, stepped, cross-shaped, etc., and these shapes can all be spliced ​​together by multiple cubes or rectangular parallelepipeds. The scene component corresponding to the above-mentioned pixel point can be the first scene component. The above-mentioned determination of the scene component corresponding to the image area and the information of the scene component can also include the following steps:

[0099] After determining the color value of the first scene component corresponding to the pixel point, if there are multiple adjacent first scene components with the same color value, the multiple adjacent first scene components with the same color value are merged into a second scene component.

[0100] For example, the first scene component is a square component, and the second scene component is a cuboid component. If multiple square components with the same color value correspond to adjacent positions in the same row or column in the target image, these square components can be merged into a cuboid component with the same color value as the square component. This reduces the number of scene components and simplifies the process of generating scene component combinations.

[0101] In one embodiment, the plurality of scene component selection controls include a first scene component selection control, and the scene component corresponding to the pixel point is the first scene component corresponding to the first scene component selection control. The step of determining the scene component corresponding to the image area and the scene component information may further include the following steps:

[0102] After determining the color value of the first scene component corresponding to the pixel point, if there are multiple adjacent first scene components with the same color value, the multiple adjacent first scene components with the same color value are merged into one first scene component, and the size of the merged first scene component is determined according to the number of the multiple adjacent first scene components with the same color value.

[0103] The size of the first scene component is adjustable and can be adjusted in any direction. For example, if the first scene component is a rectangular parallelepiped component, any one or more of the length, width, and height of the rectangular parallelepiped component can be adjusted.

[0104] For example, if multiple cuboid components with the same color value correspond to adjacent positions in the same row or column in the target image, these cuboid components can be merged into a larger cuboid component. The color value of the merged cuboid component is the same as the color value of the cuboid component before the merge, and the size along the merge direction is the size of the cuboid component before the merge multiplied by the number of merges. For example, along the width direction of the target image (i.e., the width direction of the cuboid component), N adjacent cuboid components with the same color value are merged. The width of the merged cuboid component is N times the width before the merge, and the length and height can remain unchanged. This can also reduce the number of scene components, which helps to simplify the generation process of scene component combinations.

[0105] In one embodiment, a virtual camera is provided in the game editing scene for real-time shooting and displaying the current screen of the game editing scene. The above-mentioned determination of the scene component and the information of the scene component corresponding to the image area may include the following steps:

[0106] Determine the reference point position of the scene component combination according to the position of the virtual camera;

[0107] The position of the scene component corresponding to the image area is determined according to the relative position of the scene component corresponding to the image area in the scene component combination and the reference point position.

[0108] The scene component assembly has a certain volume. When determining the position of the scene component assembly in the game editing scene, you can select a reference point in the scene component assembly. By determining the position of the reference point, you can determine the position of each scene component in the scene component assembly. The reference point can be the center point of the scene component, any corner point, or the center point of any edge, etc.

[0109] The reference point position of the scene component combination is determined based on the virtual camera's position, so that the reference point is located at an appropriate position in the virtual camera's field of view so that the user can see the entire scene component combination. More specifically, the reference point position of the scene component combination can be determined based on the virtual camera's position when importing the initial image or determining to generate the scene component combination (such as importing the initial image and clicking "Generate" in Figure 5).

[0110] For example, the reference point can be the center point of the scene component. The optical axis direction can be determined based on the virtual camera's position, and the reference point position can be determined to be located in the optical axis direction. The distance between the reference point position and the virtual camera (along the optical axis direction) can also be determined based on the size of the scene component combination so that the entire scene component combination can be displayed in the virtual camera's field of view.

[0111] Based on the reference point position, the position of each scene component can be determined based on the relative position of the scene component corresponding to each image area within the scene component combination. The relative position can be an offset relative to the reference point. The position of the scene component can be calculated by adding the reference point position to the relative position. This allows the appropriate generation position of the scene component to be determined, allowing users to directly view the scene component and scene component combination in the game editing scene when generating the scene component and scene component combination.

[0112] Continuing to refer to FIG. 4 , in step S440 , based on the information of the scene components corresponding to the image area, the scene components corresponding to the image area are generated in the game editing scene to form a scene component combination corresponding to the initial image.

[0113] The process of generating a scene component may include: generating a scene component object, which may be a collection of game resources, scene component information (such as related parameters), and related code for the scene component; loading the scene component object in the game editing scene, which may be rendered as the scene component; and after generating scene components corresponding to all image areas, forming a scene component combination from all scene components.

[0114] In one embodiment, the above-mentioned step of generating the scene component corresponding to the image area in the game editing scene based on the information of the scene component corresponding to the image area to form a scene component combination corresponding to the initial image may include the following steps:

[0115] Add the generation task of the scene component combination to the generation queue;

[0116] When the task of generating a scene component combination is executed, the scene component corresponding to the image area is generated in the game editing scene according to the information of the scene component corresponding to the image area, forming a scene component combination corresponding to the initial image.

[0117] Wherein, the generation queue can refer to FIG7 , and can include one or more generation tasks. These tasks can be generation tasks for scene component combinations (such as a picture wall) or generation tasks for other models. In the generation queue, each generation task can be arranged according to the creation time of each generation task or the time it is added to the generation queue, and executed in the order of arrangement. Of course, the user can also specify or adjust the arrangement order or execution order of each generation task. For example, the user can input an instruction to prioritize execution for a certain generation task, and the game program can advance the execution order of the generation task, such as setting it as the next task. The status of each generation task can also be displayed in the generation queue, such as waiting, executing, completed, etc. According to the execution order in the generation queue, when the generation task of the scene component combination is executed, step S430 can be executed. This ensures that each model in the game scene can be generated in an orderly manner. Even if the user frequently inputs generation component instructions (such as importing an initial image or clicking a generation instruction) in a short period of time, the game program can avoid loading too much content and causing lag. In addition, displaying the relevant information of the generation task in the generation queue realizes the visualization of the background processing process of component generation, which is beneficial to user perception.

[0118] As shown in Figure 7, the generation queue displays the generation or completion time of each task, as well as the resource quantization parameters of the components in each task. For example, the resource quantization parameter of the first picture wall is 3250. Users can delete tasks by operating the delete control (the control with the trash can icon in the figure), or trigger the display of the generation process of the corresponding component by operating the "Generate to Scene" control.

[0119] In one embodiment, a virtual camera is provided in the game editing scene for real-time shooting and displaying the current screen of the game editing scene. The above-mentioned generation of a scene component corresponding to the image area in the game editing scene may include the following steps:

[0120] Generate scene components corresponding to the image area within the field of view of the virtual camera.

[0121] When scene components are generated, they can be rendered simultaneously, and the generation location of the scene components is placed within the field of view of the virtual camera so that the user can see the generation of the scene components.

[0122] In one embodiment, the above-mentioned generation of a scene component corresponding to the image area within the field of view of the virtual camera may include the following steps:

[0123] A scene component corresponding to the image area is generated on a plane within the field of view of the virtual camera, perpendicular to the optical axis of the virtual camera, and at a preset distance from the virtual camera.

[0124] Among them, the plane perpendicular to the optical axis of the virtual camera, that is, the plane facing the field of view of the virtual camera. The distance between the plane and the virtual camera (specifically, it can be the distance between the optical center of the virtual camera) is a preset distance, and the preset distance can be determined based on experience or the size of the game scene, the size of the scene component combination, etc. Exemplarily, the width and height of the scene component combination do not exceed 20 meters, and the preset distance can be 50 meters. After determining the plane that is perpendicular to the optical axis of the virtual camera and the distance from the virtual camera is the preset distance, each scene component can be generated on the plane, that is, each scene component is tangent to or intersects with the plane. In this way, the scene component combination can be placed as a whole within the field of view of the virtual camera, and its size in the field of view is appropriate, and it will not fill the entire picture, nor will it appear too small.

[0125] In one embodiment, the above-mentioned step of generating the scene component corresponding to the image area in the game editing scene based on the information of the scene component corresponding to the image area may include the following steps:

[0126] Determining a generation order of scene components corresponding to different image regions, wherein the generation order of scene components corresponding to at least some of the image regions is different from the generation order of scene components corresponding to other image regions;

[0127] According to the information of the scene components corresponding to the image area and in accordance with the generation order of the scene components corresponding to the image area, the scene components corresponding to the image area are generated in the game editing scene.

[0128] Among them, for the scene components corresponding to all image areas, their generation order is not exactly the same, that is, all scene components have a certain generation order and are not generated at the same time. The generation order of scene components corresponding to different image areas can be randomly determined according to the processing power of the game program. For example, when the game program generates scene components, M threads responsible for generation can be run in parallel, so that M scene components can be generated at the same time. The scene components corresponding to each image area can be divided into M groups, and the same generation order is set for each group, or the scene components corresponding to each image area can be divided into M sets, and the generation order of the scene components in each set is set in the order of 1, 2, 3, ...

[0129] When the generation order of scene components is determined, each scene component can be gradually generated according to the generation order, so that the generation process of scene components is more orderly and the game program is prevented from loading too much data at one time.

[0130] In one embodiment, the above-mentioned step of generating the scene components corresponding to the image area in the game editing scene according to the information of the scene components corresponding to the image area and in the generation order of the scene components corresponding to the image area may include the following steps:

[0131] Within the current field of view, information of scene components corresponding to the image area is dynamically displayed, and the process of generating scene components corresponding to the image area in the game editing scene is carried out in the order of generating the scene components corresponding to the image area; wherein the current field of view is a picture formed by shooting the game editing scene with a virtual camera set in the game editing scene.

[0132] As shown in Figures 8 and 9, the generation process of scene components can be dynamically displayed within the current field of view. For example, at the beginning, a screen without any generated scene components is displayed. The screen may only contain the background of the game editing scene, or other generated models; then, the generated scene components are gradually displayed. Figure 8 shows a screen with some scene components generated; finally, when all scene components have been generated, a complete scene component combination is formed. As shown in Figure 9, the scene component combination is reflected in the form of a picture wall, pixel image, etc. In this way, users can watch the entire generation process, avoid meaningless waiting during the generation process, and make users have a stronger perception of the generation process, which provides a better user experience.

[0133] In one embodiment, the process of dynamically displaying information of scene components corresponding to the image area within the current field of view, and generating the scene components corresponding to the image area in the game editing scene according to the generation order of the scene components corresponding to the image area, may include the following steps:

[0134] In response to the field of view adjustment instruction, control and adjust at least one of the following information of the virtual camera: position, direction, focal length, and field of view angle;

[0135] The game editing scene is captured according to the adjusted virtual camera to form an adjusted field of view;

[0136] In the adjusted field of view, the information of the scene components corresponding to the image area is dynamically displayed, and the process of generating the scene components corresponding to the image area in the game editing scene is carried out in the generation order of the scene components corresponding to the image area.

[0137] The generation location of scene components is fixed within the game editing scene. During the scene component generation process, the field of view can be adjusted using field of view adjustment commands. Specifically, when a field of view adjustment command is generated, the game program can control the virtual camera to adjust the field of view, displaying the scene component generation process with the adjusted field of view, allowing users to observe the generation process from different perspectives.

[0138] The field of view adjustment instruction can be an instruction input by the user, or it can be an instruction automatically implemented by the game program. For example, during the generation process of the scene component, the user can adjust the field of view of the virtual camera, including moving the virtual camera position, rotating the virtual camera to change its field of view direction, adjusting the focal length or field of view of the virtual camera to change the center position of the field of view or the size of the field of view, etc. If the user wants to observe a certain scene component up close, the virtual camera can be moved to a position closer to the scene component. Alternatively, the game program can automatically adjust the virtual camera according to pre-set logic, such as controlling the virtual camera to rotate around the scene component to achieve a 360-degree dynamic display effect of viewing the scene component. In this way, the display effect of the dynamic display generation process can be enriched, further enhancing the user experience.

[0139] In one embodiment, in the process of dynamically displaying information of scene components corresponding to an image area within the current field of view, and generating scene components corresponding to the image area in the game editing scene according to the generation order of the scene components corresponding to the image area, the component generation method may further include the following steps:

[0140] Lock the operation of adding or editing components in the game editing scene to prohibit adding or editing components in the game editing scene.

[0141] Among them, the operation of adding a component refers to the operation of adding a new component in the game editing scene, and the operation of editing a component refers to the operation of editing an existing component in the game editing scene. These two types of operations can be locked during the generation process of the scene component, that is, components cannot be added or edited. For example, the control for adding a component or editing a component can be set to an inoperable state, such as being displayed in gray, or adding a prohibition icon to the control, so that the user cannot click on the control, etc., or the control can be hidden so that the user cannot operate it. Alternatively, the shape of the control can remain unchanged, and when the user adds a component or edits a component, the game program will not execute it. For example, the operation information can be discarded, or a related prompt can be displayed, such as "This operation cannot be performed at the moment".

[0142] By locking the above two operations, on the one hand, it is possible to prevent the information or information updates generated by adding or editing components from conflicting with the scene components being generated. For example, when adding or editing components, the user may occupy the position of the scene component being generated. Locking both operations can prevent this from happening. On the other hand, if the generation of scene components and the addition or editing of components are performed simultaneously, the game program may load too much data at the same time, which may cause the processing task to be too heavy and may cause lag. Locking both operations allows the game program to focus on the task of generating scene components, which can ensure the smoothness of the generation process.

[0143] In one embodiment, after the generation of the scene component combination is completed, the locks on the two operations can be released.

[0144] In one embodiment, the scene component information may include at least one of the following: size, position, direction, color, texture, and shape. The above-mentioned step of generating the scene component corresponding to the image area in the game editing scene based on the scene component information corresponding to the image area may include the following steps:

[0145] Calling corresponding editing instructions according to the information of the scene component, wherein the editing instructions are instructions provided in advance by the game program;

[0146] According to the above editing instructions, a scene component corresponding to the image area is generated in the game editing scene.

[0147] Among them, after determining the scene component corresponding to the image area, the above-mentioned various information of the scene component may be empty values ​​(such as the game program will not set a default position for the scene component. If the position is not determined, the value of the position is empty) or default values ​​(such as the game program can set an initial size for the scene component, and the initial size is the default value of the size). After further determining the information of the scene component according to each image area, the information of the scene component needs to be assigned to the object of the scene component, that is, to change the original empty value or default value. This process can be implemented by calling the editing instruction.

[0148] Editing instructions may include but are not limited to: scaling instructions for adjusting the size of scene components; moving instructions for changing the position of scene components; rotation instructions for changing the direction of scene components; color editing instructions for adjusting the color of scene components; texture editing instructions for adjusting the texture of scene components; form adjustment instructions for adjusting the form of scene components, such as adjusting the scene components to a static form, or a dynamic form with automatically changing transparency, or a dynamic form that periodically disappears and appears, or a rotating dynamic form, etc.

[0149] The editing instructions can be open to the user, that is, the user can implement one or more of the above-mentioned editing instructions through manual operation. If the user generates a scene component through manual editing instructions, a large amount of manual operation is required. In this exemplary embodiment, the game program can automatically call the required editing instructions based on the information of the scene component and execute them to quickly achieve component generation. Moreover, the editing instructions manually operated by the user and the editing instructions automatically executed by the game program can come from the same instruction set. This eliminates the need to set up two sets of instruction sets for the user's manual operation and the game program's automatic operation, which helps reduce overhead.

[0150] In this exemplary embodiment, after importing the initial image, it typically takes only a few seconds to tens of seconds (depending on the performance of the terminal device or server, resource allocation, etc.) to generate the corresponding scene component combination, while manual modeling typically takes several hours. This shows that this exemplary embodiment can significantly reduce component generation time and improve component generation efficiency.

[0151] After forming a scene component combination corresponding to the initial image, you can perform overall operations on the scene component combination, such as moving, scaling, rotating, etc. The following describes the three operations respectively:

[0152] Move Operation

[0153] In one embodiment, after forming a scene component combination corresponding to the initial image, the component generation method may further include the following steps:

[0154] In response to a move operation on the scene component assembly, the position of the scene component assembly in the game editing scene is moved.

[0155] Among them, users can move the scene component combination as a whole, such as clicking, double-clicking, or long pressing any position or specific position in the scene component combination to select the entire scene component combination, and then move it to other positions in the game editing scene by dragging and other operations.

[0156] As shown in Figure 10, the three axes of the world coordinate system can be displayed in the game editing scene, namely the x-axis, y-axis, and z-axis, and the scene component combination can be controlled to move along any one or more axes. When moving, the projected position of the scene component combination can also be displayed on the three axes, such as by highlighting or displaying it in other colors, or as shown in Figure 10, displaying the coordinates on one or more axes, so that the user can see the position of the scene component combination in different directions, making it easier for the user to accurately move it to the target position.

[0157] Zoom operation

[0158] In one embodiment, after forming a scene component combination corresponding to the initial image, the component generation method may further include the following steps:

[0159] In response to a scaling operation on the scene component composition, a size of the scene component composition is changed.

[0160] Among them, users can scale the scene component combination as a whole, such as single-clicking, double-clicking, or long pressing any position or specific position in the scene component combination to select the entire scene component combination, and then scale it to the desired size by spreading or pinching two fingers.

[0161] In one embodiment, as shown in FIG11 , the three axes of the reference coordinate system of the scene component assembly can be displayed in the game editing scene. To distinguish the three axes of the world coordinate system, the three axes of the reference coordinate system are denoted as the x' axis, the y' axis, and the z' axis. The above-mentioned change in size of the scene component assembly in response to a scaling operation on the scene component assembly may include the following steps:

[0162] If the scene component combination is set to three-axis scaling, then in response to the scaling operation, the size of the scene component combination is changed proportionally on the three axes;

[0163] If the scene component combination is set to plane scaling, the size of the scene component combination is changed within the preset plane in response to a scaling operation along the preset plane; the preset plane is a plane formed by two axes out of the three axes;

[0164] If the scene component assembly is set to single-axis scaling, then in response to a scaling operation along one of the three axes, the size of the scene component assembly is changed along that axis.

[0165] Among them, three-axis scaling, plane scaling (i.e., two-axis scaling), and single-axis scaling are three scaling methods set for scene component combinations. The scaling method can be set for the scene component combination separately, or the scaling method can be set for the game scene. Then all models in the game scene will adopt this scaling method.

[0166] In three-axis scaling, scaling along any axis will cause the scene component combination to scale proportionally on all three axes. For example, if the user reduces the size of the scene component combination by 1 / 2 along the x' axis, the size of the scene component combination on the y' and z' axes will also be reduced by 1 / 2. This three-axis proportional scaling method can improve the efficiency of user scaling operations, allowing users to achieve the desired scaling target by scaling on a single axis instead of performing scaling operations on different axes separately.

[0167] In the plane scaling mode, when the user scales along a preset plane formed by two axes (such as the x'-y' plane), the scene component combination will scale within the preset plane without changing the size on the third axis (such as the z' axis). Scaling within the preset plane can be proportional scaling on the two axes of the preset plane, or non-proportional scaling. For example, the user's scaling operation parameters can be mapped to the two axes of the preset plane and quantized into the scaling ratios on the two axes (the scaling ratios on the two axes can be different), thereby controlling the scaling of the scene component combination on the two axes.

[0168] It should be understood that a preset plane can be formed with any two axes, and the preset plane includes the x'-y' plane, the x'-z' plane, and the y'-z' plane, allowing the scene component combination to be scaled within any preset plane. The preset plane can also be formed with two fixed axes, such as setting the preset plane to be only the x'-y' plane, so that the scene component combination is only allowed to be scaled within the x'-y' plane, but not within the x'-z' plane and the y'-z' plane. In one embodiment, the image plane of the scene component combination can be used as the preset plane, and the image plane is the side used to present the initial image. For example, when the scene component combination is a picture wall, the wall surface is the image plane. The scene component combination can be set to be able to scale within the image plane, but not along the third axis (the axis perpendicular to the image plane). This makes the scaling of the scene component combination more consistent with the positioning of the model itself.

[0169] In single-axis scaling, when the user scales along one axis, the scene component combination will only scale along that axis, without scaling along the other two axes. This scaling method is more flexible and can change the size ratio of the scene component combination along the three axes to achieve more diverse visual effects.

[0170] It should be noted that you can set a scene component combination to allow single-axis scaling on any axis. You can also set a scene component combination to only allow scaling on one or two specific axes. For example, if a scene component combination is set to only be able to scale on the x' and y' axes, scaling along the z' axis will not be possible. This allows you to set size restrictions for specific types of scene component combinations to achieve specific game scene editing purposes.

[0171] Rotation operation

[0172] In one embodiment, after forming a scene component combination corresponding to the initial image, the component generation method may further include the following steps:

[0173] In response to a rotation operation on the scene component assembly, the scene component assembly is controlled to rotate.

[0174] Among them, the user can rotate the scene component combination as a whole, such as single-clicking, double-clicking, or long pressing any position or specific position in the scene component combination to select the entire scene component combination, and then controlling its rotation to the desired direction or angle through operations such as sliding along a specific trajectory.

[0175] In one embodiment, as shown in FIG12 , three arcs may be displayed in the game editing scene to indicate the rotation direction, which may be recorded as a yaw angle arc, a pitch angle arc, and a roll angle arc. The above-mentioned control of rotating the scene component assembly in response to the rotation operation of the scene component assembly may include the following steps:

[0176] In response to a rotation operation along any one of the three arcs, the scene component combination is controlled to rotate around the rotation axis with the normal of the plane where the arc is located as the rotation axis.

[0177] The rotation axis is perpendicular to the plane of the arc and can pass through the center point of the scene component assembly. For example, if the user rotates along the yaw angle arc, the z-axis passing through the center point of the scene component assembly can be used as the rotation axis to control the rotation of the scene component assembly around the rotation axis. During the rotation process, the positions of the three arcs can be maintained unchanged, or any one or more of the arcs can be rotated synchronously. By displaying the arcs, the user can be guided to rotate in the correct direction so that the desired direction or angle can be accurately rotated.

[0178] The above describes three overall operations. In addition, local operations can also be performed on the scene component combination. In one embodiment, after forming the scene component combination corresponding to the initial image, the component generation method can also include the following steps:

[0179] In response to an editing instruction for any scene component in the scene component combination, at least one of the following information of the scene component is adjusted: size, position, direction, color, texture, and shape.

[0180] Among them, the user can edit a single scene component in the scene component combination, such as single-clicking, double-clicking or long-pressing the scene component to be edited to select the scene component combination, and generating editing instructions through further manual operations to adjust the information of the scene component. For example, after selecting a scene component, its size can be changed by operations such as separating or closing two fingers, the scene component can be dragged to move its position, and it can be slid along a specific rotation trajectory to control the direction of the scene component to change. Another color, texture or form can be selected for the scene component in the interface of the game editing scene to change its color, texture or form. Thus, on the basis of generating a scene component combination, the user is allowed to flexibly edit and optimize the scene component so that the scene component combination can better meet the needs or preferences of the user.

[0181] In one embodiment, after forming a scene component combination corresponding to the initial image, an associated game event can be set for the scene component combination. For example, a specific game plot can be triggered when a game character approaches the scene component combination, or the scene component combination can be hidden or removed when a specific game time is reached.

[0182] 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 2), 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.

[0183] Figure 13 shows a system architecture diagram of the operating environment of this exemplary embodiment. The system architecture 1300 may include a terminal device 1310 and a server 1320. The server 1320 may be a backend system that provides game services, and may be a single server or a cluster of multiple servers. The terminal device 1310 and the server 1320 may be connected via a wired or wireless link for data transmission and interaction. The component generation method in this exemplary embodiment may be executed entirely by the terminal device 1310, or partially by the terminal device 1310 and partially by the server 1320. For example, after a user operates to import an initial image on the terminal device 1310, the terminal device 1310 sends the initial image to the server 1320. The server 1320 may process the initial image and related user instructions (such as instructions for generating components) using pre-configured logical rules or an artificial intelligence engine to divide the image area, determine the scene components and scene component information corresponding to the image area, and return the image area, scene components, and scene component information to the terminal device 1310. The terminal device 1310 generates scene components based on this information and forms a scene component combination.

[0184] The exemplary embodiment of the present disclosure further provides a component generation device in a game scene. Referring to FIG14 , the component generation device 1400 in the game scene may include the following program modules:

[0185] The graphical user interface processing module 1410 is configured to execute and display a graphical user interface provided by the running game program, displaying a game editing scene to be edited and a plurality of scene component selection controls in the graphical user interface, wherein the scene component selection controls are used to generate corresponding scene components in the game editing scene in response to and according to operation instructions;

[0186] The information acquisition module 1420 is configured to provide an image import entry in the graphical user interface and receive an initial image imported based on the image import entry;

[0187] The scene component determination module 1430 is configured to divide the initial image into a plurality of image regions, and determine the scene components corresponding to the image regions and information about the scene components;

[0188] The component generation module 1440 is configured to generate scene components corresponding to the image area in the game editing scene according to the information of the scene components corresponding to the image area, and form a scene component combination corresponding to the initial image.

[0189] In one embodiment, the above-mentioned generating scene components corresponding to image areas in the game editing scene based on the information of scene components corresponding to image areas includes: determining the generation order of scene components corresponding to different image areas, wherein the generation order of scene components corresponding to at least some image areas is different from the generation order of scene components corresponding to other image areas; generating scene components corresponding to image areas in the game editing scene based on the information of scene components corresponding to image areas and in accordance with the generation order of scene components corresponding to image areas.

[0190] In one embodiment, the above-mentioned process of generating scene components corresponding to the image area in the game editing scene based on the information of the scene components corresponding to the image area and in accordance with the generation order of the scene components corresponding to the image area includes: dynamically displaying the information of the scene components corresponding to the image area within the current field of view screen, and generating scene components corresponding to the image area in the game editing scene in accordance with the generation order of the scene components corresponding to the image area; wherein the current field of view screen is a screen formed by shooting the game editing scene with a virtual camera set in the game editing scene.

[0191] In one embodiment, the above-mentioned process of dynamically displaying information of scene components corresponding to the image area in the current field of view screen, and generating scene components corresponding to the image area in the game editing scene according to the generation order of the scene components corresponding to the image area, includes: responding to the field of view adjustment instruction, controlling and adjusting at least one of the following information of the virtual camera: position, direction, focal length, and field of view angle; capturing the game editing scene according to the adjusted virtual camera to form an adjusted field of view screen; in the adjusted field of view screen, dynamically displaying information of scene components corresponding to the image area, and generating scene components corresponding to the image area in the game editing scene according to the generation order of the scene components corresponding to the image area.

[0192] In one embodiment, the component generation module 1440 is further configured to: dynamically display information of scene components corresponding to the image area within the current field of view, and lock the operation of adding or editing a model in the game editing scene when generating the scene components corresponding to the image area in the game editing scene according to the generation order of the scene components corresponding to the image area, so as to prohibit adding or editing a model in the game editing scene.

[0193] In one embodiment, the scene component information includes at least one of the following: size, position, orientation, color, texture, and shape. Generating the scene component corresponding to the image area in the game editing scene based on the scene component information corresponding to the image area includes: invoking a corresponding editing instruction based on the scene component information, wherein the editing instruction is an instruction pre-provided by the game program; and generating the scene component corresponding to the image area in the game editing scene based on the editing instruction.

[0194] In one embodiment, the information acquisition module 1420 is further configured to: obtain resource quantization parameters of the scene component combination; the above-mentioned dividing the initial image into multiple image areas, determining the scene components and information of the scene components corresponding to the image areas, including: sampling the initial image based on the resource quantization parameters, and obtaining the target image based on the sampling results; taking the pixel points of the target image as an image area, determining the scene components and information of the scene components corresponding to the image area.

[0195] In one embodiment, the resource quantization parameter includes the number of scene components in the scene component combination. Sampling the initial image based on the resource quantization parameter and obtaining the target image based on the sampling result includes: sampling the initial image using the number of scene components in the scene component combination as the number of pixels after sampling, and obtaining the target image based on the sampling result.

[0196] In one embodiment, the above-mentioned method of using the pixel points of the target image as an image area and determining the scene components and information of the scene components corresponding to the image area includes: determining the initial size of the scene component combination based on the number of pixels of the target image and the initial size of the scene components; if the initial size of the scene component combination is within a preset size range, maintaining the initial size of the scene component unchanged; if the initial size of the scene component combination exceeds the preset size range, adjusting the initial size of the scene component so that after the initial size is adjusted, the initial size of the scene component combination is within the preset size range.

[0197] In one embodiment, the information acquisition module 1420 is further configured to obtain a target color number for a scene component combination. The aforementioned sampling of the initial image based on the resource quantization parameter and obtaining the target image based on the sampling result includes: sampling the initial image based on the resource quantization parameter to obtain a sampled image; performing color mapping on the color values ​​of the pixels of the sampled image based on the target color number to obtain the target image; and the aforementioned determining the scene component corresponding to the image region and the scene component information includes: using the color value of the pixel of the target image as the color value of the scene component corresponding to the pixel.

[0198] In one embodiment, the above-mentioned color mapping of the pixel color values ​​of the sampled image based on the target color number to obtain the target image includes: clustering the pixel color values ​​of the sampled image based on the target color number to obtain multiple color categories, and the number of color categories is equal to the target color number; mapping the pixel color values ​​in the color category to a preset color closest to the color category.

[0199] In one embodiment, the plurality of scene component selection controls include a first scene component selection control and a second scene component selection control, the shape of the second scene component corresponding to the second scene component selection control corresponds to the shape of a component formed by splicing together the first scene components corresponding to a preset number of first scene component selection controls; the scene component corresponding to the pixel point is the first scene component. Determining the scene component corresponding to the image area and the scene component information further includes: after determining the color value of the first scene component corresponding to the pixel point, if there are multiple adjacent first scene components with the same color value, merging the multiple adjacent first scene components with the same color value into a second scene component.

[0200] In one embodiment, the plurality of scene component selection controls include a first scene component selection control, and the scene component corresponding to the pixel point is the first scene component corresponding to the first scene component selection control. Determining the scene component corresponding to the image area and the scene component information further includes: after determining the color value of the first scene component corresponding to the pixel point, if there are multiple adjacent first scene components with the same color value, merging the multiple adjacent first scene components with the same color value into one first scene component, and determining the size of the merged first scene component based on the number of adjacent first scene components with the same color value.

[0201] In one embodiment, the first scene component is a block component, and the block component is in the shape of a cube.

[0202] In one embodiment, a virtual camera is provided in the game editing scene for capturing and displaying the current screen of the game editing scene in real time. Generating a scene component corresponding to an image area in the game editing scene includes generating a scene component corresponding to the image area within the field of view of the virtual camera.

[0203] In one embodiment, the above-mentioned generation of scene components corresponding to the image area within the field of view of the virtual camera includes: generating scene components corresponding to the image area within the field of view of the virtual camera, on a plane that is perpendicular to the optical axis of the virtual camera and has a preset distance from the virtual camera.

[0204] In one embodiment, the above-mentioned determination of the scene component and the information of the scene component corresponding to the image area includes: determining the reference point position of the scene component combination based on the posture of the virtual camera; determining the position of the scene component corresponding to the image area based on the relative position of the scene component corresponding to the image area in the scene component combination and the reference point position.

[0205] In one embodiment, the above-mentioned generating scene components corresponding to the image area in the game editing scene according to the information of the scene components corresponding to the image area to form a scene component combination corresponding to the initial image includes: adding the generation task of the scene component combination to the generation queue; when the generation task of the scene component combination is executed, generating the scene components corresponding to the image area in the game editing scene according to the information of the scene components corresponding to the image area to form a scene component combination corresponding to the initial image.

[0206] In one embodiment, the component generation device 1400 in the game scene may also include a model editing module, which is configured to: after the component generation module 1440 forms a scene component combination corresponding to the initial image, in response to a move operation on the scene component combination, move the position of the scene component combination in the game editing scene.

[0207] In one embodiment, the component generation device 1400 in the game scene may also include a model editing module, which is configured to: after the component generation module 1440 forms a scene component combination corresponding to the initial image, change the size of the scene component combination in response to a scaling operation on the scene component combination.

[0208] In one embodiment, the three axes of the reference coordinate system of the scene component assembly are displayed in the game editing scene. The above-mentioned changing the size of the scene component assembly in response to the scaling operation on the scene component assembly includes: if the scene component assembly is set to three-axis scaling, then in response to the scaling operation, the size of the scene component assembly is proportionally changed on the three axes; if the scene component assembly is set to two-axis scaling, then in response to the scaling operation along a preset plane, the size of the scene component assembly is changed within the preset plane; the preset plane is a plane formed by two axes of the three axes; if the scene component assembly is set to single-axis scaling, then in response to the scaling operation along one of the three axes, the size of the scene component assembly is changed on that axis.

[0209] In one embodiment, the component generation device 1400 in the game scene may also include a model editing module, which is configured to: after the component generation module 1440 forms a scene component combination corresponding to the initial image, in response to a rotation operation on the scene component combination, control the scene component combination to rotate.

[0210] In one embodiment, three arcs are displayed in the game editing scene to indicate rotation directions. Controlling the scene component assembly to rotate in response to a rotation operation on the scene component assembly includes: controlling the scene component assembly to rotate about the rotation axis in response to a rotation operation along any of the three arcs, with the normal of the plane on which the arc lies as the rotation axis.

[0211] In one embodiment, the component generation device 1400 in the game scene may also include a model editing module, which is configured to: after the component generation module 1440 forms a scene component combination corresponding to the initial image, in response to an editing instruction for any scene component in the scene component combination, adjust at least one of the following information of the scene component: size, position, direction, color, texture, and shape.

[0212] 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.

[0213] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium that can be implemented in the form of a program product, which includes program code. When the program product is run on an electronic device, the program code is used to cause the electronic device to perform the steps described in the "Exemplary Method" section above of this specification according to the various exemplary embodiments of the present disclosure. In an optional embodiment, the program product can be implemented as a portable compact disc read-only memory (CD-ROM) and include 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 to this, and in this document, a readable storage medium can be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, apparatus, or device.

[0214] 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.

[0215] 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.

[0216] 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.

[0217] 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).

[0218] The exemplary embodiments of the present disclosure further provide an electronic device, such as the aforementioned terminal device 1310 or server 1320. 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.

[0219] 15 , an electronic device is exemplarily described in the form of a general-purpose computing device. It should be understood that the electronic device 1500 shown in FIG15 is merely an example and should not limit the functionality and scope of use of the embodiments of the present disclosure.

[0220] As shown in FIG. 15 , the electronic device 1500 may include a processor 1510 , a memory 1520 , a bus 1530 , an I / O (input / output) interface 1540 , a network adapter 1550 , and a display 1560 .

[0221] Memory 1520 may include volatile memory, such as RAM 1521 and cache unit 1522, and non-volatile memory, such as ROM 1523. Memory 1520 may also include one or more program modules 1524. Such program modules 1524 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 1524 may include the modules described above.

[0222] The bus 1530 is used to realize the connection between different components of the electronic device 1500 and may include a data bus, an address bus, and a control bus.

[0223] The electronic device 1500 can communicate with one or more external devices 1600 (eg, a keyboard, a mouse, an external controller, etc.) through the I / O interface 1540 .

[0224] The electronic device 1500 can communicate with one or more networks via the network adapter 1550. For example, the network adapter 1550 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 1550 can communicate with other modules of the electronic device 1500 via the bus 1530.

[0225] The electronic device 1500 may display a graphical user interface through the display 1560 , such as displaying a game editing scene.

[0226] Although not shown in FIG. 15 , other hardware and / or software modules may be provided in the electronic device 1500 , including but not limited to microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0227] 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.

[0228] It will be appreciated by those skilled in the art that various aspects of the present disclosure may be implemented as a system, method or program product. Therefore, various aspects of the present disclosure may be specifically implemented as the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system". Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to encompass 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 specification and implementation are intended to be exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.

[0229] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for generating components in a game scene, the method comprising: Displaying a graphical user interface provided by running the game program, wherein a game editing scene to be edited and a plurality of scene component selection controls are displayed in the graphical user interface, wherein the scene component selection controls are used to respond to and generate corresponding scene components in the game editing scene according to an operation instruction; Providing an image import entry in the graphical user interface, and accepting an initial image imported based on the image import entry; Dividing the initial image into a plurality of image regions, determining scene components corresponding to the image regions and information of the scene components; According to the information of the scene component corresponding to the image area, the scene component corresponding to the image area is generated in the game editing scene to form a scene component combination corresponding to the initial image.

2. The method according to claim 1, wherein: The step of generating the scene component corresponding to the image area in the game editing scene according to the information of the scene component corresponding to the image area includes: Determining a generation order of scene components corresponding to different image regions, wherein the generation order of scene components corresponding to at least some of the image regions is different from the generation order of scene components corresponding to other image regions; The scene components corresponding to the image area are generated in the game editing scene according to the information of the scene components corresponding to the image area and in accordance with the generation order of the scene components corresponding to the image area.

3. The method according to claim 2, wherein: The step of generating the scene component corresponding to the image area in the game editing scene according to the information of the scene component corresponding to the image area and in the generation order of the scene component corresponding to the image area includes: In the current field of view, information of scene components corresponding to the image area is dynamically displayed, and the process of generating the scene components corresponding to the image area in the game editing scene is carried out in the order of generating the scene components corresponding to the image area; wherein the current field of view is a picture formed by shooting the game editing scene with a virtual camera set in the game editing scene.

4. The method according to claim 3, wherein: The process of dynamically displaying information of the scene component corresponding to the image area in the current field of view, and generating the scene component corresponding to the image area in the game editing scene according to the generation order of the scene component corresponding to the image area, includes: In response to the field of view adjustment instruction, control and adjust at least one of the following information of the virtual camera: position, direction, focal length, and field of view angle; Capturing the game editing scene according to the adjusted virtual camera to form an adjusted field of view; In the adjusted field of view screen, information of scene components corresponding to the image area is dynamically displayed, and a process of generating scene components corresponding to the image area in the game editing scene is performed in the order in which the scene components corresponding to the image area are generated.

5. The method according to claim 3, wherein: In the process of dynamically displaying information of the scene components corresponding to the image area in the current field of view, and generating the scene components corresponding to the image area in the game editing scene according to the generation order of the scene components corresponding to the image area, the method further includes: The operation of adding or editing a component in the game editing scene is locked to prohibit adding or editing a component in the game editing scene.

6. The method according to claim 1, wherein: The information of the scene component includes at least one of the following: size, position, direction, color, texture, and shape; The step of generating the scene component corresponding to the image area in the game editing scene according to the scene component information corresponding to the image area includes: Calling corresponding editing instructions according to the information of the scene component, wherein the editing instructions are instructions pre-provided by the game program; According to the editing instruction, a scene component corresponding to the image area is generated in the game editing scene.

7. The method according to claim 1, wherein: The method further comprises: Obtain resource quantization parameters of the scene component combination; The step of dividing the initial image into a plurality of image regions and determining scene components corresponding to the image regions and information of the scene components includes: Sampling the initial image based on the resource quantization parameter, and obtaining a target image based on the sampling result; The pixels of the target image are taken as an image area, and the scene components corresponding to the image area and the information of the scene components are determined.

8. The method according to claim 7, wherein: The resource quantification parameter of the scene component combination includes the number of scene components of the scene component combination; The sampling of the initial image based on the resource quantization parameter and obtaining the target image based on the sampling result includes: The initial image is sampled using the number of scene components of the scene component combination as the number of pixels after sampling, and the target image is obtained based on the sampling result.

9. The method according to claim 7, wherein: The step of taking the pixel points of the target image as an image area and determining the scene component corresponding to the image area and the information of the scene component includes: Determining an initial size of the scene component combination according to the number of pixels of the target image and the initial size of the scene component; If the initial size of the scene component combination is within a preset size range, keeping the initial size of the scene component unchanged; If the initial size of the scene component combination exceeds the preset size range, the initial size of the scene component is adjusted so that the initial size of the scene component combination is within the preset size range after the initial size is adjusted.

10. The method according to claim 7, wherein: The method further comprises: Get the target color quantity of the scene component combination; The sampling of the initial image based on the resource quantization parameter and obtaining the target image based on the sampling result includes: Sampling the initial image based on the resource quantization parameter to obtain a sampled image; Performing color mapping on the pixel color values ​​of the sampled image based on the target color quantity to obtain the target image; The determining of the scene component corresponding to the image area and the information of the scene component includes: The color value of the pixel point of the target image is used as the color value of the scene component corresponding to the pixel point.

11. The method according to claim 10, wherein: The step of performing color mapping on the pixel color values ​​of the sampled image based on the target color quantity to obtain the target image includes: Clustering the pixel color values ​​of the sampled image based on the number of target colors to obtain a plurality of color categories, where the number of the color categories is equal to the number of target colors; The color values ​​of the pixels in the color category are mapped to the preset colors that are closest to the color category.

12. The method according to claim 10, wherein: The multiple scene component selection controls include a first scene component selection control and a second scene component selection control, the shape of the second scene component corresponding to the second scene component selection control corresponds to the shape of a component formed by splicing the first scene components corresponding to a preset number of the first scene component selection controls; the scene component corresponding to the pixel point is the first scene component; The step of determining the scene component corresponding to the image area and the information of the scene component further includes: After determining the color value corresponding to the pixel point, if there are multiple adjacent pixels with the same color value, the first scene components corresponding to the multiple adjacent pixels with the same color value are merged into the second scene component.

13. The method according to claim 10, wherein: The multiple scene component selection controls include a first scene component selection control, and the scene component corresponding to the pixel point is the first scene component corresponding to the first scene component selection control; The step of determining the scene component corresponding to the image area and the information of the scene component further includes: After determining the color value corresponding to the pixel point, if there are multiple adjacent pixels with the same color value, the first scene components corresponding to the multiple adjacent pixels with the same color value are merged into one first scene component, and the size of the merged first scene component is determined according to the number of the multiple adjacent pixels with the same color value.

14. The method according to claim 12 or 13, wherein: The first scene component is a block component, and the shape of the block component is a cube.

15. The method according to claim 1, wherein: A virtual camera is provided in the game editing scene for real-time shooting and displaying the current screen of the game editing scene; The step of generating a scene component corresponding to the image area in the game editing scene includes: A scene component corresponding to the image area is generated within the field of view of the virtual camera.

16. The method according to claim 15, wherein: The step of generating a scene component corresponding to the image area within the field of view of the virtual camera includes: A scene component corresponding to the image area is generated on a plane within the field of view of the virtual camera, perpendicular to the optical axis of the virtual camera, and at a preset distance from the virtual camera.

17. The method according to claim 15 or 16, wherein: The determining of the scene component corresponding to the image area and the information of the scene component includes: Determining the reference point position of the scene component combination according to the position and posture of the virtual camera; The position of the scene component corresponding to the image area is determined according to the relative position of the scene component corresponding to the image area in the scene component combination and the reference point position.

18. The method according to claim 1, wherein: The step of generating the scene component corresponding to the image area in the game editing scene according to the information of the scene component corresponding to the image area to form a scene component combination corresponding to the initial image includes: Adding the generation task of the scene component combination to the generation queue; When the task of generating the scene component combination is executed, the scene component corresponding to the image area is generated in the game editing scene according to the information of the scene component corresponding to the image area, so as to form a scene component combination corresponding to the initial image.

19. The method according to claim 1, wherein: After forming a scene component combination corresponding to the initial image, the method further includes: In response to a moving operation on the scene component combination, the position of the scene component combination in the game editing scene is moved.

20. The method according to claim 1, wherein: After forming a scene component combination corresponding to the initial image, the method further includes: In response to a scaling operation on the scene component assembly, a size of the scene component assembly is changed.

21. The method according to claim 20, wherein: The three axes of the reference coordinate system of the scene component combination are displayed in the game editing scene; and the size of the scene component combination is changed in response to a scaling operation on the scene component combination, including: If the scene component combination is set to three-axis scaling, then in response to the scaling operation, the size of the scene component combination is proportionally changed on the three axes; If the scene component combination is set to plane scaling, in response to the scaling operation along a preset plane, the size of the scene component combination is changed within the preset plane; the preset plane is a plane formed by two axes of the three axes; If the scene component combination is set to single-axis scaling, in response to the scaling operation along one of the three axes, the size of the scene component combination is changed on the one axis.

22. The method according to claim 1, wherein: After forming a scene component combination corresponding to the initial image, the method further includes: In response to a rotation operation on the scene component assembly, the scene component assembly is controlled to rotate.

23. The method according to claim 22, wherein: Three arcs are displayed in the game editing scene to indicate the rotation direction; In response to the rotation operation on the scene component combination, controlling the scene component combination to rotate includes: In response to the rotation operation along any one of the three arcs, the normal line of the plane where any one of the arcs is located is used as the rotation axis, and the scene component combination is controlled to rotate around the rotation axis.

24. The method according to claim 1, wherein: After forming a scene component combination corresponding to the initial image, the method further includes: In response to an editing instruction for any scene component in the scene component combination, at least one of the following information of the scene component is adjusted: size, position, direction, color, texture, and shape.

25. A component generation device in a game scene, the device comprising: A graphical user interface processing module is configured to execute and display a graphical user interface provided by the running game program, wherein a game editing scene to be edited and a plurality of scene component selection controls are displayed in the graphical user interface, wherein the scene component selection controls are used to respond to and generate corresponding scene components in the game editing scene according to an operation instruction; An information acquisition module is configured to provide an image import entry in the graphical user interface and accept an initial image imported based on the image import entry; A scene component determination module is configured to divide the initial image into a plurality of image regions, determine scene components corresponding to the image regions and information of the scene components; The component generation module is configured to generate the scene component corresponding to the image area in the game editing scene according to the information of the scene component corresponding to the image area, so as to form a scene component combination corresponding to the initial image.

26. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to any one of claims 1 to 24 when executed by a processor.

27. An electronic device comprising: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 24 by executing the executable instructions.

Citation Information

Patent Citations

  • User interface editing method and device in game and storage medium

    CN114201167A

  • Model rendering method and device and electronic equipment

    CN115359168A

  • Game scene editing method and device, storage medium and electronic equipment

    CN115779413A

  • Component generation method and device in game scene, storage medium and electronic equipment

    CN116672720A

  • Game play data editing and sharing system and themethod thereof

    KR1020080035287A