Color changing method, device and equipment of virtual level and storage medium
By entering stylized description information in the virtual level editing interface and automatically applying it to the color change method of level components, the problems of batch color change limitation and frequent manual operations in the prior art are solved, and the intelligence level of UGC level design is improved.
Patent Information
- Application Number
- CN202311083008.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-25
- Publication Date
- 2025-02-25
AI Technical Summary
When designing UGC levels in the existing technology, the color change of batch level components can only be changed to the same color. Users need to manually select and replace the level components, resulting in a low degree of design intelligence.
A color change method for virtual level is provided. By displaying description information input controls in the level editing interface, the user inputs stylized description information, and based on this information, the virtual level component changes color to make it conform to the described color style characteristics.
The stylized color change of virtual levels is realized. Users can set the level colors with one click based on the stylized description information, improve the degree of design intelligence and reduce manual operations.
Smart Images

Figure CN119499664A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and more particularly to a method, device, equipment and storage medium for changing the color of a virtual level. Background Art
[0002] Nowadays, in order to increase user participation in the game and improve user retention, many game clients open some editing permissions to users, that is, provide UGC (User Generated Content) functions. Users can participate in the design of game content such as level maps, gameplay, and ecology through the editing entrance provided by the client.
[0003] In the related art, when performing UGC level design, the client can control the placement, movement, and color modification of the level components in the game based on the received user operations. When modifying the color, the client modifies the color of the target level component to the target color according to the target color and the target level component selected by the user. In addition, some clients provide users with tools such as brushes and multi-select color change, so that the client can implement batch color changes of level components based on user operations.
[0004] However, in the solutions provided by the related art, when changing the colors of level components in batches, the level components can only be changed to the same color in batches. Moreover, when a user generates a UGC level with stylized colors, it is necessary to first select different level components and then replace their colors separately, resulting in a low degree of intelligence in designing UGC levels with stylized colors. Summary of the invention
[0005] The embodiment of the present application provides a method, device, equipment and storage medium for changing the color of a virtual level. The technical solution is as follows:
[0006] On the one hand, an embodiment of the present application provides a method for changing the color of a virtual level, the method comprising:
[0007] Displaying a virtual level in a level editing interface, wherein the virtual level is composed of virtual level components;
[0008] In response to a triggering operation on a color change control in the level editing interface, displaying a description information input control in the level editing interface, the description information input control being used to trigger input of stylized description information, the stylized description information being used to describe color style characteristics of the virtual level;
[0009] Based on the stylized description information input through the description information input control, a color of a target virtual level component in the virtual level is changed, wherein after the color change, the color of the target virtual level component conforms to the color style feature described by the stylized description information.
[0010] On the other hand, an embodiment of the present application provides a device for changing the color of a virtual level, the device comprising:
[0011] A display module, used for displaying a virtual level in a level editing interface, wherein the virtual level is composed of virtual level components;
[0012] The display module is further configured to display a description information input control in the level editing interface in response to a triggering operation on a color change control in the level editing interface, wherein the description information input control is used to trigger input of stylized description information, and the stylized description information is used to describe the color style characteristics of the virtual level;
[0013] The color changing module is configured to change the color of a target virtual level component in the virtual level based on the stylized description information input through the description information input control, wherein the color of the target virtual level component after the color change conforms to the color style feature described by the stylized description information.
[0014] On the other hand, an embodiment of the present application provides a computer device, comprising a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the color change method of the virtual level as described in the above aspect.
[0015] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the color changing method of the virtual level as described in the above aspect.
[0016] On the other hand, an embodiment of the present application provides a computer program product, the computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the color change method of the virtual level provided in various optional implementations of the above aspects.
[0017] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0018] In the embodiment of the present application, during the virtual level editing process, the computer device can perform a stylized color change on the virtual level based on the received stylized description information, that is, perform a color change on the target virtual level component in the virtual level, so that the color of the changed target virtual level component conforms to the color style characteristics described by the stylized description information, thereby meeting the demand for stylized color change of the virtual level. By adopting the solution provided by this embodiment, the stylized color can be set for the virtual level in one click according to the stylized description information input by the user, without the need for the user to manually batch select virtual level items and then manually change the color, and the design of UGC levels with stylized colors is more intelligent. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 A schematic diagram showing an implementation environment provided by an exemplary embodiment of the present application is shown;
[0021] Figure 2 A flowchart of a method for changing color in a virtual level provided by an exemplary embodiment of the present application is shown;
[0022] Figure 3 A schematic diagram showing a color changing process of a virtual level provided by an exemplary embodiment of the present application is shown;
[0023] Figure 4 A schematic diagram of a level editing component provided by an exemplary embodiment of the present application is shown;
[0024] Figure 5 A flowchart showing a color changing process of a virtual level component provided by an exemplary embodiment of the present application is shown;
[0025] Figure 6 An effect diagram of color change based on a style reference image provided by an exemplary embodiment of the present application is shown;
[0026] Figure 7 An effect diagram of color change based on a color style palette provided by an exemplary embodiment of the present application is shown;
[0027] Figure 8 An effect diagram of color change based on style description text provided by an exemplary embodiment of the present application is shown;
[0028] Fig. 9 A schematic diagram of a change range selection control provided by an exemplary embodiment of the present application is shown;
[0029] Fig.10 A schematic diagram of a color style transfer image and a level screen provided by an exemplary embodiment of the present application is shown;
[0030] Fig.11 A schematic diagram showing a color change effect within a field of view provided by an exemplary embodiment of the present application is shown;
[0031] Fig.12 A schematic diagram showing a non-visual virtual level component and a visual virtual level component provided by an exemplary embodiment of the present application is shown;
[0032] Fig.13 A schematic diagram showing a global level color change effect provided by an exemplary embodiment of the present application is shown;
[0033] Fig.14 A schematic diagram showing a local level color change effect provided by an exemplary embodiment of the present application is shown;
[0034] Fig.15 A schematic diagram of a level editing interface with autonomous color change provided by an exemplary embodiment of the present application is shown;
[0035] Fig.16 A schematic diagram showing a map and a virtual level component provided by an exemplary embodiment of the present application is shown;
[0036] Fig.17 A schematic diagram showing a color change process of a virtual level provided by an exemplary embodiment of the present application is shown;
[0037] Fig.18 A structural block diagram of a device for changing the color of a virtual level provided by an exemplary embodiment of the present application is shown;
[0038] Fig.19 A schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0039] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0040] Game UGC refers to user-generated content, which generally refers to content created and shared by users on the Internet. Developers provide some necessary mechanisms and responsive UGC editing capabilities within the game to enable users to participate in the design of virtual level maps, gameplay, ecology and other game content.
[0041] UGC levels refer to game levels designed and produced by users. UGC levels are a type of virtual levels, and the solution shown in the embodiments of this application is based on UGC levels.
[0042] Color stylization refers to providing a style description and changing the colors of virtual level components in the virtual level through certain technical means, so that the color matching of the virtual level conforms to the stylized description.
[0043] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0044] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0045] Please refer to Figure 1 , which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application. The implementation environment includes a terminal 110 and a server 120, wherein the terminal 110 and the server 120 perform data communication via a communication network, and optionally, the communication network may be a wired network or a wireless network, and the communication network may be at least one of a local area network, a metropolitan area network, and a wide area network.
[0046] The terminal 110 is an electronic device installed with an application having a virtual level editing function (including a color changing function). The virtual level editing function may be a function of a native application in the terminal, or a function of a third-party application; the electronic device may be a smart phone, a tablet computer, a personal computer, a wearable device, a vehicle terminal, a virtual reality (VR) device, an augmented reality (AR) device, etc. Figure 1 In the description, the terminal 110 is taken as a smart phone as an example, but this is not a limitation.
[0047] The server 120 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. In the embodiment of the present application, the server 120 may be a background server of an application with a virtual level editing function.
[0048] In one possible implementation, Figure 1 As shown, there is data interaction between the server 120 and the terminal 110. After receiving the user's virtual level editing operation, the terminal 110 adjusts the virtual level according to the user's virtual level editing operation, and after receiving the user's virtual level color change operation, the color of the virtual level components in the virtual level is changed according to the stylized description information input by the player, so that the color of the changed virtual level conforms to the stylized description information. In response to the user's save operation on the edited virtual level, the terminal 110 uploads the virtual level to the server 120, and the server 120 sends the edited virtual level data to the terminal installed with the application with the virtual level editing function, so as to display the edited virtual level to other users through other terminals.
[0049] In another possible implementation, after receiving the user's color change operation, the terminal 110 sends the color change data indicated by the color change operation to the server 120, so that the server 120 changes the color of the virtual level components in the virtual level based on the received color change data. Then, the changed level screen data is sent to the terminal 110, so that the terminal 110 displays the virtual level after the color change.
[0050] For the convenience of description, the following embodiments are described by taking the method for changing the color of a virtual level executed by a computer device as an example.
[0051] Please refer to Figure 2 , which shows a flow chart of a method for changing color in a virtual level provided by an exemplary embodiment of the present application. This embodiment is described by taking the method used in a computer device as an example. The method includes the following steps:
[0052] Step 201: Display a virtual level in a level editing interface, where the virtual level is composed of virtual level components.
[0053] Optionally, the virtual level in the level editing interface is constructed by the user based on some basic virtual level components provided.
[0054] Optionally, the basic virtual level components may include but are not limited to basic shaped objects such as cubes, cuboids, spheres, cylinders, triangular pyramids, etc., and may also include some more complex object models, which is not limited in the embodiments of the present application.
[0055] Optionally, the virtual level component may construct a virtual level by translation, rotation, scaling, color change, etc., which is not limited in this embodiment of the present application.
[0056] Step 202: In response to a triggering operation on a color change control in the level editing interface, a description information input control is displayed in the level editing interface.
[0057] The description information input control is used to trigger the input of stylized description information, and the stylized description information is used to describe the color style characteristics of the virtual level.
[0058] Optionally, a variety of controls are displayed in the level editing interface, including but not limited to adjustment controls of virtual level components, exit controls, save controls, color change controls, etc., which are not limited in this embodiment.
[0059] Optionally, the stylized description information is used to describe the color style characteristics of the virtual level, and can also be used to describe the color style characteristics of a specified virtual level component in the virtual level. For example, the stylized description information is "change the color of the cube component to blue", where the specified virtual level group is a cube component.
[0060] Optionally, the triggering operation of the virtual color change control may be a single-finger click operation, a multi-finger click operation, a single-finger slide operation, a multi-finger slide operation, a long press operation, etc., which is not limited in this embodiment.
[0061] Optionally, the stylized description information is input by a user, and the color style features described therein are the color style features expected by the user.
[0062] Step 203 : based on the stylized description information input through the description information input control, the color of the target virtual level component in the virtual level is changed.
[0063] Among them, the color of the target virtual level component after the color change conforms to the color style characteristics described by the stylized description information.
[0064] The computer device performs semantic or feature analysis on the input stylized description information, determines the color feature corresponding to the stylized description information, and further changes the color of the target virtual level component in the virtual level.
[0065] Optionally, the target virtual level component may be all virtual level components in the virtual level, or may be only a part of level components in the virtual level.
[0066] Optionally, the application program in the computer device that provides the color change of the virtual level has the function of rendering the color of the virtual level component. When the computer device changes the color of the target virtual level component in the virtual level, it is first necessary to determine the target color to be replaced by the target virtual level component. After determining the target color, the computer device changes the color of the virtual level component based on the color rendering function provided by the application program.
[0067] Specifically, the computer device changes the color attribute of the map material based on the determined target color, and applies the map material with changed color attribute to the virtual level component, so that the color of the target virtual level component can be modified to the target color, thereby achieving the color change of the target virtual level component.
[0068] Indicatively, Figure 3 As shown, it shows a schematic diagram of the color change process of a virtual level provided by an exemplary embodiment of the present application. The level editing interface displays the relevant card screen as well as exit controls, save controls, perspective change controls, etc., and a color change control 301 is displayed in the level editing interface. In response to a trigger operation on the color change control 301 (a click operation in the corresponding figure), a description information input control 301 is displayed in the level editing interface (the text in the corresponding figure is a control for inputting a stylized description of a color). The user can input stylized description information through the description information input control. After receiving the stylized description information input through the description information input control, the computer device changes the color of the virtual level components in the virtual level. As shown in FIG. Figure 3 As shown, the first virtual level component 302 is changed to the first color, the triangle virtual level component 3031 in the second virtual level component 303 is changed to the second color, the colors of the remaining parts remain consistent before and after the change, and the color of the third virtual level component 304 is changed to the third color.
[0069] In summary, in the embodiment of the present application, during the virtual level editing process, the computer device can perform stylized color changes on the virtual level based on the received stylized description information, that is, the color of the target virtual level component in the virtual level is changed so that the color of the changed target virtual level component conforms to the color style characteristics described by the stylized description information, thereby realizing the stylized color change requirement of the virtual level. By adopting the solution provided by this embodiment, the stylized color can be set for the virtual level in one click according to the stylized description information input by the user, and the user does not need to manually select virtual level items in batches and then manually change the color, and the design of UGC levels with stylized colors is more intelligent.
[0070] The solution provided in the embodiment of the present application can be applied to UGC levels. In the level editing interface, users can choose to change the color of the virtual level in two ways: custom color change or stylized color change. The two ways of color change are described below.
[0071] In the case of stylized color change, the stylized description information is the description information that can describe the style characteristics of the language in the expected virtual level, and the stylized description information can be any one of three different forms of description information, namely, style description text in text form, style reference image in image form, and color style palette in color palette form. Since the stylized description information can be in any of the three forms, the input controls for inputting different forms of description information should also be different.
[0072] Optionally, in response to a triggering operation on the color change control, a text input control is displayed in the level editing interface, and the text input control is used to trigger the input of a style description text in text form.
[0073] Optionally, the text input control is a text input box control, and the user can input corresponding text by clicking the text input box control.
[0074] Optionally, in response to a triggering operation on the color change control, an image input control is displayed in the level editing interface, and the image input control is used to trigger a style reference image in the form of an input image.
[0075] Optionally, the image input control is a file input control, or a picture input control, etc., which is not limited in this embodiment.
[0076] Optionally, in response to a triggering operation on the color change control, a color palette input control is displayed in the level editing interface, and the color palette input control is used to trigger a color style palette in the form of an input color palette.
[0077] Optionally, the color palette may be a color palette or a color strip, which is composed of a plurality of color blocks, and the colors of the color blocks in the color palette may be the same or different.
[0078] Optionally, the color palette (color strip) can be a picture or a set of colors.
[0079] Indicatively, Figure 4 , which shows a schematic diagram of a level editing component provided by an exemplary embodiment of the present application. In response to a triggering operation on a color change control, a style description input control 402 is displayed in a level editing interface 401, and a text input control 4021, an image input control 4022, and a color change input control 4023 are displayed in the style description input control 402.
[0080] After receiving the stylized description information, the computer device needs to change the color of the virtual level components according to the stylized description information, so that the color matching of the virtual level components in the virtual level conforms to the stylized description information.
[0081] In a possible implementation, the color stylization migration of the level screen may be performed according to the stylized description information, so as to determine the modified colors of different virtual level components, and then perform the color change.
[0082] Please refer to Figure 5 , which shows a flowchart of a color changing process of a virtual level component provided by an exemplary embodiment of the present application, and the process includes the following steps.
[0083] Step 501: Acquire a level screen under the current viewing angle, wherein the level screen includes visible virtual level components in the virtual level under the current viewing angle.
[0084] In the level editing interface, a virtual level is composed of several virtual level components, and various editing controls for editing the virtual level are also included. Under different viewing angles, the virtual level components contained in the level screen that can be observed are different, and in general, the user may have the intention to replace the virtual level components in the current level screen. Therefore, after receiving the stylized description information input through the description information virtual control, the level screen under the current viewing angle is obtained, so as to facilitate the subsequent color stylization migration step.
[0085] Optionally, some non-visible virtual level components in the current viewing angle may be blocked by visible virtual level components in the current viewing angle, or some non-visible virtual level components in the current viewing angle may be not within the level screen.
[0086] Optionally, the non-visible virtual level component may be located inside the visible virtual component under the current viewing angle, or may be located outside the visible virtual component under the current viewing angle.
[0087] Step 502 : Perform color stylization migration on the level screen based on the stylized description information input through the description information input control to generate a color style migration image.
[0088] The color of the color style transfer image conforms to the color style features described by the stylized description information. The process of color stylization transfer is the process of transferring the color stylization features described by the stylized description information from the stylized description information to the level screen. The colors corresponding to different pixels in the generated color stylization transfer image are the embodiment of the changed colors of the virtual level components in the two-dimensional level screen.
[0089] In a possible implementation, the computer device uses an AI model to perform color stylization migration on the level screen based on the input stylized description information to generate a color stylized migration image.
[0090] Optionally, the AI model is used to associate the level information extracted from the level screen with the received stylized description information, thereby achieving color stylization migration and generating a color stylized image.
[0091] Optionally, based on the input stylized description information having different styles, color stylization migration can be achieved based on natural language processing, computer vision, computer imaging and other technologies, for example, large language models and Transformer models in the field of natural language processing and StyleGAN (Style Generative AdversarialNets, style-based generative adversarial networks) in the field of computer vision, etc.
[0092] It should be noted that this embodiment uses an AI model to achieve color stylization migration of the level screen. Various AI models in related fields can be used, and the specific type of the AI model used is not limited.
[0093] Since the stylized description information may be in different forms of description information, the color stylization migration of the level screen based on the stylized description information may include the following three possible methods.
[0094] 1. The stylized description information is a style reference image in the form of an image.
[0095] Perform image style recognition on the style reference image to obtain color style features indicated by the style reference image.
[0096] Optionally, after receiving the style reference image input through the image input control, image style recognition is performed on the style reference image based on computer graphics and other technologies to obtain color style features indicated by the style reference image.
[0097] Optionally, the color style features of the style reference image are extracted through an AI style determination model, and the AI style determination model is used to extract the color style of the image.
[0098] The color style features and level images are input into the color stylization network to obtain the color style transfer image generated by the color stylization network.
[0099] The color stylization network is used to transfer the color style of the level image under the current perspective based on the color style features, thereby generating a color style transfer image. The generated color style transfer image has the color style features described by the style reference image.
[0100] Optionally, the color stylization network may be a convolutional neural network, a variational autoencoder, a generative adversarial network, a diffusion network, etc., which is not limited in this embodiment.
[0101] For illustration, please refer to Figure 6 , which shows an effect diagram of color change based on a style reference image provided by an exemplary embodiment of the present application. The scene in the style reference image 601 is a sunset scene, in which the overall color style should be golden yellow. The color style of the virtual level after the color change based on the style reference image 601 should be consistent with the style reference image, and the color style of the target virtual level component in the changed level screen 602 should be consistent with the style reference image, also golden yellow.
[0102] 2. The stylized description information is a color style palette in the form of a palette.
[0103] Perform color extraction on the color style palette to obtain the colors contained in the color style palette.
[0104] Optionally, when receiving the color style palette input through the palette input control, the computer device first extracts the color of the style palette to obtain the colors contained in the color style palette. In addition, the computer device can also extract the hue information, color type, color richness and other information of the color style palette.
[0105] Optionally, the computer device performs color extraction on the color style palette through a neural network model, and obtains hue information, color information, and other information of the color style palette that can characterize the color style of the color style palette.
[0106] Subsequently, the colors contained in the color style palette and the level screen are input into the color stylization network to obtain a color style transfer image generated by the color stylization network.
[0107] Optionally, the hue information, color information, color type, color richness and other information of the extracted color style palette are input into a color stylization network to generate a color style transfer image.
[0108] For illustration, please refer to Figure 7, which shows a color change effect diagram based on a color style palette provided by an exemplary embodiment of the present application. The color style palette 701 received by the computer device contains ten different colors. The computer device extracts information such as color and hue contained in the color style palette 701, and the color style migration image generated according to the color style palette 701 should conform to the color style of the color style palette, so that the color style of the virtual level after the color change is consistent with the color style palette 701. The color of the target virtual level component in the level screen 702 after the color change conforms to the color style palette 701.
[0109] 3. When the stylized description information is a style description text in text form.
[0110] Semantic recognition is performed on the style description text to obtain the color style features indicated by the style description text.
[0111] The color style features and level images are input into the color stylization network to obtain the color style transfer image generated by the color stylization network.
[0112] Optionally, when receiving style description text input through the text input control, the computer device performs semantic recognition on the style description text through an AI language model to obtain color style features indicated by the style description text.
[0113] For example, if the input style description text is "new green", the computer device can recognize that the color style characteristics indicated by the style description text should include green by performing semantic recognition on the style description text, and can determine that the color style is a green color. For another example, if the input style description text is "lemon color", the computer device can recognize that the color style should be yellow by performing semantic recognition on the style description text, and the obtained color style transfer image should also be of yellow style.
[0114] For example, if the input style description text is "red, orange, mint blue and earth tones", the computer device can determine that it contains multiple colors by performing semantic recognition on the style description text. The computer device then determines the color style features based on the multiple colors, and the color style features should include the features of the above multiple colors. In addition, by recognizing the semantics of the above multiple colors in the style description text based on the AI language model, the multiple color texts can also be semantically associated, and the color style features determined by the computer device can also represent the associated features of the colors.
[0115] For another example, if the input style description text is "change the virtual character's clothing to rainbow colors", the computer device can determine that the target virtual level component targeted by the style description text is the virtual character's clothing (including clothes and accessories, etc.) by performing semantic recognition on the style description text, and can determine that the color style indicated by the style description text is rainbow colors, that is, including seven colors such as red, orange, yellow, and green.
[0116] For illustration, please refer to Figure 8 , which shows an effect diagram of color change based on style description text provided by an exemplary embodiment of the present application. The level screen 801 shown in the figure is the level screen after the computer device changes the color of the virtual level based on the style description text. Where the style description text is "gorgeous rainbow", after the virtual color change, Figure 8 As shown, the colors of the virtual level components are quite diverse, with the color style characteristics of a rainbow.
[0117] Step 503: based on the mapping relationship between pixels in the color style transfer image and the virtual level components, change the color of the target virtual level component.
[0118] After acquiring the level screen under the current viewing angle, the computer device determines the mapping relationship between different pixels in the level screen and the virtual level components, that is, virtual level components at different positions correspond to different pixel indexes.
[0119] Optionally, the computer device may determine the mapping relationship between different pixels in the level screen and the virtual level components by marking colors for the virtual level components. First, the computer device marks each virtual level component in the level screen under the current viewing angle with a unique color, that is, the color is used as the index identifier of the virtual level component. Then, each color in the level screen is traversed to determine the mapping relationship between different pixels in the level screen and the virtual level components.
[0120] Among them, the color style transfer image has the same size as the level screen, so after determining the mapping relationship between different pixels in the level screen and the virtual level components, the mapping relationship between pixels in the color style image and the virtual level components can be determined.
[0121] Subsequently, the target color corresponding to the visible virtual level component in the current level screen can be determined based on the colors of different pixels in the color style transfer image and the mapping relationship between different pixels in the color style transfer image and the virtual level component. This process is the process of mapping the color of the visible virtual level component in the three-dimensional virtual space based on the corresponding relationship between pixels and colors in the two-dimensional image. Among them, the color of the pixel in the color style image is the target color of the virtual relationship component corresponding to the pixel.
[0122] In a possible implementation, the color style transfer image retains the layout, shape, size and other features of the virtual level components in the level screen to a certain extent. When the color is changed based on the mapping relationship between the color style transfer image and the virtual level components, a virtual level component may correspond to multiple colors. When determining the target color corresponding to the virtual level component, it is necessary to determine the target color corresponding to the virtual level component by sampling. The sampling method may be random sampling, layered sampling, etc., which is not limited in this embodiment.
[0123] Finally, the computer device changes the color of the target virtual level component, and the color of the virtual level component after the change conforms to the determined target color.
[0124] In the embodiment of the present application, the computer device extracts color features from the description information in different forms in a corresponding manner based on the stylized description information in different forms, thereby enriching the forms of color stylized descriptions that the computer device can receive, and the computer device can intelligently judge the stylized description information and match the semantic information contained in the stylized information itself, thereby performing color stylization migration on the level screen according to the stylized description text. The color style migration image obtained by stylized migration conforms to the stylized description information, so that based on the mapping relationship between the pixels in the color style migration image and the virtual level components, the target virtual level components are modified to the corresponding colors, and the virtual level color stylization is intelligent and efficient. In addition, in the embodiment of the present application, the user only needs to input one form of stylized description information to achieve the color change of the target virtual level component in the virtual level, which is simple and quick to operate.
[0125] In the process of changing the color of the target virtual object according to the style transfer image, it is necessary to determine the target virtual level component in the level, and the user can change only the color of the target virtual object by setting different target virtual level component changes.
[0126] Optionally, the user can select some virtual level components in the level editing interface through a selection operation to determine them as target virtual level components. Optionally, the user can set different virtual level ranges to set virtual level components within different ranges as target virtual level components. This embodiment does not limit the method for determining the target virtual level component.
[0127] In a possible implementation, a change range selection control is displayed in the level editing interface, and the change range selection control is used to trigger the selection of a color change range in the virtual level. When a selection operation is received on the change range selection control, the computer device determines a target virtual level component based on the color change range indicated by the selection operation.
[0128] Optionally, the color change range is a maximum of all virtual level components in the virtual level and a minimum of one virtual level component.
[0129] Optionally, when the color change range of the selection operation indication is the current field of view, the visible virtual level component in the level screen is determined as the target virtual level component.
[0130] When the color change range is the current field of view, that is, the target virtual level component is only the visible virtual level component under the current viewing angle. In the virtual level, the non-visible virtual level component blocked by the visible virtual level component under the current viewing angle is not the target virtual level component.
[0131] Optionally, when the color change range of the selection operation indication is global, all virtual level components in the virtual level are determined as target virtual level components, and the target virtual level components include visible virtual level components and non-visual virtual level components.
[0132] Optionally, when the color change range indicated by the selection operation is local, a non-visual virtual level component within the virtual level whose distance to a visible virtual level component within the level screen is less than a distance threshold, and a visible virtual level component are determined as target virtual level components, and the non-visual virtual level component is located inside the visible virtual level component or outside the visible virtual level component.
[0133] Optionally, the distance threshold is the Euclidean distance, that is, the straight-line distance between two virtual level components in the virtual space of the virtual level. The distance between two virtual level components in the virtual space can be calculated by the following formula:
[0134]
[0135] Wherein, x1, y1, z1 are the three-dimensional space coordinates of the first virtual level component, x2, y2, z2 are the three-dimensional space coordinates of the second virtual level component, and d is the distance between the first virtual level component and the second virtual level component. When calculating the distance between the non-visible virtual level component and the visible virtual level component, a non-visible virtual level component and the corresponding visible virtual level component are the first virtual level component and the second virtual level component, respectively.
[0136] Optionally, the computer device stores virtual level information, including position information, type information, color information and other attribute information of virtual level components in the virtual level.
[0137] Indicatively, Fig. 9 As shown, it shows a schematic diagram of a change range selection control provided by an exemplary embodiment of the present application. Among them, a color change control 901 is displayed in the level editing interface, and a change range selection control 902 is displayed. The change range selection control in the figure selects the change range by sliding, and can also be controlled by a roller or button, which is not limited in this embodiment. In the change range selection control 902 in the figure, there are different current field of view ranges, global ranges, and local ranges to choose from. The local range is controlled by controlling the distance threshold, and the closer the distance threshold is to the global range, the larger it is. In addition, a description information input control 903 is also displayed in the level editing interface.
[0138] After determining the target virtual level component, the computer device needs to change the color of the target virtual level component based on the mapping relationship between the pixels in the color style transfer image and the virtual level component. When the color change range indicated by the selection indication operation is different, the corresponding color change method may also be different, which can be divided into the following two methods for color change.
[0139] 1. Change the color within the field of view.
[0140] In the case of changing the color in the field of view, the target color corresponding to the target virtual level component is determined based on the pixel color of the pixel in the color style transfer image and the mapping relationship between the pixels in the level screen and the visible virtual level components.
[0141] Changes the color of the target Virtual Level Component to the target color.
[0142] When changing the color within the field of view, the computer device directly determines the target color corresponding to the target virtual level component based on the color index of the visible virtual level component in the level and the correspondence between the pixels in the color style transfer image and the visible virtual level component, thereby achieving the stylization of the virtual level color within the current field of view.
[0143] For illustration, please refer to Fig.10, which shows a schematic diagram of a color style transfer image and a level screen provided by an exemplary embodiment of the present application. After the computer device obtains the level screen, a unique color is set for each virtual level component in the first level screen 1010 before the color change. As shown in the figure, the first virtual level component 1011, the second virtual level component 1012, the third virtual level component 1013, the fourth virtual level component 1014, the fifth virtual level component 1015, the sixth virtual level component 1016, the seventh virtual level component 1017, the eighth virtual level component 1018 and the ninth virtual level component 1019 correspond to different colors respectively. As shown in the figure, in the color style transfer image 1020 generated by the computer device based on the stylized description information, there are different pixel areas with different colors, wherein the colors corresponding to the first pixel area 1021, the second pixel area 1022, the fourth pixel area 1024, the fifth pixel area 1025, and the sixth pixel area 1026 are the second color, then in the first level screen, the virtual level components corresponding to the above pixel areas are the first virtual level component 1011, the second virtual level component 1012, the third virtual level component 1013, the fifth virtual level component 1015, and the sixth virtual level component 1016, respectively, then in the second level screen 1030 after the color change, the colors of these virtual items are changed to the second color. The third pixel area in the color style transfer image 1020 corresponds to the third color, and in the first level screen, the third pixel area 1023 corresponds to the third virtual level component, then the third color should be the target color of the third virtual level component, and the third virtual level component in the corresponding second level screen 1030 should be the third color. The seventh pixel region 1027 in the color style transfer image 1020 corresponds to the first color, and the seventh pixel region in the first level screen corresponds to the first virtual level component, then the first color should be the target color of the seventh virtual level component 1017, and the seventh virtual level component in the corresponding second level screen 1030 should be the first color. Similarly, the eighth pixel region 1028 and the ninth pixel region 1029 correspond to the fourth color, and correspond to the eighth virtual level component and the ninth virtual level component, respectively, then the eighth virtual level component and the ninth virtual level component in the second level screen 1030 after the color change are both the fourth color.
[0144] Indicatively, Fig.11, which shows a schematic diagram of a color change effect diagram in the field of view provided by an exemplary embodiment of the present application. The level screen 1101 in the current perspective is the screen after the color change, and all the level screen 1101 in the current perspective are visible virtual components. After the color change in the field of view, the colors of other non-visible virtual level components in the virtual level will not change. For example, in the global level screen 1102 in the figure, the first area 1104 is the visible virtual level component that changes color in the field of view, and the second area 1103 is the non-visible virtual level component that changes color in the field of view, and its color does not change.
[0145] 2. Make global or local color changes.
[0146] In the case of global or local color change, the computer device clusters the target virtual level components to obtain component clustering results, which are used to characterize the degree of correlation between different virtual level components in the level. Then, based on the mapping relationship between pixels in the color style transfer image and the virtual level components and the component clustering results, the color of the target virtual level components is changed.
[0147] Optionally, in the case of a global color change, the computer device clusters all virtual level components in the virtual level based on level component information of the virtual level components in the virtual level to obtain a component clustering result. The level component information includes the position of the virtual level component, the category of the virtual level component, the placement of the virtual level component, and other information representing the placement status of the current virtual level component in the virtual level.
[0148] Optionally, in the case of performing a local color change, the computer device clusters the target virtual level components based on the level component information of the non-visible virtual level components in the virtual level whose distance from the visible virtual level components is less than a distance threshold and the level component information of the visible virtual level components to obtain a component clustering result.
[0149] Optionally, after obtaining the component clustering results, the computer device determines the target color corresponding to the visible virtual level component at the current viewing angle based on the pixel color of the pixels in the color style transfer image and the mapping relationship between the pixels in the level screen and the virtual level components.
[0150] Based on the correlation between the non-visual virtual level component and the visible virtual level component indicated by the component clustering result and the target color corresponding to the visible virtual level component, the target color of the non-visual virtual level component is determined.
[0151] Optionally, when the correlation degree is greater than the correlation degree threshold, it is determined that the non-visual virtual level component is related to the visual virtual level component, and the target color of the non-visual virtual level component is determined to be the same as the target color of the visual virtual level component.
[0152] Optionally, the color proximity between the non-visual virtual level component and the visible virtual level component is positively correlated with the correlation between the non-visual virtual level component and the visible virtual level component.
[0153] After determining the target color, the computer device changes the target virtual level component to the target color.
[0154] After determining the target virtual level component, the computer device changes the color parameters of the virtual level component, re-renders the target virtual level component, and displays the virtual level component after the color change in the current field of view to achieve color stylization of the virtual level.
[0155] Indicative, Fig.12 A schematic diagram showing a non-visual virtual level component and a visual virtual level component provided by an exemplary embodiment of the present application is shown.
[0156] The virtual level 1210 includes a first virtual level component 1211, a second virtual level component 1212, a third virtual level component 1213, and a fourth virtual level component 1214. The third virtual level component is inside the first virtual level component, the second virtual level component is behind the first level component, and the fourth virtual level component is located in front of the first virtual level component. In the current viewing angle, the virtual level 1210 displays a level screen 1220 in the level editing interface, and the level screen only includes the first virtual level component 1211. It is determined that the first virtual level component is a visible virtual level component. The second virtual level component 1212, the third virtual level component 1213, and the fourth virtual level component 1214 are all non-visible virtual level components. In the case of global color change, the colors of the four virtual level components will all be changed. In the case of local color change, if the distance between the non-visible virtual level component and the visible virtual level component is less than the distance threshold, the non-visible virtual level component will be changed in color. Assuming that the distance threshold is less than D1, when the distance between the fourth virtual level component 1214 and the first virtual level component 1211 is D1, when the local color change is performed, the fourth virtual level component 1214 is not the target virtual level component and the color change is not performed.
[0157] Indicative, Fig.13A schematic diagram of a global level color change effect provided by an exemplary embodiment of the present application is shown. The figure shows a schematic diagram of a level screen in the current perspective and a global level screen after the color change. When the global level color is changed, all virtual level components in the virtual level are changed in color.
[0158] Indicative, indicative, Fig.14 A schematic diagram of a local level color change effect provided by an exemplary embodiment of the present application is shown. The level screen under the current viewing angle includes a visible virtual level component, which corresponds to the visible virtual level component in the first area 1402 of the global level screen. In the case of a local level color change, a distance threshold is set according to the distance threshold. The non-visible virtual level component whose distance to the visible virtual level component is less than the distance threshold belongs to the target virtual level component, corresponding to the non-visible virtual component in the second area 1403 of the global level screen in the figure. The non-visible virtual level component whose distance to the visible virtual level component is greater than the distance threshold does not change color, corresponding to the non-visible virtual group level component in the third area 1401 in the figure.
[0159] In the embodiment of the present application, there is a change range selection control in the level editing interface for the user to select the range of color change, so that the purpose of selecting multiple target virtual level components with one key can be achieved, reducing the workload and making the operation simple and fast. In addition, the color of the non-visual virtual level component is determined based on the degree of association between the non-visual virtual level component and the visible virtual level component, so that the color of the non-visual virtual level component can be determined more conveniently, so that the user can change the color of the global or local virtual level component without adjusting the observer's perspective during the process of changing the global level color, and the operation is simpler.
[0160] In another possible implementation, the application providing the virtual level editing function also supports the user to change the color independently, that is, the user can change the color of the virtual level components in the virtual level by independently selecting a custom color.
[0161] Indicative, Fig.15 A schematic diagram of a level editing interface for autonomous color change provided by an exemplary embodiment of the present application is shown. In the level editing interface 1501, a color group selection control 1502 is displayed for the user to select the desired target color.
[0162] Optionally, assuming that the color representation in the game is based on the RGB (Red Green Blue) color model, red, green, and blue represent three different color channels, and RGB superposition can represent richer colors. When designing each virtual level component during the development phase, the color material can be adjusted to match the corresponding normal map, so that during the application process, the user can change the color of the target virtual level component through the level editing interface.
[0163] Among them, the map materials with color attributes corresponding to different target virtual level components are set by the developer according to different target virtual level components. The normal map is on the concave and convex surface of the virtual level component, and each normal direction of the surface of the virtual level component is marked through the RGB color channel. In the application process, the color attribute of the map material can be changed by receiving the color set by the user, and the map material is applied to the virtual model of the virtual level component, so that the color of the virtual component can be changed. For example, the original color of the virtual level component is blue, and the user performs a color change operation on the virtual level component. The color change operation indicates that the color of the virtual level component is changed to green. Then, the computer device responds to the user's color change operation on the virtual level component, and changes the color attribute of the map material of the virtual level component, thereby changing the color of the virtual level component to green.
[0164] Indicative, Fig.16 As shown, it shows a schematic diagram of a texture and a virtual level component provided by an exemplary embodiment of the present application. The texture is applied to the virtual model of the virtual level component to obtain the virtual level component.
[0165] Please refer to Fig.17, which shows a schematic diagram of the color change process of a virtual level provided by an exemplary embodiment of the present application. In the virtual level editing process, on the one hand, the user can change the color independently, and change the color based on the basic color change function provided by the application that provides the virtual level editing function. On the other hand, the color stylization of the virtual level can be generated based on the stylized description information input by the user, and the color of the virtual level can be changed. First, it is necessary to obtain the level screen under the current perspective, including the visual virtual level component, and input the level interface and color style features into the color stylization network. The color style feature is the color stylization feature represented by the stylized description information (style description text, style reference image or color style palette) input by the user. Semantic recognition is performed on the style description text, image style recognition is performed on the style reference image, and color extraction is performed on the color style palette to obtain the color style feature. After obtaining the level screen, it is necessary to determine the correspondence between the pixels in the level screen and the virtual level components, so as to determine the target color of the virtual level components in combination with the color style transfer image output by the color stylization network, so as to change the color of the virtual level components under the current field of view and realize the color stylization under the current field of view.
[0166] In the process of global level color stylization in the virtual level, it is also necessary to perform cluster analysis on the virtual level components based on the level component information of the virtual level components in the virtual level, obtain the cluster analysis results, and determine the target color of the non-visible virtual level components according to the cluster analysis results and the color style transfer image, so as to change the color of all virtual levels in the level, thereby realizing the color stylization of the global level. For the color stylization of the local level, it is only necessary to constrain the color change according to the distance threshold to realize the local color stylization.
[0167] Please refer to Fig.18 , which shows a structural block diagram of a virtual level color changing device provided by an exemplary embodiment of the present application, the device comprising:
[0168] A display module 1801 is used to display a virtual level in a level editing interface, wherein the virtual level is composed of virtual level components;
[0169] The display module 1801 is further configured to, in response to a triggering operation on a color change control in the level editing interface, display a description information input control in the level editing interface, wherein the description information input control is used to trigger input of stylized description information, and the stylized description information is used to describe the color style characteristics of the virtual level;
[0170] The color changing module 1802 is configured to change the color of a target virtual level component in the virtual level based on the stylized description information input through the description information input control, wherein the color of the target virtual level component after the color change conforms to the color style feature described by the stylized description information.
[0171] Optionally, the display module 1801 is used to:
[0172] In response to a triggering operation on the color change control, displaying a text input control in the level editing interface, the text input control being used to trigger input of a style description text in a text form;
[0173] In response to a triggering operation on the color change control, displaying an image input control in the level editing interface, the image input control being used to trigger a style reference image in the form of an input image;
[0174] In response to a triggering operation on the color change control, a color palette input control is displayed in the level editing interface, wherein the color palette input control is used to trigger a color style palette in the form of an input color palette.
[0175] Optionally, the color changing module 1802 is used to:
[0176] Acquire a level picture at a current viewing angle, wherein the level picture includes visible virtual level components in the virtual level at the current viewing angle;
[0177] Performing color stylization migration on the level screen based on the stylized description information input through the description information input control to generate a color style migration image, wherein the color of the color style migration image conforms to the color style feature described by the stylized description information;
[0178] Based on the mapping relationship between pixels in the color style transfer image and the virtual level components, the color of the target virtual level component is changed.
[0179] Optionally, when the stylized description information is a style reference image in the form of an image, the color changing module 1802 is configured to:
[0180] Performing image style recognition on the style reference image to obtain the color style feature indicated by the style reference image;
[0181] The color style features and the level screen are input into a color stylization network to obtain the color style transfer image generated by the color stylization network.
[0182] Optionally, when the stylized description information is a color style palette in the form of a palette, the color changing module 1802 is used to:
[0183] Performing color extraction on the color style palette to obtain colors included in the color style palette;
[0184] The colors included in the color style palette and the level screen are input into a color stylization network to obtain the color style transfer image generated by the color stylization network.
[0185] Optionally, when the stylized description information is a style description text in text form, the color changing module 1802 is used to:
[0186] Performing semantic recognition on the style description text to obtain the color style feature indicated by the style description text;
[0187] The color style features and the level screen are input into a color stylization network to obtain the color style transfer image generated by the color stylization network.
[0188] Optionally, a change range selection control is displayed in the level editing interface, and the change range selection control is used to trigger the selection of a color change range in the virtual level;
[0189] The device also includes:
[0190] The target component determination module is configured to, upon receiving a selection operation on the change range selection control, determine the target virtual level component based on the color change range indicated by the selection operation.
[0191] Optionally, the target component determination module is configured to determine, when the color change range of the selection operation indication is the current field of view, that the visible virtual level component in the level screen is the target virtual level component;
[0192] In a case where the color change range of the selection operation indication is global, all virtual level components in the virtual level are determined as the target virtual level components, the target virtual level components including the visible virtual level components and the non-visual virtual level components;
[0193] In a case where the color change range of the selection operation indication is local, a non-visual virtual level component within the virtual level and a distance between the visible virtual level component within the level screen and the non-visual virtual level component are determined as the target virtual level component, and the visual virtual level component is located inside the visual virtual level component or outside the visual virtual level component.
[0194] Optionally, when changing the color in the field of view, the color changing module 1802 is used to:
[0195] Determining a target color corresponding to the target virtual level component based on pixel colors of pixels in the color style transfer image and a mapping relationship between pixels in the level screen and the visual virtual level components;
[0196] The color of the target virtual level component is changed to the target color.
[0197] Optionally, in the case of performing a global or local color change, the color change module 1802 is used to:
[0198] Clustering the target virtual level components to obtain component clustering results, wherein the component clustering results are used to characterize the degree of correlation between different virtual level components in the level;
[0199] Based on the mapping relationship between pixels in the color style transfer image and virtual level components and the component clustering result, the color of the target virtual level component is changed.
[0200] Optionally, the color changing module 1802 is used to:
[0201] Determining a target color corresponding to the visible virtual level component at a current viewing angle based on the pixel colors of the pixels in the color style transfer image and the mapping relationship between the pixels in the level screen and the virtual level components;
[0202] Determining a target color of the non-visual virtual level component based on the correlation between the non-visual virtual level component and the visual virtual level component indicated by the component clustering result and the target color corresponding to the visual virtual level component;
[0203] The target virtual level component is changed to the target color.
[0204] In summary, in the embodiment of the present application, during the virtual level editing process, the computer device can perform stylized color changes on the virtual level based on the received stylized description information, that is, the color of the target virtual level component in the virtual level is changed so that the color of the changed target virtual level component conforms to the color style characteristics described by the stylized description information, thereby realizing the stylized color change requirement of the virtual level. By adopting the solution provided by this embodiment, the stylized color can be set for the virtual level in one click according to the stylized description information input by the user, and the user does not need to manually select virtual level items in batches and then manually change the color, and the design of UGC levels with stylized colors is more intelligent.
[0205] It should be noted that: the device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0206] Please refer to Fig.19 , which shows a schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application. Specifically, the computer device 1900 includes a central processing unit (CPU) 1901, a system memory 1904 including a random access memory 1902 and a read-only memory 1903, and a system bus 1905 connecting the system memory 1904 and the central processing unit 1901. The computer device 1900 also includes a basic input / output system (I / O system) 1906 that helps transmit information between various devices in the computer, and a large-capacity storage device 1907 for storing an operating system 1913, application programs 1914 and other program modules 1915.
[0207] The basic input / output system 1906 includes a display 1908 for displaying information and an input device 1909 such as a mouse and a keyboard for user inputting information. The display 1908 and the input device 1909 are connected to the central processing unit 1901 through an input / output controller 1910 connected to the system bus 1905. The basic input / output system 1906 may also include an input / output controller 1910 for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 1910 also provides output to a display screen, a printer, or other types of output devices.
[0208] The mass storage device 1907 is connected to the central processing unit 1901 through a mass storage controller (not shown) connected to the system bus 1905. The mass storage device 1907 and its associated computer readable media provide non-volatile storage for the computer device 1900. That is, the mass storage device 1907 may include a computer readable medium (not shown) such as a hard disk or drive.
[0209] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include random access memory (RAM), read-only memory (ROM), flash memory or other solid-state storage technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, cassette, tape, disk storage or other magnetic storage devices. Of course, those skilled in the art will know that the computer storage medium is not limited to the above. The above-mentioned system memory 1904 and mass storage device 1907 can be collectively referred to as memory.
[0210] The memory stores one or more programs, and the one or more programs are configured to be executed by one or more central processing units 1901. The one or more programs contain instructions for implementing the above-mentioned methods. The central processing unit 1901 executes the one or more programs to implement the methods provided by the above-mentioned various method embodiments.
[0211] According to various embodiments of the present application, the computer device 1900 can also be connected to a remote computer on the network through a network such as the Internet. That is, the computer device 1900 can be connected to the network 1912 through the network interface unit 1911 connected to the system bus 1905, or the network interface unit 1911 can be used to connect to other types of networks or remote computer systems (not shown).
[0212] The embodiment of the present application further provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is loaded and executed by a processor to implement the color changing method of the virtual level described in the above embodiment.
[0213] Optionally, the computer readable storage medium may include: ROM, RAM, solid state drives (SSD) or optical disks, etc. Among them, RAM may include resistance random access memory (ReRAM) and dynamic random access memory (DRAM).
[0214] The embodiment of the present application provides a computer program product, which includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the color changing method of the virtual level described in the above embodiment.
[0215] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0216] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0217] Moreover, before collecting relevant data of the user and during the process of collecting relevant data of the user, the present application may display a prompt interface, pop-up window or output voice prompt information, and the prompt interface, pop-up window or voice prompt information is used to prompt the user that its relevant data is currently being collected, so that the present application starts executing the relevant steps of obtaining relevant data of the user only after obtaining the confirmation operation issued by the user to the prompt interface or pop-up window, otherwise (that is, when the confirmation operation issued by the user to the prompt interface or pop-up window is not obtained), the relevant steps of obtaining relevant data of the user are terminated, that is, the relevant data of the user is not obtained.
[0218] It should be understood that the "multiple" mentioned in this article refers to two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated with each other are in an "or" relationship. And the "first", "second", etc. mentioned in this article are used to distinguish similar objects, and are not used to limit a specific order or sequence. In addition, the step numbers described in this article only exemplify a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application do not limit this.
[0219] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for changing the color of a virtual level, characterized in that: The method comprises: Displaying a virtual level in a level editing interface, wherein the virtual level is composed of virtual level components; In response to a triggering operation on a color change control in the level editing interface, displaying a description information input control in the level editing interface, the description information input control being used to trigger input of stylized description information, the stylized description information being used to describe color style characteristics of the virtual level; Based on the stylized description information input through the description information input control, a color of a target virtual level component in the virtual level is changed, wherein after the color change, the color of the target virtual level component conforms to the color style feature described by the stylized description information.
2. The method according to claim 1, characterized in that The step of displaying a description information input control in the level editing interface in response to a triggering operation on a color change control in the level editing interface includes at least one of the following: In response to a triggering operation on the color change control, displaying a text input control in the level editing interface, the text input control being used to trigger input of a style description text in a text form; In response to a triggering operation on the color change control, displaying an image input control in the level editing interface, the image input control being used to trigger a style reference image in the form of an input image; In response to a triggering operation on the color change control, a color palette input control is displayed in the level editing interface, wherein the color palette input control is used to trigger a color style palette in the form of an input color palette.
3. The method according to claim 1, characterized in that: The step of changing the color of a target virtual level component in the virtual level based on the stylized description information input through the description information input control includes: Acquire a level picture at a current viewing angle, wherein the level picture includes visible virtual level components in the virtual level at the current viewing angle; Performing color stylization migration on the level screen based on the stylized description information input through the description information input control to generate a color style migration image, wherein the color of the color style migration image conforms to the color style feature described by the stylized description information; Based on the mapping relationship between pixels in the color style transfer image and the virtual level components, the color of the target virtual level component is changed.
4. The method according to claim 3, characterized in that In a case where the stylized description information is a style reference image in an image form, the step of performing color stylization migration on the level screen based on the stylized description information input through the description information input control to generate a color style migration image includes: Performing image style recognition on the style reference image to obtain the color style feature indicated by the style reference image; The color style features and the level screen are input into a color stylization network to obtain the color style transfer image generated by the color stylization network.
5. The method according to claim 3, characterized in that: In a case where the stylized description information is a color style palette in the form of a palette, the step of performing color stylization migration on the level screen based on the stylized description information input through the description information input control to generate a color style migration image includes: Performing color extraction on the color style palette to obtain colors included in the color style palette; The colors included in the color style palette and the level screen are input into a color stylization network to obtain the color style transfer image generated by the color stylization network.
6. The method according to claim 3, characterized in that In a case where the stylized description information is a style description text in a text form, performing color stylization migration on the level screen based on the stylized description information input through the description information input control to generate a color style migration image includes: Performing semantic recognition on the style description text to obtain the color style feature indicated by the style description text; The color style features and the level screen are input into a color stylization network to obtain the color style transfer image generated by the color stylization network.
7. The method according to claim 3, characterized in that A change range selection control is displayed in the level editing interface, and the change range selection control is used to trigger the selection of a color change range in the virtual level; The method further comprises: In a case where a selection operation on the change range selection control is received, the target virtual level component is determined based on the color change range indicated by the selection operation.
8. The method according to claim 7, characterized in that The step of determining the target virtual level component within the color change range indicated by the selection operation includes: When the color change range of the selection operation indication is the current field of view, determining the visible virtual level component in the level screen as the target virtual level component; In a case where the color change range of the selection operation indication is global, all virtual level components in the virtual level are determined as the target virtual level components, the target virtual level components including the visible virtual level components and the non-visual virtual level components; In a case where the color change range of the selection operation indication is local, a non-visual virtual level component within the virtual level and a distance between the visible virtual level component within the level screen and the non-visual virtual level component are determined as the target virtual level component, and the visual virtual level component is located inside the visual virtual level component or outside the visual virtual level component.
9. The method according to claim 8, characterized in that In the case of changing the color within the field of view, the color of the target virtual level component is changed based on the mapping relationship between the pixels in the color style transfer image and the virtual level component, including: Determining a target color corresponding to the target virtual level component based on pixel colors of pixels in the color style transfer image and a mapping relationship between pixels in the level screen and the visual virtual level components; The color of the target virtual level component is changed to the target color.
10. The method according to claim 8, characterized in that In the case of performing a global or local color change, the step of changing the color of the target virtual level component based on a mapping relationship between pixels in the color style transfer image and the virtual level component includes: Clustering the target virtual level components to obtain component clustering results, wherein the component clustering results are used to characterize the degree of correlation between different virtual level components in the level; Based on the mapping relationship between pixels in the color style transfer image and virtual level components and the component clustering result, the color of the target virtual level component is changed.
11. The method according to claim 10, characterized in that The step of changing the color of the target virtual level component based on the mapping relationship between the pixels in the color style transfer image and the virtual level component and the component clustering result includes: Determining a target color corresponding to the visible virtual level component at a current viewing angle based on the pixel colors of the pixels in the color style transfer image and the mapping relationship between the pixels in the level screen and the virtual level components; Determining a target color of the non-visual virtual level component based on the correlation between the non-visual virtual level component and the visual virtual level component indicated by the component clustering result and the target color corresponding to the visual virtual level component; The target virtual level component is changed to the target color.
12. A device for changing the color of a virtual level, characterized in that: The device comprises: A display module, used for displaying a virtual level in a level editing interface, wherein the virtual level is composed of virtual level components; The display module is further configured to display a description information input control in the level editing interface in response to a triggering operation on a color change control in the level editing interface, wherein the description information input control is used to trigger input of stylized description information, and the stylized description information is used to describe the color style characteristics of the virtual level; The color changing module is configured to change the color of a target virtual level component in the virtual level based on the stylized description information input through the description information input control, wherein the color of the target virtual level component after the color change conforms to the color style feature described by the stylized description information.
13. A computer device, characterized in that: The computer device includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the color changing method of the virtual level according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The readable storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the color changing method of the virtual level according to any one of claims 1 to 11.
15. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the color changing method of a virtual level according to any one of claims 1 to 11.