A spatial encoding-based MR complex scene multi-rendering strategy hybrid efficient rendering method
Patent Information
- Application Number
- CN202611523647.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-29
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]有鉴于此,为了解决现有技术带来的问题,本申请提供了一种基于空间编码的MR复杂场景多渲染策略混合高效渲染方法
(1)本发明通过获取真实物体数据和虚拟物体数据,并根据真实物体数据和虚拟物体数据将真实物体与虚拟物体写入同一空间范围,以构建MR场景空间编码。之后,基于MR场景空间编码,划分真实光线透射区域和虚拟画面生成区域,并通过真实光线透射区域与虚拟画面生成区域的相对位置关系确定虚拟物体遮挡区域。随后,向虚拟画面生成区域分配虚拟画面生成任务,并在执行虚拟画面生成任务后,记录每帧虚拟画面中虚拟物体覆盖位置和虚拟光线强度,把视野划分为真实光线透射区域与虚拟画面生成区域,为取得渲染负载下降与符合空间前后关系的真实遮挡结果奠定了基础。
Smart Images

Figure CN123015811A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of scene rendering technology, and in particular to an efficient rendering method for complex MR scenes based on spatial coding and multiple rendering strategies. Background Technology
[0002] Currently, existing technical solutions divide the workshop scene into a static real-world area and a dynamic virtual area. Lightweight rasterization rendering is applied to the static real-world area to save computing power. This approach works on video see-through devices but fails on optical see-through head-mounted displays. That is, the real workshop scene is directly perceived by the viewer through the lens, and the terminal never generates this image, thus there is no reduction in rendering load. Furthermore, these displays only overlay virtual light onto the field of view, without reducing the light reflected from the real equipment surfaces. Even after accurately calculating spatial boundaries and foreground / background relationships, real objects still shine through the virtual pipelines, and virtual shadows do not darken the real surfaces.
[0003] For example, when maintenance personnel wear an optical see-through head-mounted display to inspect a stainless steel machine tool, the virtual internal pipelines need to be displayed in front of the machine tool's outer casing. Existing solutions perform spatial encoding to determine that the pipelines are located in front of the casing, and then assign the static area of the casing to lightweight rasterization rendering. The rendering load is not reduced; that is, the casing image itself comes from ambient light transmission, and the terminal does not generate pixels for it. Nor is occlusion formed; that is, the workshop ceiling light creates a bright reflection on the stainless steel casing, and this reflected light, along with the superimposed light from the virtual pipelines, enters the viewer's eye simultaneously. The pipelines appear semi-transparent, floating above the casing, while the bolts and welds of the casing remain clearly visible. The shadows cast by the virtual pipelines on the casing do not darken the reflective area. Summary of the Invention
[0004] In view of this, in order to solve the problems brought about by the existing technology, this application provides an efficient rendering method for complex MR scenes based on spatial coding and multiple rendering strategies.
[0005] In a first aspect, this disclosure provides an efficient rendering method for complex MR scenes based on spatial coding, comprising: Acquire real object data and virtual object data, and write real objects and virtual objects into the same spatial range based on the real object data and virtual object data to construct MR scene spatial encoding; Based on the MR scene spatial coding, the real light transmission area and the virtual image generation area are divided, and the virtual object occlusion area is determined by the relative positional relationship between the real light transmission area and the virtual image generation area. Assign virtual image generation tasks to the virtual image generation area, and after executing the virtual image generation tasks, record the virtual object coverage position and virtual light intensity in each frame of virtual image; The overlap between the virtual object's occlusion area and the virtual object's coverage area is checked, and the degree and location of light attenuation are determined by combining the light intensity reflected from the real object and the virtual light intensity. Based on the degree and location of light attenuation, the rendering precision of the virtual image generation area is adjusted in real time to output a hybrid rendering result.
[0006] Furthermore, the step of acquiring real object data and virtual object data, and writing real objects and virtual objects into the same spatial range based on the real object data and virtual object data to construct MR scene spatial encoding, includes: The system acquires the following data according to a preset sampling period: head position of the person, viewing direction of the head-mounted display, spatial boundaries of real objects, spatial boundaries of virtual objects, intensity of light reflected from the surface of real objects, and operating status of the terminal. The head position of the person, the viewing direction of the head-mounted display, the spatial boundary of the real object, the spatial boundary of the virtual object, the intensity of reflected light from the surface of the real object, and the operating status of the terminal are encapsulated into a synchronous acquisition frame according to the time identifier. Multiple entity markers are selected from the synchronous acquisition frames, and the position of each entity marker in the real environment is determined so that the entity markers coincide with the corresponding virtual markers in the 3D application.
[0007] Furthermore, the step of acquiring real object data and virtual object data, and writing real objects and virtual objects into the same spatial range based on the real object data and virtual object data to construct MR scene spatial encoding, further includes: The spatial range is divided into multiple spatial coding units, and when the spatial boundary of the real object passes through the spatial coding unit, the occupancy status of the real object is written in the corresponding spatial coding unit. When the spatial boundary of the virtual object passes through the spatial encoding unit, the virtual object occupancy status is written into the corresponding spatial encoding unit; When the real object space boundary and the virtual object space boundary both pass through the spatial encoding unit, the virtual object in front state or the real object in front state is written according to the distance between the real object space boundary and the virtual object space boundary and the position of the person's head. The MR scene spatial encoding consists of the real object occupancy state, the virtual object occupancy state, the virtual object in front state, the real object in front state, and the corresponding spatial encoding unit.
[0008] Furthermore, the step of dividing the real light transmission area and the virtual image generation area based on the MR scene spatial encoding, and determining the virtual object occlusion area through the relative positional relationship between the real light transmission area and the virtual image generation area, includes: The first spatial coding unit within the head-mounted display's field of view is extracted from the MR scene spatial coding, and the first spatial coding unit is projected onto the binocular display plane to generate a binocular projection unit table; Based on the binocular projection unit table, the projection outline with the state of real object occupation is written into the real light transmission area, and the projection outline with the state of virtual object occupation is written into the virtual image generation area.
[0009] Furthermore, the step of dividing the real light transmission area and the virtual image generation area based on the MR scene spatial encoding, and determining the virtual object occlusion area through the relative positional relationship between the real light transmission area and the virtual image generation area, further includes: Extract the overlapping pixels between the real light transmission area and the virtual image generation area, and generate a field of view overlap area based on the overlapping pixels; The relative positional relationship between the real object and the virtual object is read within the overlapping area of the field of view, and the overlapping pixels with the virtual object in front are selected as effective occlusion pixels, so as to convert the effective occlusion pixels into the occlusion area coordinates of the virtual object occluding the real object.
[0010] Furthermore, the process of allocating virtual image generation tasks to the virtual image generation area, and recording the virtual object coverage position and virtual light intensity in each frame of the virtual image after executing the virtual image generation task, includes: Write the area coordinates corresponding to the real light transmission area into the real scene task exclusion position, and set a constraint at the real scene task exclusion position to prohibit the generation of real scene static images. The intersection of the region coordinates between the real light transmission area and the virtual image generation area is defined as the virtual pipeline coverage position, and the virtual pipeline coverage position is subtracted from the region coordinates of the virtual image generation area. The virtual pipeline coverage area is divided into multiple partitions according to the set pixel range, and a virtual image generation task is assigned to each partition. After the virtual image generation task is executed, a virtual image is generated, along with the virtual object coverage area and virtual light intensity in each frame of the virtual image.
[0011] Furthermore, the step of verifying the overlap between the virtual object's occlusion area and the virtual object's coverage area, and determining the degree and location of light attenuation by combining the reflected light intensity of the real object and the virtual light intensity, includes: The intersection of the coordinates of the occluded area of the virtual object and the covered position of the virtual object is defined as the effective attenuation position. The contour pixels that fall into the effective attenuation position are selected from the covered contour of the virtual object, and the contour pixels are output as the effective covered contour. The effective attenuation positions are associated with the reflected light intensity of real objects and the intensity of virtual light, respectively, and a boundary transition zone is set within the effective coverage contour to construct a full-view light attenuation map based on the boundary transition zone; The full-field light attenuation map is split according to the binocular identifier, and the effective attenuation position is mapped to the corresponding light attenuation layer to output the light attenuation degree and light attenuation position.
[0012] Furthermore, the real-time adjustment of the rendering precision of the virtual image generation area based on the degree and location of light attenuation to output a hybrid rendering result includes: The virtual object coverage area is subtracted from the virtual image generation area, and the real light transmission area is prohibited from generating real scene images, in order to construct a rendering accuracy control table; The rendering precision of the virtual image generation area is adjusted according to the rendering precision control table, and the adjusted virtual image, along with the light attenuation degree and light attenuation position, is written into a unified display cycle to output the hybrid rendering result.
[0013] In a second aspect, this disclosure provides an electronic device including a memory and at least one processor, the memory storing a computer program, and the processor executing the computer program to implement the method of the first aspect described above.
[0014] Thirdly, this disclosure provides a computer storage medium storing a computer program that, when executed, implements the method described in the first aspect.
[0015] The beneficial effects of this disclosure are that, compared with the prior art, this disclosure has the following advantages: (1) This invention acquires real object data and virtual object data, and writes real objects and virtual objects into the same spatial range based on the real object data and virtual object data to construct MR scene spatial encoding. Then, based on the MR scene spatial encoding, the real light transmission area and the virtual image generation area are divided, and the virtual object occlusion area is determined by the relative positional relationship between the real light transmission area and the virtual image generation area. Subsequently, virtual image generation tasks are assigned to the virtual image generation area, and after the virtual image generation task is executed, the virtual object coverage position and virtual light intensity in each frame of virtual image are recorded, dividing the field of view into the real light transmission area and the virtual image generation area, laying the foundation for obtaining a reduction in rendering load and a realistic occlusion result that conforms to the spatial front-back relationship.
[0016] (2) Based on dividing the field of view into a real light transmission area and a virtual image generation area, this invention verifies the overlap between the virtual object occlusion area and the virtual object coverage position, and determines the light attenuation degree and light attenuation position by combining the real object's reflected light intensity and the virtual light intensity. Finally, based on the light attenuation degree and light attenuation position, the rendering accuracy of the virtual image generation area is adjusted in real time to output a hybrid rendering result. Directional light attenuation is applied to the area where the virtual object occludes the real object, and the light attenuation position moves synchronously with the virtual object coverage position, thereby achieving two results: a reduction in rendering load and realistic occlusion that conforms to the spatial front-back relationship. For example, in an application scenario where maintenance personnel wear an optical see-through head-mounted display to view a stainless steel machine tool and the virtual internal pipeline needs to be displayed in front of the machine tool's outer shell, the outer shell area is included in the area that needs to be occluded. The head-mounted display applies directional attenuation to the incident light within the pipeline coverage outline, the reflected light intensity decreases, and the pipeline appears as an opaque entity. When the personnel rotate their heads, the attenuation outline moves with the pipeline position. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0018] Figure 1 The diagram illustrates a flowchart of an efficient rendering method for complex MR scenes based on spatial coding, incorporating multiple rendering strategies.
[0019] Figure 2 The diagram illustrates the process of virtual overlay combined with real light attenuation provided by the present invention.
[0020] Figure 3 The diagram illustrates the flow chart of the transmission region combined with the hybrid rendering scheduling process provided by the present invention.
[0021] Figure 4 This diagram illustrates a scenario where virtual pipeline coverage attenuation is achieved, as provided by the present invention. In the diagram, 1 represents an optical see-through head-mounted display, 3 represents a real object, 4 represents a virtual pipeline, 5 represents a human eye, 11 represents a head-mounted display lens, 12 represents a head-mounted display assembly, 13 represents a light attenuation layer, 15 represents an effective attenuation position, 16 represents a boundary transition zone, and 17 represents a fully transmissive position.
[0022] The accompanying drawings have illustrated specific embodiments of this disclosure, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this disclosure to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0023] The present disclosure will be further described below with reference to the accompanying drawings. The following embodiments are only used to illustrate the technical solutions of the present disclosure more clearly, and should not be used to limit the scope of protection of the present disclosure.
[0024] The components of the embodiments of the invention described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0025] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of the invention, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.
[0026] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of the invention pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be interpreted as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of the invention.
[0027] like Figure 1 As shown in one embodiment, a method for efficient rendering of complex MR scenes using a hybrid multi-rendering strategy based on spatial coding includes the following steps: Step S110: Obtain real object data and virtual object data, and write real object 3 and virtual object into the same spatial range according to real object data and virtual object data to construct MR scene spatial encoding.
[0028] In some embodiments, the present invention provides an efficient rendering method for complex MR scenes based on spatial coding and multi-rendering strategies, wherein step S110 specifically includes the following steps: Step S111: Acquire the position of the person's head, the viewing direction of the head-mounted display, the spatial boundary of the real object, the spatial boundary of the virtual object, the intensity of reflected light from the surface of the real object, and the operating status of the terminal according to the preset sampling period.
[0029] Step S112: Encapsulate the personnel's head position, head-mounted display viewing direction, real object spatial boundary, virtual object spatial boundary, real object surface reflected light intensity, and terminal operating status into a synchronous acquisition frame according to the time identifier.
[0030] Step S113: Select multiple entity marker points from the synchronous acquisition frame and determine the position of each entity marker point in the real environment so that the entity marker points coincide with the corresponding virtual marker points in the 3D application.
[0031] In some embodiments, the efficient rendering method for complex MR scenes based on spatial coding, which employs a hybrid rendering strategy, further includes the following steps in step S110: Step S114: Divide the spatial range into multiple spatial coding units, and when the spatial boundary of a real object passes through a spatial coding unit, write the real object's occupancy status in the corresponding spatial coding unit.
[0032] Step S115: When the virtual object's spatial boundary crosses a spatial encoding unit, write the virtual object's occupancy status into the corresponding spatial encoding unit.
[0033] Step S116: When the spatial boundary of the real object and the spatial boundary of the virtual object pass through the spatial encoding unit at the same time, write the virtual object in front state or the real object in front state according to the distance between the spatial boundary of the real object and the spatial boundary of the virtual object and the position of the person's head.
[0034] The MR scene spatial coding consists of the real object occupancy state, the virtual object occupancy state, the virtual object in front state, and the real object in front state and the corresponding spatial coding unit.
[0035] In a specific embodiment, the present invention provides an efficient rendering method for complex MR scenes based on spatial coding and multi-rendering strategies, comprising steps 1 to 5: Step 1: Establish MR scene spatial coding.
[0036] First, the head position, viewing direction, spatial boundaries of real objects, spatial boundaries of virtual objects, intensity of reflected light from the surface of real objects, and terminal operating status are acquired using an optical see-through head-mounted display 1. Then, real objects 3 and virtual objects are configured within the same spatial range, and the occupancy status of the real object, the occupancy status of the virtual object, the front-back relationship, the intensity of reflected light, and the virtual image generation accuracy are written for each spatial location. This forms the spatial encoding result, including the following sub-steps:
[0037] Sub-step 1.1: Form a synchronous acquisition frame.
[0038] Specifically, firstly, the sampling period is set to 14-16 milliseconds, a range that adapts to the screen update cycle of commonly used head-mounted displays, and a time stamp is written for each sampling period. Subsequently, the head position, viewing direction, spatial boundaries of real objects, spatial boundaries of virtual objects, reflected light intensity, and terminal operating status are encapsulated according to the time stamp, and the encapsulation result is defined as the first synchronous sampling frame.
[0039] Sub-step 1.2: Establish a unified spatial scope.
[0040] Specifically, three non-collinear entity markers are selected as spatial reference points. The positions of these three entity markers in the real environment are then obtained, and these three entity markers are aligned with three virtual markers in the 3D application. Subsequently, based on the alignment relationship, the spatial boundaries of the real object, the spatial boundaries of the virtual object, the head position, and the viewing direction are transformed. The transformed contents together form a unified spatial dataset.
[0041] Sub-step 1.3: Divide and mark the spatial locations.
[0042] Specifically, firstly, the unified spatial range is divided into cubic spatial coding units with sides of 6-8 cm. This size is smaller than the outer diameter of common industrial pipelines and does not generate too many spatial coding units. Then, a unique number is assigned to each spatial coding unit according to the order of arrangement in three spatial directions. Specifically, when the spatial boundary of a real object passes through the spatial coding unit, a real object occupancy status is recorded; when the spatial boundary of a virtual object passes through the spatial coding unit, a virtual object occupancy status is recorded; when both spatial boundaries pass through the spatial coding unit simultaneously, the distances from the two spatial boundaries to the head position are compared along the observation direction. If the distance to the virtual object's spatial boundary is smaller, a virtual object-first status is recorded; otherwise, a real object-first status is recorded. Finally, the reflected light intensity and terminal operating status are recorded in the spatial coding intermediate table.
[0043] Sub-step 1.4: Determine the accuracy of virtual image generation.
[0044] Specifically, firstly, the observation distance, field of view occupancy, reflected light intensity, and observation direction are converted into visual requirements. Then, the virtual image generation accuracy corresponding to the spatial coding unit with virtual object occupancy is determined by suppressing the virtual image through terminal load. The expression is: ; In the formula, To improve the precision of virtual image generation; The head position to the 1st The ratio of the distance between the centers of each spatial coding unit to the upper limit of the working distance; The proportion of the field of view occupied by this spatial coding unit; This is the normalized value of the reflected light intensity; It is the absolute value of the cosine of the angle between the observation direction and the center direction of the spatial coding unit; This is the normalized value of the graphics processor utilization. The value ranges from 0.29 to 0.31. The value ranges from 0.24 to 0.26. The value ranges from 0.24 to 0.26. The value ranges from 0.19 to 0.21. The value ranges from 0.18 to 0.22.
[0045] It should be noted that distance has the highest weight, used to enhance near-field virtual objects; the field of view area weight is close to the reflected light weight, used to balance contour area and reflection interference, and the terminal load adjustment intensity is lower than that of each visual weight to prevent sudden changes in accuracy. This formula is used to convert observation distance, field of view ratio, reflected light intensity, and observation direction into visual requirements, and then suppress the accuracy of virtual image generation through terminal load.
[0046] Subsequently, spatial coding units with a precision value of not less than 0.65 are written into the first precision level, spatial coding units with a precision value of less than 0.65 but not less than 0.40 are written into the second precision level, the remaining virtual object occupancy units are written into the third precision level, and spatial coding units without virtual object occupancy are written into the no virtual image generation task state.
[0047] Step S120: Based on MR scene spatial coding, the real light transmission area and the virtual image generation area are divided, and the virtual object occlusion area is determined by the relative positional relationship between the real light transmission area and the virtual image generation area.
[0048] In some embodiments, the present invention provides an efficient rendering method for complex MR scenes based on spatial coding and multi-rendering strategies, wherein step S120 specifically includes the following steps: Step S121: Extract the first spatial coding unit within the head-mounted display's field of view from the MR scene spatial coding, and project the first spatial coding unit onto the binocular display plane to generate a binocular projection unit table.
[0049] Step S122: Based on the binocular projection unit table, the projection outline with the actual object occupancy state is written into the actual light transmission area, and the projection outline with the virtual object occupancy state is written into the virtual image generation area.
[0050] In some embodiments, the efficient rendering method for complex MR scenes based on spatial coding, which combines multiple rendering strategies, further includes the following steps in step S120: Step S123: Extract the overlapping pixels between the real light transmission area and the virtual image generation area, and generate the visual overlap area based on the overlapping pixels.
[0051] Step S124: Read the relative positional relationship between the real object 3 and the virtual object within the overlapping area of the field of view, and select the overlapping pixels with the virtual object in front as effective occlusion pixels, so as to convert the effective occlusion pixels into the coordinates of the occlusion area of the virtual object occluding the real object 3.
[0052] In a specific embodiment, the present invention provides an efficient rendering method for complex MR scenes based on spatial coding, using a hybrid multi-rendering strategy. Step 2 involves dividing the field of view according to the spatial coding results. The real light transmission area is the field of view where ambient light passes through the optical see-through head-mounted display 1 and enters the human eye 5; the virtual image generation area is the field of view where the optical see-through head-mounted display 1 needs to generate virtual light. The real light transmission area is determined based on the occupancy status of real objects, and the virtual image generation area is determined based on the occupancy status of virtual objects. Then, based on the front-to-back relationship, the position where the virtual object is located in front of the real object 3 is selected from the overlapping positions of the two types of areas. The selected position forms the area where the virtual object occupies the real object 3, including the following sub-steps: Sub-step 2.1: Generate the binocular projection unit table.
[0053] Specifically, first, the unique number, spatial location range, real object occupancy status, virtual object occupancy status, front-back relationship, reflected light intensity, and virtual image generation accuracy of each spatial coding unit are read. Then, using the left and right eye observation positions as projection starting points, the spatial coding units within the head-mounted display's field of view are projected onto the left and right eye display planes, respectively. Each projection record includes the unique number of the spatial coding unit, binocular identification, projection outline, projection coverage ratio, spatial depth, and various statuses, ultimately forming a binocular projection unit table.
[0054] Sub-step 2.2 generates two types of visual regions.
[0055] Specifically, firstly, the binocular display planes are traversed pixel by pixel, and the projected outlines with real object occupancy are incorporated into the real light transmission area, which refers to the binocular pixel range where reflected light from real objects reaches the human eye 5 after passing through the head-mounted display lens 11. Next, the projected outlines with virtual object occupancy are incorporated into the virtual image generation area, which refers to the binocular pixel range where the head-mounted display needs to output virtual light. The overlapping pixels of the two types of visual fields are then calculated to form the visual field overlap area. Finally, each pixel in the above three types of areas is written with a binocular identifier, pixel position, unique spatial coding unit number, and spatial depth.
[0056] Sub-step 2.3: Filter out valid occluded pixels.
[0057] Specifically, firstly, the front-to-back relationship is read within the overlapping area of the field of view, and pixels with virtual objects in the foreground are directly filtered. A 3-5 pixel wide judgment neighborhood is set around the filtered pixels. Then, the degree of double occupancy, the degree of front-to-back separation, and the degree of reflected light interference are converted into an occlusion judgment value for each filtered pixel. The expression is: ; In the formula, This is a dimensionless occlusion determination value; To determine the percentage of pixels occupied by virtual objects within the neighborhood; To determine the proportion of pixels occupied by real objects in the neighborhood; The distance between the front and back surfaces of the real object 3 and the virtual object 3 is expressed in meters. The diagonal length of the spatial coding unit, in meters; Normalized reflected light intensity; The value ranges from 0.29 to 0.31. The value ranges from 0.24 to 0.26. The value ranges from 0.24 to 0.26. The value ranges from 0.19 to 0.21.
[0058] It should be noted that the virtual occupancy weight is relatively high and is used to maintain the outline of the virtual object; the real occupancy weight and the front-back distance weight are used to exclude unstable occlusion near the spatial boundary; and the reflected light weight is used to enhance the occlusion requirements of the highlighted real surface. This formula is used to convert the dual occupancy degree, the front-back separation degree, and the reflected light interference degree into a unified occupancy judgment value.
[0059] Subsequently, the selected pixels with occlusion judgment values of 0.59-0.61 are written into the effective occlusion pixel set. The occlusion judgment threshold is close to 0.6, which is used to suppress spatial boundary jitter while maintaining the contour integrity of the narrow virtual pipeline 4.
[0060] Sub-step 2.4 generates the field of view segmentation results.
[0061] Specifically, three sets of coordinates are organized according to the binocular identifiers. The set of effectively occluded pixels is converted into a set of coordinates for the region where the virtual object occludes the real object 3. Each pixel in the set is assigned a unique spatial coding unit number, spatial depth, reflected light intensity, and virtual image generation precision. Among them, the set of coordinates for the virtual image generation region is used for assigning rendering tasks in step 3; the set of coordinates for the real light transmission region is used for excluding real-scene image generation tasks in step 3; and the set of coordinates for the region where the virtual object occludes the real object 3 is used for determining the directional light attenuation position in step 4.
[0062] Step S130: Assign virtual image generation tasks to the virtual image generation area, and after executing the virtual image generation tasks, record the virtual object coverage position and virtual light intensity in each frame of virtual image.
[0063] In some embodiments, the present invention provides an efficient rendering method for complex MR scenes based on spatial coding and multi-rendering strategies, wherein step S130 specifically includes the following steps: Step S131: Write the area coordinates corresponding to the real light transmission area into the real scene task exclusion position, and set a constraint at the real scene task exclusion position to prohibit the generation of real scene static images.
[0064] Step S132: Define the intersection of the region coordinates between the real light transmission area and the virtual image generation area as the virtual pipeline coverage position, and subtract the virtual pipeline coverage position from the region coordinates of the virtual image generation area.
[0065] Step S133: Divide the virtual pipeline coverage area into multiple partitions according to the set pixel range, and assign a virtual image generation task to each partition, so as to generate a virtual image and the virtual object coverage area and virtual light intensity in each frame of the virtual image after executing the virtual image generation task.
[0066] In a specific embodiment, the present invention provides an efficient rendering method for complex MR scenes based on spatial coding, employing a multi-rendering strategy hybrid approach. Step 3 involves executing a multi-rendering strategy hybrid scheduling method. Instead of allocating image generation tasks for static real-world areas to the actual light transmission areas, it allocates virtual image generation tasks to the virtual image generation areas based on the virtual image generation precision. During execution, high-precision rendering is used for virtual pipeline coverage areas, while lightweight rasterization rendering is used for non-covered areas within the virtual image generation area. After virtual image generation is completed, the coverage position, coverage outline, and virtual light intensity of virtual objects in each frame are recorded, such as... Figure 3 As shown, it includes the following sub-steps: Sub-step 3.1: Create a rendering task constraint table.
[0067] Specifically, first, three sets of coordinates are read according to the binocular identifiers and pixel positions. The coordinate set of the real light transmission area is written into the real-scene task exclusion position, and a constraint prohibiting the generation of real-scene static images is configured for the real-scene task exclusion position. This constraint does not restrict the generation of virtual images. Next, the intersection of the virtual image generation area coordinate set and the area coordinate set where the virtual object occludes the real object 3 is calculated. This intersection is defined as the virtual pipeline coverage position, which refers to the binocular pixel range where the virtual pipeline 4 is located in front of the real object 3 and needs to present a physical occlusion effect. Then, the virtual pipeline coverage position is subtracted from the virtual image generation area coordinate set, and the difference is defined as the virtual non-coverage position. Finally, the virtual pipeline coverage position and the virtual non-coverage position together cover the complete virtual image generation area.
[0068] Sub-step 3.2 generates a partition rendering task.
[0069] Specifically, firstly, the virtual pipeline coverage area is divided into partitions with side lengths of 15-17 pixels, and a high-precision rendering task is created for each partition. This high-precision rendering task uses the complete geometry of virtual pipeline 4, the original texture levels, virtual lighting, and virtual shadows. In the high-precision rendering task, the first precision level uses 100% of the display resolution; the second precision level uses 94% of the display resolution; and the third precision level uses 88% of the display resolution. All three precision levels maintain the depth writing and coverage outline writing of virtual pipeline 4.
[0070] Subsequently, the virtual non-covered areas are partitioned according to a side length of 15-17 pixels, and a lightweight rasterization task is established for each partition. This lightweight rasterization task uses visible geometry and basic texture sampling. In this lightweight rasterization task, the first precision level uses 78% of the display resolution; the second precision level uses 72% of the display resolution; and the third precision level uses 66% of the display resolution. Furthermore, the lightweight rasterization result is restored to the display resolution in sub-step 3.3.
[0071] Then, the accuracy requirements, display area, reflection interference, and occlusion requirements are converted into a unified scheduling order to arrange the two types of rendering tasks from high to low according to their scheduling priority. After the task is executed, the real-scene task exclusion position is written to the real-scene task exclusion record. This real-scene task exclusion record does not create real-scene static image tasks.
[0072] In this embodiment, the expression for the scheduling priority value is: ; In the formula, For the first Dimensionless scheduling priority value for each partition rendering task; Generate precision-normalized values for the virtual image; For the first The area percentage of each zone in the binocular display plane; For the first Normalized mean of reflected light intensity within each partition; For the first The proportion of pixels covered by the virtual pipeline within each partition; The value ranges from 0.29 to 0.31; The value ranges from 0.24 to 0.26; The value ranges from 0.19 to 0.21; The value ranges from 0.24 to 0.26.
[0073] It should be noted that the virtual image generation accuracy has the highest weight and is used to maintain accuracy requirements; the partition area weight reflects the extent of the partition's influence on the image; the reflected light intensity weight reflects the degree of interference of real reflected light on the virtual image; and the virtual pipeline coverage ratio weight is used to improve the execution order of physical occlusion areas. This formula is used to convert accuracy requirements, display area, reflection interference, and occlusion requirements into a unified scheduling order, that is, to arrange the two types of rendering tasks from high to low scheduling priority.
[0074] Sub-step 3.3: Perform hybrid rendering.
[0075] Specifically, firstly, a high-precision rendering execution queue and a lightweight rasterization execution queue are established. The two execution queues submit tasks according to the scheduling priority value. Before the task is submitted, the real-scene task exclusion record checks each partition. Partitions located at the real-scene task exclusion position but not falling into the virtual image generation area do not enter the two execution queues and are written into the real-scene task exclusion execution record.
[0076] In this embodiment, the high-precision rendering execution queue completes the geometry processing, depth writing, texture sampling, virtual lighting, virtual shadows, and pixel generation for virtual pipeline 4; the lightweight rasterization execution queue completes the geometry processing, basic texture sampling, and pixel generation for virtual non-covered areas. During execution, the lightweight rasterization results are restored to the display resolution, and the two types of results are merged according to binocular identification, spatial depth, and pixel position. Specifically, the high-precision rendering results are used for virtual pipeline covered areas, and the lightweight rasterization results are used for virtual non-covered areas. The merged results form a frame-level virtual rendering intermediate result. Finally, for each generated pixel, frame time, binocular identification, pixel position, spatial depth, virtual object occupancy status, and virtual light intensity are written to form a pixel generation record.
[0077] Sub-step 3.4 generates a frame-level virtual image.
[0078] Specifically, first, the frame-level virtual rendering intermediate results are verified based on the execution records of the real-world task exclusion process. Pixels of real-world static images that mistakenly entered the frame-level virtual rendering intermediate results are deleted. Then, pixels that have been written into the spatial depth of virtual objects are filtered based on the pixel generation records. The filtering results form the virtual object coverage position.
[0079] Subsequently, the virtual object coverage positions are traversed. When a covered pixel is adjacent to an uncovered pixel, the covered pixel is written into the virtual object coverage outline. The coverage outlines are connected according to the left and right eyes respectively, and the frame time is recorded. Then, the virtual light intensity of each covered pixel is read according to the pixel generation record. This virtual light intensity is represented by the brightness value of the light output by the head-mounted display component 12. Finally, a virtual image generation result without the real-world static image generation task is formed, along with the coverage position, coverage outline, and virtual light intensity consistent with the position of the virtual pipeline 4 in each frame.
[0080] Step S140: Check the overlap between the virtual object's occlusion area and the virtual object's coverage area, and determine the degree and location of light attenuation by combining the reflected light intensity of the real object and the virtual light intensity.
[0081] In some embodiments, the present invention provides an efficient rendering method for complex MR scenes based on spatial coding and multi-rendering strategies, wherein step S140 specifically includes the following steps: Step S141: Define the intersection of the region coordinates of the virtual object's occlusion area and the virtual object's coverage area as the effective attenuation position 15, and filter out the contour pixels that fall into the effective attenuation position 15 from the virtual object's coverage contour, so as to output the contour pixels as the effective coverage contour.
[0082] Step S142: Associate the effective attenuation position 15 with the reflected light intensity of the real object and the virtual light intensity respectively, and set the boundary transition zone 16 within the effective coverage contour to construct a full-view light attenuation map based on the boundary transition zone 16.
[0083] Step S143: The full-field light attenuation map is split according to the binoculars and the effective attenuation position 15 is mapped to the corresponding light attenuation layer 13 to output the light attenuation degree and light attenuation position.
[0084] In a specific embodiment, the present invention provides a high-efficiency rendering method for complex MR scenes based on spatial coding and multi-rendering strategies. Step 4 involves performing virtual-real fusion optimization. The area where the virtual object occludes the real object 3 is checked for overlap with the virtual object's coverage position, and the coverage outline is obtained from the overlap position. During execution, the degree of directional light attenuation is determined based on the intensity of reflected light from the real object surface and the intensity of virtual light. The optical see-through head-mounted display 1 reduces the real reflected light entering the human eye 5 according to the coverage outline, while real light outside the coverage outline continues to transmit. When the wearer's head position or viewing direction changes, the directional light attenuation position is moved using the updated virtual object coverage position, ultimately forming a real light attenuation area that moves synchronously with the virtual object, such as... Figure 2 As shown, it includes the following sub-steps: Sub-step 4.1: Form frame-level fused data packets.
[0085] Specifically, firstly, the left-eye coordinates and right-eye coordinates are processed according to frame time and binocular identifiers, and then the intersection of the set of coordinates of the region where the virtual object occludes the real object 3 and the virtual object's coverage position is obtained. This intersection is defined as the effective attenuation position 15. Subsequently, the contour pixels that fall into the effective attenuation position 15 are selected from the virtual object's coverage contour. The selection result is defined as the effective coverage contour, and the pixels outside the effective attenuation position 15 are set as the fully transparent position 17.
[0086] Then, based on the unique spatial coding unit number, the effective attenuation position 15 is associated with the intensity of reflected light from the real object surface. Next, based on the pixel positions of both eyes, the effective attenuation position 15 is associated with the virtual light intensity. Both light intensities are represented using brightness per unit area. Finally, the effective attenuation position 15, the effective coverage outline, the two light intensities, the virtual image generation result, and the frame time are encapsulated into a frame-level fusion data packet.
[0087] Sub-step 4.2: Determine the degree of attenuation of the directional light.
[0088] Specifically, a boundary transition band 16 with a width of four to five pixels is set within the effective coverage contour, and the distance from each effective attenuation pixel to the effective coverage contour is calculated. The normalized contour depth outside the boundary transition band 16 is set to 0, and the normalized contour depth at the inner endpoint of the boundary transition band 16 is set to 1. Subsequently, the intensity of reflected light from the real object surface, the intensity of virtual light rays, and the normalized contour depth are read. Based on the absolute brightness of the real reflected light and the proportion of real light rays relative to virtual light rays, the attenuation degree at strong reflection positions is increased, and the attenuation edges are smoothed using the normalized contour depth to determine the directional light attenuation ratio for each effective attenuation pixel. The expression is: ; In the formula, For the first The directional ray attenuation ratio of each effective attenuation pixel, with a value range of 0-1; The maximum attenuation ratio is 0.88-0.92; For the first Normalized contour depth of each effective decay pixel; This represents the intensity of light reflected from the surface of a real object. For virtual light intensity; To calibrate the reference brightness; The attenuation response coefficient has a value of 1.95-2.05. The absolute reflectance weight is set to 0.54-0.56. The weighting for the proportion of actual light rays ranges from 0.44 to 0.46. , and The value is expressed in candela per square meter. Furthermore, a slightly higher weight is given to absolute reflectivity to enhance the attenuation of high-brightness reflective areas on the stainless steel surface. A cubic smoothing term controls the boundary transition to prevent noticeable dark edges from appearing on the effective coverage contour. This formula is used to increase the attenuation of strong reflective locations based on the absolute brightness of the actual reflected light and the proportion of the actual ray relative to the virtual ray, and utilizes normalized contour depth to smooth the attenuation edges.
[0089] Subsequently, the attenuation ratio outside the effective attenuation position 15 is set to 1. Then, the attenuation ratios of all pixels are combined to form a full-view ray attenuation map. Finally, the full-view ray attenuation map and the virtual image generation result are encapsulated into a virtual-real synchronized display frame.
[0090] You can refer to this. Figure 4 As shown: The upper and lower walls of the optical see-through head-mounted display 1 form an accommodating space. The two ends of the left eye light attenuation layer 13 and the head-mounted display lens 11 are respectively attached to the inner surfaces of the upper and lower walls. They are arranged front and back along the ambient light incident path, with the left eye light attenuation layer 13 closer to the real object 3 and the head-mounted display lens 11 closer to the human eye 5. The head-mounted display assembly 12 is mounted on the inner surface of the upper wall. The output virtual light is refracted by the head-mounted display lens 11 and then directed towards the human eye 5. The real object 3 and the virtual pipeline 4 overlap front and back along the observation direction. The reflected light from the surface of the real object enters the left eye light attenuation layer 13 in the direction of the arrow: the reflected light entering the effective attenuation position 15 is reduced, the reflected light entering the boundary transition zone 16 is gradually reduced according to the contour depth, and the reflected light entering the fully transmitted position 17 passes through the head-mounted display lens 11 and enters the human eye 5.
[0091] Sub-step 4.3 generates a synchronous decay command.
[0092] Specifically, the full-field light attenuation map is split according to the binocular identifiers. The attenuation position of the left eye is mapped to the left eye light attenuation layer 13, and the attenuation position of the right eye is mapped to the right eye light attenuation layer 13. This light attenuation layer 13 refers to the area-by-area transmission control component located in the ambient light incident path. Subsequently, the directional light attenuation ratio is converted into the driving intensity of the light attenuation layer 13. A full transmission command is written to the position where the attenuation ratio is 0, and a directional attenuation command is written to the position where the attenuation ratio is greater than 0.
[0093] Then, the driving time of the light attenuation layer 13 and the display time of the virtual image are written into the same display cycle. After the wearer's head position or viewing direction changes, steps 1 to 3 generate a new virtual object coverage position, and sub-steps 4.1 and 4.2 generate a new full-view light attenuation map accordingly. Finally, the attenuation position of the previous display cycle is covered in the new display cycle, and the directional light attenuation position moves with the virtual object coverage position.
[0094] Sub-step 4.4 outputs the actual light attenuation area.
[0095] Specifically, the optical see-through head-mounted display 1 drives the left and right eye light attenuation layers 13 according to the binocular synchronous attenuation command. The real reflected light inside the effective coverage area is attenuated according to the pixel-by-pixel attenuation ratio, while the real light outside the effective coverage area enters the human eye 5 according to the complete transmission command. Finally, the head-mounted display simultaneously outputs a virtual image, and the virtual image and the real light attenuation area are displayed at the same time.
[0096] Step S150: Based on the degree and location of light attenuation, the rendering precision of the virtual image generation area is adjusted in real time to output a hybrid rendering result.
[0097] In some embodiments, the present invention provides an efficient rendering method for complex MR scenes based on spatial coding and multi-rendering strategies, wherein step S150 specifically includes the following steps: Step S151: Subtract the virtual object coverage area from the virtual image generation area and prohibit the generation of real scene images in the real light transmission area to construct a rendering accuracy control table.
[0098] Step S152: Adjust the rendering precision of the virtual image generation area according to the rendering precision control table, and write the adjusted virtual image, light attenuation degree and light attenuation position into a unified display cycle to output the mixed rendering result.
[0099] In a specific embodiment, this invention provides a high-efficiency rendering method for complex MR scenes based on spatial coding and multi-rendering strategies. Step 5 involves performing terminal adaptive adaptation and outputting the MR fused image. The rendering precision of the virtual image generation area is adjusted according to the terminal's operating status, while the image generation precision of the real light transmission area remains unchanged. When the terminal load increases, the rendering precision of non-covered areas within the virtual image generation area is reduced, while the rendering precision required to form the entity outline is maintained at the virtual object coverage area. Subsequently, the virtual image generation result is output synchronously with the real light attenuation area, and the reflected light from the real object surface is attenuated within the virtual object coverage outline, thus giving the virtual object an opaque occlusion effect. Finally, spatial coding, multi-rendering strategy hybrid scheduling, virtual-real fusion optimization, and terminal adaptive adaptation together form a real-time hybrid rendering result, including the following sub-steps: Sub-step 5.1: Generate the rendering precision control table.
[0100] Specifically, first, the virtual object's coverage area is subtracted from the set of coordinates of the virtual scene generation area to obtain the virtual non-covered area. Then, the real light transmission area is written into the real scene generation forbidden area, and no rendering precision is set for the real scene generation forbidden area.
[0101] Subsequently, every three display cycles, the GPU utilization, VRAM utilization, and current frame rate are read. The difference between the current frame rate and the target frame rate is divided by the target frame rate to obtain the frame rate pressure value. The target frame rate is set to 88-92 frames per second. Then, based on the three terminal operating states, the non-overlay rendering precision coefficient for each display cycle is determined, expressed as: ; In the formula, This refers to the precision coefficient for non-overlay rendering. This represents the lower limit of non-overlay rendering precision, with a value ranging from 0.64 to 0.66. To normalize the graphics processor utilization rate; To normalize the video memory usage rate; The frame rate stress value is limited to the range of zero to one. This is the load response coefficient, with a value ranging from 1.95 to 2.05; , , The weights are, in order, the graphics processor load weight, the video memory load weight, and the frame rate pressure weight, with values ranging from 0.36 to 0.28, 0.32 to 0.34, and 0.29 to 0.31, respectively. In addition, the graphics processor load directly reflects the pressure of image generation, so it has the highest weight. This formula reduces the rendering accuracy of virtual non-covered areas as the terminal load increases, and smoothly restores the rendering accuracy after the load decreases.
[0102] Finally, the original rendering precision of the virtual non-covered position is multiplied by the non-covered rendering precision coefficient, and the virtual object coverage position maintains the high-precision rendering requirements determined in step 3. The processing result is then written into the rendering precision control table.
[0103] Sub-step 5.2: Form a synchronized fused display frame.
[0104] Specifically, the virtual image generation results are processed according to the rendering precision control table. The virtual non-covered areas use the adjusted rendering precision, while the virtual object covered areas use the maintained rendering precision. Subsequently, the processed virtual image and the real light attenuation area are written into the same display cycle, and the later completion time of the two is set as the common output time to form a synchronously merged display frame.
[0105] Sub-step 5.3 outputs the real-time hybrid rendering result.
[0106] Specifically, the optical see-through head-mounted display 1 displays a virtual image during the common output phase and drives the real light attenuation area. The reflected light from the real surface inside the outline covered by the virtual object is attenuated, while real light outside the outline continues to transmit, resulting in an opaque occlusion effect at the virtual object's coverage area. Finally, the new head position, viewing direction, and terminal operating status are returned to step 1 to enter the next display cycle.
[0107] It should be understood that the above embodiments are only used to illustrate the technical solutions of this disclosure, and not to limit them; although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure.
Claims
1. A high-efficiency rendering method for complex MR scenes based on spatial coding and multi-rendering strategies, characterized in that, The method includes: Acquire real object data and virtual object data, and write real objects and virtual objects into the same spatial range based on the real object data and virtual object data to construct MR scene spatial encoding; Based on the MR scene spatial coding, the real light transmission area and the virtual image generation area are divided, and the virtual object occlusion area is determined by the relative positional relationship between the real light transmission area and the virtual image generation area. Assign virtual image generation tasks to the virtual image generation area, and after executing the virtual image generation tasks, record the virtual object coverage position and virtual light intensity in each frame of virtual image; The overlap between the virtual object's occlusion area and the virtual object's coverage area is checked, and the degree and location of light attenuation are determined by combining the light intensity reflected from the real object and the virtual light intensity. Based on the degree and location of light attenuation, the rendering precision of the virtual image generation area is adjusted in real time to output a hybrid rendering result.
2. The efficient rendering method for complex MR scenes based on spatial coding using a hybrid rendering strategy, as described in claim 1, is characterized in that... The step of acquiring real object data and virtual object data, and writing real objects and virtual objects into the same spatial range based on the real object data and virtual object data to construct MR scene spatial encoding, includes: The system acquires the following data according to a preset sampling period: head position of the person, viewing direction of the head-mounted display, spatial boundaries of real objects, spatial boundaries of virtual objects, intensity of light reflected from the surface of real objects, and operating status of the terminal. The head position of the person, the viewing direction of the head-mounted display, the spatial boundary of the real object, the spatial boundary of the virtual object, the intensity of reflected light from the surface of the real object, and the operating status of the terminal are encapsulated into a synchronous acquisition frame according to the time identifier. Multiple entity markers are selected from the synchronous acquisition frames, and the position of each entity marker in the real environment is determined so that the entity markers coincide with the corresponding virtual markers in the 3D application.
3. The efficient rendering method for complex MR scenes based on spatial coding using a hybrid rendering strategy, as described in claim 2, is characterized in that... The step of acquiring real object data and virtual object data, and writing real objects and virtual objects into the same spatial range based on the real object data and virtual object data to construct MR scene spatial encoding, further includes: The spatial range is divided into multiple spatial coding units, and when the spatial boundary of the real object passes through the spatial coding unit, the occupancy status of the real object is written in the corresponding spatial coding unit. When the spatial boundary of the virtual object passes through the spatial encoding unit, the virtual object occupancy status is written into the corresponding spatial encoding unit; When the real object space boundary and the virtual object space boundary both pass through the spatial encoding unit, the virtual object in front state or the real object in front state is written according to the distance between the real object space boundary and the virtual object space boundary and the position of the person's head. The MR scene spatial encoding consists of the real object occupancy state, the virtual object occupancy state, the virtual object in front state, the real object in front state, and the corresponding spatial encoding unit.
4. The efficient rendering method for complex MR scenes based on spatial coding using a hybrid rendering strategy, as described in claim 3, is characterized in that... The process of dividing the real light transmission area and the virtual image generation area based on the MR scene spatial encoding, and determining the virtual object occlusion area through the relative positional relationship between the real light transmission area and the virtual image generation area, includes: The first spatial coding unit within the head-mounted display's field of view is extracted from the MR scene spatial coding, and the first spatial coding unit is projected onto the binocular display plane to generate a binocular projection unit table; Based on the binocular projection unit table, the projection outline with the state of real object occupation is written into the real light transmission area, and the projection outline with the state of virtual object occupation is written into the virtual image generation area.
5. The efficient rendering method for complex MR scenes based on spatial coding using a hybrid rendering strategy, as described in claim 4, is characterized in that... The step of dividing the real light transmission area and the virtual image generation area based on the MR scene spatial encoding, and determining the virtual object occlusion area through the relative positional relationship between the real light transmission area and the virtual image generation area, further includes: Extract the overlapping pixels between the real light transmission area and the virtual image generation area, and generate a field of view overlap area based on the overlapping pixels; The relative positional relationship between the real object and the virtual object is read within the overlapping area of the field of view, and the overlapping pixels with the virtual object in front are selected as effective occlusion pixels, so as to convert the effective occlusion pixels into the occlusion area coordinates of the virtual object occluding the real object.
6. The efficient rendering method for complex MR scenes based on spatial coding using a hybrid rendering strategy, as described in claim 5, is characterized in that... The process of allocating virtual image generation tasks to the virtual image generation area and, after executing the virtual image generation tasks, recording the virtual object coverage position and virtual light intensity in each frame of the virtual image includes: Write the area coordinates corresponding to the real light transmission area into the real scene task exclusion position, and set a constraint at the real scene task exclusion position to prohibit the generation of real scene static images. The intersection of the region coordinates between the real light transmission area and the virtual image generation area is defined as the virtual pipeline coverage position, and the virtual pipeline coverage position is subtracted from the region coordinates of the virtual image generation area. The virtual pipeline coverage area is divided into multiple partitions according to the set pixel range, and a virtual image generation task is assigned to each partition. After the virtual image generation task is executed, a virtual image is generated, along with the virtual object coverage area and virtual light intensity in each frame of the virtual image.
7. The efficient rendering method for complex MR scenes based on spatial coding using a hybrid rendering strategy, as described in claim 1, is characterized in that... The step of verifying the overlap between the virtual object's occlusion area and the virtual object's coverage area, and determining the degree and location of light attenuation by combining the reflected light intensity of the real object and the virtual light intensity, includes: The intersection of the coordinates of the occluded area of the virtual object and the covered position of the virtual object is defined as the effective attenuation position. The contour pixels that fall into the effective attenuation position are selected from the covered contour of the virtual object, and the contour pixels are output as the effective covered contour. The effective attenuation positions are associated with the reflected light intensity of real objects and the intensity of virtual light, respectively, and a boundary transition zone is set within the effective coverage contour to construct a full-view light attenuation map based on the boundary transition zone; The full-field light attenuation map is split according to the binocular identifier, and the effective attenuation position is mapped to the corresponding light attenuation layer to output the light attenuation degree and light attenuation position.
8. The efficient rendering method for complex MR scenes based on spatial coding using a hybrid rendering strategy, as described in claim 7, is characterized in that... The real-time adjustment of the rendering precision of the virtual image generation area based on the degree and location of light attenuation to output a hybrid rendering result includes: The virtual object coverage area is subtracted from the virtual image generation area, and the real light transmission area is prohibited from generating real scene images, in order to construct a rendering accuracy control table; The rendering precision of the virtual image generation area is adjusted according to the rendering precision control table, and the adjusted virtual image, along with the light attenuation degree and light attenuation position, is written into a unified display cycle to output the hybrid rendering result.
9. An electronic device, characterized in that, The electronic device includes a memory and at least one processor, the memory storing a computer program, and the processor executing the computer program to implement the method of any one of claims 1-8.
10. A computer storage medium, characterized in that, It stores a computer program, which, when executed, performs the method according to any one of claims 1-8.
