Component generation method and device in game scene, storage medium and electronic device
Patent Information
- Application Number
- CN202310718159.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-15
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2043-06-15
AI Technical Summary
[0004]本公开提供一种游戏场景中的组件生成方法、游戏场景中的组件生成装置、计算机可读存储介质与电子设备,以至少在一定程度上解决相关技术中组件生成效率低下的问题
一方面,提供了一种通过导入图像对应生成场景组件组合(即虚拟模型)的方案,根据所导入的初始图像中的图像区域确定对应的场景组件和场景组件的信息,进而自动生成场景组件并形成场景组件组合,无需用户进行手动操作编辑,极大地降低了人力与时间成本,提高了组件生成效率。另一方面,用户可以根据自身的需求与偏好导入初始图像,最终生成对应图案的场景组件组合,即所生成的场景组件组合用于呈现所导入的初始图像,由此得到游戏场景中的图片墙、像素图像等形式的虚拟模型,能够丰富游戏场景,并满足用户的个性化需求。
Smart Images

Figure CN116672720B_ABST
Abstract
Description
Technical Field
[0001] This 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 Technology
[0002] A game scene typically consists of a number of components (or models), each of which may be an object or a person within the game scene. Modeling and editing the objects or people in the game scene is one of the main tasks in creating a game scene.
[0003] Currently, modeling and editing in game scenes mainly rely on manual operation by relevant personnel. For example, the generation process of a single component generally includes: manually editing the shape, adjusting the size and position, rendering colors and textures, and finally generating the required component. This method is costly in terms of manpower and time, and is inefficient. Summary of the Invention
[0004] This disclosure provides 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, so as to at least partially solve the problem of low component generation efficiency in related technologies.
[0005] According to a first aspect of this disclosure, a method for generating components in a game scene is provided. The method includes: displaying a graphical user interface provided by a running game program; displaying a game editing scene to be edited and multiple 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 multiple image regions; determining scene components corresponding to the image regions and information about the scene components; and generating scene components corresponding to the image regions in the game editing scene according to the information about the scene components corresponding to the image regions, forming a combination of scene components corresponding to the initial image.
[0006] According to a second aspect of this disclosure, a component generation apparatus for a game scene is provided. The apparatus includes: a graphical user interface processing module configured to display a graphical user interface provided by a running game program, displaying a game editing scene to be edited and multiple 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 multiple image regions and determine the scene components corresponding to the image regions and the information of the scene components; and a component generation module configured to generate the scene components corresponding to the image regions in the game editing scene according to the information of the scene components corresponding to the image regions, forming a combination of scene components corresponding to the initial image.
[0007] According to a third aspect of this disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the component generation method and possible implementations thereof in the game scene of the first aspect described above.
[0008] According to a fourth aspect of this 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 and possible implementations of the game scene described in the first aspect by executing the executable instructions.
[0009] The technical solution disclosed herein has the following beneficial effects: On the one hand, a solution is provided to generate scene component combinations (i.e., virtual models) by importing images. The solution determines the corresponding scene components and their information based on the image regions in the imported initial image, automatically generating scene components and forming scene component combinations. This eliminates the need for manual editing by the user, significantly reducing labor and time costs and improving component generation efficiency. On the other hand, users can import initial images according to their own needs and preferences, ultimately generating scene component combinations with corresponding patterns. These generated scene component combinations are used to present the imported initial image, resulting in virtual models in the form of image walls, pixel images, etc., enriching the game scene and meeting users' personalized needs. Attached Figure Description
[0010] Figure 1 This diagram illustrates the game editing scene and scene component selection control in this exemplary embodiment; Figure 2 A schematic diagram illustrating the perspective of setting the game editing scene in this exemplary embodiment; Figure 3A A schematic diagram illustrating the God's-eye view in this exemplary embodiment is shown; Figure 3B A schematic diagram illustrating the game perspective in this exemplary embodiment is shown; Figure 4 This diagram illustrates a component generation method in a game scene according to an exemplary embodiment. Figure 5 This diagram illustrates the import of an initial image in this exemplary embodiment. Figure 6 A flowchart illustrating the determination of scene components and information about scene components in this exemplary embodiment is shown. Figure 7 A schematic diagram of the generation queue is shown in this exemplary embodiment; Figure 8 This diagram illustrates some scene components that have been generated in this exemplary embodiment; Figure 9 This diagram illustrates all scene components that have been generated in this exemplary embodiment; Figure 10 This diagram illustrates the movement of a combination of scene components in this exemplary embodiment. Figure 11 This diagram illustrates scaling the combination of scene components in this exemplary embodiment; Figure 12 This diagram illustrates the rotation of the scene component combination in this exemplary embodiment; Figure 13 This diagram illustrates the system architecture of the operating environment for this exemplary embodiment. Figure 14 This diagram illustrates the structure of a component generation device in a game scene according to an exemplary embodiment of the present invention. Figure 15 A schematic diagram of the structure of an electronic device in this exemplary embodiment is shown. Detailed Implementation
[0011] Exemplary embodiments of this disclosure will be described more fully below with reference to the accompanying drawings.
[0012] The accompanying drawings are schematic illustrations of this disclosure and are not necessarily drawn to scale. Some block diagrams shown in the drawings may be functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in hardware modules or integrated circuits, or in networks, processors, or microcontrollers. Implementations can be carried out in various forms and should not be construed as limited to the examples set forth herein. The features, structures, or characteristics described in this disclosure can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough description of embodiments of this disclosure. However, those skilled in the art will recognize that one or more specific details may be omitted when implementing the technical solutions of this disclosure, or other methods, components, apparatuses, steps, etc., may be used to replace one or more specific details.
[0013] Incorporating diverse components into game scenes can enrich the gameplay and enhance the player's experience. One such component is the image wall, which displays visual content. In related technologies, original images are placed directly on the wall of a wall component within the game scene. When the player's in-game view is focused on the wall, the original image is visible, thus transforming the wall component into an image wall. However, if the image clashes with the style of the game scene—for example, if the image is a real-world photograph but the game scene is animated—such an image wall will create a jarring visual experience for the player, making it appear as if it doesn't belong in the game environment.
[0014] To create an image wall that harmonizes with the game's style, it might require manual editing, color correction, and stitching of each section using elements from the game scene. Since the images are typically complex, presenting or approximating them in the image wall would be extremely time-consuming. Furthermore, each time a new image wall is created, these manual steps must be repeated, resulting in low efficiency.
[0015] In view of the above problems, the exemplary embodiments of this disclosure provide a method for generating components in a game scene, which can improve the generation efficiency of components such as image walls.
[0016] In this exemplary embodiment, a graphical user interface (GUI) can be displayed on a terminal device. The terminal device can be a mobile phone, personal computer, tablet computer, smart wearable device, game console, etc., and has a display function capable of displaying a GUI. The GUI can include the screen of the terminal device's operating system, such as the desktop, system settings interface, application interface, etc. When the terminal device runs a game program, the GUI can display the game editing scene provided by the running game program. This game program can be the main game program, which provides game scene editing functions (such as a built-in game editor). When the user uses this function, they can enter the game editing scene. Alternatively, the game program can also 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 the game scene, refer to... Figure 1 As shown, the graphical user interface displays the game editing scene to be edited, as well as multiple scene component selection controls. The game editing scene can include the scene background and generated components. The scene component selection controls can include controls such as "block component," "cylinder component," and "semi-cylinder component." When the user uses these controls, such as clicking the "block component" control, the corresponding block component can be generated in the game editing scene.
[0017] This exemplary implementation supports player-customized scene editing; therefore, the term "user" in this document can refer to game developers (such as artists) or players.
[0018] In one implementation, a virtual camera can be set up in the game editing scene. A virtual camera is a tool in the game program that simulates a real camera to capture game scene footage. It can be set up anywhere in the game editing scene and capture the game scene from any perspective; that is, the virtual camera can have any pose in the game scene, which 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 footage.
[0019] refer to Figure 2 As shown, the game editing scene can present two different perspectives: the God's-eye view and the game's perspective. The God's-eye view refers to observing the game editing scene from a third-person perspective, as shown in the reference... Figure 3A As shown, in a God's-eye view, users in the game editing scene can directly control a virtual camera to move the viewpoint without controlling the game character. The game perspective refers to observing the game editing scene from a first-person viewpoint. Figure 3BAs shown, from a game perspective, the user can control a game character in the game editing scene. This game character can be linked to a virtual camera, meaning 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 moves the game character, the virtual camera moves synchronously, thus changing the viewpoint. From a top-down or game perspective, the game editing scene can include virtual joysticks, up / down controls, etc., which the user can use to move the virtual camera or the game character.
[0020] The game program provides multiple different scene components, such as... Figure 1 The scene component selection controls are shown below. Scene components are virtual models that make up a game scene; they can be objects, people, or parts of objects or people. The scene components provided by the game program can include basic scene components and combinations of basic scene components. Basic scene components are indivisible scene components and can be considered the smallest units that make up a game scene. For example, in a 3D game scene, basic scene components can include block components, cuboid 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 a part of the basic scene component's information. A combination of basic scene components is a scene component composed of multiple basic scene components. For example, a block component or cuboid component can be combined onto the circular surface of a cylinder component to form a roller-shaped scene mechanism; this scene mechanism is a combination of basic scene components.
[0021] In one implementation, the game program may come with multiple different scene components, which may be pre-configured and stored in the game program by artists, allowing players to easily use these scene components for scene editing.
[0022] In one implementation, players can pre-configure scene components. Players can create scene components not originally present in the game program by modeling them in the game's scene editing interface or other editing interfaces. Player-configured scene components can include basic scene components and combinations of basic scene components. For example, if a player configures a scene component as an indivisible whole, then that scene component is a basic scene component; otherwise, it is a combination of basic scene components. Player-configured scene components can be used only by the player or shared with other players.
[0023] When pre-configuring scene components, one or more settings such as size, position, orientation, color, texture, and shape can be configured. This allows users to directly access these configured settings when using the scene components in the game's editing scene, making it very convenient and efficient. Of course, users can also adjust the configured settings within the scene components, such as modifying one or more of the aforementioned settings, to better suit their needs and preferences.
[0024] Figure 4 An exemplary flow of a component generation method in a game scene is shown, which may include the following steps S410 to S440: Step S410: Display the graphical user interface provided by the game program. The graphical user interface displays the game editing scene to be edited and multiple scene component selection controls. The scene component selection controls are used to respond to and generate corresponding scene components in the game editing scene according to the operation instructions. Step S420: Provide an image import entry in the graphical user interface and accept the initial image imported based on the image import entry; Step S430: Divide the initial image into multiple image regions and determine the scene components and scene component information corresponding to the image regions; Step S440: Based on the information of the scene components corresponding to the image region, generate the scene components corresponding to the image region in the game editing scene to form a combination of scene components corresponding to the initial image.
[0025] The scene component assembly is a composite virtual model formed by multiple scene components, and can be viewed as a model itself. The scene component assembly is a virtual model used to present the initial image in the game scene. In this paper, presenting the initial image (or sampled image, target image, or other images) can be a complete presentation of the initial image or an approximate presentation of the initial image. Approximate presentation can refer to presenting a blurred pattern of the initial image. The scene component assembly has a correspondence with the initial image, which is reflected in their identical or similar patterns, and also in the fact that the scene component assembly is a component ultimately generated in response to the instruction to import the initial image.
[0026] The scene component assembly has at least one face capable of displaying an initial image. In one embodiment, the scene component assembly can be a wall or wall-like model, such as a picture wall, pixel image, etc. This disclosure does not specifically limit the shape of the scene component assembly. For example, the face of the scene component assembly used to display the initial image can be a flat plane, such as a cuboid, where the two faces with the largest surface areas can be used to display the initial image. Alternatively, the face of the scene component assembly used to display the initial image can be a non-flat surface, such as the coordinates of the various scene components on the normal axis of this face not being exactly the same, presenting an effect of certain undulations on the face of each scene component, which can create a visual sense of three-dimensionality.
[0027] based on Figure 4 The proposed method offers two approaches. First, it provides a scheme for generating scene component combinations (i.e., virtual models) by importing images. Based on the image regions in the imported initial image, it determines the corresponding scene components and their information, automatically generating scene components and forming scene component combinations. This eliminates the need for manual editing by the user, significantly reducing labor and time costs and improving component generation efficiency. Second, users can import initial images according to their own needs and preferences, ultimately generating scene component combinations with corresponding patterns. These generated scene component combinations are used to present the imported initial image, resulting in virtual models in the game scene, such as image walls and pixel images, enriching the game scene and meeting users' personalized needs.
[0028] The following is about Figure 4 Each step in the process will be explained in detail.
[0029] refer to Figure 4 In step S410, the graphical user interface provided by the game program is displayed. The graphical user interface displays the game editing scene to be edited and multiple scene component selection controls. The scene component selection controls are used to respond to and generate corresponding scene components in the game editing scene according to the operation instructions.
[0030] The game editing scene to be edited can be a newly created game editing scene or an existing game editing scene. The scene component selection control can be as follows: Figure 1 As shown, but not limited to Figure 1 The scene component types are shown. When the user interacts with the scene component selection controls, the corresponding scene component can be generated in the game's scene editing interface. For example, in... Figure 1 In the game, users can press and hold the "block component" control and drag it into the game editing scene to generate the corresponding block component. Users can then edit and adjust the block component's size, position, orientation, color, texture, and shape.
[0031] Continue to refer to Figure 4 In step S420, an image import entry is provided in the graphical user interface, and an initial image imported based on the image import entry is accepted.
[0032] The image import entry point can be provided within the relevant game editing interface. For example, in a game editing scene, a generator option can be selected to trigger the opening of the generator interface, which can be found in [reference needed]. Figure 5 As shown, an image import entry is provided. Users can select an initial image using this entry and import it into the current game scene to be edited. Alternatively, users can import an initial image through an image import entry provided in other interfaces of the game program without opening the game editing scene. During import, users can select a game scene, and the game program can also open and load the user-selected game scene. Alternatively, the game program can automatically select an initial image and import it into the game editing scene.
[0033] The initial image provides pattern information for the final generated scene component assembly, enabling the scene component assembly to display the initial image. The initial image can be an imported original image or a processed version of an original image; for example, an original image can be processed to a specified size to obtain the initial image. This disclosure does not limit the source, format, or content of the initial image. For example, the initial image can originate from the terminal device's photo album or from the internet. Users can choose any initial image based on their needs and preferences.
[0034] In one implementation, after a user imports an initial image, the server can review the initial image to ensure that its content meets relevant requirements.
[0035] Continue to refer to Figure 4 In step S430, the initial image is divided into multiple image regions, and the scene components and scene component information corresponding to the image regions are determined.
[0036] In game editing scenarios, scene components represent image regions of the initial image, thus modeling the entire initial image by combining scene components. Before generating scene components, the image regions can be divided, and the corresponding scene components and their information can be determined.
[0037] When dividing an image into regions, adjacent pixels with the same or similar colors can be grouped into one region, meaning each region can be monochromatic or have a monochromatic color scheme. This makes it easier to determine the color or texture information of the scene components corresponding to each region. Alternatively, image regions can be divided based on pre-defined information such as the size, number, and shape of the regions.
[0038] After obtaining the image regions, it can be determined which scene component corresponds to each image region. For example, based on the shape of the image region, if the image region is square, the corresponding scene component is determined to be a cube component; if the image region is rectangular, the corresponding scene component is determined to be a cuboid component. Furthermore, information about the scene component corresponding to each image region can be determined, including but not limited to size, position, orientation, color, texture, and shape, so that the scene component subsequently generated based on this information can reproduce the appearance or shape effect of the image region. For example, the size of the scene component corresponding to the image region can be determined based on the size of the image region. For instance, a mapping relationship between the size of the image region and the size of the scene component can be established in advance, and the size of the scene component corresponding to the size of the image region can be calculated from this mapping relationship. The position of the scene component corresponding to the image region can be determined based on the position of the image region in the initial image. The color or texture of the scene component corresponding to the image region can be determined based on the color or texture of the image region. For instance, a primary color (which can be the average color calculated from the color values of all pixels in the image region) can be extracted from the color of the image region and used as the color of the scene component, or texture features can be extracted from the image region and the texture of the scene component can be generated based on these texture features.
[0039] In one implementation, the component generation method may further include the following steps: Obtain resource quantification parameters for the combination of scene components.
[0040] The resource quantification parameter represents the amount of game resources used by the scene component combination. It can be quantified by the quantity of game resources, or by the data volume, memory usage, etc., of the game resources. The resource quantification parameter can be an exact value or a range. If the resource quantification parameter is a range, it means that the quantified value of the game resources used by the scene component combination should be within that range. For example, the resource quantification parameter can include the number of scene components in the scene component combination, which can be a single value or a range, representing the number or range of scene components included in the scene component combination. Users can set resource quantification parameters for scene component combinations, as described above. Figure 5 As shown, you can set the maximum number of scene components in a scene component combination (i.e., Figure 5The maximum resource usage value is 3425, indicating that the number of scene components included in the scene component combination does not exceed 3425. Alternatively, users can set resource quantification parameters for the current game scene to be edited, indicating the amount of game resources used by the game scene. Then, the resource quantification parameters of the scene component combination can be determined based on the game scene's resource quantification parameters. For example, the resource quantification parameters of the game scene can be subtracted from the resource quantification parameters of other generated models to obtain the resource quantification parameters of the scene component combination. Alternatively, the resource quantification parameters of the game scene can be multiplied by a certain ratio (representing the resource ratio allocated to the scene component combination) to obtain the resource quantification parameters of the scene component combination. Of course, the game program can also automatically determine the resource quantification parameters of the scene component combination, such as calculating the resource quantification parameters of the scene component combination based on user permissions, the amount of cached data at the game level, and the resource status of the terminal device (such as the remaining memory), or first calculating the resource quantification parameters of the game scene, and then calculating the resource quantification parameters of the scene component combination from the game scene's resource quantification parameters.
[0041] Generally, a larger resource quantization parameter indicates that more game resources can be used in the combination of scene components, meaning that the combination of scene components can contain more scene components, resulting in a more refined combination of scene components. This allows for a more refined division of the initial image into image regions, resulting in a larger number of image regions. Therefore, in one implementation, the number of image regions can be determined based on the resource quantization parameter, and the initial image can be divided into multiple image regions according to the number of image regions.
[0042] In one implementation, reference Figure 6 As shown, the above process of dividing the initial image into multiple image regions and determining the scene components and scene component information corresponding to the image regions may include the following steps S610 and S620: Step S610: Sample the initial image based on the resource quantization parameters, and obtain the target image based on the sampling results; Step S620: Using the pixels of the target image as an image region, determine the scene components corresponding to the image region and the information of the scene components.
[0043] Sampling the initial image can be either downsampling or upsampling. If a relatively large resource quantization parameter is set, resulting in a scene component combination with a higher level of detail than the initial image, then the initial image can be upsampled. Conversely, if a relatively small resource quantization parameter is set, resulting in a scene component combination with a lower level of detail than the initial image, then the initial image can be downsampled. The number of image regions, i.e., the number of pixels after sampling, can be determined based on the resource quantization parameter.
[0044] In one implementation, the resource quantization parameter of the scene component combination includes the number of scene components in the scene component combination, which can be a precise numerical value. The above-described 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: The initial image is sampled using the number of scene components combined with the scene components as the number of pixels after sampling, and the target image is obtained based on the sampling results.
[0045] The number of sampled pixels can be equal to the number of image regions. The number of pre-set scene components is used as the number of sampled pixels, so that the number of image regions is equal to the number of scene components, thereby accurately controlling the number of scene components in the scene component combination.
[0046] After sampling the initial image, the resulting image is called the sampled image. Upsampling produces a more refined image compared to the initial image, while downsampling results in a blurrier image. The sampled image can be further preprocessed, such as optimizing or simplifying colors, to obtain the target image. Alternatively, the sampled image can be used directly as the target image.
[0047] Each pixel in the target image can be considered an image region, which is equivalent to dividing the initial image into image regions through sampling. This division method is simple and efficient. Furthermore, the corresponding scene components and their information can be determined based on the information of each pixel in the target image.
[0048] In one implementation, determining the scene components and scene component information corresponding to the target image's pixels as an image region may include the following steps: Determine the initial size of the scene component assembly based on the number of pixels in the target image and the initial size of the scene components; If the initial size of the scene component combination is within the preset size range, then the initial size of the scene component remains 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.
[0049] The scene components have an initial size, which can be a default size pre-configured by the game program. If the size of the scene components is not set or adjusted, this initial size is used by default; that is, when scene components are generated in the game's scene editing, their size is equal to this initial size. The number of pixels in the target image represents the number of scene components in the scene component combination. Multiplying this number by the initial size of the scene components yields the size of the scene component combination formed using those initial sizes, denoted as the initial size of the scene component combination. It should be noted that since the scene components and scene component combinations have not yet been generated, the initial size of the scene component combination calculated here is an estimated size.
[0050] The preset size range is the allowed size range set for scene component combinations, preventing them from being too large or too small. Users 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 the size of the game scene. For instance, the preset size range for the width and height of a scene component combination can be set to 0-20 meters, meaning 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, it can remain unchanged. If the initial size exceeds the preset size range, it is adjusted. For example, if the initial size is too large, it is reduced; if it is too small, it is increased. After adjusting the initial size, it can be recalculated to ensure it remains within the preset size range. This allows for quick and accurate determination of scene component size information; the initial or adjusted size can be used as the size of subsequently generated scene components, eliminating the need for users 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 the preset size range, thereby controlling the size of the scene component combination at an appropriate level.
[0051] In one implementation, the component generation method may further include the following steps: Get the target number of colors for the scene component combination.
[0052] The target color quantity indicates how many colors the scene component combination has. This allows control over the colors of the scene component combination, preventing it from being too complex or too simple.
[0053] Users can set the target number of colors for scene component combinations, as described above. Figure 5As shown, users can set the target number of colors when importing the initial image. For example, setting it to 12 indicates that the scene component combination has no more than 12 colors. Alternatively, the game program can automatically set the target number of colors, such as automatically setting an appropriate number of target colors for the scene component combination based on user permissions, game scene resources, and level of detail.
[0054] In one implementation, the above-mentioned sampling of the initial image based on resource quantization parameters and obtaining the target image based on the sampling results may include the following steps: The initial image is sampled based on the resource quantization parameters to obtain the sampled image; The target image is obtained by color mapping the pixel color values of the sampled image based on the number of target colors.
[0055] The number of colors in the sampled image is usually not equal to the target number of colors set for the scene component assembly. For example, the color distribution of the sampled image may be complex, while the scene component assembly only needs to approximate the sampled image or the initial image, and its colors do not need to be so complex. Therefore, the target number of colors is usually less than the number of colors in the sampled image. By color mapping the pixel color values of the sampled image, the number of colors in the sampled image can be increased or decreased to make it equal to the target number of colors.
[0056] This disclosure does not limit the specific method of color mapping; the following two specific methods are illustrated by example: Method 1: Color mapping is achieved by clustering pixel color values. Specifically, the above-mentioned color mapping of pixel color values in the sampled image based on the number of target colors to obtain the target image may include the following steps: Clustering of pixel color values in the sampled image based on the number of target colors yields multiple color categories, with the number of color categories equal to the number of target colors. Map the color values of pixels in a color category to the preset color that is closest to the color category.
[0057] The preset colors can be optional colors provided by the game program for scene components. For example, the game program can provide a set of optional colors for scene components, such as a primary color with 12 or 24 hues, as preset colors. When determining or editing the color of a scene component, it needs to be selected from the preset colors. This way, scene components will not use colors other than the preset colors, which helps to simplify the complexity and resource consumption of the game scene and further improves the efficiency of component generation.
[0058] For example, if the target number of colors is 12, the pixel color values of the sampled image can be clustered into 12 color categories. This can be achieved using the K-Means algorithm, with K set to 12. Then, the closest preset color for each color category is determined from the preset colors; for example, it could be the preset color with the smallest distance to the cluster center color of that color category. Finally, the pixel color values in each color category are mapped to the preset color closest to that category. The cluster center color of a 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 a cluster center color calculated by weighting the pixel color values in the color category (e.g., determining the weight based on the number of pixels in each pixel's color value and then weighting the pixel color values accordingly).
[0059] Method 2: Determine the number of target colors that match the color distribution of the sampled image from all preset colors, and map the pixel color values of the sampled image to the closest preset color.
[0060] For example, the color space can be pre-divided into multiple color intervals based on all preset colors, with each preset color corresponding to one color interval. For instance, the preset color could be the center color of an interval. The color distribution of the sampled image is statistically analyzed, assigning each pixel to its corresponding color interval and determining the number of pixels within each interval. If the target color count is 12, the preset colors within the 12 color intervals with the highest pixel count are selected, thus determining the 12 preset colors. The color value of each pixel in the sampled image is then mapped to the preset color closest to it among these 12 preset colors.
[0061] Color mapping enables the conversion between the colors of a sampled image and the colors of scene components. Further, in one implementation, determining the scene component corresponding to the image region and the information of the scene component may include the following steps: Use the color value of the pixel in the target image as the color value of the scene component corresponding to that pixel.
[0062] Since the color value of each pixel in the target image is already a preset color that can be selected by the scene components, the color value of each pixel can be directly used as the color value of the scene component corresponding to that pixel, without further processing of the color values of the scene components. This process is convenient and efficient. This ensures that the colors of the target image, the colors of the scene components, and the color style of the game scene itself are consistent.
[0063] In one implementation, the aforementioned 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 the component formed by piecing together the first scene components corresponding to a preset number of the first scene component selection controls. For example, the first scene component can be a cube component or a cuboid component; the cube component is cube-shaped, and the cuboid component is cuboid-shaped. The second scene component can be a cuboid component, a stepped component, a cross component, etc., and its shape can be cuboid, stepped, cross-shaped, etc., all of which can be formed by piecing together multiple cubes or cuboids. The scene component corresponding to the aforementioned pixel point can be the first scene component. The aforementioned determination of the scene component corresponding to the image region and the information of the scene component may further include the following steps: After determining the color value of the first scene component corresponding to the pixel, if there are multiple adjacent first scene components with the same color value, then these multiple adjacent first scene components with the same color value are merged into a second scene component.
[0064] For example, the first scene component is a cube component, and the second scene component is a cuboid component. Multiple cube components with the same color value correspond to adjacent positions in the same row or column of the target image. These cube components can be merged into a cuboid component, with the cuboid component having the same color value as the cube component. This reduces the number of scene components and simplifies the process of generating scene component combinations.
[0065] In one implementation, the plurality of scene component selection controls includes a first scene component selection control, and the scene component corresponding to the pixel is the first scene component corresponding to the first scene component selection control. The determination of the scene component corresponding to the image region and the information of the scene component may further include the following steps: After determining the color value of the first scene component corresponding to the pixel, if there are multiple adjacent first scene components with the same color value, then these 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 these multiple adjacent first scene components with the same color value.
[0066] 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 cuboid component, any one or more of its length, width, and height can be adjusted.
[0067] For example, if multiple cuboid components with the same color value correspond to adjacent positions in the same row or column of 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 that of the original cuboid components, and its size along the merging direction is the size of the original cuboid component multiplied by the number of components merged. For instance, merging N adjacent cuboid components with the same color value along the width direction of the target image (i.e., the width direction of the cuboid components) will result in a cuboid component whose width is N times that of the original component, while its length and height can remain unchanged. This also reduces the number of scene components, simplifying the generation process of scene component combinations.
[0068] In one implementation, a virtual camera is provided in the game editing scene to capture and display the current view of the game editing scene in real time. The determination of the scene component corresponding to the image region and the information of the scene component may include the following steps: The reference point position for assembling scene components is determined based on the pose of the virtual camera; The position of the scene component corresponding to the image region is determined based on the relative position of the scene component in the scene component combination and the position of the reference point.
[0069] The scene component assembly has a certain volume. When determining the position of the scene component assembly in the game editing scene, a reference point can be selected within the scene component assembly. By determining the position of the reference point, the position of each scene component within the scene component assembly can be determined. The reference point can be the center point of the scene component, any corner point, or the center point of any edge, etc.
[0070] The reference point position for the scene component assembly is determined based on the pose of the virtual camera, ensuring that the reference point is positioned appropriately within the virtual camera's field of view so that the user can see the entire scene component assembly. More specifically, this can be done by importing the initial image or determining the generation of the scene component assembly (e.g., during...). Figure 5 Import the initial image and click "Generate" to determine the reference point position of the virtual camera pose for the scene component combination.
[0071] For example, the reference point can be the center point of the scene component. The optical axis direction can be determined based on the pose of the virtual camera, and the reference point position can be determined to be located along the optical axis direction. The distance between the reference point position and the virtual camera (distance along the optical axis direction) can also be determined based on the size of the scene component assembly, so that the entire scene component assembly can be displayed in the virtual camera's field of view.
[0072] Based on the reference point location, the position of each scene component can be determined according to its relative position within the scene component combination for each image region. The relative position can be an offset from the reference point; adding the relative position to the reference point location calculates the position of the scene component. This determines suitable generation positions for the scene components, allowing users to directly see the scene components and their combinations within the game editing scene when generating scene components and combinations.
[0073] Continue to refer to Figure 4 In step S440, based on the information of the scene components corresponding to the image region, the scene components corresponding to the image region are generated in the game editing scene to form a combination of scene components corresponding to the initial image.
[0074] The process of generating scene components can include: generating scene component objects, which can be a collection of game resources for the scene components, scene component information (such as related parameters), and related code; loading the scene component objects in the game editing scene, which can be represented by rendering the scene components. After generating scene components corresponding to all image regions, all scene components are combined to form a scene component composition.
[0075] In one implementation, generating scene components corresponding to the image region in the game editing scene based on the information of the scene components corresponding to the image region, and forming a combination of scene components corresponding to the initial image, may include the following steps: Add the generation task of the scene component combination to the generation queue; When the task of generating scene component combinations is executed, the scene components corresponding to the image regions are generated in the game editing scene based on the information of the scene components corresponding to the image regions, forming a scene component combination corresponding to the initial image.
[0076] Among them, the generation queue can be referenced. Figure 7As shown, the system can include one or more generation tasks. These tasks can be generation tasks for scene component combinations (such as image walls) or generation tasks for other models. In the generation queue, each generation task can be arranged according to its creation time or the time it was added to the queue, and executed in the ordered order. Of course, the user can also specify or adjust the order of arrangement or execution of each generation task. For example, the user can input a priority command for a generation task, and the game program can advance the execution order of that task, such as setting it as the next task. The generation queue can also display the status of each generation task, such as waiting, executing, or completed. Based on the execution order in the generation queue, when the generation task for scene component combinations is reached, step S430 can be executed. This ensures that the various models in the game scene are generated in an orderly manner. Even if the user frequently inputs commands to generate components in a short period (such as importing the initial image or clicking the generate command), it can prevent the game program from loading too much content and causing lag. Furthermore, displaying relevant information about the generation tasks in the generation queue visualizes the background processing of component generation, which is beneficial for user perception.
[0077] refer to Figure 7 As shown, the generation queue displays the generation or completion time of each task, as well as the resource quantification parameters of the components within each task. For example, the resource quantification parameter for the first image wall is 3250. Users can delete tasks by operating the delete control (the control with the trash can icon in the image), or trigger the generation process of the corresponding components by operating the "Generate to Scene" control.
[0078] In one implementation, a virtual camera is provided in the game editing scene to capture and display the current view of the game editing scene in real time. The scene component that generates the image area corresponding to the above-mentioned game editing scene may include the following steps: Generate scene components corresponding to the image area within the field of view of the virtual camera.
[0079] In this design, scene components can be rendered simultaneously during their generation. The generated locations of these scene components are placed within the virtual camera's field of view, allowing users to see them being generated.
[0080] In one implementation, the scene component that generates the image region corresponding to the virtual camera's field of view may include the following steps: Within the field of view of the virtual camera, on a plane perpendicular to the optical axis of the virtual camera and at a preset distance from the virtual camera, generate scene components corresponding to the image area.
[0081] The plane perpendicular to the optical axis of the virtual camera is the plane directly facing the camera's field of view. The distance between this plane and the virtual camera (specifically, the distance between the plane and the camera's optical center) is a preset distance, which can be determined based on experience, the size of the game scene, or the size of the scene component assembly. For example, the width and height of the scene component assembly may not exceed 20 meters, and the preset distance could be 50 meters. After determining the plane perpendicular to the virtual camera's optical axis and at the preset distance, each scene component can be generated on this plane, meaning each scene component is tangent to or intersects this plane. This allows the scene component assembly to be placed within the virtual camera's field of view, and its size within the view is appropriate—neither filling the entire screen nor appearing too small.
[0082] In one implementation, generating the scene component corresponding to the image region in the game editing scene based on the information of the scene component corresponding to the image region may include the following steps: Determine the generation order of scene components corresponding to different image regions, wherein the generation order of scene components corresponding to at least some image regions is different from the generation order of scene components corresponding to other image regions; Based on the information of the scene components corresponding to the image region, and in accordance with the generation order of the scene components corresponding to the image region, the scene components corresponding to the image region are generated in the game editing scene.
[0083] In this context, the generation order of scene components corresponding to all image regions is not entirely the same; that is, all scene components are generated in a certain order and are not generated simultaneously. The generation order of scene components corresponding to different image regions can be randomly determined based on the processing power of the game program. For example, when generating scene components, the game program can run M threads in parallel, thus generating M scene components at the same time. The scene components corresponding to each image region can be divided into groups of M, with each group having the same generation order. Alternatively, the scene components corresponding to each image region can be divided into M sets, with the generation order of scene components within each set set according to the sequence 1, 2, 3, ...
[0084] Given a defined generation order for scene components, each component can be generated sequentially, making the generation process more orderly and preventing the game program from loading too much data at once.
[0085] In one implementation, generating scene components corresponding to image regions in the game editing scene based on the information of scene components corresponding to image regions and according to the generation order of scene components corresponding to image regions may include the following steps: Within the current field of view, information about 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 according to the generation order of the scene components corresponding to the image area is performed; wherein, the current field of view is the image formed by the game editing scene captured by a virtual camera set in the game editing scene.
[0086] refer to Figure 8 and Figure 9 As shown, the process of generating scene components can be dynamically displayed within the current view. For example, initially, a screen without any generated scene components is displayed; this screen can contain only the background of the game editing scene or other generated models. Subsequently, the generated scene components are gradually displayed. Figure 8 The screen shows a partial view of the generated scene components; finally, when all scene components have been generated, a complete scene component assembly is formed, such as... Figure 9 As shown, scene components are combined in the form of image walls, pixelated images, etc. This allows users to view the complete generation process, avoiding meaningless waiting during generation and giving them a stronger sense of the process, resulting in a better user experience.
[0087] In one implementation, the process of dynamically displaying information about scene components corresponding to image regions within the current field of view, and generating scene components corresponding to image regions in the game editing scene according to the generation order of the scene components corresponding to the image regions, may include the following steps: In response to field of view adjustment commands, control and adjust at least one of the following information of the virtual camera: position, orientation, focal length, and field of view. The adjusted viewpoint is generated by capturing game editing scenes using the adjusted virtual camera. In the adjusted view, information about the scene components corresponding to the image region is dynamically displayed, and the process of generating the scene components corresponding to the image region in the game editing scene according to the generation order of the scene components corresponding to the image region is performed.
[0088] The location of scene components is fixed within the game's editing scene. During the generation process, the view can be adjusted using view adjustment commands. Specifically, when a view adjustment command is generated, the game program can control the virtual camera to adjust the view, displaying the scene component generation process from different perspectives.
[0089] Field of view adjustment commands can be user-inputted or automatically generated by the game program. For example, during the generation of scene components, the user can adjust the virtual camera's field of view, including moving the virtual camera, rotating it to change its direction, adjusting its focal length or field of view to change the center position or size of the field of view, and so on. For instance, if a user wants to observe a scene component up close, they can move the virtual camera closer to it. 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. This enriches the display effects of the dynamic display generation process and further enhances the user experience.
[0090] In one implementation, during the process of dynamically displaying information about scene components corresponding to image regions within the current field of view, and generating scene components corresponding to image regions in the game editing scene according to the generation order of the scene components corresponding to the image regions, the component generation method may further include the following steps: Lock the operation of adding or editing components in the game editing scene to prevent the addition or editing of components in the game editing scene.
[0091] Adding components refers to adding new components to the game editing scene, while editing components refers to editing existing components in the game editing scene. During the generation of scene components, these two types of operations can be locked, preventing the addition or editing of components. For example, the controls for adding or editing components can be set to an inoperable state, such as being grayed out or having a prohibition icon added to them, preventing users from clicking or performing other operations. Alternatively, the controls can be hidden, making them unusable. Or, the control's appearance can remain unchanged, but the game program can prevent the user from executing the addition or editing operation. This could be done by discarding the operation information or displaying a prompt such as "This operation is currently unavailable."
[0092] By locking these two operations, on the one hand, conflicts can be prevented between information or information updates generated by adding or editing components and the scene components being generated. For example, when a user adds or edits a component, it might occupy the space of a scene component that is being generated. Locking these two operations can prevent this from happening. On the other hand, if scene component generation and component addition or editing are performed simultaneously, the game program may load too much data at the same time, making the processing task too heavy and potentially causing lag. Locking these two operations allows the game program to primarily perform the task of generating scene components, ensuring the smoothness of the generation process.
[0093] In one implementation, after the scene component combination is generated, the lock on the two operations can be released.
[0094] In one implementation, the information of the scene component may include at least one of the following: size, position, orientation, color, texture, and shape. Generating the scene component corresponding to the image region in the game editing scene based on the scene component information corresponding to the image region may include the following steps: The corresponding editing instructions are invoked based on the information of the scene components. These editing instructions are pre-provided by the game program. Based on the above editing instructions, scene components corresponding to the image regions are generated in the game editing scene.
[0095] After determining the scene component corresponding to the image region, the various information of the scene component may be null (e.g., the game program will not set a default position for the scene component; if the position is not determined, the position value will be null) or default value (e.g., the game program can set an initial size for the scene component, which is the default size). After further determining the information of the scene component based on each image region, the information of the scene component needs to be assigned to the object of the scene component, that is, changing the original null or default value. This process can be achieved by calling the editing command.
[0096] Editing commands may include, but are not limited to: scaling commands, used to adjust the size of scene components; moving commands, used to change the position of scene components; rotating commands, used to change the orientation of scene components; color editing commands, used to adjust the color of scene components; texture editing commands, used to adjust the texture of scene components; and shape adjustment commands, used to adjust the shape of scene components, such as adjusting scene components to a static shape, or a dynamic shape with automatically changing transparency, or a dynamic shape that periodically disappears and reappears, or a rotating dynamic shape, etc.
[0097] Editing commands can be made available to users, meaning users can manually execute one or more of the aforementioned editing commands. If users generate scene components using manually executed editing commands, a significant amount of manual work is required. In this exemplary embodiment, the game program can automatically invoke and execute the necessary editing commands based on the scene component information to quickly generate the component. Furthermore, the user-manual editing commands and the game program-automated editing commands can come from the same instruction set, eliminating the need for two separate instruction sets for user manual operations and game program automatic operations, thus reducing overhead.
[0098] 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 editing and modeling generally takes several hours. Therefore, this exemplary embodiment can significantly reduce component generation time and improve component generation efficiency.
[0099] After forming a scene component composition corresponding to the initial image, overall operations such as moving, scaling, and rotating the scene component composition are allowed. The following sections explain these three operations: Mobile operation In one implementation, after forming a combination of scene components corresponding to the initial image, the component generation method may further include the following steps: In response to a move operation on the scene component assembly, move the position of the scene component assembly within the game editing scene.
[0100] Users can move scene component groups as a whole. For example, they can click, double-click, or long-press any or specific position in the scene component group to select the entire scene component group, and then move it to other positions in the game editing scene by dragging or other operations.
[0101] refer to Figure 10 As shown, the game editing scene can display three axes of the world coordinate system: the x-axis, y-axis, and z-axis. Scene component combinations can be moved along any one or more axes. During movement, the projected positions of the scene component combinations can also be displayed on the three axes, such as by highlighting them or displaying them in other colors, or as... Figure 10 As shown, the coordinates on one or more axes are displayed, allowing users to see the position of scene components in different directions, making it easier for users to move them accurately to the target location.
[0102] Scaling operation
[0103] In one implementation, after forming a combination of scene components corresponding to the initial image, the component generation method may further include the following steps: Responding to scaling operations on the scene component composition, change the size of the scene component composition.
[0104] Users can zoom in and out of scene component groups as a whole. For example, they can click, double-click, or long-press any or specific position in the scene component group to select the entire scene component group, and then zoom in to the desired size by splitting or pinching their fingers.
[0105] In one implementation, reference Figure 11As shown, the game editing scene can display three axes of the reference coordinate system for the scene component assembly. To distinguish them from the three axes of the world coordinate system, the three axes of the reference coordinate system are denoted as the x' axis, y' axis, and z' axis. The above-mentioned response to scaling operations on the scene component assembly, changing the size of the scene component assembly, can include the following steps: If the scene component group is set to three-axis scaling, the size of the scene component group will change proportionally on the three axes in response to the scaling operation. If the scene component group is set to planar scaling, the size of the scene component group will change within the preset plane in response to scaling operations along the preset plane; the preset plane is a plane formed by two of the three axes. If the scene component composition is set to single-axis scaling, the size of the scene component composition will change on one of the three axes in response to a scaling operation along that axis.
[0106] Among them, three-axis scaling, planar scaling (i.e., dual-axis scaling), and single-axis scaling are three scaling methods set for scene component combinations. The scaling method can be set individually for scene component combinations, or the scaling method can be set for the game scene, in which case all models in the game scene will use the specified method.
[0107] In three-axis scaling, any scaling operation performed by the user along any axis will proportionally scale the scene component assembly along all three axes. For example, if the user reduces the size of the scene component assembly by half along the x' axis, the size of the scene component assembly along the y' and z' axes will also be reduced by half simultaneously. This three-axis proportional scaling improves the efficiency of scaling operations, allowing users to achieve their scaling goals by scaling on a single axis instead of separately along different axes.
[0108] In planar scaling, when a user scales along a preset plane formed by two axes (such as the x'-y' plane), the scene components will scale within that preset plane without changing their size on a third axis (such as the z' axis). Scaling within the preset plane can be either proportional or non-proportional. For example, the user's scaling parameters can be mapped to the two axes of the preset plane and quantified into scaling ratios on the two axes (the scaling ratios on the two axes can be different), thereby controlling the scaling of the scene components along those two axes.
[0109] It should be understood that a preset plane can be formed using any two axes, including the x'-y' plane, x'-z' plane, and y'-z' plane, allowing scene component combinations to scale within any preset plane. Alternatively, a preset plane can be formed using fixed two axes, such as setting the preset plane to only the x'-y' plane. This allows scene component combinations to scale only within the x'-y' plane, but not within the x'-z' or y'-z' planes. In one implementation, the image plane of the scene component combination can be used as the preset plane. The image plane is the side used to present the initial image; for example, when the scene component combination is an image wall, the wall surface is the image plane. The scene component combination can be set to scale within the image plane, but not along a third axis (the axis perpendicular to the image plane). This makes the scaling of the scene component combination more consistent with the model's positioning.
[0110] In single-axis scaling, when a user scales along one axis, the scene components will only scale along that axis, not along the other two axes. This scaling method is more flexible, allowing users to change the size ratio of the scene components across all three axes to achieve more diverse visual effects.
[0111] It should be noted that you can configure the scene component group to be scaled on any axis. Alternatively, you can configure it to only allow scaling on one or two specific axes. For example, if you configure the scene component group to only scale on the x' and y' axes, then scaling along the z' axis will be impossible. This allows you to impose size restrictions on specific types of scene component groups to achieve specific game scene editing purposes.
[0112] Rotation operation
[0113] In one implementation, after forming a combination of scene components corresponding to the initial image, the component generation method may further include the following steps: In response to a rotation operation on the scene component group, control the scene component group to rotate.
[0114] Users can rotate the scene component group as a whole. For example, they can click, double-click, or long-press any or specific position in the scene component group to select the entire scene component group, and then control its rotation to the desired direction or angle through operations such as sliding along a specific trajectory.
[0115] In one implementation, reference Figure 12 As shown, the game editing scene can display three arcs to represent the direction of rotation, which can be denoted as the yaw angle arc, pitch angle arc, and roll angle arc. The above-mentioned response to a rotation operation on the scene component group, controlling the rotation of the scene component group, can include the following steps: In response to a rotation operation along any of the three arcs, the scene component assembly is controlled to rotate around the rotation axis with the normal of the plane containing that arc as the rotation axis.
[0116] The rotation axis is perpendicular to the plane containing the arc and can pass through the center point of the scene component assembly. For example, if a user rotates along the yaw angle arc, the scene component assembly can be controlled to rotate around the rotation axis using the z-axis passing through the center point of the scene component assembly. During rotation, the positions of the three arcs can remain unchanged, or any one or more arcs can rotate simultaneously. By displaying the arcs, the user can be guided to rotate in the correct direction, facilitating accurate rotation to the desired direction or angle.
[0117] The above describes three holistic operations. Furthermore, local operations on scene component combinations are also permitted. In one implementation, after forming a scene component combination corresponding to the initial image, the component generation method may further include the following steps: In response to an editing command on any scene component in the scene component assembly, adjust at least one of the following information of the scene component: size, position, orientation, color, texture, and shape.
[0118] Users can edit individual scene components within a scene component set. For example, they can select the desired scene component set by clicking, double-clicking, or long-pressing. Further manual operations generate editing commands to adjust the scene component's information. For instance, after selecting a scene component, users can resize it using two fingers to separate or pinch it, drag it to move its position, slide it along a specific rotation path to change its direction, and select a different color, texture, or shape for the scene component in the game's scene editing interface. Therefore, based on the generated scene component set, users can flexibly edit and optimize the scene components, making the scene component set more tailored to their needs and preferences.
[0119] In one implementation, after forming a combination of scene components corresponding to the initial image, associated game events can be set for the combination of scene components. For example, specific game events can be triggered when a game character approaches the combination of scene components, or the combination of scene components can be hidden or removed when a specific game time is reached.
[0120] In one implementation, operations related to creating or publishing a game scene (such as clicking) are performed via a terminal device. Figure 2After using the "Publish Map" control, game scene information corresponding to the game editing scene can be generated. This game scene information can be saved in a preset location, which can be a map file. This map file can save not only the game scene information but also 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 approves it, it can publish the game scene generated from the game scene information to the preset map pool. Terminal devices connected to the server can then download the corresponding game scene information from the server and generate the corresponding game scene through the game program, and then experience the game in that game scene. This method allows game scene information in the game editor to be published and experienced by other players, thereby realizing a rapid UGC (User Generated Content) function.
[0121] Figure 13 A system architecture diagram of the operating environment of this exemplary embodiment is shown. This system architecture 1300 may include a terminal device 1310 and a server 1320. The server 1320 may be a backend system providing game services; it may be a single server or a cluster of multiple servers. The terminal device 1310 and the server 1320 can be connected via wired or wireless links for data transmission and interaction. The component generation method in this exemplary embodiment can 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 imports an initial image on the terminal device 1310, the terminal device 1310 sends the initial image to the server 1320. The server 1320 can process the initial image and related user instructions (such as instructions to generate components) using pre-configured logical rules or an artificial intelligence engine to divide the image area, determine the scene components corresponding to the image area and the information of the scene components, 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.
[0122] Exemplary embodiments of this disclosure also provide a component generation apparatus for a game scene. (See reference...) Figure 14 As shown, the component generation device 1400 in the game scene may include the following program modules: The graphical user interface processing module 1410 is configured to display the graphical user interface provided by the running game program, and to display the game editing scene to be edited and multiple scene component selection controls in the graphical user interface. The scene component selection controls are used to respond to and generate corresponding scene components in the game editing scene according to the operation instructions. The information acquisition module 1420 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; The scene component determination module 1430 is configured to divide the initial image into multiple image regions and determine the scene components corresponding to the image regions and the information of the scene components. The component generation module 1440 is configured to generate scene components corresponding to the image region in the game editing scene based on the information of the scene components corresponding to the image region, forming a combination of scene components corresponding to the initial image.
[0123] In one implementation, generating the scene component corresponding to the image region in the game editing scene based on the information of the scene component corresponding to the image region includes: Determine the generation order of scene components corresponding to different image regions, wherein the generation order of scene components corresponding to at least some image regions is different from the generation order of scene components corresponding to other image regions; Based on the information of the scene components corresponding to the image region, and in accordance with the generation order of the scene components corresponding to the image region, the scene components corresponding to the image region are generated in the game editing scene.
[0124] In one implementation, generating scene components corresponding to image regions in the game editing scene based on the information of scene components corresponding to image regions and according to the generation order of scene components corresponding to image regions includes: Within the current field of view, information about 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 according to the generation order of the scene components corresponding to the image area is performed; wherein, the current field of view is the image formed by the game editing scene captured by a virtual camera set in the game editing scene.
[0125] In one implementation, the process of dynamically displaying information about scene components corresponding to image regions within the current field of view, and generating scene components corresponding to image regions in the game editing scene according to the generation order of the scene components corresponding to the image regions, includes: In response to field of view adjustment commands, control and adjust at least one of the following information of the virtual camera: position, orientation, focal length, and field of view. The adjusted viewpoint is generated by capturing game editing scenes using the adjusted virtual camera. In the adjusted view, information about the scene components corresponding to the image region is dynamically displayed, and the process of generating the scene components corresponding to the image region in the game editing scene according to the generation order of the scene components corresponding to the image region is performed.
[0126] In one implementation, the component generation module 1440 is further configured to: Within the current field of view, dynamically display information about scene components corresponding to the image region. While generating scene components corresponding to the image region in the game editing scene according to the generation order of the scene components corresponding to the image region, lock the operation of adding or editing models in the game editing scene to prevent the addition or editing of models in the game editing scene.
[0127] In one implementation, the scene component information includes at least one of the following: size, position, orientation, color, texture, and shape. The above-mentioned generation of the scene component corresponding to the image region in the game editing scene based on the scene component information corresponding to the image region includes: The corresponding editing instructions are invoked based on the information of the scene components. These editing instructions are pre-provided by the game program. Based on the editing instructions, scene components corresponding to the image regions are generated in the game editing scene.
[0128] In one implementation, the information acquisition module 1420 is further configured to: Obtain resource quantification parameters for the combination of scene components; The above process divides the initial image into multiple image regions and determines the scene components corresponding to each image region and the information of those scene components, including: The initial image is sampled based on resource quantization parameters, and the target image is obtained based on the sampling results; Using the pixels of the target image as an image region, determine the scene components corresponding to the image region and the information of the scene components.
[0129] In one implementation, the resource quantization parameter includes the number of scene components in the scene component combination. The above-described 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 combined with the scene components as the number of pixels after sampling, and the target image is obtained based on the sampling results.
[0130] In one implementation, the above-mentioned determination of scene components and scene component information corresponding to the image region, using pixels of the target image as an image region, includes: Determine the initial size of the scene component assembly based on the number of pixels in the target image and the initial size of the scene components; If the initial size of the scene component combination is within the preset size range, then the initial size of the scene component remains 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.
[0131] In one implementation, the information acquisition module 1420 is further configured to: Get the target number of colors for the scene component combination.
[0132] The above-mentioned sampling of the initial image based on resource quantization parameters and obtaining the target image based on the sampling results includes: The initial image is sampled based on the resource quantization parameters to obtain the sampled image; The target image is obtained by color mapping the pixel color values of the sampled image based on the number of target colors; The above-mentioned determination of the scene components corresponding to the image region and the information of the scene components includes: Use the color value of the pixel in the target image as the color value of the scene component corresponding to that pixel.
[0133] In one implementation, the above-mentioned color mapping of pixel color values in the sampled image based on the target color quantity to obtain the target image includes: Clustering of pixel color values in the sampled image based on the number of target colors yields multiple color categories, with the number of color categories equal to the number of target colors. Map the color values of pixels in a color category to the preset color that is closest to the color category.
[0134] In one implementation, 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 the component formed by splicing together the first scene components corresponding to a preset number of the first scene component selection controls. The scene component corresponding to the pixel is the first scene component.
[0135] The above-mentioned determination of the scene component corresponding to the image region and the information of the scene component also includes: After determining the color value of the first scene component corresponding to the pixel, if there are multiple adjacent first scene components with the same color value, then the multiple adjacent first scene components with the same color value are merged into a second scene component.
[0136] In one implementation, the plurality of scene component selection controls includes a first scene component selection control, and the scene component corresponding to the pixel is the first scene component corresponding to the first scene component selection control.
[0137] The above-mentioned determination of the scene component corresponding to the image region and the information of the scene component also includes: After determining the color value of the first scene component corresponding to the pixel, if there are multiple adjacent first scene components with the same color value, then 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 multiple adjacent first scene components with the same color value.
[0138] In one implementation, the first scene component is a block component, and the shape of the block component is a cube.
[0139] In one implementation, a virtual camera is provided in the game editing scene to capture and display the current scene of the game editing scene in real time.
[0140] The scene components that generate the image region in the game editing scene include: Generate scene components corresponding to the image area within the field of view of the virtual camera.
[0141] In one embodiment, the scene component that generates the image region corresponding to the field of view of the virtual camera includes: Within the field of view of the virtual camera, on a plane perpendicular to the optical axis of the virtual camera and at a preset distance from the virtual camera, generate scene components corresponding to the image area.
[0142] In one implementation, the above-mentioned determination of the scene component corresponding to the image region and the information of the scene component includes: The reference point position for assembling scene components is determined based on the pose of the virtual camera; The position of the scene component corresponding to the image region is determined based on the relative position of the scene component in the scene component combination and the position of the reference point.
[0143] In one implementation, the process of generating scene components corresponding to the image region in the game editing scene based on the information of the scene components corresponding to the image region, forming a combination of scene components corresponding to the initial image, includes: Add the generation task of the scene component combination to the generation queue; When the task of generating scene component combinations is executed, the scene components corresponding to the image regions are generated in the game editing scene based on the information of the scene components corresponding to the image regions, forming a scene component combination corresponding to the initial image.
[0144] In one embodiment, the component generation device 1400 in the game scene may further include a model editing module, configured to: After the component generation module 1440 forms a scene component combination corresponding to the initial image, in response to the movement operation of the scene component combination, the position of the scene component combination in the game editing scene is moved.
[0145] In one embodiment, the component generation device 1400 in the game scene may further include a model editing module, configured to: After the component generation module 1440 forms a scene component combination corresponding to the initial image, the size of the scene component combination is changed in response to the scaling operation of the scene component combination.
[0146] In one implementation, the game editing scene displays the three axes of a reference coordinate system for the combination of scene components.
[0147] The above-mentioned response to scaling operations on the scene component composition, changing the size of the scene component composition, includes: If the scene component group is set to three-axis scaling, the size of the scene component group will change proportionally on the three axes in response to the scaling operation. If the scene component group is set to planar scaling, the size of the scene component group will change within the preset plane in response to scaling operations along the preset plane; the preset plane is a plane formed by two of the three axes. If the scene component composition is set to single-axis scaling, the size of the scene component composition will change on one of the three axes in response to a scaling operation along that axis.
[0148] In one embodiment, the component generation device 1400 in the game scene may further include a model editing module, configured to: After the component generation module 1440 forms a scene component combination corresponding to the initial image, it controls the scene component combination to rotate in response to the rotation operation on the scene component combination.
[0149] In one implementation, the game editing scene displays three arcs to indicate the direction of rotation.
[0150] The above-mentioned response to a rotation operation on the scene component assembly, controlling the scene component assembly to rotate, includes: In response to a rotation operation along any of the three arcs, the scene component assembly is controlled to rotate around the rotation axis with the normal of the plane containing any arc as the rotation axis.
[0151] In one embodiment, the component generation device 1400 in the game scene may further include a model editing module, configured to: After the component generation module 1440 forms a scene component combination corresponding to the initial image, in response to an editing instruction on any scene component in the scene component combination, at least one of the following information of the scene component is adjusted: size, position, orientation, color, texture, and shape.
[0152] The specific details of each part of the above-mentioned device have been described in detail in the method section of the implementation plan. For any undisclosed details, please refer to the implementation plan of the method section, and therefore will not be repeated here.
[0153] Exemplary embodiments of this disclosure also provide a computer-readable storage medium that can be implemented as a program product including program code, which, when run on an electronic device, causes the electronic device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. In an alternative embodiment, the program product can be implemented as a portable compact disc read-only memory (CD-ROM) including program code and can run on an electronic device, such as a personal computer. However, the program product of this disclosure is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0154] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0155] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various 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, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0156] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0157] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing devices can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0158] Exemplary embodiments of this disclosure also provide an electronic device, such as the terminal device 1310 or server 1320 described above. The electronic device may include a processor and a memory. The memory stores executable instructions of the processor, such as program code. The processor executes the executable instructions to perform the methods of this exemplary embodiment. Furthermore, the electronic device may also include a display for displaying a graphical user interface.
[0159] The following is for reference. Figure 15 The electronic device is illustrated by way of a general-purpose computing device. It should be understood that... Figure 15 The electronic device 1500 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.
[0160] like Figure 15 As shown, 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.
[0161] Memory 1520 may include volatile memory, such as RAM 1521 and cache unit 1522, and may also include non-volatile memory, such as ROM 1523. Memory 1520 may also include one or more program modules 1524, such program modules 1524 including, but not limited to: 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 module 1524 may include the modules in the above-described apparatus.
[0162] Bus 1530 is used to connect different components of electronic device 1500 and may include a data bus, an address bus and a control bus.
[0163] Electronic device 1500 can communicate with one or more external devices 1600 (such as keyboard, mouse, external controller, etc.) through I / O interface 1540.
[0164] Electronic device 1500 can communicate with one or more networks via network adapter 1550. For example, 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. Network adapter 1550 can communicate with other modules of electronic device 1500 via bus 1530.
[0165] Electronic device 1500 can display a graphical user interface, such as displaying a game editing scene, through monitor 1560.
[0166] although Figure 15 As not shown in the diagram, other hardware and / or software modules may also be configured in the electronic device 1500, including but not limited to: a display, microcode, device driver, redundant processor, external disk drive array, RAID system, tape drive, and data backup storage system.
[0167] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to exemplary embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0168] Those skilled in the art will understand that various aspects of this disclosure can be implemented as systems, methods, or program products. Therefore, various aspects of this disclosure can be embodied in entirely hardware implementations, entirely software implementations (including firmware, microcode, etc.), or implementations combining hardware and software aspects, collectively referred to herein as “circuit,” “module,” or “system.” Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0169] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is defined only by the appended claims.
Claims
1. A method for generating components in a game scene, characterized in that, The method includes: The graphical user interface provided by the 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 to and generate corresponding scene components in the game editing scene according to the operation instructions. The graphical user interface provides an image import entry point and accepts initial images imported based on the image import entry point; The initial image is divided into multiple image regions, and the scene components corresponding to the image regions and the information of the scene components are determined. Based on the information of the scene components corresponding to the image area, a 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; the scene component combination is a wall used to present the initial image.
2. The method according to claim 1, characterized in that, The step of generating the scene component corresponding to the image region in the game editing scene based on the information of the scene component corresponding to the image region includes: The generation order of scene components corresponding to different image regions is determined, wherein the generation order of scene components corresponding to at least some image regions is different from the generation order of scene components corresponding to other image regions. Based on the information of the scene components corresponding to the image region, and in accordance with the generation order of the scene components corresponding to the image region, the scene components corresponding to the image region are generated in the game editing scene.
3. The method according to claim 2, characterized in that, The step of generating the scene component corresponding to the image region in the game editing scene according to the information of the scene component corresponding to the image region and in the generation order of the scene component corresponding to the image region includes: Within the current field of view, information about 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 according to the generation order of the scene components corresponding to the image area is performed; wherein, the current field of view is the image formed by capturing the game editing scene through a virtual camera set in the game editing scene.
4. The method according to claim 3, characterized in that, The process of dynamically displaying information about scene components corresponding to the image region within the current field of view, and generating scene components corresponding to the image region in the game editing scene according to the generation order of the scene components corresponding to the image region, includes: In response to a field-of-view adjustment command, the virtual camera is controlled to adjust at least one of the following information: position, orientation, focal length, and field of view. The adjusted virtual camera captures the game editing scene to form the adjusted field of view; In the adjusted field of view, information of scene components corresponding to the image region is dynamically displayed, and the process of generating scene components corresponding to the image region in the game editing scene according to the generation order of the scene components corresponding to the image region is performed.
5. The method according to claim 3, characterized in that, Within the current field of view, the method further includes dynamically displaying information about scene components corresponding to the image region, and generating scene components corresponding to the image region in the game editing scene according to the generation order of the scene components corresponding to the image region. Lock the operation of adding or editing components in the game editing scene to prevent the addition or editing of components in the game editing scene.
6. The method according to claim 1, characterized in that, The information of the scene components includes at least one of the following: size, position, orientation, color, texture, and shape; The step of generating scene components corresponding to the image region in the game editing scene based on the scene component information corresponding to the image region includes: The corresponding editing instructions are invoked based on the information of the scene components, wherein the editing instructions are instructions provided in advance by the game program; According to the editing instructions, scene components corresponding to the image region are generated in the game editing scene.
7. The method according to claim 1, characterized in that, The method further includes: Obtain the resource quantification parameters of the scene component combination; The step of dividing the initial image into multiple image regions and determining the scene components corresponding to the image regions and the information of the scene components includes: The initial image is sampled based on the resource quantization parameters, and the target image is obtained based on the sampling results; Using the pixels of the target image as an image region, determine the scene components corresponding to the image region and the information of the scene components.
8. The method according to claim 7, characterized in that, The resource quantization parameters of the scene component combination include the number of scene components in the scene component combination; the step of sampling the initial image based on the resource quantization parameters and obtaining the target image based on the sampling results includes: The initial image is sampled using the number of scene components in the scene component combination as the number of pixels after sampling, and the target image is obtained based on the sampling results.
9. The method according to claim 7, characterized in that, The step of determining the scene components corresponding to the image region and the information of the scene components, using the pixels of the target image as an image region, includes: The initial size of the scene component assembly is determined based on the number of pixels in 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, then the initial size of the scene component remains unchanged; If the initial size of the scene component assembly exceeds the preset size range, the initial size of the scene component is adjusted so that the initial size of the scene component assembly is within the preset size range after the initial size is adjusted.
10. The method according to claim 7, characterized in that, The method further includes: Obtain the target number of colors in the scene component combination; The step of sampling the initial image based on the resource quantization parameters and obtaining the target image based on the sampling results includes: The initial image is sampled based on the resource quantization parameters to obtain a sampled image; The target image is obtained by color mapping the pixel color values of the sampled image based on the target color quantity; The determination of the scene component corresponding to the image region and the information of the scene component include: The color value of the pixel in the target image is used as the color value of the scene component corresponding to the pixel.
11. The method according to claim 10, characterized in that, The step of color mapping the pixel color values of the sampled image based on the target color quantity to obtain the target image includes: Based on the target color quantity, the pixel color values of the sampled image are clustered to obtain multiple color categories, and the number of color categories is equal to the target color quantity; Map the pixel color values in the color category to a preset color that is closest to the color category.
12. The method according to claim 10, characterized in that, 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 the component formed by splicing together the first scene components corresponding to the first scene component selection controls by a preset number of such components. The scene component corresponding to the pixel is the first scene component. The determination of the scene component corresponding to the image region and the information of the scene component further includes: After determining the color value corresponding to the pixel, if there are multiple adjacent pixels with the same color value, then the first scene components corresponding to the multiple adjacent pixels with the same color value are merged into a second scene component.
13. The method according to claim 10, characterized in that, The plurality of scene component selection controls include a first scene component selection control, and the scene component corresponding to the pixel is the first scene component corresponding to the first scene component selection control; The determination of the scene component corresponding to the image region and the information of the scene component further includes: After determining the color value corresponding to the pixel, 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, characterized in that, 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, characterized in that, A virtual camera is set up in the game editing scene to capture and display the current screen of the game editing scene in real time; The process of generating the scene component corresponding to the image region in the game editing scene includes: A scene component corresponding to the image region is generated within the field of view of the virtual camera.
16. The method according to claim 15, characterized in that, The step of generating the scene component corresponding to the image region within the field of view of the virtual camera includes: Within the field of view of the virtual camera, on a plane perpendicular to the optical axis of the virtual camera and at a preset distance from the virtual camera, a scene component corresponding to the image area is generated.
17. The method according to claim 15 or 16, characterized in that, The determination of the scene component corresponding to the image region and the information of the scene component include: The reference point position of the scene component assembly is determined based on the pose of the virtual camera; The position of the scene component corresponding to the image region is determined based on the relative position of the scene component in the scene component combination and the position of the reference point.
18. The method according to claim 1, characterized in that, The step of generating scene components corresponding to the image region in the game editing scene based on the information of the scene components corresponding to the image region, forming a scene component combination corresponding to the initial image, includes: Add 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 region is generated in the game editing scene according to the information of the scene component corresponding to the image region, forming a scene component combination corresponding to the initial image.
19. The method according to claim 1, characterized in that, After forming a combination of scene components corresponding to the initial image, the method further includes: In response to a movement operation on the scene component group, the position of the scene component group in the game editing scene is moved.
20. The method according to claim 1, characterized in that, After forming a combination of scene components corresponding to the initial image, the method further includes: In response to a scaling operation on the scene component assembly, the size of the scene component assembly is changed.
21. The method according to claim 20, characterized in that, The game editing scene displays the three axes of the reference coordinate system of the scene component assembly; the step of changing the size of the scene component assembly in response to a scaling operation 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 changed proportionally on the three axes; If the scene component assembly is set to planar 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 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.
22. The method according to claim 1, characterized in that, After forming a combination of scene components 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, characterized in that, The game editing scene displays three arcs to indicate the direction of rotation; The step of controlling the scene component assembly to rotate in response to a rotation operation on the scene component assembly includes: In response to the rotation operation along any of the three arcs, the scene component assembly is controlled to rotate around the rotation axis with the normal of the plane containing any arc as the rotation axis.
24. The method according to claim 1, characterized in that, After forming a combination of scene components corresponding to the initial image, the method further includes: In response to an editing instruction on any scene component in the scene component group, at least one of the following information of the scene component is adjusted: size, position, orientation, color, texture, and shape.
25. A component generation device for a game scene, characterized in that, The device includes: The graphical user interface processing module is configured to display the graphical user interface provided by the running game program, and to display the game editing scene to be edited and multiple scene component selection controls in the graphical user interface. The scene component selection controls are used to respond to and generate corresponding scene components in the game editing scene according to the operation instructions. The 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; The scene component determination module is configured to divide the initial image into multiple image regions and determine the scene components corresponding to the image regions and the information of the scene components. The component generation module is configured to generate 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, forming a scene component combination corresponding to the initial image; the scene component combination is a wall used to present the initial image.
26. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 24.
27. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1 to 24 by executing the executable instructions.
Citation Information
Patent Citations
Program, computer system and game map generation method
JP2023051598A