A three-dimensional object composite highlight rendering method and system, and a storage medium
Patent Information
- Application Number
- CN202611169963.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2046-08-04
AI Technical Summary
该方式虽然可针对单一对象类型做局部优化,但会导致不同对象之间采用不同渲染路径和实现逻辑,代码分裂严重,系统维护成本高,且难以快速扩展至新的对象类型,无法形成统一稳定的高亮渲染框架
[0034]通过本发明提供的该三维对象复合高亮渲染方法及系统、存储介质,巧妙的在复杂三维场景中,将异构业务对象的高亮渲染过程从“直接依赖原始模型”的传统路径中解耦出来,构建一条从“业务语义-代理几何-掩码标记-后处理统一合成”的独立高亮管线,从而将异构业务对象,转换为独立于原始模型的规则代理几何,并统一写入掩码缓冲,利用与主相机实时同步的掩码相机保障空间对齐,再经由双掩码缓冲在离屏阶段即完成“描边加填充”与“仅填充”两类视觉逻辑的物理分离,最终通过单一后处理着色器,一次性分别执行轮廓提取与填充合成并复合至主画面,从而在不修改原始材质、不依赖原始拓扑的前提下,实现了对复杂三维场景中多类型对象的统一稳定高亮,同时保证了多种高亮视觉逻辑的同场并存、高亮结果与主视图的严格对齐以及高亮渲染模块的强复用性与易扩展性。
Smart Images

Figure CN122695063B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer graphics and 3D visualization rendering technology, and in particular to a method, system, and storage medium for highlighting 3D objects based on off-screen dual masking, proxy geometry, and post-processing synthesis. Background Technology
[0002] In industrial 3D visualization, digital twins, warehousing and logistics 3D scheduling, and robot monitoring systems, it is often necessary to highlight different types of 3D objects, such as paths, storage locations, shelf selection areas, robot activity areas, and collision areas, to enable users to quickly identify target objects, understand their status, and perform interactive operations. Because these objects differ significantly in geometric shape, topological structure, material properties, and business semantics, achieving unified, stable, and scalable highlighting rendering for heterogeneous objects has become a crucial technical challenge in the field of 3D front-end visualization.
[0003] Currently, common highlighting implementation methods in existing technologies mainly include the following categories:
[0004] The first method involves directly modifying the material color, transparency, or luminescence parameters of the original model to create a highlighted effect. While simple to implement, this method directly alters the material state of the original scene objects, easily leading to material contamination. When the highlight is removed, complex material state restoration logic needs to be executed. This is especially problematic for model objects with multiple materials, transparent materials, instantiated rendering, or shared materials, as it can easily result in state inconsistencies, incomplete restoration, and inconsistent display. Furthermore, frequent modifications to the original material parameters can trigger state switching overhead in the rendering pipeline, impacting overall rendering performance.
[0005] The second approach involves re-rendering the original model and generating object outlines through techniques such as geometric expansion, normal offsetting, or overall magnification. This method is effective for regular, closed models, but it typically relies heavily on the original model's topology and geometric continuity. When the object itself is a thin structure, a ribbon path, a complex mesh, a composite structure, or a locally non-closed structure, issues such as broken outlines, visible gaps in the outline, edge jitter, and local misalignment can easily occur, leading to unstable display results. Furthermore, geometric expansion may disrupt the depth relationships and occlusion logic of the original scene, causing visual anomalies.
[0006] The third approach involves writing separate highlighting logic for different object types. For example, a separate path highlighting scheme is used for path objects, a planar overlay scheme is used for storage location objects, and a collision area coloring scheme is used for robot objects. While this approach allows for local optimization for a single object type, it leads to different rendering paths and implementation logic for different objects, resulting in severe code fragmentation, high system maintenance costs, and difficulty in quickly extending to new object types, thus failing to form a unified and stable highlighting rendering framework.
[0007] In summary, there is an urgent need in this field to propose a novel 3D object highlighting rendering scheme to overcome the above-mentioned defects of existing technologies and achieve unified, stable, and scalable composite highlighting display of heterogeneous objects in complex 3D scenes. Summary of the Invention
[0008] Therefore, the main objective of this invention is to provide a method and system for composite highlight rendering of three-dimensional objects, as well as a storage medium, to solve the problems mentioned in the background art.
[0009] To achieve the above objectives, according to one aspect of the present invention, a method for rendering composite highlights of three-dimensional objects is provided, comprising the following steps:
[0010] Perform normal rendering on the main 3D scene and output the main screen;
[0011] Establish a mask camera that is synchronized with the parameters of the main camera in real time, as well as a first off-screen mask buffer and a second off-screen mask buffer; the first off-screen mask buffer is used to record the first type of highlighted object area that needs to perform both region filling and outline tracing at the same time, and the second off-screen mask buffer is used to record the second type of highlighted object area that only needs to perform region filling.
[0012] Determine the set of target objects that need to be highlighted, and construct corresponding proxy geometry according to the type and spatial parameters of each target object. The proxy geometry is independent of the original business model of the target object and is used to uniformly express heterogeneous target objects into a geometric expression suitable for highlight rendering, so as to replace the original business model in highlight rendering.
[0013] The mask camera renders all types of proxy geometry using a mask material, and writes them into the first off-screen mask buffer or the second off-screen mask buffer according to the highlight style type. The mask material does not depend on the original model material, does not perform lighting calculations, and only outputs a mask marker value that indicates whether a pixel is occupied by a highlighted object.
[0014] The post-processing shader simultaneously reads the main screen, the first off-screen mask buffer, and the second off-screen mask buffer. It performs contour generation and region filling processing on the first off-screen mask buffer, performs region filling processing on the second off-screen mask buffer, and combines the processing results into the main screen to obtain the final highlight rendering result.
[0015] In a possible preferred embodiment, in each rendering frame, the position parameters, orientation parameters, field of view parameters, near clipping plane parameters, far clipping plane parameters, aspect ratio parameters, and projection type parameters of the main camera are synchronized to the mask camera; or, the observation matrix and projection matrix of the main camera are directly copied to the mask camera.
[0016] In a possible preferred embodiment, the step of constructing the corresponding proxy geometry based on the type and spatial parameters of each target object includes:
[0017] For path objects, construct strip proxy geometry based on the path centerline point column, path width, and display height;
[0018] For storage location objects, construct box-shaped proxy geometry or thin-layer box-shaped proxy geometry based on the storage location's center point, length, width, and height.
[0019] For the selected shelf area, construct a proxy geometry for the combination of columns and panels or an extruded polygon proxy geometry based on the set of boundary points and height range of the selected area.
[0020] For objects in the robot's activity area or collision area, construct disk proxy geometry, cylindrical proxy geometry, or capsule proxy geometry based on the robot's current position, radius of action, and height range.
[0021] In the above-mentioned methods of constructing proxy geometry, for target objects with complex structures or irregular topologies, simplified meshes, bounding boxes, convex hulls, or low-face-count alternative models are used as the proxy geometry.
[0022] In a possible preferred embodiment, the steps of performing contour generation and region filling processing on the first off-screen mask buffer include: performing neighborhood sampling on the first off-screen mask buffer to identify the object edge region; performing dilation processing on the mask region to obtain an expanded region; extracting the outer contour by the difference between the expanded region and the original mask region, and performing anti-aliasing smoothing processing on the outer contour; and performing internal filling synthesis on the original mask region.
[0023] In a possible preferred embodiment, each proxy geometry instance includes at least: object identification information, proxy type information, vertex array, index array, world coordinate transformation matrix, bounding range parameter, and highlight style mark, which is used to indicate whether the proxy geometry should be written to a first off-screen mask buffer or a second off-screen mask buffer.
[0024] In a possible preferred embodiment, the method steps further include: generating the proxy geometry according to business needs using any of the following methods: real-time generation, pre-generated cache, or incremental update when parameters change.
[0025] In a possible preferred implementation, during the process of rendering the proxy geometry to the corresponding mask buffer, any of the following depth control methods are adopted: controlling the order of depth testing, depth writing and rendering to ensure that the highlighting results maintain the same occlusion relationship as the main scene; or, using depth offset or disabling depth writing of the corresponding object to weaken the impact of local occlusion on the highlighting display.
[0026] Secondly, corresponding to the above method examples, the present invention also provides a three-dimensional object composite highlight rendering system, which includes:
[0027] The main rendering module is configured to perform normal rendering on the main 3D scene and output the main screen.
[0028] The mask camera module is configured to establish a mask camera that is synchronized with the parameters of the main camera in real time, and to construct a first off-screen mask buffer and a second off-screen mask buffer; the first off-screen mask buffer is used to record the first type of highlighted object regions that need to perform both region filling and outline tracing simultaneously, and the second off-screen mask buffer is used to record the second type of highlighted object regions that only need to perform region filling.
[0029] The proxy geometry construction module is configured to determine the set of target objects that need to be highlighted, and construct corresponding proxy geometry according to the type and spatial parameters of each target object. The proxy geometry is independent of the original business model of the target object and is used to uniformly express heterogeneous target objects into a geometric expression suitable for highlight rendering, so as to replace the original business model in highlight rendering.
[0030] The mask rendering module is configured to render each proxy geometry using the mask camera and a mask material, and write the results to the first off-screen mask buffer or the second off-screen mask buffer according to the highlight style type. The mask material does not depend on the original model material, does not perform lighting calculations, and only outputs a mask marker value that indicates whether a pixel is occupied by a highlighted object.
[0031] The post-processing composite module is configured to simultaneously read the main screen, the first off-screen mask buffer, and the second off-screen mask buffer through the post-processing shader, perform contour generation and region filling processing on the first off-screen mask buffer, perform region filling processing on the second off-screen mask buffer, and composite the processing results into the main screen to obtain the final highlight rendering result.
[0032] In a possible preferred embodiment, when the post-processing composite module performs contour generation processing on the first off-screen mask buffer, it includes sampling the neighborhood around the current pixel, wherein the neighborhood sampling adopts a 3×3 neighborhood, 5×5 neighborhood, four-neighbor or eight-neighbor sampling template; performing mask dilation to expand the original mask area outward by 1 pixel to 6 pixels; comparing the dilated area with the original mask area to obtain the outer contour area, and assigning stroke color, stroke transparency and stroke style; the stroke style includes solid line stroke or dashed line stroke; when performing area filling processing on the second off-screen mask buffer, it includes color overlay, transparency mixing or semi-transparent enhancement display, and controlling the fill color and fill transparency respectively.
[0033] Thirdly, corresponding to the above method examples, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the steps of the three-dimensional object composite highlight rendering method as described in the first aspect.
[0034] The 3D object composite highlighting rendering method, system, and storage medium provided by this invention cleverly decouple the highlighting rendering process of heterogeneous business objects in complex 3D scenes from the traditional path of "directly relying on the original model." It constructs an independent highlighting pipeline from "business semantics - proxy geometry - mask marking - unified post-processing synthesis," thereby converting heterogeneous business objects into regular proxy geometry independent of the original model and uniformly writing them into the mask buffer. A mask camera synchronized in real-time with the main camera ensures spatial alignment. Then, through dual mask buffers, the physical separation of the two visual logics, "outline and fill" and "fill only," is completed at the off-screen stage. Finally, a single post-processing shader performs contour extraction and fill synthesis separately and composites them onto the main screen. This achieves unified and stable highlighting of multiple types of objects in complex 3D scenes without modifying the original materials or relying on the original topology. It also ensures the coexistence of multiple highlighting visual logics, strict alignment of the highlighting results with the main view, and strong reusability and scalability of the highlighting rendering module. Attached Figure Description
[0035] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0036] Figure 1 This is a schematic diagram of the overall design architecture of the three-dimensional object composite highlight rendering method and system provided in the embodiments of the present invention;
[0037] Figure 2 A schematic diagram illustrating the process of main scene rendering, mask camera rendering, and post-processing composite provided in an embodiment of the present invention;
[0038] Figure 3 This is a schematic diagram illustrating the division of labor in a dual off-screen mask buffer provided in an embodiment of the present invention, showing the separate rendering relationship between the outline-type highlight mask and the fill-only highlight mask;
[0039] Figure 4 This is a schematic diagram of the three-dimensional object highlighting rendering effect provided in an embodiment of the present invention, showing the display result of path object, warehouse location object and robot area object after composite highlighting;
[0040] Figure 5 A schematic diagram illustrating the principle of contour generation based on neighborhood sampling and mask dilation provided in this embodiment of the invention;
[0041] Figure 6 This is a schematic diagram of the synchronization relationship between the main camera parameters and the mask camera parameters provided in an embodiment of the present invention. The code synchronizes projection parameters such as alpha, beta, radius, target, mode, fov, minZ, maxZ, orthoLeft, orthoRight, orthoBottom, and orthoTop.
[0042] Figure 7 This is a schematic diagram of the structure of a three-dimensional object composite highlight rendering system provided in an embodiment of the present invention. Detailed Implementation
[0043] To enable those skilled in the art to better understand the technical solutions of the present invention, the specific technical solutions of the present invention will be clearly and completely described below in conjunction with embodiments, so as to help those skilled in the art further understand the present invention. Obviously, the embodiments described in this application are merely some embodiments of the present invention, and not all embodiments. It should be noted that, for those skilled in the art, the embodiments and features in the embodiments of this application can be combined with each other without departing from the concept of the present invention and without conflict. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the disclosure and protection scope of the present invention.
[0044] Furthermore, the terms "first," "second," "S1," "S2," etc., used in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such features can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those described herein. At the same time, the stages described in each step are not necessarily to be implemented in the same step; it should be understood that the implementation order of the contents of each step stage can be adjusted and interchanged without violating the inventive concept, so that embodiments of the invention described herein can be implemented in orders other than those described herein. Additionally, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. Unless otherwise expressly specified and limited, the terms "set," "arrange," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; a mechanical connection or an electrical connection; a direct connection or an indirect connection through an intermediate medium; or a connection within two elements. Those skilled in the art can understand the specific meaning of the above terms in this case based on the specific circumstances and in conjunction with existing technology.
[0045] Implementation Method 1: Overall Rendering Process
[0046] To address the technical challenge of achieving a unified and stable implementation of highlighting heterogeneous objects in complex 3D scenes. For example... Figures 1 to 6 As shown, this invention exemplifies a method for composite highlighting rendering of three-dimensional objects. The method is conceptually designed to achieve unified highlighting of heterogeneous objects in complex three-dimensional scenes by constructing a four-layer decoupled architecture consisting of "business object → proxy geometry → dual off-screen mask buffer → post-processing unified composition".
[0047] In one specific implementation, taking a 3D scheduling system for warehouse logistics as an example, the example is implemented based on the Babylon.js 3D engine. This 3D scene includes: the ground, shelves, storage locations, handling robots, task paths, and operational risk areas. When a user selects a task on the scheduling page, the corresponding path object, target storage location object, and robot activity area object need to be highlighted simultaneously. The path object is highlighted using a "stroke and fill" method, while the target storage location object or risk area object is highlighted using a "fill only" method. (Refer to...) Figure 4 As shown, this illustrates the display results of different types of business objects being first converted into corresponding proxy geometry before participating in highlight rendering.
[0048] Specifically, such as Figure 2 As shown, the example steps of this 3D object composite highlight rendering method include the following:
[0049] Step S1: Perform normal rendering on the main 3D scene and output the main screen.
[0050] Reference Figure 2 As shown, the main scene rendering, as the initial stage of the overall process, involves loading ground models, shelf models, warehouse location models, robot models, and business object data into the 3D engine, and establishing a main camera as the display camera for the user to observe the scene. The main camera can be a perspective camera or an orthographic camera; when using a perspective camera, its field of view can be set to 45° to 65°, the near clipping plane can be set to 0.1m to 1m, and the far clipping plane can be set to 100m to 500m, with the aspect ratio consistent with the current display viewport; when using an orthographic camera, its orthographic dimensions or projection boundaries are set according to the scene coverage. After the main camera completes normal rendering, the main screen data can be obtained through the rendering target texture, frame buffer object, or screen color cache provided by the 3D engine. This main screen data serves as the base map for subsequent highlight result compositing. Through this step, complete main view information can be preserved without changing the original scene display logic, providing a basic image for subsequent off-screen highlight compositing.
[0051] S2. Establish a masked camera that is synchronized with the parameters of the main camera in real time, as well as a first off-screen mask buffer and a second off-screen mask buffer.
[0052] Reference Figure 2 and Figure 6 As shown, the mask camera is used to generate off-screen masks for highlighted objects, not directly for the final image display. Specifically, an auxiliary camera node corresponding to the main camera can be created in the 3D engine. Before each rendering frame begins, or when a change in the main camera parameters is detected, the main camera's position parameters, orientation parameters, rotation quaternion or Euler angle parameters, field of view parameters, aspect ratio parameters, near clipping plane parameters, far clipping plane parameters, and projection mode parameters are synchronized to the mask camera. If necessary, the main camera's observation matrix and projection matrix can also be directly copied. For example, when the main camera's position is (x1, y1, z1), orientation angle is (yaw1, pitch1, roll1), field of view is 60°, near clipping plane is 0.3m, and far clipping plane is 200m, the mask camera synchronously uses the same parameters; when the main camera is an orthographic camera, its left, right, top, and bottom projection boundaries or orthographic dimension parameters are synchronized. (Refer to...) Figure 6 By keeping the viewing cone of the mask camera consistent with that of the main camera, it is possible to ensure that the highlighted areas in the off-screen mask are consistent with the actual objects in the main image in terms of spatial position, perspective, and scaling, thereby reducing highlight drift, misalignment, and abnormal occlusion.
[0053] As an optional implementation method, in terms of camera synchronization, in addition to copying the main camera parameters frame by frame, event-driven synchronization, unified synchronization before rendering, matrix sharing synchronization, or parameter cache synchronization can also be used to achieve consistency between the mask camera and the main camera.
[0054] Reference Figure 3 As shown, both the first and second off-screen mask buffers can be implemented using rendering target textures, framebuffer objects, or other off-screen caches. The first off-screen mask buffer records the off-screen mask cache of the projected coverage area of a first type of highlighted object in screen space. This first type of highlighted object is one that requires both area filling and outer contour tracing later, such as task path objects, key shelf selection areas, or work area objects whose boundaries need to be emphasized. The second off-screen mask buffer records the off-screen mask cache of the projected coverage area of a second type of highlighted object in screen space. This second type of highlighted object is one that only requires area filling later and does not need outer contour tracing, such as target storage location objects, restricted area objects, or risk coverage area objects. The resolution of both mask buffers can be set to be consistent with the main viewport. For example, when the main viewport resolution is 1920×1080, both mask buffers use a 1920×1080 resolution. In scenarios with high performance requirements, a ratio of 0.5 to 1 times the main viewport resolution can also be used. The mask buffer can use a single-channel texture, grayscale texture, or RGBA texture to store mask information. The clear value is preferably set to 0 to indicate an unhighlighted area. When the target object is rendered to the corresponding buffer, 1 or a preset grayscale value can be written to indicate a highlighted area.
[0055] As an optional implementation, in terms of mask buffer implementation, in addition to using two independent off-screen mask buffers, a multi-channel encoding method with a single off-screen buffer can also be used, such as using different color channels, different depth layers or different marker values to distinguish between stroke-type highlighted objects and fill-type highlighted objects.
[0056] The principle of using dual off-screen mask buffers is to separate two types of highlighted objects with different visual logics at the off-screen stage. This allows the post-processing stage to perform contour extraction, edge expansion, and stroke generation on the first mask buffer, while only performing fill blending on the second mask buffer. This avoids the stroke calculation interfering with the fill-only objects and makes it easier to control the stroke width, stroke color, fill color, and transparency separately.
[0057] S3. Determine the set of target objects that need to be highlighted, decouple each target object from the original business model, and construct corresponding proxy geometry according to the type and spatial parameters of each target object to replace the original business model in highlighting rendering.
[0058] The proxy geometry refers to a simplified geometry constructed separately to express the spatial extent, coverage area, or contour features of the target object, instead of directly using the original business model for highlight rendering. The design purpose of setting up proxy geometry is threefold: first, to avoid the highlighting effect from over-relying on the complex topology, material state, or texture information of the original model; second, to allow heterogeneous objects such as paths, storage locations, shelf selection areas, and robot areas to enter the same highlighting pipeline; and third, to reduce off-screen rendering computation and improve the stability and controllability of the highlighting results. The design concept is to first abstract the business object into a geometric proxy suitable for highlighting expression, and then uniformly write it into the mask buffer, thereby decoupling the original scene display logic from the highlighting display logic.
[0059] In this step, the proxy geometry is not required to be completely identical to the original business model in terms of mesh details; it only needs to accurately represent the highlight coverage and contour features of the target object in the final image. Through the above processing, different types of objects can enter the subsequent mask rendering steps in a unified data format, thereby achieving the technical effects of reducing implementation splits, improving engineering reusability, and ensuring stable output of highlight contours.
[0060] In practice, the system first iterates through the set of target objects that need to be highlighted and reads their corresponding business parameters based on their object types. For path objects, parameters such as path point sequence, path width, and path display height can be read. The tangent direction and lateral offset are calculated based on adjacent path points to generate a strip-shaped proxy geometry extending along the path. The path width can be set to 0.1m to 0.5m, preferably 0.15m to 0.3m, and the display height can be raised by 0.01m to 0.05m above the ground to reduce depth flickering when coplanar with the ground. For storage location objects, the center point, length, width, and height dimensions of the storage location can be read to generate box-shaped or thin-layer box-shaped proxy geometry; for example, a length of 1m to 2m, a width of 0.8m to 1.5m, and a height of 0.05m to 1.5m. For shelf selection area objects, the set of selection area boundary points and the start and end height range can be read to generate a combination of column and panel proxy geometry, or an extruded body proxy geometry obtained by stretching the boundary polygon upwards. For the robot's activity area or collision area, the robot's current position, radius of action, and height range can be read to construct disk-type, cylindrical-type, or capsule-type proxy geometry; the radius of action can be set from 0.3m to 2m. For objects with particularly complex structures, their simplified meshes, bounding boxes, convex hulls, or low-face-count models can be used as proxy geometry; for complex models with regular topology that do not require simplification, their original meshes can be directly used as proxy geometry for mask rendering.
[0061] As an alternative implementation, in terms of proxy geometry, in addition to strips, boxes, columns, panels, and disks, cylinders, capsules, stretched polygons, bounding boxes, simplified meshes, convex hulls, or other simplified geometric structures suitable for expressing the shape or extent of an object can also be used as proxy geometry.
[0062] As an optional implementation, this technical solution is applicable not only to paths, storage locations, shelf selection areas, and robot areas, but also to equipment outlines, obstacle areas, safety boundaries, task areas, and other three-dimensional business objects that require unified visual enhancement.
[0063] S4. Using the mask camera, all types of proxy geometry are rendered using a mask material, and written to the first off-screen mask buffer or the second off-screen mask buffer according to the highlight style type.
[0064] Reference Figure 2 and Figure 3 As shown, rendering to the mask buffer means that instead of directly drawing the proxy geometry as a user-visible color result, the pixel area covered by its projection is written to the corresponding off-screen buffer, forming a mask image that can be recognized by post-processing. The purpose of this step is to separate the object geometry representation and the final highlight visual generation into two stages, so that subsequent effects such as outlining, filling, and transparency blending no longer depend on the original model material, but only on the mask result for unified calculation. The design concept is to first write the object category and coverage area into the buffer using a unified mask rendering rule, and then generate the outline and fill effects separately according to different visual logics in the post-processing stage.
[0065] In practical implementation, a mask material can be uniformly assigned to all proxy geometry. The mask material refers to a rendering material or shading program specifically designed to output mask marker values. It does not rely on the original texture, does not perform complex lighting calculations, and does not output the final display color; it only outputs fixed marker values, such as 0 for non-highlighted areas and 1 for highlighted areas. When different object levels need to be distinguished, 0.5, 0.75, or other preset grayscale values can also be output. Before rendering, the first and second mask buffers can be cleared, with the clear value preferably set to 0. Subsequently, objects are categorized according to their highlight style type: for objects that require both outlining and filling, such as task path objects, key shelf selection areas, or work area objects requiring emphasized boundaries, their proxy geometry is rendered to the first off-screen mask buffer; for objects that only need filling and coverage, such as target storage location objects, restricted area objects, or risk-covered area objects, their proxy geometry is rendered to the second off-screen mask buffer.
[0066] During rendering, the depth testing, depth writing, and rendering order can be controlled according to business needs. Depth testing utilizes the distance between objects and the camera to determine whether the current pixel should be written to the buffer, thus maintaining occlusion consistency with the main scene. Depth writing records the depth value of the current pixel in the depth buffer for comparison with subsequent pixels. Depth testing can be enabled when highlighting results strictly adhere to scene occlusion relationships; when highlighting a specific area while mitigating local occlusion, depth offsetting or disabling partial depth writing can be used under certain conditions to reduce flicker. For overlapping areas, it can be specified that later-rendered objects overwrite earlier-rendered objects, or a maximum value writing rule can be used to ensure stable mask results. This step accurately writes different types of objects to their corresponding mask buffers, forming clear-bounded and well-defined intermediate results, providing reliable input for subsequent post-processing compositing.
[0067] S5. Simultaneously read the main screen, the first off-screen mask buffer, and the second off-screen mask buffer through the post-processing shader. Perform contour generation and region filling processing on the first off-screen mask buffer, wherein the contour generation includes outer contour extraction and outlining processing. Perform region filling processing on the second off-screen mask buffer. Combine the above processing results into the main screen to obtain the final highlight rendering result.
[0068] Reference Figure 2 and Figure 5 As shown, the post-processing compositing refers to the process where, after the main scene has been rendered and both mask buffers have been generated, the target objects are no longer re-rendered individually. Instead, pixel-level calculations are performed on the main scene and mask buffers to directly generate the final highlight result, which is then overlaid onto the main scene. The design purpose of this step is threefold: first, to unify stroke generation, fill control, and color blending into a single post-processing stage, avoiding repeated drawing of the original objects; second, to improve the consistency of highlight styles for different objects; and third, to facilitate centralized adjustment of parameters such as stroke width, stroke color, fill color, transparency, and anti-aliasing strength. The design concept is to treat the first mask buffer as the input for stroke plus fill objects, and the second mask buffer as the input for fill only objects, processing them separately in the same compositing process before mixing them with the main scene for output.
[0069] In practical implementation, a post-processing shader can be established. The post-processing shader refers to a screen shading program that, after the main image has been obtained, performs sampling, judgment, blending, and output on a pixel-by-pixel basis across the entire image. The post-processing stage reads at least three types of input data: the main image texture, the first off-screen mask buffer, and the second off-screen mask buffer. (Refer to...) Figure 5As shown, when processing the first off-screen mask buffer, the neighborhood around the current pixel can be sampled. Neighborhood sampling refers to reading the mask values of its surrounding pixels in addition to the current pixel itself. For example, a 3×3, 5×5, four-neighbor, or eight-neighbor sampling template can be used. When there are mask differences among the surrounding pixels, it can be determined that the current pixel is near the edge of the object. Based on this, mask dilation can be performed. Mask dilation refers to expanding the original mask area outward by several pixels to generate a wider outer contour than the original object area; the dilation radius can be set to 1 to 6 pixels, preferably 2 to 4 pixels. Subsequently, by comparing the dilated area with the original mask area, the outer contour area can be obtained, and a stroke color, such as yellow, red, blue, or other preset colors, can be assigned to this outer contour area. The stroke transparency can also be set to 0.4 to 1.0. Simultaneously, for the internal area corresponding to the original mask area in the first off-screen mask buffer, area filling processing is performed, assigning a fill color and fill transparency.
[0070] The second off-screen mask buffer is then filled with a region, including color overlay, transparency blending, or semi-transparent enhancement, with control over the fill color and transparency. For example, the target storage location object can be filled with a semi-transparent blue, while the risk area object can be filled with a semi-transparent red, to visually distinguish it from the stroke fill effect of the first type of highlighted object.
[0071] As an alternative implementation, in terms of contour extraction, in addition to generating outlines based on neighborhood sampling and mask dilation, morphological edge detection, Sobel edge detection, multi-level fuzzy difference, or other screen post-processing contour extraction methods can also be used.
[0072] Finally, refer to Figure 4 As shown, the above stroke results, fill results, and fill results of the second mask buffer are combined into the main screen according to a preset blending mode (such as Alpha blending, additive blending, or screen blending) to obtain the final highlight rendering result. Figure 4 The path is shown ( Figure 4 a) Storage location ( Figure 4 b), Shelves ( Figure 4 c), Robot ( Figure 4 d) The correspondence between the four types of objects from the original business model and the proxy geometry.
[0073] As an optional implementation method, in terms of the composite method, in addition to one-time post-processing composite, the final highlight result can also be generated by staged synthesis, multi-channel mixing or layer superposition.
[0074] As an optional implementation, in terms of highlighting style, in addition to solid line stroke, dashed line stroke, and semi-transparent fill, it can also be extended to gradient stroke, dynamic flashing stroke, pulsed fill, color-grade highlighting, or multi-state superimposed highlighting.
[0075] Through the above technical solution, the present invention achieves unified highlighting display of multiple types of three-dimensional objects, avoids contamination of the original model material, and improves the stability, controllability and engineering reuse value of the highlighting effect.
[0076] Implementation Method 2: Proxy Geometry Construction Method
[0077] In this implementation, different proxy geometry forms can be used for highlight rendering for different business objects, but all are connected to the same off-screen highlight pipeline through a unified proxy geometry construction interface. The proxy geometry refers to a simplified geometric object constructed separately to generate the highlight display effect. It is not directly equivalent to the original business model, but is used to express the spatial extent, coverage area, boundary contour, or visual projection range of the target object. The design purpose of setting up proxy geometry is to: avoid the highlight logic relying excessively on the complex topology, material state, or texture information of the original model; enable different types of objects such as paths, storage locations, shelf selection areas, and robot areas to enter the same highlight rendering process in a unified manner; and reduce the computational load of off-screen rendering, improving the stability, controllability, and engineering reusability of the highlight results.
[0078] In practice, the basic parameters of the business object can be extracted first, and then the corresponding proxy geometry can be generated according to the preset construction rules. The basic parameters may include at least the object's position, orientation, size, boundary point set, height range, radius of effect, or path point sequence. After the proxy geometry is generated, vertex data, index data, pose transformation parameters, bounding range parameters, and corresponding highlight type markers can be uniformly output for direct use in subsequent mask rendering steps.
[0079] The example objects are as follows:
[0080] 1. For path objects, a strip proxy geometry can be constructed based on the path centerline point array, path width, and display height. The strip proxy geometry refers to a narrow strip mesh structure that extends continuously along the path direction, capable of representing the continuous coverage area of the path object in the scene. Specifically, the tangent direction can be calculated for adjacent path points, and the lateral offset vector can be obtained based on the tangent direction. Then, left and right boundary points are generated on both sides of the path centerline according to the preset path width, and finally connected to form a continuous strip mesh. The path width can be set to 0.1m to 0.5m, preferably 0.15m to 0.3m; the display height can be raised by 0.01m to 0.05m above the ground reference to reduce depth flicker when coplanar with the ground. For turning positions, sharp angle breaks can be mitigated by interpolation smoothing, rounded corner transitions, or increasing the sampling point density. By using strip proxy geometry, the highlighted area of the path can be stably represented without relying on the specific modeling method of the original path model.
[0081] 2. For storage location objects, box-shaped proxy geometry or thin-layer box-shaped proxy geometry can be constructed based on the storage location's center point, length, width, and height dimensions. The box-shaped proxy geometry refers to a regular cuboid structure defined by length, width, and height parameters, used to represent the scope of objects with regular boundaries, such as storage locations, pallet locations, and docking locations. Specifically, the center coordinates and dimension parameters of the storage location can be read, and eight vertices can be generated along the three coordinate axes using this center point as a reference, thus forming corresponding facets. The length can be set to 1m to 2m, the width to 0.8m to 1.5m, and the height to 0.05m to 1.5m; when only the ground coverage area needs to be represented, only the top surface can be retained, or a thin-layer box can be formed using a smaller thickness value. By using box-shaped proxy geometry, the boundary range of storage location objects can be represented simply and stably, avoiding the instability of highlighted edges caused by excessive materials, openings, and detailed components in the original storage location model.
[0082] 3. For selected shelf areas, a combination of column and panel proxy geometry or an extruded polygon proxy geometry can be constructed based on the selection boundary point set and height range. The column and panel proxy geometry refers to a geometric structure composed of multiple vertical boundary columns and several connecting panels, used to emphasize the selection boundary and area coverage. The extruded polygon proxy geometry refers to a three-dimensional structure formed by extruding a two-dimensional boundary polygon along its height. Specifically, the sequence of boundary points of the selected shelf area on the plane can be extracted first, and then the upper and lower boundaries can be generated based on the starting and ending heights. For scenarios requiring boundary emphasis, columns can be generated at each boundary inflection point, and side panels can be generated between adjacent columns. For scenarios requiring emphasis on the overall area coverage, the boundary polygons can be directly extruded upwards to form a closed or semi-closed proxy body. The height range can be set according to the shelf height, selection coverage height, or business-defined height, for example, from 0.2m to 3m. This method can simultaneously achieve boundary emphasis and area expression effects, and is suitable for highlighting objects such as selected shelf areas, area selection boxes, and fence ranges.
[0083] 4. For the robot's activity area, collision area, or safety coverage area, disk-type proxy geometry, cylindrical proxy geometry, or capsule-type proxy geometry can be constructed based on the robot's current position, radius of action, and height range. The disk-type proxy geometry refers to a circular coverage area on a horizontal plane, suitable for representing the robot's chassis projection range; the cylindrical proxy geometry is a columnar body formed by stretching a disk along its height direction, suitable for representing a coverage area with vertical height; the capsule-type proxy geometry refers to a long strip with smooth transitions at both ends, suitable for representing a collision buffer range extending along the direction of movement. Specifically, the robot's current position coordinates, chassis radius, outward safety distance, and height parameters can be read, where the radius of action can be set from 0.3m to 2m, and the height from 0.05m to 2m. When only the ground projection needs to be represented, disk-type proxy geometry can be used preferentially; when the spatial occupancy range needs to be represented, cylindrical proxy geometry can be used; when the buffer envelope along the path's forward direction needs to be represented, capsule-type proxy geometry can be used. Through the above methods, the robot's relevant areas can be uniformly abstracted into regular geometric objects, facilitating the stable generation of highlighted coverage areas.
[0084] 5. For business objects with complex shapes, irregular topologies, or those that are difficult to accurately represent using regular geometry, simplified meshes, bounding boxes, convex hulls, or low-face-count alternative models can be used as proxy geometry. For complex models with regular topologies that do not require simplification, their original mesh can be used directly as proxy geometry. A bounding box refers to the smallest regular box or approximate box that can enclose the outer contour of the target object; a convex hull refers to the smallest convex geometric shell that encloses the outer contour of the target object; and a low-face-count alternative model refers to a simplified model that reduces the number of faces while maintaining basic contour features. The specific proxy form used can be determined based on whether the object requires precise boundaries, low computational cost, and emphasis on overall coverage relationships. By introducing such alternative proxies, unified highlighting of complex objects can still be achieved without directly using the original complex model.
[0085] 6. To facilitate unified rendering, a consistent data organization method can be adopted for all proxy geometry. Specifically, each proxy geometry instance can include at least: object identification information, proxy type information, vertex array, index array, world coordinate transformation matrix, bounding range parameters, and highlight style markers. The highlight style markers indicate whether the proxy geometry should be written to the first or second off-screen mask buffer; when marked as a first-type highlighted object, it indicates that stroke and fill processing is required subsequently; when marked as a second-type highlighted object, it indicates that only fill processing is required. By using a unified data structure, different types of proxy geometry can use the same calling process in the subsequent mask rendering stage, reducing implementation fragmentation.
[0086] 7. Regarding the timing of proxy geometry generation, real-time generation, pre-generation caching, or incremental updates based on parameter changes can be adopted according to business needs. For objects such as path objects and robot regions that frequently change with business status, the corresponding proxy geometry can be regenerated after the target parameters change. For static or low-frequency changing objects such as storage location objects and fixed selection area objects, proxy geometry can be generated and cached in advance, and updated only when size, position, or boundary parameters change. By caching and incrementally updating proxy geometry, the performance overhead caused by repeated construction per frame can be reduced.
[0087] Through the above proxy geometry construction method, the original business object is transformed into a simplified geometric object suitable for unified highlighting. This not only reduces the dependence on the original model material and topology, but also facilitates subsequent off-screen mask rendering and post-processing compositing, thereby obtaining a highlighting display effect with more stable boundaries, more unified style, and easier parameter control.
[0088] Implementation Method 3: System Architecture and Module Collaboration
[0089] Reference Figure 1 and Figure 7As shown, this embodiment provides a three-dimensional object composite highlight rendering system. The system realizes the above four-layer decoupled highlight pipeline through a modular architecture. The modules interact with each other through standardized data interfaces to form a front-end highlight rendering framework that can be deployed independently and expanded on demand.
[0090] In one specific implementation, the system can be deployed in the front-end rendering engine of a 3D scheduling platform for warehousing and logistics, working in conjunction with the business data layer, the 3D scene layer, and the user interaction layer. When a user selects a specific task or set of objects through the interaction layer, the business data layer sends the target object identifier and parameters to the system; after each module of the system executes in sequence, the final highlighted rendering result is output to the display device.
[0091] Specifically, such as Figure 7 As shown, an example of this 3D object composite highlighting rendering system includes:
[0092] Main rendering module
[0093] The main rendering module is configured to perform normal rendering of the main 3D scene and output the main view. This module is responsible for loading and rendering the original business models such as the ground, shelves, storage locations, and robots in the 3D scene, and managing the view frustum parameters and rendering status of the main camera. The main view output by the main rendering module serves as the base map for subsequent post-processing compositing. Its rendering process is not affected by the highlighting system, and the material states, instantiation batches, and depth relationships of the original business models remain independent.
[0094] As an optional implementation, the main rendering module can adopt a forward rendering, deferred rendering, or hybrid rendering architecture; its output main screen can be obtained through rendering target textures, frame buffer objects, or screen color caches, depending on the underlying implementation of the 3D engine.
[0095] Masked camera module
[0096] The masked camera module is configured to establish a masked camera whose parameters are synchronized with the main camera in real time, and to construct a first off-screen mask buffer and a second off-screen mask buffer. (Refer to...) Figure 6 As shown, this module synchronizes the position parameters, orientation parameters, field of view parameters, near clipping plane parameters, far clipping plane parameters, aspect ratio parameters, and projection type parameters of the main camera to the mask camera in each rendering frame; or, it directly copies the main camera's observation matrix and projection matrix to the mask camera. Simultaneously, this module is responsible for the creation, size configuration, screen clearing management, and lifecycle maintenance of the two off-screen mask buffers.
[0097] As an optional implementation, the mask camera module can use an event-driven mechanism to listen for changes in the main camera parameters and perform synchronization only when a change is detected, so as to reduce the computational overhead per frame; in terms of mask buffer implementation, in addition to two independent buffers, a multi-channel encoding method with a single off-screen buffer can also be used.
[0098] Proxy geometry construction module
[0099] The proxy geometry construction module is configured to determine the set of target objects to be highlighted and construct corresponding proxy geometry based on the type and spatial parameters of each target object. This module contains several sub-units:
[0100] The path proxy geometry unit is configured to construct strip proxy geometry for a path object based on the path centerline point column, path width, and display height.
[0101] The storage location proxy geometry unit is configured to construct either a box-shaped proxy geometry or a thin-layer box-shaped proxy geometry for a storage location object based on the storage location's center point, length, width, and height dimensions.
[0102] The shelf selection area proxy geometry unit is configured to construct a combination of column and panel proxy geometry or an extruded polygon proxy geometry for the shelf selection area object based on the selection area boundary point set and height range.
[0103] The robot region proxy geometry unit is configured to construct disk proxy geometry, cylindrical proxy geometry, or capsule proxy geometry for the robot's activity area or collision area object, based on the robot's current position, radius of action, and height range.
[0104] This module outputs the constructed proxy geometry instances as a standardized data structure containing object identification information, proxy type information, vertex array, index array, world coordinate transformation matrix, bounding range parameters, and highlight style markers, which can be directly called by the mask rendering module.
[0105] As an optional implementation, the proxy geometry construction module can generate proxy geometry in real time, pre-generated cache, or incremental update when parameters change, according to business needs. For target objects with complex structures or irregular topologies, simplified meshes, bounding boxes, convex hulls, or low face counts can be used as proxy geometry to replace the model. For complex models with regular topologies that do not require simplification, their original mesh can be used directly as proxy geometry.
[0106] Mask rendering module
[0107] The mask rendering module is configured to render each proxy geometry using the mask camera and mask material, and write the rendered data to the first off-screen mask buffer or the second off-screen mask buffer according to the highlight style type. (See reference...) Figure 2 and Figure 3As shown, this module uniformly assigns mask materials to all proxy geometry. These mask materials do not depend on the original model material, do not perform lighting calculations, and only output mask marker values indicating whether a pixel is occupied by a highlighted object. During rendering, this module controls the order of depth testing, depth writing, and rendering to ensure that the highlighting results maintain the same occlusion relationship as the main scene; alternatively, it uses depth offset or disables depth writing for corresponding objects to weaken the impact of local occlusion on highlight display.
[0108] As an optional implementation, the mask rendering module can use a maximum value writing rule to process the mask markers of overlapping areas, or control the rendering order according to object priority to achieve coverage relationship management.
[0109] Post-processing composite module
[0110] The post-processing composite module is configured to simultaneously read the main screen, the first off-screen mask buffer, and the second off-screen mask buffer via a post-processing shader. It performs outer contour extraction and outlining processing, as well as region filling processing, on the first off-screen mask buffer. It also performs region filling processing on the second off-screen mask buffer and composites the processing results into the main screen to obtain the final highlight rendering result. (Refer to...) Figure 2 and Figure 5 As shown, when this module performs contour generation processing on the first off-screen mask buffer, it includes sampling the neighborhood around the current pixel. The neighborhood sampling uses a 3×3 neighborhood, 5×5 neighborhood, four-neighborhood, or eight-neighborhood sampling template. It then performs mask dilation, expanding the original mask area outward by 1 to 6 pixels. The expanded area is compared with the original mask area to obtain the outer contour area, and stroke color, stroke transparency, and stroke style are assigned. The stroke style includes solid line strokes or dashed line strokes. When performing area filling processing on the second off-screen mask buffer, it includes color overlay, transparency blending, or semi-transparent enhancement display, and controls the fill color and fill transparency respectively.
[0111] As an optional implementation, the post-processing compositing module can use morphological edge detection, Sobel edge detection, multi-level fuzzy difference, or other screen post-processing contour extraction methods in terms of contour extraction, in addition to generating strokes based on neighborhood sampling and mask dilation. In terms of compositing methods, in addition to one-time post-processing compositing, it can also use staged synthesis, multi-channel mixing, or layered overlay to generate the final highlight result. In terms of highlight styles, in addition to solid line strokes, dashed line strokes, and semi-transparent fills, it can also be extended to gradient strokes, dynamic flashing strokes, pulsed fills, color-graded highlighting, or multi-state overlay highlighting.
[0112] Module collaboration relationship
[0113] Reference Figure 1As shown, the five modules form a data flow in sequence: the main rendering module outputs the main screen; the mask camera module establishes a synchronized view frustum and double buffer; the proxy geometry construction module converts business objects into standardized proxy geometry; the mask rendering module writes the proxy geometry into the corresponding buffer; and the post-processing composite module reads all data and outputs the final result. The modules are decoupled through standardized interfaces, ensuring that changes to the internal implementation of any module do not affect the normal operation of other modules, thus guaranteeing a high degree of modularity and engineering reusability for the system.
[0114] As can be seen from the above system architecture, the present invention achieves unified highlighting display of multiple types of 3D objects, avoids contamination of the original model materials, and improves the stability, controllability and engineering reuse value of the highlighting effect.
[0115] In summary, the 3D object composite highlighting rendering method and system described in this embodiment achieves unified highlighting of heterogeneous 3D objects in complex industrial visualization scenarios such as 3D scheduling of warehousing and logistics by constructing a four-layer decoupled architecture of business object → proxy geometry → dual off-screen mask buffer → unified post-processing synthesis.
[0116] At the methodological level, the proxy geometry intermediate layer decouples diverse business objects such as paths, storage locations, shelf selection areas, and robot areas from the original model topology, unifying them into regularized and standardized geometric expressions. This frees highlight rendering from the constraints of the original material state and complex mesh topology. The dual off-screen mask buffers physically separate the two visual logics of outlining and filling versus filling only during the off-screen stage, avoiding visual interference caused by multiple states mixed within a single buffer. Real-time parameter synchronization between the mask camera and the main camera ensures strict spatial alignment between the off-screen mask and the main screen under any perspective change. The post-processing shader reads the main screen and the dual mask buffers at once and performs contour calculations and fill compositing separately, avoiding multiple redraws for different object types.
[0117] At the system level, the main rendering module, mask camera module, proxy geometry construction module, mask rendering module, and post-processing composite module are decoupled through standardized data interfaces. Changes to the internal implementation of any module do not affect the normal operation of other modules, enabling this highlighting mechanism to be flexibly deployed as a general front-end effect module in various business pages and system scenarios. Therefore, this solution achieves a unified improvement in the stability, consistency, scalability, and engineering reusability of highlighting effects without modifying the original model materials or disrupting the original scene depth relationships.
[0118] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The present invention is limited only by the claims and their full scope and equivalents. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.
[0119] Those skilled in the art will understand that, besides implementing the system, apparatus, unit, and its modules provided by this invention in purely computer-readable program code, the same program can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system, apparatus, and its modules provided by this invention can be considered a hardware component, and the modules included therein for implementing various programs can also be considered structures within the hardware component; alternatively, modules for implementing various functions can be considered both software programs implementing the method and structures within the hardware component.
[0120] Furthermore, all or part of the steps in the methods described in the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a microcontroller, chip, or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0121] Furthermore, various different implementations of the present invention can be combined arbitrarily, as long as they do not violate the spirit of the present invention, they should also be regarded as the content disclosed in the present invention.
Claims
1. A method for rendering composite highlights of three-dimensional objects, characterized in that, Includes the following steps: Perform normal rendering on the main 3D scene and output the main screen; Establish a masked camera that is synchronized with the parameters of the main camera in real time, as well as a first off-screen mask buffer and a second off-screen mask buffer; The first off-screen mask buffer is used to record the first type of highlighted object region that needs to perform both region filling and outline tracing simultaneously, and the second off-screen mask buffer is used to record the second type of highlighted object region that only needs to perform region filling; Determine the set of target objects that need to be highlighted, and construct corresponding proxy geometry according to the type and spatial parameters of each target object. The proxy geometry is independent of the original business model of the target object and is used to uniformly express heterogeneous target objects into a geometric expression suitable for highlight rendering, so as to replace the original business model in highlight rendering. The mask camera renders all types of proxy geometry using a mask material and writes them into the first off-screen mask buffer or the second off-screen mask buffer according to the highlight style type. The mask material does not depend on the original model material, does not perform lighting calculations, and only outputs mask marker values that represent whether a pixel is occupied by a highlighted object; The post-processing shader simultaneously reads the main screen, the first off-screen mask buffer, and the second off-screen mask buffer. It performs contour generation and region filling processing on the first off-screen mask buffer, performs region filling processing on the second off-screen mask buffer, and combines the processing results into the main screen to obtain the final highlight rendering result.
2. The method according to claim 1, characterized in that, In each rendering frame, the position parameters, orientation parameters, field of view parameters, near clipping plane parameters, far clipping plane parameters, aspect ratio parameters, and projection type parameters of the main camera are synchronized to the mask camera. Alternatively, the observation matrix and projection matrix of the main camera can be directly copied to the mask camera.
3. The method according to claim 1, characterized in that, The step of constructing the corresponding proxy geometry based on the type and spatial parameters of each target object includes: For path objects, construct strip proxy geometry based on the path centerline point column, path width, and display height; For storage location objects, construct box-shaped proxy geometry or thin-layer box-shaped proxy geometry based on the storage location's center point, length, width, and height. For the selected shelf area, construct a proxy geometry for the combination of columns and panels or an extruded polygon proxy geometry based on the set of boundary points and height range of the selected area. For objects in the robot's activity area or collision area, construct disk proxy geometry, cylindrical proxy geometry, or capsule proxy geometry based on the robot's current position, radius of action, and height range. In the above-mentioned methods of constructing proxy geometry, for target objects with complex structures or irregular topologies, simplified meshes, bounding boxes, convex hulls, or low-face-count alternative models are used as the proxy geometry.
4. The method according to claim 1, characterized in that, The steps of performing contour generation and region filling processing on the first off-screen mask buffer include: Neighborhood sampling is performed on the first off-screen mask buffer to identify the object edge region; dilation processing is performed on the mask region to obtain the outer expansion region; the outer contour is extracted by the difference between the outer expansion region and the original mask region, and anti-aliasing smoothing processing is performed on the outer contour; internal filling synthesis is performed on the original mask region.
5. The method according to claim 1, characterized in that, Each proxy geometry instance includes at least: object identification information, proxy type information, vertex array, index array, world coordinate transformation matrix, bounding range parameter, and highlight style markup, which indicates whether the proxy geometry should be written to the first off-screen mask buffer or the second off-screen mask buffer.
6. The method according to claim 1, characterized in that, The proxy geometry is generated according to business needs using any of the following methods: real-time generation, pre-generated cache, or incremental update when parameters change.
7. The method according to claim 1, characterized in that, During the process of rendering proxy geometry to the corresponding mask buffer, any of the following depth control methods may be used: Control the order of depth testing, depth writing, and rendering to ensure that the highlighting results maintain the same occlusion relationship as the main scene; By using depth offset or disabling depth writing for the corresponding object, the impact of local occlusion on highlight display can be reduced.
8. A three-dimensional object composite highlight rendering system, characterized in that, include: The main rendering module is configured to perform normal rendering on the main 3D scene and output the main screen. The mask camera module is configured to establish a mask camera that is synchronized with the parameters of the main camera in real time, and to construct a first off-screen mask buffer and a second off-screen mask buffer; the first off-screen mask buffer is used to record the first type of highlighted object regions that need to perform both region filling and outline tracing simultaneously, and the second off-screen mask buffer is used to record the second type of highlighted object regions that only need to perform region filling. The proxy geometry construction module is configured to determine the set of target objects that need to be highlighted, and construct corresponding proxy geometry according to the type and spatial parameters of each target object. The proxy geometry is independent of the original business model of the target object and is used to uniformly express heterogeneous target objects into a geometric expression suitable for highlight rendering, so as to replace the original business model in highlight rendering. The mask rendering module is configured to render each proxy geometry using the mask camera and a mask material, and write the results to the first off-screen mask buffer or the second off-screen mask buffer according to the highlight style type. The mask material does not depend on the original model material, does not perform lighting calculations, and only outputs mask marker values that represent whether a pixel is occupied by a highlighted object; The post-processing composite module is configured to simultaneously read the main screen, the first off-screen mask buffer, and the second off-screen mask buffer through the post-processing shader, perform contour generation and region filling processing on the first off-screen mask buffer, perform region filling processing on the second off-screen mask buffer, and composite the processing results into the main screen to obtain the final highlight rendering result.
9. The system according to claim 8, characterized in that, When the post-processing composite module performs contour generation processing on the first off-screen mask buffer, it includes sampling the neighborhood around the current pixel. The neighborhood sampling uses a 3×3 neighborhood, 5×5 neighborhood, four-neighborhood, or eight-neighborhood sampling template. It performs mask dilation to expand the original mask area outward by 1 to 6 pixels. It compares the expanded area with the original mask area to obtain the outer contour area and assigns stroke color, stroke transparency, and stroke style. The stroke style includes solid line stroke or dashed line stroke. When performing area filling processing on the second off-screen mask buffer, it includes color overlay, transparency blending, or semi-transparent enhancement display, and controls the fill color and fill transparency respectively.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the three-dimensional object composite highlight rendering method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Graph rendering method and device, electronic equipment and storage medium
CN116152411A
Image rendering method, image rendering device and computer readable storage medium
CN118505872A
