Method for rendering virtual object, host and computer readable storage medium
Patent Information
- Application Number
- CN202311684385.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-09-08
- Filing Date
- 2023-12-08
- Publication Date
- 2025-03-11
Smart Images

Figure CN119600165A_ABST
Abstract
Description
Technical Field
[0001] The present invention generally relates to mechanisms for generating visual content, and more particularly, to methods, hosts, and computer-readable storage media for rendering virtual objects. Background Art
[0002] In reality services such as augmented reality (AR) or mixed reality (MR) services, developers aim to visually integrate virtual objects with the real world seamlessly. To achieve this, the reality system of the reality service needs to capture and store lighting information from the current scene / environment, and use the stored lighting information to render virtual objects so that the rendered virtual objects can appear to be illuminated by real environment light.
[0003] In the art, lighting information refers to data and details about the lighting conditions in an environment. Lighting information is a key component of AR / MR applications because it helps make virtual objects look more real, consistent, and realistic within the real world.
[0004] Generally speaking, lighting information covers the following aspects:
[0005] (1) Light source position and direction: Knowing the position and direction of light sources, such as the sun, light bulbs, or other sources, ensures that shadows and highlights of virtual objects align with the real environment.
[0006] (2) Light source intensity and color: Measure the brightness and color of the light source to ensure that the color and brightness of the virtual object are consistent with the surrounding environment.
[0007] (3) Environmental reflection and refraction: The material and reflective properties of the target surface are taken into account to simulate how light interacts with the surface, thereby achieving a more realistic appearance through reflection and refraction effects.
[0008] (4) Shadows and occlusions: Produce appropriate shadow effects based on the position of the light source and the relationship between the objects to make the virtual objects look like they belong to the real world.
[0009] (5) Ambient lighting: Consider the overall lighting level in the environment to adjust the brightness of virtual objects so that virtual objects blend seamlessly with their environment.
[0010] In simple terms, lighting information in AR / MR applications is used to ensure that virtual objects are rendered in a coordinated way with the real-world environment, thereby enhancing user perception and experience. This involves complex calculations and algorithms that simulate the behavior of light and the interaction of virtual objects with light, thereby achieving high-quality augmented reality effects.
[0011] Typically, an AR system collects lighting information via a camera on an AR device (e.g., a head-mounted display (HMD) and / or AR glasses). Since light can come from any angle in the environment, the AR system needs to guide the user to look around the entire scene / environment so that the AR device can collect complete lighting information for the entire scene / environment. Under this premise, when the lighting of the scene / environment changes for some reason (e.g., turning the lights on / off), the user needs to perform the above action again (i.e., look around the scene / environment) to update the lighting information of the scene / environment.
[0012] Furthermore, when the lighting in the environment is uneven, the AR device cannot obtain complete lighting information by the user looking around only once, since a single capture position cannot reflect the uneven lighting of the entire environment.
[0013] See also Figure 1 , which illustrates a scenario of rendering virtual objects based on lighting information captured in an environment with uneven lighting.
[0014] exist Figure 1 In the example, if the user 199 wearing the AR device 100 is in the environment 110 having the brighter area 111 and the darker area 112, the lighting information obtained when the user 199 is located in the darker area 112 will not be suitable for use when the user 199 moves to the brighter area 111. Specifically, when the user 199 sees the virtual object 120 rendered based on the lighting information corresponding to the darker area 112 in the brighter area 111, the rendered virtual object 120 will appear dark, which will be inconsistent with the brighter area 111 where the user is located.
[0015] Likewise, the lighting information obtained when the user 199 is located in the brighter area 111 will not be suitable for use when the user 199 moves to the darker area 112. Specifically, when the user 199 sees a virtual object rendered based on the lighting information corresponding to the brighter area 111 in the darker area 112, the rendered virtual object will appear bright, which will be inconsistent with the darker area 112 where the user 199 is located. Summary of the invention
[0016] Therefore, the present invention relates to a method for rendering a virtual object, a host, and a computer-readable storage medium, which can be used to solve the above technical problems.
[0017] An embodiment of the present invention provides a method for rendering a virtual object, which is applied to a host and includes: determining multiple areas in an environment; determining lighting information for each of the multiple areas; obtaining a virtual object to be rendered and selecting at least one candidate area corresponding to the virtual object to be rendered from the multiple areas; determining reference lighting information based on the lighting information of each of the at least one candidate area; and rendering the virtual object to be rendered based on the reference lighting information.
[0018] An embodiment of the present invention provides a host including a storage circuit and a processor. The storage circuit stores program code. The processor is coupled to the non-temporary storage circuit and accesses the program code to execute: determining multiple areas in an environment; determining lighting information of each of the multiple areas; obtaining a virtual object to be rendered and selecting at least one candidate area corresponding to the virtual object to be rendered from the multiple areas; determining reference lighting information based on the lighting information of each of the at least one candidate area; and rendering the virtual object to be rendered based on the reference lighting information.
[0019] An embodiment of the present invention provides a non-temporary computer-readable storage medium, which records an executable computer program, and the executable computer program is loaded by a host to perform the following steps: determining multiple areas in an environment; determining lighting information for each of the multiple areas; obtaining a virtual object to be rendered and selecting at least one candidate area corresponding to the virtual object to be rendered from the multiple areas; determining reference lighting information based on the lighting information of each of the at least one candidate area; and rendering the virtual object to be rendered based on the reference lighting information. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and together with the description serve to explain the principles of the invention.
[0021] Figure 1 Depicted is a scenario of rendering a virtual object based on lighting information captured in an environment with uneven lighting.
[0022] Figure 2 A schematic diagram of a host according to an embodiment of the present invention is shown.
[0023] Figure 3 A flow chart of a method for rendering a virtual object according to an embodiment of the present invention is shown.
[0024] Figure 4 A schematic diagram of a region determined in an environment according to an embodiment of the present invention is shown.
[0025] Figure 5A flow chart of determining illumination information of a first area according to an embodiment of the present invention is shown.
[0026] Fig. 6A A flow chart of determining first illumination information of a first reference point according to an embodiment of the present invention is shown.
[0027] Figure 6B Drawing basis Fig. 6A application scenarios.
[0028] Figure 7 Drawing basis Figure 4 application scenarios.
[0029] Description of Figure Numbers
[0030] 100: Augmented reality device;
[0031] 110: Environment;
[0032] 110a: Area;
[0033] 110b: Area;
[0034] 110c: Area;
[0035] 111: Region;
[0036] 112: Region;
[0037] 120: virtual object;
[0038] 199: user;
[0039] 200: host;
[0040] 202: storage circuit;
[0041] 204: processor;
[0042] 206: Camera;
[0043] 610: Region;
[0044] 610a: first reference point;
[0045] 620A, 620B: first environment image;
[0046] 630A, 630B: calibrated first environment images;
[0047] 710, 720, 730: rendered virtual objects;
[0048] L1, L2: first position;
[0049] R1, R2: first relative position;
[0050] S310, S320, S330, S340, S350, S510, S520, S610, S620, S630: steps. DETAILED DESCRIPTION
[0051] Reference will now be made in detail to the presently preferred embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals are used in the drawings and the description to refer to the same or like parts.
[0052] See also Figure 2 , which depicts a schematic diagram of a host according to an embodiment of the present invention. In various embodiments, the host 200 may be any smart device / computer device. In some embodiments, the host 200 may be any electronic device capable of providing a reality service (e.g., an AR service, an MR service, or the like). In some embodiments, the host 200 may be implemented as an AR device, such as AR glasses and / or an HMD, but the present invention is not limited thereto.
[0053] exist Figure 2 In the embodiment, the host 200 includes a storage circuit 202 and a processor 204. The storage circuit 202 is one or a combination of a stationary or mobile random access memory (RAM), a read-only memory (ROM), a flash memory, a hard disk, or any other similar device, and the storage circuit records a plurality of modules and / or program codes that can be executed by the processor 204.
[0054] The processor 204 may be coupled to the memory circuit 202, and the processor 204 may be, for example, a general purpose processor, a special purpose processor, a conventional processor, a digital signal processor (DSP), a plurality of microprocessors, one or more microprocessors associated with a DSP core, a controller, a microcontroller, an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) circuit, any other type of integrated circuit (IC), a state machine, etc.
[0055] In some embodiments, the host 200 may further include one or more cameras 206 coupled to the processor 204. The camera 206 may be any camera having a charge coupled device (CCD) lens, a complementary metal oxide semiconductor transistor (CMOS) lens, or an infrared lens. In an embodiment of the present invention, the camera 206 may be used to capture an environmental image of a scene / environment in which the host 200 is located, wherein the environmental image may be a panoramic image and / or a cube map, but the present invention is not limited thereto.
[0056] In an embodiment of the present invention, the processor 204 may access the modules and / or program codes stored in the storage circuit 202 to implement the method for rendering a virtual object provided in the present invention, which will be further discussed below.
[0057] See also Figure 3 , which depicts a flow chart of a method for rendering a virtual object according to an embodiment of the present invention. The method of this embodiment may be Figure 2 The host 200 in the above example executes the following code. Figure 2 The components shown in Figure 3 Details of each step in the.
[0058] In step S310, the processor 204 determines a plurality of regions in an environment. In one embodiment, the environment may be a scene / field where the host 200 and its user are located, such as a room, a house, a corridor, but the present invention is not limited thereto.
[0059] In one embodiment, the processor 204 may determine the zones in the environment based on the requirements of the designer.
[0060] For example, in step S310 , the processor 204 may scan the dimension / size / appearance of the environment and divide the environment into a plurality of 3D areas as consideration areas.
[0061] In one embodiment, since the user will more likely move horizontally in the environment, processor 204 may divide the environment into several 3D areas distributed horizontally in the environment.
[0062] In one embodiment, the processor 204 may divide the environment into a number of 3D areas distributed in a grid.
[0063] In one embodiment, if the environment is provided with one or more landmarks (eg, furniture or other real objects), the processor 204 may divide the environment into the above-mentioned areas based on the landmarks.
[0064] See also Figure 4 , which depicts a schematic diagram of a region determined in an environment according to an embodiment of the present invention. Figure 4 In the embodiment, after the processor 204 obtains the dimension / size / appearance of the environment 100 , the processor 204 may divide the environment 110 into, for example, 3D regions 110 a to 110 c , but the present invention is not limited thereto.
[0065] In one embodiment, the processor 204 may determine the area according to the setting of the designer. For example, the designer may predetermine the dimensions / size / appearance of the environment 110 and the size / position / dimension of each of the areas 110a to 110c, and the designer may input this information into the reality service system (e.g., AR system) of the host 200. In this case, the processor 204 may directly determine the areas 110a to 110c according to the information input by the designer, but the present invention is not limited thereto.
[0066] In order to better understand the concept of the present invention, Figure 4 The application scenario in will be used as an illustrative example, but the present invention is not limited thereto.
[0067] In step S320 , the processor 204 determines lighting information for each of the plurality of regions 110 a to 110 c .
[0068] In one embodiment, the processor 204 may execute Figure 5 The steps in are used to determine the lighting information of the first area among the areas 110a to 110c.
[0069] See also Figure 5 , which illustrates a flow chart of determining illumination information of a first area according to an embodiment of the present invention.
[0070] In step S510, the processor 204 determines a first reference point in the first area. In various embodiments, the first reference point may be any point in the first area, such as a center point of the first area, but the present invention is not limited thereto.
[0071] In step S520 , the processor 204 determines first illumination information of a first reference point in the first area.
[0072] In one embodiment, in response to determining that the host 200 is located in the first area, the processor 204 may control the camera 206 to capture a first environment image associated with the first area, wherein the first environment image may include at least one of a panorama and a cube map. Subsequently, the processor 204 may determine first illumination information of a first reference point in the first area based on the first environment image associated with the first area.
[0073] In one embodiment, the processor 204 may execute Fig. 6A The steps in are used to determine first lighting information of a first reference point in the first area based on a first environment image associated with the first area.
[0074] See also Fig. 6A , which illustrates a flow chart of determining first illumination information of a first reference point according to an embodiment of the present invention.
[0075] In step S610 , in response to determining that the first environment image is captured at a first position within a first area, the processor 204 determines a first relative position between the first position and a first reference point.
[0076] In step S620 , the processor 204 calibrates the first environment image based on the first relative position, wherein the calibrated first environment image corresponds to a viewing angle of the host relative to the environment at the first reference point.
[0077] In step S630 , the processor 204 converts the calibrated first environment image into first lighting information of a first reference point.
[0078] To better understand Fig. 6A The concept of Figure 6B will be used as an illustrative example, where Figure 6B Drawing basis Fig. 6A application scenarios.
[0079] exist Figure 6B In the embodiment, the user 199 may wear the HMD as the corresponding host 200. In the embodiment, the HMD of the user 199 may capture a first environment image 620A at a first position L1 within a first area 610 (which may be understood as one of the areas 110a to 110c). Figure 6B , the perspective of the camera of the HMD of the user 199 may include light sources in the environment, so that the first environment image 620A captures the light sources, but the present invention is not limited thereto.
[0080] In this case, the processor 204 may determine a first relative position R1 between the first reference point 610a of the first area 610 and the first position L1, and calibrate the first environment image 620A based on the first relative position R1. Figure 6B As shown in FIG. 6 , the calibrated first environment image 630A corresponds to the viewing angle of the HMD of the user 199 relative to the environment at the first reference point 610a.
[0081] After obtaining the calibrated first environment image 620A, the HMD may convert the calibrated first environment image 620A into first lighting information of the first reference point 610a.
[0082] In another embodiment, the HMD of the user 199 may capture a first environment image 620B at a first position L2 within a first area 610 (which may be understood as one of the areas 110a to 110c). Figure 6B , the perspective of the camera of the HMD of the user 199 may include light sources in the environment, so that the first environment image 620B captures the light sources, but the present invention is not limited thereto.
[0083] In this case, the processor 204 may determine a first relative position R2 between the first reference point 610a of the first area 610 and the first position L2, and calibrate the first environment image 620B based on the first relative position R2. Figure 6B As shown in FIG. 6 , the calibrated first environment image 630B corresponds to the viewing angle of the HMD of the user 199 relative to the environment at the first reference point 610a.
[0084] After obtaining the calibrated first environment image 620B, the HMD may convert the calibrated first environment image 620B into first lighting information of the first reference point 610a.
[0085] Reference again Figure 5 After determining the first illumination information of the first reference point (eg, the first reference point 610a) in the first region (eg, the first region 610), the processor 204 determines the first illumination information of the first reference point as the illumination information of the first region.
[0086] In one embodiment, the processor 204 may determine the lighting information of each of the regions 110 a to 110 c based on the above description.
[0087] In one embodiment, once the illumination information of the first area is determined, the processor 204 may determine the illumination information of a second area among the areas 110 a to 110 c , wherein the second area may be adjacent to the first area.
[0088] by Figure 4 For example, since user 199 is in area 110a, area 110a can be regarded as the first area, and area 110b adjacent to area 110a can be regarded as the second area. In this case, after determining the illumination information of area 110a, processor 204 can determine the illumination information of area 110b according to the illumination information of area 110a. In one embodiment, processor 204 can directly determine the illumination information of area 110b as the illumination information of area 110a, or slightly modify the illumination information of area 110a to generate the illumination information of area 110b, but the present invention is not limited thereto.
[0089] In one embodiment, the processor 204 may update the lighting information of at least one of the areas 110a to 110c in response to the movement of the host 200. For example, when the user 199 moves from the area 110a to the area 110b, the processor 204 may further update the lighting information of at least one of the areas 110a to 110c based on the movement of the host 200. Figure 5 , Fig. 6A as well as Figure 6B The lighting information of the area 110b is updated according to the associated description.
[0090] Since the area 110b can be considered to be adjacent to the area 110a and the area 110c, the processor 204 can regard each of the area 110a and the area 110c as a corresponding second area. In this case, the processor 204 can determine the lighting information of the area 110a and the area 110c based on the lighting information of the area 110b. In one embodiment, the processor 204 can directly determine the lighting information of the area 110a and the area 110c as the lighting information of the area 110b, or slightly modify the lighting information of the area 110b based on, for example, the location, orientation and / or geographic information of the environment 110 of the host 200 to generate the lighting information of the area 110a and the area 110c, but the present invention is not limited thereto.
[0091] In some embodiments, the processor 204 may determine the illumination information of each of the regions 110a to 110c separately. For example, when the user 199 is in the region 110a, the processor 204 may determine only the illumination information of the region 110a based on the above discussion. When the user 199 moves from the region 110a to the region 110b, the processor 204 may determine only the illumination information of the region 110b based on the above discussion. When the user 199 moves from the region 110b to the region 110c, the processor 204 may determine only the illumination information of the region 110c based on the above discussion.
[0092] In one embodiment, if the user 199 moves from the area 110c back to the area 110b, the processor 204 may update the lighting information of the area 110b by determining the lighting information again based on the above teachings, but the present invention is not limited thereto.
[0093] Return to reference Figure 3 After determining the lighting information of each of the regions 110a to 110c, the processor 204 executes step S330 to obtain the virtual object to be rendered, and selects at least one candidate region corresponding to the virtual object to be rendered from among the multiple regions.
[0094] In one embodiment, the virtual object to be rendered may be, for example, an AR object, which will be rendered for viewing by the user 199 .
[0095] In one embodiment, the virtual object to be rendered has a specific position in the visual content provided by the host 200 for the user 199 to view, wherein the specific position is the position where the virtual object will be displayed / shown after being rendered, but the present invention is not limited thereto.
[0096] In an embodiment of the present invention, the processor 204 may select at least one candidate region corresponding to the virtual object to be rendered from the regions 110 a to 110 c .
[0097] In one embodiment, in response to determining that the virtual object to be rendered is located in the first area (ie, the specific position of the virtual object to be rendered is within the first area), the processor 204 may at least select the first area as at least one candidate area.
[0098] For example, if the virtual object to be rendered is located in the area 110 a , the processor 204 may at least select the area 110 a as one of the at least one candidate area.
[0099] In addition, in response to determining that the virtual object to be rendered is located in the first area (i.e., the specific position of the virtual object to be rendered is within the first area), the processor 204 can not only select the first area as at least one candidate area, but also select other areas near / adjacent to the first area as at least one candidate area, such as the second area.
[0100] For example, if the virtual object to be rendered is located in the region 110 a , the processor 204 may select the region 110 a and the region 110 b (which is adjacent to the region 110 a ) as at least one candidate region.
[0101] For another example, if the virtual object to be rendered is located in region 110b, the processor 204 may select region 110b, region 110a, and region 110c (region 110a and region 110c are adjacent to region 110b) as at least one candidate region, but the present invention is not limited thereto.
[0102] In step S340 , the processor 204 determines reference lighting information based on the lighting information of each of the at least one candidate region.
[0103] In one embodiment, the processor 204 may combine the illumination information of each of the at least one candidate region into reference illumination information.
[0104] For example, if the processor 204 determines that at least one candidate region includes the region 110 a , the processor 204 may directly determine the reference illumination information as the illumination information of the region 110 a .
[0105] For another example, if the processor 204 determines that the at least one candidate region includes the region 110 a and the region 110 b , the processor 204 may combine the illumination information of each of the region 110 a and the region 110 b into the reference illumination information.
[0106] In one embodiment, the processor 204 may combine the illumination information of each of the at least one candidate region into reference illumination information by performing linear / non-linear / weighted combination on the illumination information of each of the at least one candidate region, but the present invention is not limited thereto.
[0107] From another perspective, the processor 204 may not only use the illumination information of the area where the host 200 is currently located to determine the reference illumination information, but may also consider the illumination information of other neighboring areas when determining the reference illumination information.
[0108] In step S350, the processor 204 renders the virtual object to be rendered based on the reference lighting information. In an embodiment, since the reference lighting information can better characterize the lighting information corresponding to the virtual object to be rendered, the light on the rendered virtual object will be more consistent with the environment.
[0109] See also Figure 7 , which is drawn based on Figure 4 In FIG. 7 , when the user 199 moves from the area 110 a to the area 110 c , the host 200 may determine the illumination information of each of the areas 110 a to 110 c .
[0110] In one embodiment, for the virtual object 710 to be rendered that is located in the area 110a (for example, the virtual object 710 is expected to be shown / displayed in the area 110a after being rendered), the processor 204 may determine the corresponding reference lighting information as the lighting information of the area 110a. In this case, the processor 204 may render the virtual object 710 to be rendered based on the corresponding reference lighting information (for example, the lighting information of the area 110a), and display the rendered virtual object 710 at the corresponding specific position in the area 110a.
[0111] In another embodiment, since the virtual object 710 to be rendered is near the region 110 b , the processor 204 may determine the reference lighting information corresponding to the virtual object 710 to be rendered by combining the lighting information of the region 110 a and the region 110 b , but the present invention is not limited thereto.
[0112] like Figure 7 , the light on the rendered virtual object 710 may be consistent with the area 110a, which may be a dark area in the environment 110. More specifically, the rendered virtual object 710 will appear dark, which better matches the lighting conditions of the area 110a.
[0113] In one embodiment, for the virtual object 720 to be rendered located in the area 110b (for example, the virtual object 720 is expected to be shown / displayed in the area 110b after being rendered), the processor 204 may determine the corresponding reference lighting information as the lighting information of the area 110b. In this case, the processor 204 may render the virtual object 720 to be rendered based on the corresponding reference lighting information (for example, the lighting information of the area 110b), and display the rendered virtual object 720 at the corresponding specific position in the area 110b.
[0114] In another embodiment, since the virtual object 720 to be rendered is near area 110a and area 110c, the processor 204 can determine the reference lighting information corresponding to the virtual object 720 to be rendered by combining the lighting information of area 110b with the lighting information of area 110a and / or the lighting information of area 110c, but the present invention is not limited to this.
[0115] like Figure 7 , the lighting on the rendered virtual object 720 may be consistent with the area 110b, which may be a darker area in the environment 110. More specifically, since the area 110b is brighter than the area 110a, the rendered virtual object 720 will appear brighter than the rendered virtual object 710, thereby better matching the lighting conditions of the area 110b.
[0116] In one embodiment, for the virtual object 730 to be rendered located in the area 110c (for example, the virtual object 730 is expected to be displayed / shown in the area 110c after being rendered), the processor 204 may determine the corresponding reference lighting information as the lighting information of the area 110c. In this case, the processor 204 may render the virtual object 730 to be rendered based on the corresponding reference lighting information (for example, the lighting information of the area 110c), and display the rendered virtual object 730 at the corresponding specific position in the area 110c.
[0117] In another embodiment, since the virtual object 730 to be rendered is near the region 110 b , the processor 204 may determine the reference lighting information corresponding to the virtual object 730 to be rendered by combining the lighting information of the region 110 b and the region 110 c , but the present invention is not limited thereto.
[0118] like Figure 7 , the light on the rendered virtual object 730 may be consistent with the area 110c, which may be a bright area in the environment 110. More specifically, since the area 110c is brighter than the area 110b, the rendered virtual object 730 will appear brighter than the rendered virtual object 720, thereby better matching the lighting conditions of the area 110c.
[0119] In some embodiments, the processor 204 may store the obtained illumination information of each of the regions 110a to 110c in, for example, a database associated with the environment 110. In this case, when the host 200 comes to the environment 110 next time, the processor 204 may directly retrieve the illumination information of each of the regions 110a to 110c from the database, which may save the computational effort of the host 200.
[0120] The present invention further provides a computer-readable storage medium for executing a method for rendering a virtual object. The computer-readable storage medium is composed of a plurality of program instructions (e.g., setting program instructions and deployment program instructions) implemented herein. These program instructions can be loaded into and executed by the host 200 to execute the method for rendering a virtual object and the functions of the host 200 described above.
[0121] In summary, the embodiments of the present invention provide a solution for better determining the lighting information corresponding to the virtual object to be rendered, so that the light on the rendered virtual object can be more consistent with the environment. Therefore, the user can have a better visual experience.
[0122] It will be apparent to those skilled in the art that various modifications and variations may be made to the structure of the present invention without departing from the scope or spirit of the present invention. In view of the foregoing, it is intended that the present invention encompass modifications and variations of the present invention within the scope of the appended claims and their equivalents.
Claims
1. A method for rendering a virtual object, the method being applied to a host, characterized in that: include: determining, by the host, a plurality of regions in an environment; determining, by the host, lighting information for each of the plurality of areas; The host obtains a virtual object to be rendered, and the host selects at least one candidate region corresponding to the virtual object to be rendered from among the multiple regions; determining, by the host, reference illumination information based on the illumination information of each of the at least one candidate area; as well as The host renders the virtual object to be rendered based on the reference lighting information.
2. The method for rendering a virtual object according to claim 1, further comprising: The lighting information of at least one of the plurality of areas is updated in response to movement of the host.
3. The method for rendering a virtual object according to claim 1, wherein the plurality of regions include a first region, and the step of determining the lighting information of each of the plurality of regions comprises: determining a first reference point in the first area; determining first illumination information of the first reference point in the first area; as well as The first illumination information of the first reference point is determined as the illumination information of the first area. 4 . The method for rendering a virtual object according to claim 3 , wherein the first reference point in the first area is a center point of the first area.
5. The method for rendering a virtual object according to claim 3, wherein the step of determining the first lighting information of the first reference point in the first area comprises: capturing a first environment image associated with the first area in response to determining that the host is located in the first area, wherein the first environment image comprises at least one of a panorama and a cube map; and The first lighting information of the first reference point in the first area is determined based on the first environment image associated with the first area.
6. The method for rendering a virtual object according to claim 5, wherein the step of determining the first lighting information of the first reference point in the first area based on the first environment image associated with the first area comprises: determining a first relative position between a first location and the first reference point in response to determining that the first environment image was captured at a first location within the first area; calibrating the first environment image based on the first relative position, wherein the calibrated first environment image corresponds to a viewing angle of the host relative to the environment at the first reference point; as well as The calibrated first environment image is converted into the first lighting information of the first reference point.
7. The method for rendering a virtual object according to claim 3, wherein the plurality of regions include a first region and a second region adjacent to each other, and the method further comprises: After the illumination information of the first area is determined, the illumination information of the second area is determined accordingly.
8. The method for rendering a virtual object according to claim 1, wherein the plurality of regions include a first region, and the step of selecting the at least one candidate region corresponding to the to-be-rendered virtual object from among the plurality of regions comprises: In response to determining that the to-be-rendered virtual object is located in the first area, at least the first area is selected as the at least one candidate area.
9. The method for rendering a virtual object according to claim 8, wherein the plurality of regions further comprises a second region adjacent to the first region, and the step of selecting at least the first region as the at least one candidate region comprises: The first region and the second region are selected as the at least one candidate region.
10. The method for rendering a virtual object according to claim 1, wherein the step of determining the reference lighting information based on the lighting information of each of the at least one candidate region comprises: The illumination information of each of the at least one candidate region is combined into the reference illumination information.
11. A host, characterized in that: include: A storage circuit for storing program codes; as well as A processor, coupled to the memory circuit and accessing the program code to execute: Identify multiple areas in the environment; determining lighting information for each of the plurality of regions; Obtaining a virtual object to be rendered, and selecting at least one candidate region corresponding to the virtual object to be rendered from the multiple regions; determining reference illumination information based on the illumination information of each of the at least one candidate region; as well as The to-be-rendered virtual object is rendered based on the reference lighting information.
12. The host of claim 11, wherein the processor further executes: The lighting information of at least one of the plurality of areas is updated in response to movement of the host.
13. The host of claim 11, wherein the plurality of regions include a first region, and the processor performs: determining a first reference point in the first area; determining first illumination information of the first reference point in the first area; and The first illumination information of the first reference point is determined as the illumination information of the first area. The host according to claim 13 , wherein the first reference point in the first area is a center point of the first area.
15. The host of claim 11, wherein the plurality of regions include a first region, and the processor performs: capturing a first environment image associated with the first area in response to determining that the host is located in the first area, wherein the first environment image comprises at least one of a panorama and a cube map; and The first lighting information of the first reference point in the first area is determined based on the first environment image associated with the first area.
16. The host of claim 15, wherein the first area includes a first reference point, and after capturing the first environment image associated with the first area, the processor further performs: determining a first relative position between a first location and the first reference point in response to determining that the first environment image was captured at a first location within the first area; calibrating the first environment image based on the first relative position, wherein the calibrated first environment image corresponds to a viewing angle of the host relative to the environment at the first reference point; as well as The calibrated first environment image is converted into the first lighting information of the first reference point.
17. The host according to claim 13, wherein the plurality of regions include a first region and a second region adjacent to each other, and the processor executes: After the illumination information of the first area is determined, the illumination information of the second area is determined accordingly.
18. The host of claim 11, wherein the plurality of regions include a first region, and the processor performs: In response to determining that the to-be-rendered virtual object is located in the first area, the first area and the second area are selected as the at least one candidate area.
19. The host of claim 11, wherein the processor performs: The illumination information of each of the at least one candidate region is combined into the reference illumination information.
20. A computer-readable storage medium, characterized in that: The computer readable storage medium records an executable computer program, and the executable computer program is loaded by a host to perform the following steps: Identify multiple areas in the environment; determining lighting information for each of the plurality of regions; Obtaining a virtual object to be rendered, and selecting at least one candidate region corresponding to the virtual object to be rendered from the multiple regions; determining reference illumination information based on the illumination information of each of the at least one candidate region; as well as The to-be-rendered virtual object is rendered based on the reference lighting information.