Lighting effect processing method and apparatus in game, and program product and electronic device

By projecting patterns of light source components in the game scene, the problem of single light source in the game is solved, the diversity of lighting effects and the improvement of realism are achieved, and the user experience is enhanced.

WO2025195070A1PCT designated stage Publication Date: 2025-09-25NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/077230
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-20
Filing Date
2025-02-13
Publication Date
2025-09-25

AI Technical Summary

Technical Problem

The role of virtual light sources in games is relatively simple, and it is difficult to simulate the visual experience of the real world, which affects the user experience.

Method used

In the game scene, the first pattern is projected onto the target scene component through the preset light source component, and the second pattern is formed according to the relative posture relationship between the light source component and the target component, simulating the light source pattern projection in the real world.

Benefits of technology

Improved the diversity and realism of lighting effects, and enhanced the immersion of the game screen.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025077230_25092025_PF_FP_ABST
    Figure CN2025077230_25092025_PF_FP_ABST
Patent Text Reader

Abstract

Provided are a lighting effect processing method and apparatus (1200) in a game, and a program product and an electronic device (1300). The method comprises: displaying a game scene in a graphical user interface provided by a game operation program, wherein the game scene comprises a plurality of scene components, the plurality of scene components comprising a preset light source component and a target scene component (402) that is at least partially located in a lighting region (401) of the preset light source component, the preset light source component being configured with a first pattern, and the preset light source component having a visible effect or an invisible effect in the game scene; and on the basis of a relative pose relationship between the preset light source component and the target scene component (402), displaying on the target scene component (402) a second pattern (4031, 4032, 4033, 4034) formed on the basis of the first pattern. In this way, a pattern projection effect of a preset light source component is realized, and the diversity of lighting effects is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device, program product and electronic device for processing lighting effects in games

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to a Chinese patent application filed on March 20, 2024, with application number 202410330370.5 and entitled “Method, device, program product and electronic device for processing lighting effects in games,” the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present disclosure relates to the field of computer and game technology, and in particular to a method for processing lighting effects in a game, a device for processing lighting effects in a game, a computer program product, and an electronic device. Background Art

[0004] With the development of computer and human-computer interaction technology, games have become a popular form of entertainment. In the virtual scene of the game, a virtual light source is generally set up to illuminate virtual objects such as people or objects in the scene, allowing users to see the virtual objects.

[0005] However, in related technologies, the role of virtual light sources in games is relatively simple, and they can usually only achieve lighting effects. It is difficult to simulate the visual experience of the real world, which affects the user experience. Summary of the Invention

[0006] The present disclosure provides a method for processing lighting effects in a game, a device for processing lighting effects in a game, a computer program product, and an electronic device, so as to at least to some extent solve the problem that the role of a virtual light source in a game is relatively single.

[0007] According to a first aspect of the present disclosure, a method for processing lighting effects in a game is provided, the method comprising: displaying a game scene in a graphical user interface provided by running a game program; the game scene comprising a plurality of scene components, the plurality of scene components comprising a preset light source component and a target scene component at least partially within an illumination area of ​​the preset light source component; the preset light source component is configured with a first pattern; the preset light source component has a visible effect or an invisible effect in the game scene; and displaying a second pattern formed based on the first pattern on the target scene component according to a relative posture relationship between the preset light source component and the target scene component.

[0008] According to a second aspect of the present disclosure, a lighting effect processing device in a game is provided, the device comprising: a game scene display processing module, configured to execute displaying a game scene in a graphical user interface provided by running a game program; the game scene comprises a plurality of scene components, the plurality of scene components comprising a preset light source component and a target scene component at least partially within an illumination area of ​​the preset light source component; the preset light source component is configured with a first pattern; the preset light source component has a visible effect or an invisible effect in the game scene; a pattern display processing module, configured to execute displaying a second pattern formed based on the first pattern on the target scene component according to a relative posture relationship between the preset light source component and the target scene component.

[0009] According to a third aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method of the first aspect and possible implementations thereof are implemented.

[0010] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the method of the above-mentioned first aspect and its possible implementation methods by executing the executable instructions.

[0011] The technical solution disclosed in this disclosure has the following beneficial effects:

[0012] The first pattern of the preset light source component is projected onto the target scene component to display a corresponding second pattern. This, on the one hand, achieves the patterned illumination effect of the preset light source component, allowing the light source to no longer be limited to providing illumination, but to present a variety of light patterns at different locations in the game scene, thereby increasing the diversity of lighting effects. Furthermore, this solution simulates pattern projection in the real world, allowing the first pattern to be processed to form the final projected second pattern, which helps enhance the realism of the game screen and improve the user's sense of immersion. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] FIG1 shows a system architecture diagram of one embodiment of the present exemplary embodiment;

[0014] FIG2 is a flowchart showing a method for processing lighting effects in a game according to one exemplary embodiment of the present invention;

[0015] FIG3 is a schematic diagram showing a game editing scene and scene component adding controls according to one exemplary embodiment of the present invention;

[0016] FIG4 shows a schematic diagram showing a second pattern according to one embodiment of the present invention;

[0017] FIG5 is a schematic diagram showing a first pattern and a second pattern according to an exemplary embodiment of the present invention;

[0018] FIG6 shows a flow chart of obtaining a second pattern based on a first pattern according to one exemplary embodiment;

[0019] FIG7A is a schematic diagram showing a movable preset light source assembly according to one exemplary embodiment of the present invention;

[0020] FIG7B is a schematic diagram showing a movable preset light source assembly according to one exemplary embodiment of the present invention;

[0021] FIG8 is a schematic diagram showing a method of blurring the edge of a second pattern according to one embodiment of the present invention;

[0022] FIG9 is a schematic diagram showing a rotating preset light source assembly according to the present exemplary embodiment;

[0023] FIG10 is a schematic diagram showing a scaling illumination area according to one exemplary embodiment of the present invention;

[0024] FIG11 is a schematic diagram showing a color editing operation according to the present exemplary embodiment;

[0025] FIG12 is a schematic structural diagram of a lighting effect processing device in a game according to one exemplary embodiment of the present invention;

[0026] FIG. 13 is a schematic structural diagram of an electronic device according to the exemplary embodiment. DETAILED DESCRIPTION

[0027] Exemplary embodiments of the present disclosure will be described more fully hereinafter with reference to the accompanying drawings.

[0028] The accompanying drawings are schematic illustrations of the present disclosure and are not necessarily drawn to scale. Some of the block diagrams shown in the accompanying drawings may be functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, or in hardware modules or integrated circuits, or in networks, processors or microcontrollers. The embodiments can be implemented in various forms and should not be construed as being limited to the examples set forth herein. The features, structures or characteristics described in the present disclosure may be combined in one or more embodiments in any suitable manner. In the description below, many specific details are provided to provide a full description of the embodiments of the present disclosure. However, those skilled in the art will appreciate that one or more specific details may be omitted when implementing the technical solution of the present disclosure, or that other methods, components, devices, steps, etc. may be used to replace one or more specific details.

[0029] Virtual light sources in game scenes can illuminate virtual objects. For example, in related technologies, a physics engine simulates and calculates the propagation of light from a light source, calculates the lighting parameters received by virtual objects, and adjusts the display of virtual objects accordingly, allowing users to see the virtual objects. The inventors have found that most light sources in games only provide lighting effects and have a relatively simple function. In contrast, light sources in the real world can provide a more diverse visual experience, such as changing the color or pattern of objects seen by the human eye. Obviously, light sources in games cannot simulate the visual experience of the real world, which affects the user experience.

[0030] In view of the above problems, an exemplary embodiment of the present disclosure provides a method for processing lighting effects in a game, so that a preset light source component in a game scene can illuminate other scene components to produce a pattern effect.

[0031] Figure 1 shows the system architecture of the operating environment of this exemplary embodiment. This system architecture may include a terminal device 110 and a server 120. Terminal device 110 may be a mobile phone, tablet computer, personal computer, smart wearable device, game console, or other device. It has a display function and is capable of displaying a graphical user interface (GUI). The GUI may include an operating system interface or an application interface, etc. A game program, such as a client program for an online game, is installed on terminal device 110. When terminal device 110 runs the game program, game scenes or related game interfaces may be displayed in the GUI. Server 120 generally refers to the backend system that provides the game service in this exemplary embodiment and may be a single server or a cluster of multiple servers. A game server program is deployed on server 120 to perform server-side game data processing. Terminal device 110 and server 120 may be connected via a wired or wireless communication link for data transmission. The lighting effect processing method in this exemplary embodiment may be executed by any one or more of terminal device 110 and server 120.

[0032] In one embodiment, the lighting effect processing method can be implemented and executed based on a cloud interaction system. The cloud interaction system can be the system architecture described above. Various cloud applications, such as cloud gaming, can be run within the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program execution body and the game screen presentation body are separated. The storage and operation of the in-game control and interaction methods are completed on the cloud gaming server (such as the aforementioned server 120). The cloud gaming client (such as the aforementioned terminal device 110) is responsible for receiving and sending data and presenting the game screen. For example, the cloud gaming client can be a display device with data transmission capabilities close to the user, such as a mobile terminal, television, computer, or PDA; while the cloud gaming server in the cloud performs information processing. When playing or editing a game, the user operates the cloud gaming client to send operation instructions to the cloud gaming server. The cloud gaming server runs the game according to the operation instructions, encodes and compresses the game screen and other data, and returns it to the cloud gaming client via the network. Finally, the cloud gaming client decodes and outputs the game screen.

[0033] In one embodiment, the lighting effect processing method can be implemented in a stand-alone game. No server deployment is required, and the entire game program can be installed on the terminal device 110 and the lighting effect processing method can be executed.

[0034] In one embodiment, referring to FIG2 , a method for processing lighting effects in a game may include the following steps:

[0035] Step S210: Displaying a game scene in a graphical user interface provided by running the game program; the game scene includes a plurality of scene components, the plurality of scene components including a preset light source component and a target scene component at least partially within an illumination area of ​​the preset light source component; the preset light source component is configured with a first pattern; and the preset light source component has a visible effect or an invisible effect in the game scene;

[0036] Step S220: displaying a second pattern formed based on the first pattern on the target scene component according to the relative posture relationship between the preset light source component and the target scene component.

[0037] Based on the method shown in Figure 2, the first pattern of the preset light source component itself is projected onto the target scene component to display a corresponding second pattern. On the one hand, this achieves the patterned illumination effect of the preset light source component, allowing the light source to no longer only provide illumination but also present a variety of light patterns at different locations in the game scene, thereby enhancing the diversity of lighting effects. On the other hand, this solution simulates the pattern projection conditions in the real world and can perform certain processing on the first pattern to form the final projected second pattern, which helps to enhance the realism of the game screen and improve the user's immersion.

[0038] Each step in Figure 2 is described in detail below.

[0039] In step S210, step S210, a game scene is displayed in a graphical user interface provided by running a game program; the game scene includes multiple scene components, the multiple scene components include a preset light source component and a target scene component that is at least partially within the illumination area of ​​the preset light source component; the preset light source component is configured with a first pattern; the preset light source component has a visible effect or an invisible effect in the game scene.

[0040] The game scene includes a game editing scene or a game running scene. It should be understood that the lighting effect processing method in this exemplary embodiment can be implemented only in the game editing scene, only in the game running scene, or in both the game editing scene and the game running scene.

[0041] The game editing scene is a game scene loaded in an editing state. For example, the game provides an editing function for players. The user can open the editor interface in the main game program, or use the editing program that comes with the main game program, choose to create a new game scene or select an existing game scene for editing, thereby entering the game editing scene. The game running scene is a game scene loaded in a running state (or playing state). For example, the user selects a game scene (which can be a game scene that comes with the game program, usually edited in advance by the developer, or a game scene that the user has customized) in the game preparation interface (such as the game lobby) to start the game, thereby entering the game running scene.

[0042] A game scene includes multiple scene components. A scene component refers to the people or objects in the game scene and can be any virtual object, such as characters, buildings, mechanisms, vehicles, furniture, etc. In the game editing scene, a scene component can be built-in (e.g., a game program may provide multiple preset game scenes of different styles, and when a user selects a preset game scene for editing, the scene component is initially built-in) or user-generated. In the game running scene, a scene component can be a virtual model generated corresponding to the scene component in the game editing scene. The same scene component can have the same or different appearance or performance in the game editing scene and the game running scene. For example, a block component can be displayed transparently in the game editing scene for user convenience, but can be displayed opaquely in the game running scene. For another example, a component representing a specific effect area (such as a "spawn point," the initial location of a player-controlled virtual object in the game) can be visible in the game editing scene to facilitate user editing, but invisible in the game running scene. The same scene component can be stored as different types of program objects in the game editing scene and the game running scene to achieve the above-mentioned differences in appearance or performance effects, or to achieve differences in other aspects.

[0043] In one embodiment, multiple scene components can be combined into a scene component combination. For example, a block component can be combined with the circular surface of a cylindrical component to form a roller-shaped mechanism component. In this way, complex and diverse components of people or objects can be formed in the game. For ease of distinction, a single scene component can be referred to as a basic scene component. It cannot be separated and can be regarded as the smallest component unit in the game editing scene. Unless otherwise specified, the scene component mentioned in this article can refer to either a basic scene component or a scene component combination.

[0044] In the game editing scene, users can edit the game scene's environment, such as background, weather, and lighting. They can also edit scene components, such as adding or deleting specific scene components, moving, rotating, and scaling scene components, and editing their color and other properties. When the game editing scene is displayed, a scene component add control can be provided to generate corresponding scene components in the game editing scene in response to user triggering operations. The scene component add control is used to generate scene components already in the game program. The scene component add control can be divided into different component types. Figure 3 shows a schematic diagram of the game editing scene and the scene component add control. As shown in Figure 3, the scene component add control can be provided in the form of a list (including one or more levels of lists, with Figure 3 showing a second-level list), which lists one or more levels of component categories. For example, "Structure," "Artifact," "Environment," "Mechanism," "Creature," and "Combination" are first-level component categories. Each first-level component category includes one or more second-level component categories. For example, the first-level component category "Artifact" includes second-level component categories such as "Furniture," "Interior Decoration," and "Lighting." Each secondary component category includes one or more scene component adding controls, such as the secondary component category "furniture" includes scene component adding controls such as "log coffee table", "round low table", "wooden small table", and "European table". Users can trigger operations on the scene component adding controls, such as clicking and dragging operations, to generate corresponding scene components in the game editing scene. For example, in Figure 3, the user drags the "round low table" scene component adding control to a certain location in the game editing scene, which can trigger the generation of a round low table scene component at that location. The present disclosure does not limit the form, appearance, etc. of the scene component adding control. The scene component adding control can display the name of the scene component or the icon of the scene component.

[0045] In one embodiment, the scene component add control is configured with a corresponding scene component template, which includes pre-edited scene component parameters. Scene component parameters can include one or more parameters such as shape, color, texture, transparency, material, size, orientation, physical properties, and other parameters. When users edit a scene component in the game editing scene, they need to set the scene component parameters for the scene component. If a scene component is generated in the game editing scene using the scene component add control, the scene component parameters in the scene component template corresponding to the scene component add control can be called to quickly generate the scene component based on these parameters. It can be understood that the scene component add control is a pre-edited, templated scene component that configures the scene component parameters in the form of a template and provides them to the user via the scene component add control. When users use the scene component add control, they are effectively applying the scene component template, thereby improving editing efficiency. Of course, after a scene component is generated, its parameters can be modified, such as by scaling, changing its size, rotating, and changing its orientation, or by setting its color or transparency.

[0046] Game programs can include built-in scene component addition controls, such as game developers pre-editing scene component templates and configuring them as scene component addition controls for players to use. Furthermore, players can also be allowed to configure scene component addition controls. For example, players can model scene components in the game editing scene or other editing interface and save the scene component parameters to form a scene component template and configure it as a scene component addition control.

[0047] In one embodiment, users can edit and update the scene component add control. For example, they can modify the scene component template corresponding to the scene component add control, modify the scene component parameters therein, save the changes, and then update the scene component template corresponding to the scene component add control. When subsequently generating a scene component in a game editing scene using the scene component add control, the scene component parameters in the updated scene component template can be used to generate the scene component.

[0048] In one embodiment, a corresponding scene component add control can also be configured for scene component combinations. For example, a user can combine a block component onto the circular surface of a cylinder component to form a wheel-shaped mechanism component. Based on the scene component parameter configuration of this mechanism component, a new scene component add control can be generated. Subsequently, users can use this scene component add control to generate mechanism components in the game editing scene. This allows for one-click generation of scene component combinations, which is very convenient.

[0049] A virtual camera can be set up in the game scene. A virtual camera is a shooting tool in the game program that simulates a real camera and can be used to shoot to form the picture in the game scene. The virtual camera can be set up at any position in the game scene and shoot the scene from any perspective, that is, it can have any posture, and its posture can be fixed or dynamically changing. In addition, any number of virtual cameras can be set up in the game scene, and different virtual cameras can shoot different game scene pictures. For example, two virtual cameras are set up in the game scene, one of which is used to shoot the main picture in the game scene, and the other is used to shoot the auxiliary picture in the game scene. When the main picture shows the front of a scene component, the auxiliary picture can show the side or back of the scene component, etc., to help users see more comprehensive information.

[0050] In this exemplary embodiment, the scene components in the game scene include at least one preset light source component. The preset light source component refers to a light source type scene component that has the pattern illumination effect in this exemplary embodiment. Of course, non-preset light source components can also be set in the game scene, such as light source components that only have lighting effects but no pattern illumination effects. The present disclosure does not limit the illumination type of the preset light source component. For example, the preset light source component can be a point light source component, a surface light source component, a conical light source component, etc. The preset light source component has an illumination area. Depending on its illumination type, the illumination area can be a spherical area, a rectangular or cubic area, a conical area, etc. In one embodiment, the preset light source component is a surface light source component, and its light-emitting portion is a plane, called the light-emitting plane, which emits light in a direction perpendicular to the light-emitting plane, which is the illumination direction. It should be noted that the surface light source component is usually a single-sided light source, which can be understood as emitting light only from the front and not from the back. The illumination direction is the direction facing the front. The illumination area of ​​the surface light source component is the area formed by extending the preset illumination distance from its light-emitting plane to the illumination direction. The preset illumination distance refers to the maximum illumination distance of the surface light source component. It can be set according to the specific situation or can be set to infinity. For example, if the light-emitting surface is rectangular or square, the illumination area is a cuboid or cube area; if the light-emitting surface is circular, the illumination area is a cylindrical area.

[0051] Preset light source components can have visible or invisible effects in the game scene. For example, a preset light source component can be set as a lamp with a specific shape, allowing the user to directly see the preset light source component. For another example, a preset light source component can be set to have no shape, that is, completely invisible, which can reduce the resource usage of the preset light source component and the game scene.

[0052] In one embodiment, the game scene is a game editing scene, and a visual object corresponding to the lighting area can be displayed in the game editing scene. Referring to Figure 4, the preset light source component is not displayed in the game editing scene, and a virtual object in the shape of a cube can be displayed to represent the lighting area 401 of the preset light source component, so that the user can intuitively see the lighting range, lighting direction, lighting distance, etc. of the preset light source component, so as to facilitate editing operations, such as accurately editing the relative position of the preset light source component and other scene components. Exemplarily, the visual object corresponding to the lighting area can be implemented as a scene component, which may not have physical properties and only serves as a visual effect.

[0053] The preset light source component is configured with a first pattern. The first pattern is a pattern that can be displayed by the illumination of the preset light source component. It should be noted that during the illumination process of the preset light source component, the first pattern may change, and the second pattern is actually displayed. The first pattern may also have a visible effect or an invisible effect in the game scene. For example, when the preset light source component is invisible in the game scene, the first pattern is also invisible; or, when the preset light source component is visible in the game scene, the first pattern is also visible, such as when the preset light source component is a light board, the first pattern is the pattern on the surface of the light board; or, when the preset light source component is visible in the game scene, the first pattern is invisible. The first pattern may be an attribute of the preset light source component, such as a pattern attribute may be added to the data of the preset light source component, and the data of the first pattern may be added. The data of the first pattern may be in the format of an image, texture, etc.

[0054] The target scene component is a scene component that is in the illumination area of ​​the preset light source component and can present a lighting effect. Generally, the physical scene component has a visible appearance and can present a lighting effect. When it is in the illumination area, it can be used as a target scene component. Correspondingly, the non-physical scene component does not have a visible appearance. For example, the above-mentioned components representing a certain effect area (such as the "birth point") cannot present a lighting effect and therefore cannot be used as a target scene component. Of course, the present disclosure is not limited to this. For example, in some game scenes, the physical scene component is configured to have a light absorption characteristic and cannot present a lighting effect and cannot be used as a target scene component. The non-physical scene component is configured to be able to present a lighting effect and can be used as a target scene component.

[0055] Continuing to refer to FIG. 2 , in step S220 , according to the relative posture relationship between the preset light source component and the target scene component, a second pattern formed based on the first pattern is displayed on the target scene component.

[0056] The second pattern is the pattern formed by illuminating the first pattern onto the target scene component, equivalent to the effect of projecting the pattern of the light source onto the target scene component. During the illumination and projection process, the first pattern may undergo certain changes, such as changes in clarity and color. In this exemplary embodiment, a second pattern is formed based on the first pattern to simulate the pattern changes during the illumination process, and the second pattern is displayed on the target scene component, thereby achieving the pattern illumination effect of the preset light source component. Compared with the related art where the light source can only achieve the lighting effect, this improves the diversity of lighting effects.

[0057] Figure 5 shows a schematic diagram of a first pattern and a second pattern. It can be seen that the first pattern has a higher clarity, and the first pattern can be blurred to obtain a second pattern with a lower clarity than the first pattern. Furthermore, the first pattern can be blurred to varying degrees based on the specific game settings to produce different second patterns, thereby achieving a richer range of game lighting effects. For example, the greater the distance between the preset light source component and the target scene component, the more blurred the second pattern.

[0058] In one embodiment, it can be considered that the pattern does not change during the illumination and projection process, that is, the first pattern can be used as the second pattern.

[0059] The relative position relationship between the preset light source component and the target scene component, including their relative position, relative rotation angle, and other spatial relationships. The relative position relationship can affect the lighting conditions of the preset light source component on the target scene component, such as lighting distance and lighting angle, thereby affecting the pattern display effect.

[0060] In one embodiment, the preset light source assembly is further configured with lighting parameters, including but not limited to one or more of the following parameters: basic light intensity, which refers to the unattenuated light intensity emitted by the preset light source assembly; light attenuation parameter, which refers to the degree to which light intensity decreases with increasing light propagation distance. For example, if the light intensity and light propagation distance satisfy a quadratic attenuation function, the light attenuation parameter may include parameters in the quadratic attenuation function; and lighting color parameter, which may be the light color of the preset light source assembly itself. The above-mentioned step of displaying a second pattern formed based on the first pattern on the target scene assembly according to the relative posture relationship between the preset light source assembly and the target scene assembly may include the following steps:

[0061] Processing the first pattern according to the illumination parameters and the relative posture relationship to obtain a second pattern;

[0062] The second pattern is displayed on the target scene component.

[0063] The relative position relationship can affect parameters such as the clarity of the illuminated pattern, while the illumination parameters can affect the luminescence and brightness of the illuminated pattern. Combining the illumination parameters and the relative position relationship, the first pattern can be processed to generate a second pattern. By displaying the second pattern, the pattern illumination and lighting effects of the preset light source assembly can be presented.

[0064] In one embodiment, referring to FIG6 , the step of processing the first pattern according to the illumination parameters and the relative posture relationship to obtain the second pattern may include the following steps S610 and S620:

[0065] Step S610: adjusting at least one attribute to be processed of the first pattern according to the relative posture relationship.

[0066] The attributes to be processed are attributes that may change during the pattern projection process. They may be related to the distance of light propagation or attributes that are affected by the environment, such as clarity, color, brightness, etc. At least one attribute to be processed of the first pattern is adjusted based on the relative position relationship, such as reducing clarity or changing color.

[0067] In one embodiment, the step of adjusting at least one attribute to be processed of the first pattern according to the relative posture relationship may include the following steps:

[0068] At least one to-be-processed attribute of the first pattern is adjusted according to a distance between the preset light source component and the target scene component along the illumination direction of the preset light source component.

[0069] Among them, the distance between the preset light source component and the target scene component along the illumination direction of the preset light source component, that is, the distance from the light source to the target scene component along the illumination direction, can be called the light propagation distance. It can be considered that the attribute to be processed of the first pattern changes with the propagation of light, and the degree of change is related to the light propagation distance. The relationship between the attribute to be processed and the light propagation distance can be configured in advance, for example, there is a negative correlation between clarity, brightness and light propagation distance. Based on the relationship between the attribute to be processed and the light propagation distance, the value of the attribute to be processed corresponding to a specific light propagation distance can be calculated, and the attribute to be processed of the first pattern can be adjusted accordingly, reflecting the effect that the attribute to be processed changes with the propagation of light.

[0070] Furthermore, at least one attribute to be processed of the first pattern can be adjusted based on the relative rotation angle between the preset light source assembly and the target scene assembly. For example, the angle between the illumination direction of the preset light source assembly and the illuminated surface of the target scene assembly can be obtained, which is the light illumination angle. A 90-degree illumination angle indicates forward illumination of the illuminated surface, and the illumination effect is generally strongest at this angle. A smaller illumination angle results in a weaker illumination effect. Therefore, the attribute to be processed can be determined based on the illumination angle, such as the positive correlation between the illumination angle and clarity.

[0071] Of course, the attribute to be processed of the first pattern may also be adjusted in combination with the light propagation distance and the light irradiation angle.

[0072] In one embodiment, the attribute to be processed includes clarity, and the step of adjusting at least one attribute to be processed of the first pattern according to the relative posture relationship may include the following steps:

[0073] Determine the clarity attenuation parameter according to the relative posture relationship;

[0074] The first pattern is sampled based on the sharpness decay parameter.

[0075] Among them, the clarity attenuation parameter can be: the clarity of the second pattern (such as resolution, number of pixels or other clarity indicators), the clarity attenuation ratio of the second pattern relative to the first pattern (such as the clarity of the second pattern is 1 / 2, 1 / 4, etc. of the first pattern). Generally, the greater the light propagation distance, the lower the clarity of the second pattern, or the smaller the light irradiation angle, the lower the clarity of the second pattern. The clarity attenuation parameter can be determined based on the relative posture relationship. For example, the light propagation distance and the clarity attenuation parameter conform to a piecewise function relationship. When the light propagation distance is in a certain numerical range, it corresponds to a specific clarity attenuation parameter. The larger the numerical range, the higher the degree of clarity attenuation.

[0076] Sampling the first pattern based on the definition attenuation parameter, such as downsampling the first pattern according to the definition of the second pattern, is equivalent to reducing the definition of the first pattern.

[0077] In one embodiment, the step of sampling the first pattern based on the clarity attenuation parameter may include the following steps:

[0078] Based on the definition attenuation parameter, a target sampling image is determined from the multi-level sampling images of the first pattern, and texture sampling is performed on the target sampling image.

[0079] Among them, the multi-level sampling image of the first pattern can be obtained by performing multi-level sampling on the first pattern. For example, 1 / 2 sampling is performed on the first pattern to obtain a 1 / 2 sampling image, and the 1 / 2 sampling image is sampled again by 1 / 2 to obtain a 1 / 4 sampling image, and the 1 / 4 sampling image is sampled again by 1 / 2 to obtain a 1 / 8 sampling image... In this way, a multi-level sampling image with gradually decreasing clarity corresponding to the first pattern is obtained. Based on the clarity attenuation parameter, the degree of attenuation can be determined, and the sampling image corresponding to the degree is the target sampling image. Furthermore, the texture coordinates of the second pattern can also be determined based on the clarity attenuation parameter, and texture sampling is performed in the target sampling image through the texture coordinates, thereby obtaining the first pattern after clarity attenuation (that is, the second pattern before adding the lighting effect).

[0080] In one embodiment, the attribute to be processed includes brightness. The step of performing attenuation processing on at least one attribute to be processed of the first pattern according to the relative posture relationship may include the following steps:

[0081] Determine the brightness attenuation parameter according to the relative posture relationship;

[0082] The brightness of the first pattern is attenuated based on the brightness attenuation parameter.

[0083] The brightness attenuation parameter can be a brightness attenuation factor or the desired brightness. Generally, the greater the light propagation distance, the lower the brightness after attenuation, or the smaller the light irradiation angle, the lower the brightness after attenuation. The brightness attenuation parameter can be determined based on the relative position relationship. For example, the relationship between the light propagation distance and the brightness attenuation parameter follows a piecewise function relationship. When the light propagation distance is within a certain numerical range, a specific brightness attenuation parameter corresponds. A larger numerical range indicates a higher degree of clarity attenuation.

[0084] In one embodiment, the brightness of the first pattern is the brightness without considering the lighting effect of the preset light source component, and can be the brightness of the initial light source pattern (such as the brightness of the initial image corresponding to the first pattern imported by the user). The above-mentioned determination of the brightness attenuation parameter based on the relative posture relationship and the brightness attenuation processing performed on the first pattern are processing without considering the lighting effect of the preset light source component, such as the brightness attenuation of the first pattern under natural light in the game scene. Subsequently, further lighting effects can be added through step S620 to superimpose the lighting effect of the preset light source component on the pattern display.

[0085] Step S620 , adding a lighting effect to the adjusted first pattern according to the lighting parameters to obtain a second pattern.

[0086] Adding a lighting effect to the first pattern after adjusting the attributes to be processed according to the lighting parameters, such as rendering a glowing effect, increasing the brightness, etc., to obtain a second pattern.

[0087] In one embodiment, the step of adding a lighting effect to the adjusted first pattern according to the lighting parameters to obtain the second pattern may include:

[0088] Determine lighting effect parameters based on relative posture relationship and lighting parameters;

[0089] A lighting effect is added to the adjusted first pattern based on the lighting effect parameter to obtain a second pattern.

[0090] Among them, the lighting effect parameters are used to characterize the lighting effect (such as light intensity) received by the target scene component, which is the result of the lighting parameters taking into account the propagation of light. Therefore, the lighting effect parameters can be determined based on the relative posture relationship and the lighting parameters. For example, the lighting parameters include basic light intensity and light intensity attenuation parameters. The relative posture relationship reflects the light propagation distance. The basic light intensity of the preset light source component is attenuated according to the light propagation distance and the light intensity attenuation parameter to calculate the light intensity reaching the target scene component. Based on the lighting effect parameters, a certain degree of lighting effect can be added to the first pattern after adjusting the attributes to be processed. For example, the corresponding brightness adjustment parameters can be calculated based on the lighting effect parameters, wherein the greater the light intensity received by the target scene component, the greater the brightness adjustment parameter, indicating a higher degree of brightness improvement, and the brightness of the adjusted first pattern is improved according to the brightness adjustment parameter. Alternatively, the corresponding luminous level and other parameters can be calculated based on the lighting effect parameters, and a luminous effect is added to the adjusted first pattern accordingly. The second pattern is obtained after adding the lighting effect.

[0091] In one embodiment, the clarity of the first pattern can be adjusted according to the relative posture relationship, the lighting effect parameters can be determined according to the relative posture relationship and the lighting parameters, and the lighting effect is added to the first pattern after the clarity is adjusted based on the lighting effect parameters to obtain the second pattern.

[0092] In the method of Figure 6, when determining the second pattern based on the first pattern, the light propagation factor caused by the relative posture relationship and the lighting factor of the preset light source component itself are taken into account. The second pattern displayed can include factors such as light propagation and light source illumination, so that the pattern illumination effect and lighting effect of the preset light source component can be fully reflected in the game scene screen, and can more accurately and fully simulate the lighting effect of the real world.

[0093] It should be understood that in addition to adjusting the clarity, brightness, and other processing attributes based on the relative posture relationship, and adding lighting effects based on the lighting effect parameters, other processing can also be performed on the first pattern. For example, if the climate of the game scene is taken into consideration, when it rains in the game scene, a pattern blurring effect caused by rain can be added to the first pattern. If there is natural light (such as sunlight) in the game scene, the brightness and other related attributes of the first pattern can be adjusted according to the natural light.

[0094] In one embodiment, the step of processing the first pattern according to the illumination parameters and the relative posture relationship to obtain the second pattern may include the following steps:

[0095] At least one attribute to be processed of the first pattern is adjusted according to the illumination parameters and the relative posture relationship to obtain a second pattern.

[0096] Among them, the first attribute to be processed of the first pattern can be adjusted according to the illumination parameters. The first attribute to be processed is an attribute related to the illumination parameters and unrelated to the relative posture relationship, such as color. The second attribute to be processed of the first pattern can be adjusted according to the relative posture relationship. The first attribute to be processed is an attribute related to the relative posture relationship and unrelated to the illumination parameters, such as clarity. Alternatively, the third attribute to be processed of the first pattern can be adjusted according to the combined influence of the illumination parameters and the relative posture relationship. The third attribute to be processed is an attribute related to both the relative posture relationship and the illumination parameters, such as brightness.

[0097] Exemplarily, the clarity of the first pattern can be adjusted according to the relative posture relationship, and the brightness of the first pattern can be adjusted according to the illumination parameters and the relative posture relationship to obtain the second pattern. Among them, the clarity of the first pattern can be adjusted according to the relative posture relationship, and reference can be made to the relevant content of step S610, such as determining the clarity attenuation parameter according to the relative posture relationship, and sampling the first pattern based on the clarity attenuation parameter to achieve clarity adjustment. The illumination parameters may include basic light intensity and light intensity attenuation parameters, and the relative posture relationship may reflect the light propagation distance. The light intensity received by the target scene component may be determined according to the illumination parameters and the relative posture relationship, and then the brightness adjustment parameter may be calculated (such as a brightening value, the greater the light intensity received by the target scene component, the greater the brightening value), and the brightness of the first pattern may be adjusted accordingly to obtain the second pattern.

[0098] In one embodiment, at least one attribute to be processed of the first pattern can be adjusted according to the relative posture relationship to obtain a second pattern. For example, the clarity of the first pattern can be adjusted according to the relative posture relationship. For another example, the brightness of the first pattern can be adjusted according to the relative posture relationship. Among them, the first pattern can be a pattern superimposed with the lighting effect of the preset light source component, such as the brightness of the initial light source pattern can be adjusted based on the basic light intensity of the preset light source component to obtain the first pattern. It can be understood that the first pattern is the pattern presented by placing the initial light source pattern on the preset light source component (the light propagation distance is 0, and it is assumed that there is no light intensity attenuation), and its brightness information includes the lighting effect of the preset light source component. In this way, when the second pattern is generated based on the first pattern, the brightness attenuation parameter of the first pattern can be determined according to the relative posture relationship, and the first pattern can be subjected to brightness attenuation processing without adding the lighting effect of the preset light source component to the second pattern.

[0099] In one embodiment, if the distance between the preset light source component and the target scene component along the preset light source component's illumination direction is relatively close, such as less than a preset distance threshold, then the light propagation distance is considered to have no effect on the pattern. Alternatively, if the light propagation angle is relatively large, such as greater than a preset angle threshold, then the light propagation angle is considered to have no effect on the pattern. Thus, the properties of the first pattern to be processed can be omitted, and only lighting effects can be added to the first pattern based on the lighting parameters to produce the second pattern.

[0100] In one embodiment, the lighting effect processing method may further include the following steps:

[0101] If the relative posture relationship changes, the corresponding adjusted second pattern is displayed on the target scene component according to the changed relative posture relationship.

[0102] As described above, the relative position relationship affects the pattern display effect. When the relative position relationship changes, the second pattern will also change accordingly. Therefore, the second pattern can be adjusted based on the changed relative position relationship, and the corresponding adjusted second pattern can be displayed on the target scene component. It should be noted that the relative position relationship includes the relative position and relative rotation angle relationship between the preset light source component and the target scene component in different directions. Changes in the relative position or relative rotation angle in a specific direction can be set to cause the second pattern to change. For example, if the light propagation distance changes, the corresponding adjusted second pattern will be displayed on the target scene component based on the changed distance, such as a second pattern with varying clarity or brightness. However, changes in the distance between the preset light source component and the target scene component in directions other than the illumination direction may have no effect on the second pattern. If the light illumination angle changes, the corresponding adjusted second pattern will be displayed on the target scene component based on the changed angle. Changes in angles other than the illumination angle between the preset light source component and the target scene component may have no effect on the second pattern.

[0103] Figures 7A and 7B illustrate the changes in the second pattern when the preset light source assembly is moved relative to the target scene assembly, based on Figure 4. Referring to Figure 4, the illumination direction is the negative Y-axis direction, and the target scene assembly 402 is located in the illumination direction and within the illumination area 401. At this point, the Y-axis coordinate of the preset light source assembly is 6.0. The distance along the Y-axis (i.e., the light propagation distance) between the preset light source assembly and the target scene assembly 402 is relatively large, resulting in a lower clarity and blurriness of the second pattern 4031. If the preset light source assembly is moved along the illumination direction, as shown in Figure 7A, the Y-axis coordinate after the movement is 4.0. Compared to Figure 4, the light propagation distance is shortened, and the adjusted second pattern 4032 is displayed, with improved clarity compared to the second pattern 4031 in Figure 4. Referring to Figure 7B, the preset light source assembly is further moved based on Figure 7A, and the Y-axis coordinate after the movement reaches 2.0. The light propagation distance is further shortened, and the adjusted second pattern 4033 is displayed, with improved clarity compared to the second pattern 4032 in Figure 7A. It can be seen that as the light propagation distance continues to shorten, the clarity of the second pattern continues to improve. When the light propagation distance is shortened to a certain extent (such as less than a preset distance threshold), the clarity of the second pattern is equal to the clarity of the first pattern.

[0104] From the above, it can be seen that when the relative posture of the preset light source component and the target scene component changes, the second pattern can be dynamically changed, further enriching the lighting effect of the preset light source component and enhancing the visual expressiveness of the game scene.

[0105] In one embodiment, after obtaining the second pattern, the method further comprises the following steps:

[0106] performing blurring processing on the edge of the second pattern;

[0107] Accordingly, the step of displaying the second pattern on the target scene component may include:

[0108] The second pattern with blurred edges is displayed on the target scene component.

[0109] Referring to FIG8 , based on FIG7B , the edges of second pattern 4033 are blurred, for example, by applying a Gaussian blur to the edges of second pattern 4033, resulting in second pattern 4034 in FIG8 . A blurred gradient effect is created between the edges of second pattern 4034 and the exterior of second pattern 4034, reducing the visual abruptness and creating a more harmonious image. Furthermore, the blurred edges of second pattern 4034 can simulate the effect of diffused light spots, consistent with real-world lighting effects.

[0110] In one embodiment, the step of blurring the edge of the second pattern may include the following steps:

[0111] If the edge of the second pattern contacts the edge of the illumination area, blurring is performed on the edge of the second pattern.

[0112] When the edge of the second pattern contacts the edge of the illuminated area, the edge of the second pattern is blurred. During the blurring process, the edge of the second pattern can be blended, smoothed, interpolated, or otherwise processed with the pattern outside the edge of the illuminated area to create a blurred gradient effect at the boundary of the illuminated area. This reduces sudden changes in pattern, brightness, light, and shadow at the boundary of the illuminated area. In the user's visual perception, the lighting effect appears or disappears gradually from outside to inside the illuminated area, or vice versa, rather than suddenly, which is more consistent with real-world lighting effects.

[0113] In one embodiment, the step of displaying a second pattern based on the first pattern on the target scene component may include the following steps:

[0114] A second pattern is displayed on the projection area of ​​the target scene component; the projection area is a surface area of ​​the target scene component that is within the illumination area and faces the illumination direction of the preset light source component.

[0115] For example, referring to Figures 4, 7A, 7B, or 8, the illumination direction of the light source assembly is preset to the negative Y-axis direction, and the target scene assembly 402 is within the illumination area 401. The area facing the illumination direction is the projection area, i.e., the local area where the upper surface intersects the illumination area 401. Second patterns 4031, 4032, 4033, and 4034 are all displayed in the projection area, thereby simulating a realistic projection effect.

[0116] In one embodiment, the lighting effect processing method may further include the following steps:

[0117] If the projection area changes, at least one of the display position, display angle, and display size of the second pattern is adjusted according to the changed projection area.

[0118] The change in the projection area may include one or more of the following situations, and the display adjustment of the second pattern in each situation is described below:

[0119] ① The preset light source component moves. The preset light source component can move when the user performs a moving operation, such as in a game editing scene, the user can move the position of the preset light source component. Alternatively, the preset light source component can also move on its own, such as when the user sets periodic spontaneous movement for the preset light source component in the game editing scene, and in the game running scene, the preset light source component will move periodically on its own according to the information set by the user. Alternatively, the preset light source component moves when it interacts with other scene components (such as being collided, pushed, lifted, etc. by other scene components). When the preset light source component moves, the illuminated area can move accordingly, and the position, rotation angle, size, etc. of the projection area may change. In one embodiment, when the preset light source component moves in a non-illuminating direction, the position of the projection area may change, and the display position of the second pattern may be adjusted according to the changed projection area. For example, in Figure 4, if the preset light source moves on the XZ plane, the projection area also moves on the XZ plane, and the position of the second pattern 4031 on the XZ plane can be adaptively adjusted. In particular, when the preset light source component moves, it may cause changes in the target scene component. For example, the original target scene component moves out of the illumination area, and a new scene component enters the illumination area. The new scene component serves as the target scene component. Since its shape, surface size, rotation angle, etc. may be different from the original target scene component, it may cause changes in the position, rotation angle, size, etc. of the projection area. The display position, display angle, and display size of the second pattern can be adjusted.

[0120] ② The preset light source component rotates. The preset light source component can rotate when the user performs a rotation operation, such as in a game editing scene, the user can rotate the preset light source component to adjust its angle. Alternatively, the preset light source component can also rotate on its own, such as when the user sets the preset light source component to rotate periodically on its own in the game editing scene, and in the game running scene, the preset light source component will rotate periodically on its own according to the information set by the user. Alternatively, the preset light source component rotates when interacting with other scene components. When the preset light source component rotates, the illumination area can rotate accordingly, and the position, rotation angle, size, etc. of the projection area may change. For example, Figure 9 shows a schematic diagram of rotating the preset light source component based on Figure 4. As the preset light source component rotates, the illumination area 401 also rotates, and the projection area of ​​the target scene component 402 changes. The display angle of the second pattern 4031 can be adjusted accordingly, presenting a rotation effect of the second pattern 4031. In particular, when the preset light source component rotates, it may cause changes in the target scene component. For example, the original target scene component moves out of the illumination area, and a new scene component enters the illumination area. The new scene component serves as the target scene component. Since its shape, surface size, rotation angle, etc. may be different from the original target scene component, it may cause changes in the position, rotation angle, size, etc. of the projection area. The display position, display angle, and display size of the second pattern can be adjusted.

[0121] ③ The size of the illumination area changes. Among them, the size of the illumination area may change with the size of the preset light source component, or the user may directly scale the illumination area to adjust its size, or the illumination area may change in size when triggered by a specific game event (such as weather changes, game characters upgrading or transforming the preset light source component, etc.). When the size of the illumination area changes, the position, rotation angle, size, etc. of the projection area may change. For example, Figure 10 shows a schematic diagram of enlarging the illumination area 401 based on Figure 4. The projection area of ​​the target scene component 402 expands as the illumination area 401 expands, and the display size of the second pattern 4031 can be increased, presenting a scaling effect of the second pattern 4031. In particular, when the size of the illuminated area changes, it may cause changes in the target scene component. For example, the original target scene component moves out of the illuminated area, and a new scene component enters the illuminated area. The new scene component serves as the target scene component. Since its shape, surface size, rotation angle, etc. may be different from the original target scene component, it may cause changes in the position, rotation angle, size, etc. of the projection area. The display position, display angle, and display size of the second pattern can be adjusted.

[0122] ④ The target scene component moves. When the target scene component moves, the position of the projection area may change, and the display position of the second pattern may be adjusted accordingly. Furthermore, the movement of the target scene component may also cause a change in the rotation angle or size of the projection area, and the display position or size of the second pattern may be adjusted accordingly.

[0123] ⑤ The target scene component rotates. Rotation of the target scene component may cause the rotation angle of the projection area to change, and the display angle of the second pattern may be adjusted accordingly. Furthermore, rotation of the target scene component may also cause the position or size of the projection area to change, and the display angle or size of the second pattern may be adjusted accordingly.

[0124] ⑥ The size of the target scene component changes. When the size of the target scene component changes, the size of the projection area may change, and the display size of the second pattern may be adjusted accordingly. Furthermore, the size change of the target scene component may also cause the position or rotation angle of the projection area to change, and the display position or angle of the second pattern may be adjusted accordingly.

[0125] It should be understood that when the projection area changes, the relative posture relationship between the preset light source component and the target scene component may also change. Based on the above-mentioned adjustment of clarity, brightness, etc., the second pattern can be adjusted according to the changed relative posture relationship, and the above-mentioned display position, display angle, display size, etc. of the second pattern can be adjusted. That is, the second pattern can be superimposed and adjusted in two aspects, and finally the adjusted second pattern is presented to achieve a more complex and diverse pattern dynamic change effect.

[0126] In one embodiment, the step of displaying a second pattern based on the first pattern on the target scene component may include the following steps:

[0127] The lighting effect material specified by the preset light source component is rendered based on the second pattern, and the rendered lighting effect material is superimposed on the material of the game scene or the material of the target scene component to display the second pattern on the target scene component.

[0128] Among them, the lighting effect material specified by the preset light source component is a material set for the preset light source component to present the lighting effect of the preset light source component, which can be any specified material. After obtaining the second pattern, the second pattern can be rendered onto the lighting effect material, such as by coloring the lighting effect material based on the data of the second pattern, so that the second pattern is presented on the lighting effect material. In order to display the second pattern on the target scene component without covering the original pattern or texture on the target scene component or in the game scene, the lighting effect material can be superimposed with the material of the game scene or the material of the target scene component by material superposition. In this way, the target scene component shows the effect of its original material superimposed with the second pattern.

[0129] In one embodiment, the step of rendering the lighting effect material specified by the preset light source component based on the second pattern includes:

[0130] A lighting effect area is determined on the lighting effect material, and the lighting effect area on the lighting effect material is rendered based on the second pattern.

[0131] Among them, the lighting effect area can be an area where the second pattern is presented, which can be a projection area or a mapping of the lighting area on the lighting effect material. For example, when the projection area of ​​the target scene component is determined, the coordinates of the projection area can be mapped to the lighting effect material, thereby obtaining the coordinates of the lighting effect area on the lighting effect material. When rendering the lighting effect material, the part outside the lighting effect area can be blocked, and only the lighting effect area is rendered. In this way, when the lighting effect material is superimposed with the material of the target scene component, the lighting effect area coincides with the projection area, and the superposition result of the second pattern and the appearance of the target scene component is presented only in the projection area, and the rest of the area is not rendered, which will not affect the appearance of the target scene component itself and reduce the amount of calculation.

[0132] In one embodiment, the game scene is a game editing scene, allowing the user to perform editing operations. Accordingly, the lighting effect processing method may further include the following steps:

[0133] In response to a pattern editing operation on a preset light source component, the first pattern is edited according to the pattern editing operation, and an edited second pattern corresponding to the edited first pattern is displayed on the target scene component.

[0134] Among them, the pattern editing operation refers to the operation of editing and changing the first pattern, that is, allowing the user to edit the first pattern in the game editing scene. When editing the first pattern, it will affect the second pattern. The edited second pattern corresponding to the edited first pattern can be displayed synchronously, so that the user can see the pattern editing effect.

[0135] In one embodiment, in response to a pattern editing operation for a preset light source component, the second pattern displayed in the game editing scene can be replaced with the first pattern, and the edited first pattern can be displayed during the pattern editing operation. As can be seen from the above, the second pattern may be blurred compared to the first pattern, resulting in the second pattern not being able to clearly reflect the pattern editing effect when the user edits the first pattern. Replacing the second pattern with the first pattern allows the user to see the pattern editing effect more clearly and intuitively. Furthermore, in response to the end of the pattern editing operation, the first pattern displayed in the game editing scene can be replaced with the second pattern again. At this time, the second pattern displayed can be the edited second pattern corresponding to the edited first pattern.

[0136] In one embodiment, if a visual object corresponding to an illuminated area is displayed in a game editing scene, the visual object can be hidden in response to a pattern editing operation on a preset light source component. That is, the illuminated area is not displayed while the user is performing the pattern editing operation. This prevents the illuminated area from obscuring the second pattern (or first pattern), making it easier for the user to observe the editing effect of the pattern during the pattern editing operation. Furthermore, in response to the completion of the pattern editing operation, the visual object corresponding to the illuminated area can be restored to display.

[0137] In one embodiment, the first pattern includes one or more pattern areas. The pattern area can be a set of pixels or textures that are pre-divided and have certain commonalities. For example, the first pattern is a plaid pattern, a floral pattern, etc. composed of four different colors. The area where each color is located is a pattern area, and the first pattern includes four pattern areas. Different pattern areas can correspond to different color channels of the preset light source component, such as four pattern areas corresponding to R, G, B, and A channels respectively. Accordingly, the above-mentioned response to the pattern editing operation of the preset light source component and the step of editing the first pattern according to the pattern editing operation may include the following steps:

[0138] In response to a color editing operation on a preset light source component, a pattern area corresponding to a target color channel of the preset light source component is edited according to the color editing operation; the target color channel is the color channel edited by the color editing operation.

[0139] For example, as shown in Figure 11, the preset light source component is a surface light source component, which includes 4 color channels. Users can perform color editing operations in the editing interface of the surface light source component. When the user selects channel 1 and can adjust the color in the color panel, the corresponding pattern area 1 in the first pattern can actually be edited. If the user changes the color of channel 1, that is, changes the color of pattern area 1, the second pattern 4033 in the game editing scene can show real-time color changes. Users can perform targeted editing on each pattern area, which is conducive to achieving refined editing operations.

[0140] In one embodiment, in response to the pattern editing operation for the preset light source assembly, the step of editing the first pattern according to the pattern editing operation may include the following steps:

[0141] In response to a pattern selection operation for a preset light source assembly, a new first pattern is determined according to the pattern selection operation.

[0142] That is, the user can reselect the first pattern for the preset light source assembly. If the game program provides multiple candidate patterns, the user can select from them to determine a new first pattern, and the second pattern corresponding to the new first pattern can be displayed in the game editing scene.

[0143] In one embodiment, candidate patterns for preset light source components can be generated based on user-uploaded images. For example, a game editing scene may provide an image upload portal through which users can upload local images. The game program then converts the uploaded image into a pattern format, or processes the image (e.g., by unifying the resolution, simplifying the colors, etc.), converts the image into a pattern format, and stores it as a candidate pattern for the preset light source component. The user can then select this candidate image as the first pattern, thereby implementing user-defined light source patterns and further enhancing the diversity of lighting effects.

[0144] The exemplary embodiment of the present disclosure further provides a lighting effect processing device in a game. Referring to FIG12 , the lighting effect processing device 1200 in the game includes the following program modules:

[0145] The game scene display processing module 1210 is configured to execute displaying a game scene in a graphical user interface provided by running a game program; the game scene includes a plurality of scene components, the plurality of scene components including a preset light source component and a target scene component at least partially within the illumination area of ​​the preset light source component; the preset light source component is configured with a first pattern; the preset light source component has a visible effect or a non-visible effect in the game scene;

[0146] The pattern display processing module 1220 is configured to display a second pattern formed based on the first pattern on the target scene component according to the relative posture relationship between the preset light source component and the target scene component.

[0147] In one embodiment, the preset light source assembly is also configured with lighting parameters; according to the relative posture relationship between the preset light source assembly and the target scene assembly, a second pattern based on the first pattern is displayed on the target scene assembly, including: processing the first pattern according to the lighting parameters and the relative posture relationship to obtain the second pattern; and displaying the second pattern on the target scene assembly.

[0148] In one embodiment, a first pattern is processed according to lighting parameters and relative posture relationships to obtain a second pattern, including: adjusting at least one attribute to be processed of the first pattern according to the relative posture relationship; and adding a lighting effect to the adjusted first pattern according to the lighting parameters to obtain the second pattern.

[0149] In one embodiment, adjusting at least one attribute to be processed of the first pattern according to the relative posture relationship includes: adjusting at least one attribute to be processed of the first pattern according to the distance between the preset light source component and the target scene component along the lighting direction of the preset light source component.

[0150] In one embodiment, the attribute to be processed includes clarity; adjusting at least one attribute to be processed of the first pattern according to the relative posture relationship includes: determining a clarity attenuation parameter according to the relative posture relationship; and sampling the first pattern based on the clarity attenuation parameter.

[0151] In one embodiment, sampling the first pattern based on the clarity attenuation parameter includes: determining a target sampling image from multiple levels of sampling images of the first pattern based on the clarity attenuation parameter, and performing texture sampling on the target sampling image.

[0152] In one embodiment, processing the first pattern according to the illumination parameters and the relative posture relationship to obtain the second pattern includes: adjusting at least one to-be-processed attribute of the first pattern according to the illumination parameters and the relative posture relationship to obtain the second pattern.

[0153] In one embodiment, adding a lighting effect to the adjusted first pattern according to the lighting parameters to obtain a second pattern includes: determining the lighting effect parameters according to the relative posture relationship and the lighting parameters; and adding a lighting effect to the adjusted first pattern based on the lighting effect parameters to obtain the second pattern.

[0154] In one embodiment, the pattern display processing module 1220 is further configured to execute: after obtaining the second pattern, blurring the edge of the second pattern; and displaying the second pattern with the blurred edge on the target scene component.

[0155] In one embodiment, blurring the edge of the second pattern includes: if the edge of the second pattern contacts the edge of the illumination area, blurring the edge of the second pattern.

[0156] In one embodiment, the pattern display processing module 1220 is further configured to execute: if the relative posture relationship changes, then display the corresponding adjusted second pattern on the target scene component according to the changed relative posture relationship.

[0157] In one embodiment, displaying a second pattern based on the first pattern on the target scene component includes: displaying the second pattern on the projection area of ​​the target scene component; the projection area is a surface area on the target scene component that is within the illumination area and faces the illumination direction of the preset light source component.

[0158] In one embodiment, the pattern display processing module 1220 is further configured to: if the projection area changes, adjust at least one of the display position, display angle, and display size of the second pattern according to the changed projection area.

[0159] In one embodiment, the projection area changes, including one or more of the following situations: the preset light source component moves; the preset light source component rotates; the size of the illuminated area changes; the target scene component moves; the target scene component rotates; the size of the target scene component changes.

[0160] In one embodiment, displaying a second pattern based on the first pattern on a target scene component includes: rendering a lighting effect material specified by a preset light source component based on the second pattern, and superimposing the rendered lighting effect material on the material of the game scene or the material of the target scene component to display the second pattern on the target scene component.

[0161] In one embodiment, the game scene is a game editing scene; the game scene display processing module 1210 is further configured to execute: displaying a visual object corresponding to the lighting area in the game editing scene.

[0162] In one embodiment, the game scene is a game editing scene; the pattern display processing module 1220 is further configured to execute: responding to a pattern editing operation for a preset light source component, editing a first pattern according to the pattern editing operation, and displaying an edited second pattern corresponding to the edited first pattern on a target scene component.

[0163] In one embodiment, the first pattern includes one or more pattern areas, different pattern areas correspond to different color channels of a preset light source component; in response to a pattern editing operation for the preset light source component, the first pattern is edited according to the pattern editing operation, including: in response to a color editing operation for the preset light source component, editing the pattern area corresponding to the target color channel of the preset light source component according to the color editing operation; the target color channel is the color channel edited by the color editing operation.

[0164] In one embodiment, in response to a pattern editing operation on a preset light source assembly, editing the first pattern according to the pattern editing operation includes: in response to a pattern selection operation on the preset light source assembly, determining a new first pattern according to the pattern selection operation.

[0165] In one embodiment, the preset light source assembly is a surface light source assembly, and the illumination area is an area formed by extending the light emitting plane of the surface light source assembly toward the illumination direction of the surface light source assembly by a preset illumination distance.

[0166] The specific details of each part of the above-mentioned device have been described in detail in the implementation method part. The undisclosed details can be found in the implementation method part, so they will not be repeated here.

[0167] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0168] The exemplary embodiments of the present disclosure further provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, implements the above-mentioned game editing method.

[0169] In one embodiment, a computer program product may be a tangible product containing a computer program, such as a computer-readable storage medium storing the computer program. The computer-readable storage medium may be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory (Flash), mechanical hard disk drive (HDD), solid-state drive (SSD), and the like. Exemplarily, the computer program product may be implemented as a non-volatile storage medium storing the computer program, such as a read-only memory, NAND flash memory, and the like.

[0170] In one embodiment, the computer program product may be an intangible product containing a computer program. For example, the computer program product may be implemented as a virtual digital product, such as a digital file such as an executable file or installation package storing the computer program.

[0171] The code of the computer program can be written in one or more programming languages. Programming languages ​​include C, Java, C++, etc. The program code can be executed entirely on the user computing device, partially on the user computing device, or as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device via any type of network, such as a local area network (LAN), a wide area network (WAN), etc., or can be connected to an external computing device (e.g., via an Internet connection provided by a carrier).

[0172] Computer programs can be carried or transmitted through electrical, magnetic, optical, electromagnetic, infrared and other signals. Electronic devices can convert signals carrying computer programs into digital signals, and then run the computer program. When the computer program is running on an electronic device, its code is used to enable the electronic device to execute (more specifically, it can enable the processor of the electronic device to execute) the method steps of various exemplary embodiments of the present disclosure, such as the above-mentioned game editing method, which includes the following steps: displaying a game scene in a graphical user interface provided by running the game program; the game scene includes a plurality of scene components, and the plurality of scene components include a preset light source component and a target scene component that is at least partially within the illumination area of ​​the preset light source component; the preset light source component is configured with a first pattern; the preset light source component has a visible effect or an invisible effect in the game scene; according to the relative posture relationship between the preset light source component and the target scene component, a second pattern formed based on the first pattern is displayed on the target scene component.

[0173] By implementing the aforementioned method steps through a computer program, the first pattern of the preset light source component itself is projected onto the target scene component to display a corresponding second pattern. This, on the one hand, achieves the patterned illumination effect of the preset light source component, enabling the light source to no longer solely provide illumination, but to present a variety of light patterns at different locations within the game scene, thereby increasing the diversity of lighting effects. Furthermore, this solution simulates real-world pattern projection, allowing the first pattern to be processed to form the final projected second pattern, thereby enhancing the realism of the game screen and enhancing the user's sense of immersion.

[0174] The exemplary embodiments of the present disclosure further provide an electronic device, such as the aforementioned terminal device 110 or server 130. The electronic device may include a processor and a memory. The memory stores executable instructions for the processor, such as a computer program. The processor executes the executable instructions to perform the method steps of the various exemplary embodiments of the present disclosure. Furthermore, the electronic device may also include a display for displaying a graphical user interface.

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

[0176] As shown in FIG. 13 , the electronic device 1300 may include a processor 1310 , a memory 1320 , a bus 1330 , an I / O (input / output) interface 1340 , a network adapter 1350 , and a display 1360 .

[0177] Memory 1320 may include volatile memory, such as RAM 1321 and cache unit 1322, and non-volatile memory, such as ROM 1323. Memory 1320 may also include one or more program modules 1324. Such program modules 1324 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. For example, program modules 1324 may include the modules described above.

[0178] The processor 1310 may include one or more processing units, for example: the processor 1310 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc.

[0179] The processor 1310 can be used to execute executable instructions stored in the memory 1320, such as the above-mentioned game editing method, which includes the following steps: displaying a game scene in a graphical user interface provided by running a game program; the game scene includes multiple scene components, the above-mentioned multiple scene components include a preset light source component and a target scene component that is at least partially within the illumination area of ​​the preset light source component; the preset light source component is configured with a first pattern; the preset light source component has a visible effect or an invisible effect in the game scene; and according to the relative posture relationship between the preset light source component and the target scene component, a second pattern formed based on the first pattern is displayed on the target scene component.

[0180] Processor 1310 executes the aforementioned method steps to project the first pattern of the preset light source assembly onto the target scene assembly, thereby displaying a corresponding second pattern. This achieves the patterned illumination effect of the preset light source assembly, enabling the light source to no longer solely provide illumination, but instead present a variety of light source patterns at different locations within the game scene, thereby increasing the diversity of lighting effects. Furthermore, this solution simulates real-world pattern projection, processing the first pattern to form the final projected second pattern, thereby enhancing the realism of the game screen and enhancing the user's sense of immersion.

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

[0182] The electronic device 1300 can communicate with one or more external devices 1400 (eg, a keyboard, a mouse, an external controller, etc.) through the I / O interface 1340 .

[0183] The electronic device 1300 can communicate with one or more networks via a network adapter 1350. For example, the network adapter 1350 can provide mobile communication solutions such as 3G / 4G / 5G, or wireless communication solutions such as wireless LAN, Bluetooth, and near-field communication. The network adapter 1350 can communicate with other modules of the electronic device 1300 via the bus 1330.

[0184] The electronic device 1300 can display a graphical user interface through the display 1360, such as displaying a game scene.

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

[0186] As can be seen from the above, the technical solutions of the present disclosure can be implemented as methods, devices, systems, computer program products, storage media, electronic devices, etc. Those skilled in the art will understand that various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation that combines hardware and software aspects, such as "circuit", "module" or "system".

[0187] It should be understood that the present disclosure is not limited to the specific method steps or structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. Those skilled in the art will easily think of other embodiments based on the specific embodiments provided by the present disclosure. Therefore, the specific embodiments provided by the present disclosure are merely exemplary, and the scope and spirit of the present disclosure are indicated by the claims, which should cover any variations, uses or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the field of the present technology that are not disclosed in the present disclosure.

Claims

1. A method for processing lighting effects in a game, the method comprising: Displaying the game scene in the graphical user interface provided by the running game program; The game scene includes a plurality of scene components, wherein the plurality of scene components include a preset light source component and a target scene component at least partially located within an illumination area of ​​the preset light source component; the preset light source component is configured with a first pattern; and the preset light source component has a visible effect or an invisible effect in the game scene; According to the relative posture relationship between the preset light source component and the target scene component, a second pattern formed based on the first pattern is displayed on the target scene component.

2. The method according to claim 1, wherein The preset light source component is further configured with lighting parameters; and the step of displaying a second pattern formed based on the first pattern on the target scene component according to the relative posture relationship between the preset light source component and the target scene component comprises: Processing the first pattern according to the illumination parameters and the relative posture relationship to obtain the second pattern; The second pattern is displayed on the target scene component.

3. The method according to claim 2, wherein: The step of processing the first pattern according to the illumination parameters and the relative posture relationship to obtain the second pattern includes: Adjusting at least one to-be-processed attribute of the first pattern according to the relative posture relationship; A lighting effect is added to the adjusted first pattern according to the lighting parameters to obtain the second pattern.

4. The method according to claim 3, wherein: The step of adjusting at least one to-be-processed attribute of the first pattern according to the relative posture relationship includes: At least one to-be-processed attribute of the first pattern is adjusted according to a distance between the preset light source component and the target scene component along the illumination direction of the preset light source component.

5. The method according to claim 3, wherein The attribute to be processed includes clarity; and the step of adjusting at least one attribute to be processed of the first pattern according to the relative posture relationship includes: Determining a clarity attenuation parameter according to the relative posture relationship; The first pattern is sampled based on the sharpness decay parameter.

6. The method according to claim 5, wherein: The step of sampling the first pattern based on the clarity attenuation parameter comprises: Based on the definition attenuation parameter, a target sampling image is determined from the multi-level sampling images of the first pattern, and texture sampling is performed on the target sampling image.

7. The method according to claim 3, wherein: The step of adding a lighting effect to the adjusted first pattern according to the lighting parameters to obtain the second pattern includes: Determining lighting effect parameters according to the relative posture relationship and the lighting parameters; A lighting effect is added to the adjusted first pattern based on the lighting effect parameter to obtain the second pattern.

8. The method according to claim 2, wherein: The step of processing the first pattern according to the illumination parameters and the relative posture relationship to obtain the second pattern includes: At least one to-be-processed attribute of the first pattern is adjusted according to the illumination parameter and the relative posture relationship to obtain the second pattern.

9. The method according to claim 2, wherein: After obtaining the second pattern, the method further includes: performing blurring processing on the edge of the second pattern; The step of displaying the second pattern on the target scene component includes: A second pattern with blurred edges is displayed on the target scene component.

10. The method according to claim 9, wherein: The step of blurring the edge of the second pattern comprises: If the edge of the second pattern contacts the edge of the illumination area, blurring is performed on the edge of the second pattern.

11. The method according to claim 1, wherein The method further comprises: If the relative posture relationship changes, the corresponding adjusted second pattern is displayed on the target scene component according to the changed relative posture relationship.

12. The method according to claim 1, wherein The step of displaying a second pattern formed based on the first pattern on the target scene component includes: The second pattern is displayed on a projection area of ​​the target scene component; the projection area is a surface area of ​​the target scene component that is within the illumination area and faces the illumination direction of the preset light source component.

13. The method according to claim 12, wherein: The method further comprises: If the projection area changes, at least one of a display position, a display angle, and a display size of the second pattern is adjusted according to the changed projection area.

14. The method according to claim 13, wherein: The projection area changes, including one or more of the following situations: The preset light source assembly moves; The preset light source assembly rotates; The size of the illuminated area changes; The target scene component moves; The target scene component rotates; The size of the target scene component changes.

15. The method according to claim 1, wherein The step of displaying a second pattern formed based on the first pattern on the target scene component includes: Render the lighting effect material specified by the preset light source component based on the second pattern, and superimpose the rendered lighting effect material on the material of the game scene or the material of the target scene component to display the second pattern on the target scene component.

16. The method according to claim 1, wherein The game scene is a game editing scene; the method further includes: Displaying a visual object corresponding to the illuminated area in the game editing scene.

17. The method according to claim 1, wherein The game scene is a game editing scene; the method further includes: In response to a pattern editing operation on the preset light source component, the first pattern is edited according to the pattern editing operation, and an edited second pattern corresponding to the edited first pattern is displayed on the target scene component.

18. The method according to claim 17, wherein The first pattern includes one or more pattern areas, and different pattern areas correspond to different color channels of the preset light source assembly; The step of responding to the pattern editing operation on the preset light source assembly and editing the first pattern according to the pattern editing operation includes: In response to a color editing operation on the preset light source component, editing a pattern area corresponding to a target color channel of the preset light source component according to the color editing operation; The target color channel is the color channel edited by the color editing operation.

19. The method according to claim 17, wherein The step of responding to the pattern editing operation on the preset light source assembly and editing the first pattern according to the pattern editing operation includes: In response to a pattern selection operation for the preset light source assembly, a new first pattern is determined according to the pattern selection operation.

20. The method according to any one of claims 1 to 19, wherein The preset light source assembly is a surface light source assembly, and the illumination area is an area formed by extending the light emitting plane of the surface light source assembly toward the illumination direction of the surface light source assembly by a preset illumination distance.

21. A device for processing lighting effects in a game, the device comprising: A game scene display processing module is configured to display the game scene in a graphical user interface provided by the running game program; The game scene includes a plurality of scene components, wherein the plurality of scene components include a preset light source component and a target scene component at least partially located within an illumination area of ​​the preset light source component; the preset light source component is configured with a first pattern; and the preset light source component has a visible effect or an invisible effect in the game scene; The pattern display processing module is configured to display a second pattern formed based on the first pattern on the target scene component according to the relative posture relationship between the preset light source component and the target scene component.

22. A computer program product comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 20 is implemented.

23. An electronic device comprising: processor; a memory for storing executable instructions of the processor; The processor is configured to perform the method according to any one of claims 1 to 20 by executing the executable instructions.

Citation Information

Patent Citations

  • Auxiliary resource display method and device, storage medium and electronic equipment

    CN112370782A

  • Volume cloud processing method and device, electronic equipment and storage medium

    CN112465941A

  • Illumination rendering method and device for volume component

    CN116115997A

  • Sky illumination switching method and device in game and electronic equipment

    CN116850580A

  • Virtual object model rendering method and device, computer equipment and storage medium

    CN117541674A