Interaction method and device in virtual scene, equipment, storage medium and program product

By adding lighting components to the virtual scene and binding multiple virtual light sources to voxels, the efficiency of lighting group placement and lighting effects in the virtual scene is solved, and efficient lighting effects and sense of reality are achieved.

CN119810391APending Publication Date: 2025-04-11BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411858379.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In virtual scenes, as the number of light sources increases, how to achieve efficient lighting group placement and lighting effects with a small amount of computing resources has become an urgent problem.

Method used

The lighting effect is presented in the virtual scene by adding a lighting component in the virtual scene and responding to the lighting component turn-on event. The lighting effect is determined based on a plurality of virtual light sources associated with the lighting component, and is bound to the voxel using the multiple virtual light sources to achieve the lighting effect.

Benefits of technology

It improves the realism of the lighting effect, reduces the computing power consumption of lighting calculations, and can simulate more complex lighting effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810391A_ABST
    Figure CN119810391A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an interaction method and device in a virtual scene, equipment, a storage medium and a program product. The method comprises the following steps: adding an illumination component in a virtual scene; in response to the situation that the illumination component is started in the virtual scene, the illumination effect of the illumination component is presented in the virtual scene, and the illumination effect is determined based on the multiple virtual light sources associated with the illumination component. Therefore, according to the embodiment of the invention, the illumination effect can be improved, the illumination reality sense can be improved, and a more complex illumination effect can be simulated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Example embodiments of the present disclosure generally relate to the computer field, and in particular, to an interaction method, apparatus, device, computer-readable storage medium, and computer program product in a virtual scene. Background Art

[0002] With the development of computer technology, users can use computers to place virtual objects and lighting components (e.g., lights) in scenes provided by computers (e.g., simulation environments, virtual environments, etc.), and the lighting components in these virtual scenes can provide lighting effects for the virtual scenes. Summary of the invention

[0003] In a first aspect of the present disclosure, a method for interaction in a virtual scene is provided. The method comprises: adding a lighting component in the virtual scene; and in response to the lighting component being turned on in the virtual scene, presenting a lighting effect of the lighting component in the virtual scene, wherein the lighting effect is determined based on a plurality of virtual light sources associated with the lighting component.

[0004] In a second aspect of the present disclosure, a device for interaction in a virtual scene is provided. The device includes: an adding module configured to add a lighting component in the virtual scene; and a rendering module configured to render a lighting effect of the lighting component in the virtual scene in response to the lighting component being turned on in the virtual scene, wherein the lighting effect is determined based on a plurality of virtual light sources associated with the lighting component.

[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device executes the method of the first aspect.

[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect.

[0007] In a fifth aspect of the present disclosure, a computer program product is provided, which includes computer executable instructions, and when the computer executable instructions are executed by a processor, the method of the first aspect is implemented.

[0008] It should be understood that the contents described in this content section are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0010] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;

[0011] FIG. 2A to FIG. 2B A schematic diagram of a light assembly according to some embodiments of the present disclosure is shown;

[0012] FIG. 3A to FIG. 3E A schematic diagram of a light assembly according to some embodiments of the present disclosure is shown;

[0013] Figure 4 A flow chart showing interactions in a virtual scene according to some embodiments of the present disclosure;

[0014] Figure 5 A schematic structural block diagram of an apparatus for interaction in a virtual scene according to some embodiments of the present disclosure is shown;

[0015] Figure 6 A block diagram of an electronic device capable of implementing various embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0016] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0017] It should be noted that the titles of any sections / subsections provided herein are not restrictive. Various embodiments are described throughout this article, and any type of embodiment may be included under any section / subsection. In addition, the embodiments described in any section / subsection may be combined in any manner with any other embodiments described in the same section / subsection and / or different sections / subsections.

[0018] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below. The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may be included below.

[0019] The embodiments of the present disclosure may involve user data, data acquisition and / or use, etc. These aspects are subject to the corresponding laws, regulations and relevant provisions. In the embodiments of the present disclosure, all data collection, acquisition, processing, processing, forwarding, use, etc. are carried out on the premise that the user knows and confirms. Accordingly, when implementing each embodiment of the present disclosure, the type, scope of use, usage scenario, etc. of the data or information that may be involved should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with the relevant laws and regulations. The specific notification and / or authorization method can vary according to the actual situation and application scenario, and the scope of the present disclosure is not limited in this respect.

[0020] In this specification and the embodiments, if personal information processing is involved, it will be processed on the premise of having a legal basis (such as obtaining the consent of the subject of personal information, or it is necessary to perform a contract, etc.), and will only be processed within the scope of regulations or agreements. If a user refuses to process personal information other than the necessary information for basic functions, it will not affect the user's use of basic functions.

[0021] As described above, a user can use a computer to place virtual objects and lighting components (e.g., lights) in a scene provided by the computer (e.g., a simulation environment, a virtual environment, etc.), and the lighting components in these virtual scenes can provide lighting effects for the virtual scenes.

[0022] However, with the development of computers, the number of light sources in virtual scenes is increasing, and people's demand for various lighting effects in virtual scenes is also increasing. How to realize the light group in the virtual scene with a small amount of computing resources, and how to achieve efficient light group placement have become urgent problems to be solved.

[0023] In view of this, an embodiment of the present disclosure proposes an interactive solution in a virtual scene. According to the solution, a lighting component can be added to the virtual scene; further, in response to the lighting component being turned on in the virtual scene, a lighting effect of the lighting component can be presented in the virtual scene, wherein the lighting effect is determined based on multiple virtual light sources associated with the lighting component.

[0024] Based on this approach, the embodiments of the present disclosure can improve the lighting effect and enhance the lighting realism, and the embodiments of the present disclosure can also simulate more complex lighting effects.

[0025] Example Environment

[0026] Figure 1 1 is a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Figure 1 As shown, example environment 100 may include electronic device 110 .

[0027] In the example environment 100, an application 120 is installed in an electronic device 110. A user 140 can interact with the application 120 via the electronic device 110 and / or its attached devices. The application 120 can be an interactive application in a virtual scene, such as a game application, or any other appropriate application.

[0028] exist Figure 1 In the environment 100 , if the application 120 is in an active state, the application 120 may provide a presentation interface 150 for the user 140 .

[0029] In some embodiments, the electronic device 110 communicates with the server 130 to provide services for the application 120. The electronic device 110 can be any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a gaming device, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the electronic device 110 can also support any type of interface for the user (such as a "wearable" circuit, etc.).

[0030] The server 130 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks, and big data and artificial intelligence platforms. The server 130 may include, for example, a computing system / server, such as a mainframe, an edge computing node, a computing device in a cloud environment, etc. The server 130 may provide background services for the application 120 in the electronic device 110 that supports interaction in a virtual scene.

[0031] A communication connection may be established between the server 130 and the electronic device 110. The communication connection may be established in a wired manner or a wireless manner. The communication connection may include, but is not limited to, a Bluetooth connection, a mobile network connection, a universal serial bus connection, a wireless fidelity connection, etc., and the embodiments of the present disclosure are not limited in this respect. In the embodiments of the present disclosure, the server 130 and the electronic device 110 may implement signaling interaction through the communication connection between the two.

[0032] It should be understood that the structure and function of the various elements in the environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure.

[0033] Some example embodiments of the present disclosure will be described below with continued reference to the accompanying drawings.

[0034] Example Interaction

[0035] The following will refer to FIG. 2A to FIG. 2B To describe the lighting group according to an embodiment of the present disclosure. Figure 2A A lighting assembly 201 is shown according to some embodiments of the present disclosure.

[0036] In the virtual scene provided by the electronic device 110 , the user can build various structures, and the user can also add light sources (eg, lighting component 201 ) in the virtual scene to provide lighting for the virtual environment.

[0037] In some embodiments, the electronic device 110 may add a lighting component to the virtual scene in response to receiving a light source placement operation from the user. For example, the electronic device 110 may place the lighting component 201 in the virtual scene in response to receiving a placement operation for the lighting component 201, and the lighting component 201 may provide lighting for the virtual scene. Figure 2A As shown, the lighting component 201 is a surface light source, and the lighting component 201 can illuminate the virtual environment around it. In other embodiments, the lighting component can also be a spherical light source, a point light source, etc.

[0038] refer to Figure 2B , Figure 2B A schematic diagram of a lighting assembly and a switch control is shown.

[0039] like Figure 2B As shown, in some embodiments, the electronic device 110 can present the lighting effect of the lighting component in the virtual scene in response to the lighting component being turned on in the virtual scene, wherein the lighting effect is determined based on multiple virtual light sources associated with the lighting component. In addition, the configuration information of the lighting effect can be stored in a configuration file, which can be, for example, a file in JSON format.

[0040] In some embodiments, the lighting effect at least indicates the lighting shape of the lighting component. For example, the lighting shape may include conical lighting of a spotlight, spherical lighting generated by a point light source, planar lighting generated by a surface light source, and lighting of various irregular shapes.

[0041] In some embodiments, voxel data associated with the voxels may also be stored in the configuration file.

[0042] In some embodiments, the electronic device 110 may turn on the lighting component in response to receiving a preset operation for the lighting component. For example, if the electronic device 110 receives an operation indicating to turn on the lighting component via controls 202-1, 202-2, and 202-3, the electronic device 110 may turn on the virtual lighting of the lighting components 205-1, 205-2, and 205-3 corresponding to the above three controls, respectively, to provide lighting effects for the virtual environment. It should be understood that the three controls mentioned here can also control all the lighting components at the same time. For example, the electronic device 110 only needs to receive an operation for control 202-1 to turn on or off the lighting components 205-1, 205-2, and 205-3.

[0043] In some embodiments, the configuration information further indicates at least one lighting parameter associated with the plurality of virtual light sources.

[0044] In some embodiments, the virtual light sources may each have different parameters, including but not limited to the intensity, color, shape, saturation, etc. of the light. In addition, the configuration information may also indicate information such as anchor point data, attached light brightness information, and offset data.

[0045] In other embodiments, the electronic device 110 may also turn on the lighting components in response to the virtual scene satisfying a preset condition. For example, when the virtual scene switches from day to night, the electronic device 110 may automatically turn on the lighting components 205-1, 205-2, and 205-3. Or the electronic device 110 may turn on the lighting components 205-1, 205-2, and 205-3 within a certain period of time according to a preset configuration. Alternatively or additionally, the electronic device 110 may also turn on the lighting components 205-1, 205-2, and 205-3 in response to a virtual object or player character being within a preset range or area.

[0046] refer to Figure 3A , Figure 3A An example 300A of a virtual light source and light assembly is shown.

[0047] like Figure 3AAs shown, the electronic device 110 can bind multiple virtual light sources to multiple voxels associated with the lighting component based on the configuration information of the lighting component in response to the lighting component being turned on in the virtual scene. For example, the electronic device 110 can bind three virtual light sources to voxels 325-1, 325-2, and 325-3 in response to the lighting component 320 being turned on. Through the above method, the electronic device 110 can quickly establish an association relationship between multiple virtual light sources and the lighting component, thereby realizing the creation of a light group. In some embodiments, the virtual light source described herein can be located outside the lighting component.

[0048] refer to Figure 3B , Figure 3B An example 300B of deleting a virtual light source or releasing a binding between a virtual light source and a voxel is shown.

[0049] like Figure 3B As shown, the electronic device 110 can delete multiple virtual light sources or release the binding between multiple virtual light sources and multiple voxels in response to the light component being turned off or deleted, so as to stop presenting the lighting effect.

[0050] For example, the electronic device 110 may delete the virtual light sources bound to the voxels 325 - 1 , 325 - 2 , and 325 - 3 to stop providing lighting for the virtual environment, thereby achieving the effect of turning off the lights or shutting down the lighting component.

[0051] refer to Figure 3C , Figure 3C An example 300C is shown where multiple virtual light sources are bound to the same voxel.

[0052] like Figure 3C As shown, the electronic device 110 may determine that a target voxel in the virtual scene is bound to a group of virtual light sources, and based on the lighting parameters of the group of virtual light sources, determine the target virtual lighting corresponding to the target voxel.

[0053] For example, in Figure 3C In the illustrated case, the voxel 330 is bound to the virtual light source 335 - 1 and the virtual light source 335 - 2 . At this time, the electronic device 110 can determine the effective virtual lighting based on the lighting parameters of the virtual light source 335 - 1 and the virtual light source 335 - 2 .

[0054] In some embodiments, the electronic device 110 may determine an effective virtual light source in a group of virtual light sources based on the illumination intensity of the group of virtual light sources. The electronic device 110 may also determine a target virtual illumination corresponding to a target voxel based on the effective virtual light source.

[0055] Specifically, the electronic device 110 can determine which virtual light source is effective at the voxel position based on the light intensity or light priority of the virtual light sources 335-1 and 335-2. If the light intensity or priority of the virtual light source 335-1 is higher, the virtual light source 335-1 is used as the effective virtual light source. The virtual light source 335-2 is considered invalid and does not participate in the lighting calculation.

[0056] In some examples, virtual light source 335 - 1 may be provided by lighting component 320 , while virtual light source 335 - 2 may be provided by other lighting components.

[0057] In some embodiments, in response to determining a valid virtual light source, the electronic device 110 may present a lighting effect of a lighting component in the virtual scene based on the virtual lighting associated with the plurality of voxels.

[0058] The above process of determining the virtual light source can reduce the computing power consumption of the light source calculation and retain the rationality and authenticity of the lighting effect to the greatest extent.

[0059] like Figure 3D As shown, Figure 3D An example 300D of a mobile lighting assembly is shown.

[0060] like Figure 3D As shown, the electronic device 110 can determine a first position of the lighting component in the virtual scene. The electronic device 110 can determine multiple placement positions of multiple virtual light sources based on the first position and the configuration information. The electronic device 110 can also bind the multiple virtual light sources to multiple voxels in the virtual scene based on the multiple placement positions.

[0061] For example, the electronic device 110 may first determine that the lighting component 320 is at the first position 346-1, and then the electronic device 110 determines the positions 340-1, 342-1, and 344-1 at which the virtual light source is placed based on the first position 346-1 and the configuration information. After determining the position, the electronic device 110 may bind the virtual light source to the voxels at the determined position. For example, these voxels may be located at positions 340-1, 342-1, and 344-1.

[0062] In other embodiments, the electronic device 110 may also determine the offset information of the multiple virtual light sources relative to the first position based on the configuration information. The electronic device 110 may also determine the multiple placement positions of the multiple virtual light sources based on the first position and the offset information. In other words, the position of the virtual light source may not coincide with the position of the illumination component. However, in some embodiments, the position of the virtual light source may coincide with the position of the illumination component.

[0063] For example, the electronic device 110 may determine the offset information of the virtual light source relative to the first position 346-1 based on the configuration information described above. The offset information may indicate the offset direction and distance of the virtual light source relative to the lighting component. After determining the above offset information, the electronic device 110 may determine the placement position of the virtual light source (e.g., positions 340-1, 342-1, and 344-1).

[0064] In some embodiments, the electronic device 110 may rebind multiple virtual light sources to multiple new voxels in the virtual scene based on the configuration information in response to the lighting component being moved to the second position in the virtual scene. For example, if the lighting component 320 is moved to the second position 346-2, the electronic device 110 may rebind multiple virtual light sources to the voxels at positions 340-2, 342-2, and 344-2. Thus, the synchronous movement of the lighting component and the virtual light source is achieved.

[0065] refer to Figure 3E , Figure 3E An example 300E is shown in which an occluding object exists between a virtual light source and a lighting component.

[0066] like Figure 3E As shown, the electronic device 110 can determine whether the positional relationship between the target placement position of the target virtual light source and the first position satisfies the preset constraint based on the scene information of the virtual scene. For example, the electronic device 110 can determine whether the positional relationship between the position of the virtual light source and the position of the light component satisfies the preset constraint based on the position of the virtual object in the virtual scene.

[0067] In some embodiments, the preset constraint is related to whether there is an occluding object between the target placement position and the first position in the virtual scene.

[0068] For example, in Figure 3E In the scene shown in , there is an occluding object 350 between the lighting component 320 and the virtual light source 360-2, while there is no occluding object between the lighting component 320 and the virtual light sources 360-1 and 360-3. As a result, the positional relationship between the position of the virtual light source 360-2 and the position of the lighting component 320 does not satisfy the preset constraint. Therefore, the virtual light source 360-2 can be determined as an invalid virtual light source, so that no virtual lighting is provided. Therefore, the virtual light source 360-2 can be deleted or unbound.

[0069] In some embodiments, the electronic device 110 may bind the target virtual light source to the voxel corresponding to the target placement position in response to the position relationship satisfying the preset constraint. For example, if the virtual light sources 360-1 and 360-3 satisfy the preset constraint of the position relationship, the two virtual light sources are determined to be valid, and the two virtual light sources may be bound to the corresponding voxels.

[0070] In some embodiments, the process of determining the occluding object can be determined by a DDA linear rasterization algorithm, and by means of RayMarching stepping, it is calculated whether there are other virtual objects or other physical voxels between the lighting component and its attached virtual light source.

[0071] The above-mentioned occlusion test of the virtual light source reduces erroneous lighting effects, makes the lighting in the virtual scene more realistic, and improves the presentation effect of the lighting effect of the virtual scene.

[0072] In some embodiments, the lighting calculation in the virtual scene may adopt rules and evolutions such as cellular automata, and the lighting at each location may comprehensively consider the properties of the lighting present in the virtual scene such as ambient light.

[0073] The basic components of cellular automata include cells, cellular space, neighbors, and rules. Cells are the most basic components of cellular automata, and they are distributed on the lattice points of discrete one-dimensional, two-dimensional, or multi-dimensional Euclidean space. Each cell has a discrete state at each moment, such as {0,1}. The cellular space is the set of spatial grid points where cells are distributed, which can be a triangular grid, a quadrilateral grid, or a hexagonal grid. Neighbors mean that the evolution rules of cellular automata are local, and when updating the state of a specified cell, only the states of its neighboring cells need to be known. The rules define how the cell state is updated, which is usually the same for each cell, does not change over time, and applies to the entire grid.

[0074] For example, the electronic device 110 can divide the space into cells (voxel units), each cell is affected by the surrounding neighboring cells, and the rules of this influence are unified for each cell. Each cell in the cellular automaton evolves according to the established rules in a certain area and time domain.

[0075] Based on the above-mentioned lighting calculation method, the lighting calculation amount of the electronic device 110 can be significantly reduced, and the lighting effect in the virtual scene can be guaranteed to be unaffected to the greatest extent, thereby improving the operating efficiency of the electronic device 110 and optimizing the presentation of the lighting effect of the virtual scene.

[0076] Based on this approach, the embodiments of the present disclosure can enable users to quickly and easily place light groups in a virtual scene, and the lighting calculation method of the embodiments of the present disclosure can also effectively reduce the computing power consumption of lighting calculation and maximize the lighting presentation effect. In addition, the embodiments of the present disclosure can also simulate more complex lighting effects (for example, surface light sources, spherical light sources, colored light sources, etc.).

[0077] Therefore, the embodiments of the present disclosure can improve the lighting effect in the virtual scene and enhance the realism of the lighting.

[0078] Example Process

[0079] Figure 4 4 is a flowchart showing an example process 400 of interaction in a virtual scene according to some embodiments of the present disclosure. Process 400 may be implemented at electronic device 110. Figure 1 Process 400 is described.

[0080] At block 410 , the electronic device 110 adds a lighting component to the virtual scene.

[0081] In block 420 , in response to the lighting component being turned on in the virtual scene, the electronic device 110 presents a lighting effect of the lighting component in the virtual scene, wherein the lighting effect is determined based on a plurality of virtual light sources associated with the lighting component.

[0082] In some embodiments, the lighting effect is indicative of at least a lighting shape of the lighting component.

[0083] In some embodiments, process 400 further includes: binding a plurality of virtual light sources to a plurality of voxels associated with the lighting component based on configuration information of the lighting component.

[0084] In some embodiments, based on configuration information of the lighting component, binding multiple virtual light sources to multiple voxels associated with the lighting component includes: determining a first position of the lighting component in the virtual scene; based on the first position and the configuration information, determining multiple placement positions of the multiple virtual light sources; and based on the multiple placement positions, binding the multiple virtual light sources to the multiple voxels in the virtual scene.

[0085] In some embodiments, determining multiple placement positions of multiple virtual light sources based on the first position and configuration information includes: determining offset information of the multiple virtual light sources relative to the first position based on the configuration information; and determining multiple placement positions of the multiple virtual light sources based on the first position and the offset information.

[0086] In some embodiments, based on multiple placement positions, binding multiple virtual light sources to multiple voxels in a virtual scene includes: determining whether a positional relationship between a target placement position of a target virtual light source and a first position satisfies a preset constraint based on scene information of the virtual scene; and in response to the positional relationship satisfying the preset constraint, binding the target virtual light source to the voxel corresponding to the target placement position.

[0087] In some embodiments, the preset constraint is related to whether there is an occluding object between the target placement position and the first position in the virtual scene.

[0088] In some embodiments, the process 400 further includes: in response to the lighting component being turned off or removed, deleting the plurality of virtual light sources or releasing the binding between the plurality of virtual light sources and the plurality of voxels to stop presenting the lighting effect.

[0089] In some embodiments, the configuration information further indicates at least one lighting parameter associated with the plurality of virtual light sources.

[0090] In some embodiments, process 400 further includes: in response to receiving a preset operation for the lighting component, turning on the lighting component; or in response to the virtual scene satisfying a preset condition, turning on the lighting component.

[0091] In some embodiments, process 400 further includes: in response to the lighting component being moved to a second position in the virtual scene, rebinding the plurality of virtual light sources to a plurality of new voxels in the virtual scene based on the configuration information.

[0092] In some embodiments, process 400 further includes: determining that a target voxel in the virtual scene is bound to a set of virtual light sources; and determining a target virtual lighting corresponding to the target voxel based on lighting parameters of the set of virtual light sources.

[0093] In some embodiments, process 400 further includes: determining an effective virtual light source in a group of virtual light sources based on the illumination intensity of the group of virtual light sources; and determining a target virtual lighting corresponding to the target voxel based on the effective virtual light source.

[0094] Example devices and equipment

[0095] The embodiments of the present disclosure also provide corresponding devices for implementing the above methods or processes. Figure 5 A schematic structural block diagram of an apparatus 500 for interaction in a virtual scene according to some embodiments of the present disclosure is shown. The apparatus 500 may be implemented as or included in the electronic device 110 as discussed above. Each module / component in the apparatus 500 may be implemented by hardware, software, firmware, or any combination thereof.

[0096] like Figure 5 As shown, the device 500 includes an adding module 510, configured to add a lighting component in a virtual scene; and a rendering module 520, configured to render a lighting effect of the lighting component in the virtual scene in response to the lighting component being turned on in the virtual scene, wherein the lighting effect is determined based on a plurality of virtual light sources associated with the lighting component.

[0097] In some embodiments, the lighting effect is indicative of at least a lighting shape of the lighting component.

[0098] In some embodiments, the apparatus 500 further includes a binding module configured to: bind the plurality of virtual light sources to the plurality of voxels associated with the lighting component based on configuration information of the lighting component.

[0099] In some embodiments, the device 500 also includes a position determination module configured to: determine a first position of the lighting component in the virtual scene; determine multiple placement positions of multiple virtual light sources based on the first position and configuration information; and bind the multiple virtual light sources to multiple voxels in the virtual scene based on the multiple placement positions.

[0100] In some embodiments, the device 500 also includes an offset information determination module configured to: determine the offset information of multiple virtual light sources relative to the first position based on the configuration information; and determine multiple placement positions of the multiple virtual light sources based on the first position and the offset information.

[0101] In some embodiments, the device 500 also includes a relationship determination module, which is configured to: determine whether the positional relationship between the target placement position and the first position of the target virtual light source satisfies a preset constraint based on scene information of the virtual scene; and in response to the positional relationship satisfying the preset constraint, bind the target virtual light source to the voxel corresponding to the target placement position.

[0102] In some embodiments, the preset constraint is related to whether there is an occluding object between the target placement position and the first position in the virtual scene.

[0103] In some embodiments, the apparatus 500 further includes a deletion module configured to: in response to the lighting component being turned off or removed, delete the plurality of virtual light sources or release the binding between the plurality of virtual light sources and the plurality of voxels to stop presenting the lighting effect.

[0104] In some embodiments, the configuration information further indicates at least one lighting parameter associated with the plurality of virtual light sources.

[0105] In some embodiments, the apparatus 500 further includes a start module configured to: turn on the lighting component in response to receiving a preset operation for the lighting component; or turn on the lighting component in response to the virtual scene satisfying a preset condition.

[0106] In some embodiments, the apparatus 500 further comprises a first rebinding module configured to: in response to the lighting component being moved to a second position in the virtual scene, rebind the plurality of virtual light sources to a plurality of new voxels in the virtual scene based on the configuration information.

[0107] In some embodiments, the apparatus 500 further comprises a second rebinding module configured to: determine that a target voxel in the virtual scene is bound to a set of virtual light sources; and determine a target virtual lighting corresponding to the target voxel based on lighting parameters of the set of virtual light sources.

[0108] In some embodiments, the device 500 also includes an effectiveness determination module configured to: determine an effective virtual light source in a group of virtual light sources based on the illumination intensity of a group of virtual light sources; and determine a target virtual lighting corresponding to a target voxel based on the effective virtual light source.

[0109] The units included in the device 500 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units in the device 500 can be implemented at least in part by one or more hardware logic components. As an example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0110] Figure 6 1 shows a block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 6 The electronic device 600 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 6 The electronic device 600 shown can be used to implement Figure 1 Electronic device 110 or Figure 5 Device 500.

[0111] like Figure 6 As shown, the electronic device 600 is in the form of a general electronic device. The components of the electronic device 600 may include, but are not limited to, one or more processors or processing units 610, a memory 620, a storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. The processing unit 610 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 620. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 600.

[0112] The electronic device 600 typically includes a plurality of computer storage media. Such media can be any available media accessible to the electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 620 can be a volatile memory (e.g., registers, caches, random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory) or some combination thereof. The storage device 630 can be a removable or non-removable medium, and can include a machine-readable medium, such as a flash drive, a disk, or any other medium, which can be used to store information and / or data and can be accessed within the electronic device 600.

[0113] The electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 6 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 620 may include a computer program product 625 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.

[0114] The communication unit 640 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 600 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 600 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.

[0115] The input device 650 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 660 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 600 may also communicate with one or more external devices (not shown) through the communication unit 640 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 600, or communicate with any device that allows the electronic device 600 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).

[0116] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.

[0117] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0118] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0119] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0120] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

[0121] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.

Claims

1. An interactive method in a virtual scene, comprising: Add lighting components to the virtual scene; as well as In response to the lighting component being turned on in the virtual scene, a lighting effect of the lighting component is presented in the virtual scene, wherein the lighting effect is determined based on a plurality of virtual light sources associated with the lighting component. The method according to claim 1 , wherein the lighting effect indicates at least a lighting shape of the lighting component.

3. The method according to claim 1, further comprising: Based on the configuration information of the lighting component, the plurality of virtual light sources are bound to a plurality of voxels associated with the lighting component.

4. The method according to claim 3, wherein based on the configuration information of the lighting component, binding a plurality of virtual light sources to a plurality of voxels associated with the lighting component comprises: Determining a first position of the lighting component in the virtual scene; Based on the first position and the configuration information, determining a plurality of placement positions of the plurality of virtual light sources; as well as Based on the plurality of placement positions, a plurality of virtual light sources are bound to the plurality of voxels in the virtual scene.

5. The method according to claim 4, wherein determining the plurality of placement positions of the plurality of virtual light sources based on the first position and the configuration information comprises: Based on the configuration information, determining offset information of the plurality of virtual light sources relative to the first position; as well as Based on the first position and the offset information, multiple placement positions of the multiple virtual light sources are determined.

6. The method of claim 3, wherein binding a plurality of virtual light sources to the plurality of voxels in the virtual scene based on the plurality of placement positions comprises: Based on the scene information of the virtual scene, determining whether a positional relationship between a target placement position of a target virtual light source and the first position satisfies a preset constraint; as well as In response to the positional relationship satisfying the preset constraint, the target virtual light source is bound to a voxel corresponding to the target placement position. 7 . The method according to claim 6 , wherein the preset constraint is related to whether there is an occluding object in the virtual scene between the target placement position and the first position.

8. The method according to claim 3, further comprising: In response to the lighting component being turned off or removed, the plurality of virtual light sources are deleted or binding between the plurality of virtual light sources and the plurality of voxels is released to stop presenting the lighting effect.

9. The method of claim 3, wherein the configuration information further indicates at least one lighting parameter associated with the plurality of virtual light sources.

10. The method according to claim 1, further comprising: In response to receiving a preset operation for the illumination component, turning on the illumination component; or In response to the virtual scene satisfying a preset condition, the lighting component is turned on.

11. The method according to claim 1, further comprising: In response to the lighting component being moved to a second position in the virtual scene, the plurality of virtual light sources are re-bound to a plurality of new voxels in the virtual scene based on the configuration information.

12. The method according to claim 1, further comprising: Determining that a target voxel in the virtual scene is bound to a set of virtual light sources; as well as Based on the lighting parameters of the set of virtual light sources, a target virtual lighting corresponding to the target voxel is determined.

13. The method according to claim 12, wherein determining the target virtual lighting corresponding to the target voxel based on the lighting parameters of the set of virtual light sources further comprises: Determining a virtual light source that is effective in the group of virtual light sources based on the illumination intensity of the group of virtual light sources; as well as The target virtual lighting corresponding to the target voxel is determined based on the effective virtual light source.

14. A device for interaction in a virtual scene, comprising: An adding module, configured to add a lighting component to a virtual scene; as well as The rendering module is configured to render a lighting effect of the lighting component in the virtual scene in response to the lighting component being turned on in the virtual scene, wherein the lighting effect is determined based on a plurality of virtual light sources associated with the lighting component.

15. An electronic device, comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 13 when executed by the at least one processing unit.

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

17. A computer program product tangibly stored in a computer storage medium and comprising computer executable instructions which, when executed by a device, cause the device to perform the method according to any one of claims 1 to 13.