Method for real-time boolean subtraction of a sphere from a mesh
The method and system for real-time Boolean subtraction of a sphere from a mesh address computational challenges by identifying loops and forming a closing-off surface, ensuring immediate feedback and maintaining mesh integrity with sharp, precise modifications.
Patent Information
- Application Number
- PCT/IB2024/055136
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2025-12-04
AI Technical Summary
Existing methods for real-time mesh modification in computer graphics, such as in medical simulations and interactive design, face challenges in achieving both accuracy and speed due to computational intensity, often relying on complex data structures or extensive mesh traversals, leading to delays and inaccuracies.
A method and system for real-time Boolean subtraction of a sphere from a mesh that identifies loops in the mesh, computes a closing-off surface to restore spatial integrity, and uses GPU compute capabilities for efficient processing, eliminating the need for complex data structures.
Ensures immediate feedback and maintains mesh integrity with sharp, precise modifications, optimizing performance and visual fidelity while reducing computational overhead.
Smart Images

Figure IB2024055136_04122025_PF_FP_ABST
Abstract
Description
[0001] METHOD FOR REAL-TIME BOOLEAN SUBTRACTION OF A SPHERE FROM A MESH
[0002] FIELD OF THE INVENTION
[0003] The present invention relates to the field of computer graphics, in particular to the facilitation of Boolean subtraction operation. More broadly, the proposed system and method can support a modification of one graphic model in respect to another. The invention relates to a computer graphics facilitator system, to a computer arrangement for computer graphics, to a related computer implemented method, and to a related (computer) program.
[0004] TECHNICAL BACKGROUND
[0005] Three-dimensional (3D) mesh manipulation is a foundational aspect of computer graphics, digital modeling, and simulation. Meshes, composed of vertices, edges, and faces (eg triangles or other polygons), may represent spatial structure of 3D objects in a digital environment. The ability to modify these meshes in real-time is of benefit for various applications, from video game design to medical simulations and other still.
[0006] Historically, mesh modification techniques have been constrained by computational limitations, leading to methods that either sacrifice real-time responsiveness or compromise on the accuracy and quality of the resulting mesh. Traditional methods often rely on complex data structures to track mesh adjacencies or require intricate traversals of the mesh to determine which components are affected by a given modification. These approaches can be computationally intensive, especially for large and detailed meshes, making them unsuitable for real-time applications.
[0007] In the realm of medical simulations to name merely one non-limiting example, the need for accurate and real-time mesh modifications is a consideration. Medical professionals may rely on these simulations for training, planning, and visualization and for other purposes. For instance, in orthopedic surgery, the ability to simulate bone shaving or drilling with high precision and in real-time can significantly enhance the training experience. However, existing methods often struggle to provide both accuracy and speed, leading to simulations that either lack realism or suffer from computational lag.
[0008] Moreover, in broader computer graphics applications, such as sculpting or interactive design, users expect immediate feedback when manipulating 3D models. Delays or inaccuracies in mesh modifications can hinder the creative process and detract from the overall user experience.
[0009] There is, therefore, a need for real-time, accurate mesh modifications without relying on complex data structures or extensive mesh traversals. Such would benefit a wide range of applications, from medical simulations to interactive design and gaming and others still, such as engineering, etc.
[0010] An object herein is the improving of computer graphics, in particular the rendering thereof where Boolean Subtraction is used. Boolean Subtraction is one type of modification of main interest herein. Boolean Subtraction is the forming of an intersection between two models, and taking out the intersection from one of them (also referred to herein as the cuttee model). The conceptual set-theoretic simplicity of this operation belies its implementation in computer graphics, in particular if the cuttee model is a mesh. Such operation may slow done a graphics display considerable, due to a number of computational hogs that lie in waiting under the “hood” of a naive plain vanilla implementation of such Boolean Subtraction.
[0011] Aspects of the present invention, examples and exemplary steps and their embodiments are disclosed in the following. Different exemplary features of the invention can be combined in accordance with the invention wherever technically expedient and feasible. EXEMPLARY SHORT DESCRIPTION OF THE INVENTION
[0012] In the following, a short description of specific features of the present invention is given which shall not be understood to limit the invention only to the features or a combination of the features described in this section.
[0013] Broadly, the system proposed herein facilitates, in a responsive and / or memory conserving manner, rendering by a graphics pipeline of a Boolean subtraction operation among at least two graphical objects, including shape models, such as mesh model(s) and / primitive(s). Such a mesh model, when in use, defines a surface of a volume in surrounding data space. As such, Boolean subtraction operable on such a mesh model may leave a void in the mesh’s surface, thus compromising its spatial integrity. The proposed system is operable to recognize such a void as one or more loops, based on mesh elements (eg, edges) of the mesh, and computes a closing off surface or capping surface (“cap”), for said void, based on said one or more loops. The computing of the closing-off surface may further be based on prior removed mesh elements, removed as a result of the Boolean subtraction. Thus, some or part of mesh models are reused to construct the closing-off surface. The closing-off surface removes the void, thereby reestablishing the mesh model’s spatial integrity. The closing-off surface may be understood as a cut surface of the volume originally enclosed by the mesh model, and left by the Boolean subtracting-out of the mesh model, by the least one other model. The other said model may be a geometric primitive. The system thus provides a modified version of the input mesh model, now having the closing-off surface. The closing-off surface is also made up of mesh elements, thus the modified version of the mesh model remains a mesh model.
[0014] GENERAL DESCRIPTION OF THE INVENTION
[0015] In this section, a description of the general features of the present invention is given for example by referring to possible embodiments of the invention.
[0016] According to one embodiment of the invention there is provided a computer graphics facilitator system capable of facilitating Boolean subtraction between at least two 3D (three-dimensional) surface models of a 3D data space, referred to herein as the first model and at least one second model, the models resideable in at least one computer memory, the system capable to: a) remove an intersection portion between the two models from one of the models, referred to herein as the first model, the first model being a mesh model, thereby leaving at least one opening in the said first model, b) identify the at least one opening so formed as at least one loop based on extant mesh elements of the first model, and c) at least partly close-off the said at least one opening by forming a closing-off surface from new mesh elements based on at least one or more of the, or at least one other, extant mesh elements of the first model.
[0017] In some embodiments, the forming of the closing-off surface may also include using some extant mesh elements. Some of the new mesh elements may be based one may on some extant mesh elements for better memory / GPU (graphical processing unit) efficiency. When so reused, the extant mesh elements may be shifted, projected, rotated, etc into place for forming the closing off surface.
[0018] A geometry of the second model (eg, radius / center of the second model is a sphere primitive) may be used herein to calculate whether mesh elements (eg, vertices) are inside / out, where to split edges (eg, to define the loop), and in generating / forming the closing off surface.
[0019] The loop may be understood as a series of mesh elements (such as edges) that form a topologically closed shape on a surface, thus representing the intersection of the second model (eg, a primitive) and the first model (eg, a mesh of such mesh elements). In some embodiments, the system may further comprise a Tenderer capable of rendering at least the first model now having the closing-off surface in a 3D graphics display for displaying on a display device. In embodiments where the second model is a spheroid or similar, the closing off surface may have the form of an at least partial cap. The first model now having the closing-off surface may be used for rendering a still image or (of main interest herein) a frame of CGI / video / footage. Thus, the proposed system is operable per frame.
[0020] In some embodiments, the system may further comprise a user interface (Ul), capable of allowing user to change a mutual position of the said models.
[0021] In some embodiments, such a change in position to cause a new opening, and such change to trigger the system to recompute a new closing-off surface for the new opening.
[0022] In some embodiments, the at least one other model, referred to herein as the second model, is a geometric primitive (eg, sphere, spheroid, or other). The second model may be convex. The second model may be symmetric. The first model is in generally not symmetric.
[0023] In some embodiments, the first model is based on measurement data, such as a medical image data, eg, a CT (computed tomography), a PET (Positron emission tomography), a US (ultrasound), magnetic resonance (MR) volume, etc. Alternatively, the measurement data may hail from engineering applications, such as radar, or other modality.
[0024] In some embodiments, the closing-off surface substantially follows in curvature a surface of the second model that bounds the intersection portion.
[0025] In some embodiments, the system may be capable to form the at least one loop based at least in part on a manner in which mesh elements intersect the second model.
[0026] In some embodiments, the system is to so form the closing-off surface based on one or more mesh elements part of the removed intersection portion.
[0027] In some embodiments, the system may comprise a buffer such as a vertex of index buffer, for storing one of more such mesh elements for reuse of same in forming the closing-off surface. In particular, memory space or indices (pointers) (for index buffer) of such removed mesh elements may be reused for the new mesh elements. In some embodiments, the system is to so form the closing-off surface based on triangulation, such as based on extant or new mesh elements. Thus, „triangulation” may include generating new mesh elements (eg triangles) to form the closing-off surface. Triangulation includes surface triangulation. Thus, a surface (eg, parts of second model’s surface) may be discretized into such mesh elements (eg, triangles). Triangulation may proceed iteratively, eg from the loop towards a reference point, such as one based on a centroid (see below). Thus, mesh elements, further such are computed, and so forth, until the opening is covered with such mesh elements.
[0028] Triangulation may be based on a series of mesh element strips (eg, triangle strips), optionally with a fan at the center. Using such strips and / or fan allows quick rendering thereof, and hence of the closing off surface that is made up of such strips. In such strip structures, contiguous mesh elements share some lower-level mesh elements, such as triangular strips where vertices and edges are shared so that fewer such vertices / edges are needed than would be the case if one were to store instead for each, say, triangle its own, dedicated, vertices / edges.
[0029] Intersection of the two models may cause multiple opening, each with its own loop. Thus, multiple loops may need to be processed to so built a “combo” closing-off surface. For efficient processing, even in such multi-loop scenario, merely one single pass over the first model (eg, a mesh) may be needed. This allows compiling a list of intersecting edges, and then run, for example, a greedy-type algorithm to process them - removing edges during the process. When the edge list is empty, there are no loops left.
[0030] In some embodiments, the system in so forming the closing-off surface is to modify at least one of the extant mesh elements.
[0031] In some embodiments, the system, when such modification results in a micro-mesh element, is to replace same by a single such mesh element, wherein a micro-mesh element is one whose area size is below a pre-defined threshold.
[0032] In some embodiments, the system is to present extant and / or new mesh elements in a cartesian coordinate system and / or in a coordinate system whose geometry corresponds to a geometry of the second model. For example, the geometry may be one of spherical, cylindrical, or other, as opportune and apt in the circumstances.
[0033] In some embodiments, the forming of the closing-off surface by the system is based on computing a centroid in respect of the said at least one loop.
[0034] In some embodiments, the forming of the closing-off surface by the system is based on projecting the said centroid on the second model.
[0035] In some embodiments, the first model is representative of at least a part of a human anatomy.
[0036] In some embodiments, the second model is representative of a tool enagable with what the first model represents. For example, such tool may be one for subtractive forming, such as cutting (eg, milling, drilling, lathing / turning, broaching, ...).
[0037] In some embodiments, the system may further comprise a control interface capable of controlling a device based on the first model having the closing-off surface. The device may be a robot, medical device, tool, excavator.
[0038] In another aspect the invention may provide a computing arrangement comprising any one of more of the following: i) the system of any one of the preceding claims, ii) the at least one or more memories, ii) a computer graphics pipeline, iii) at least one or more processors or chipset capable of implementing the system of any one of the preceding claims, iv) the controlled device.
[0039] In some embodiments, of such computing arrangement, the system is at least partly included in the computer graphics pipeline.
[0040] In yet another aspect, the invention may provide a computing-implemented method for facilitating Boolean subtraction between at least two 3D surface models of a 3D data space, referred to herein as the first model and at least one second model, the models resideable in at least one computer memory, the method comprising: removing an intersection portion between the two models from one of the models, referred to herein as the first model, the first model being a mesh model, thereby leaving at least one opening in the said first model, identifying at least one opening so formed as at least one loop based on extant mesh elements of the first model, and closing-off the said at least one opening by forming a closing-off surface from new mesh elements based on at least one or more of the, or at least one other, extant mesh elements of the first model.
[0041] In yet another aspect, the invention may provide a program which, when running on a computer or when loaded onto a computer, causes the computer to perform the method steps of the said method; and / or a program storage medium on which the program is stored; and / or a computer comprising at least one processor and a memory and / or the program storage medium, wherein the program is running on the computer or loaded into the memory of the computer; and / or a signal wave or a digital signal wave, carrying information which represents the program; and / or a data stream which is representative of the program.
[0042] In another aspect still, or in combination with any of the above mentioned aspects, or said differently, the invention may be said to provide a method for performing, preferably real-time, Boolean subtraction of a sphere from a mesh, comprising: a) identifying vertices of the mesh that lie inside the sphere; b) modifying associated triangles based on the identified vertices; c) recognizing gaps or holes formed in the mesh as a result of the modifications as loops of edges.
[0043] In embodiments the method may further comprise: a) computing the centroid of each identified loop in spherical coordinates.
[0044] In embodiments the method may further comprise: a) computing the centroid of each identified loop in cartesian coordinates; b) determining the centroid as a weighted average of the loop's vertices based on edge lengths; and c) projecting the cartesian centroid onto the sphere using a combination of the average normal of the loop's surrounding faces and the centroid itself through a spherical linear interpolation (eg, “Slerp”) technique or other. In embodiments the method may further comprise: a) triangulating the identified holes to restore the integrity of the mesh; b) generating a series of strips that extend towards the centroid; c) sharing vertices across triangles during the triangulation process to maintain a closed and continuous mesh structure.
[0045] In embodiments the method may further comprise: a) the method operates in real-time, ensuring immediate feedback during mesh modifications.
[0046] In embodiments the method may further comprise: a) the method utilizes standard mesh data, specifically a vertex buffer and an index buffer.
[0047] In embodiments the method may further comprise: a) employing acceleration data structures to enhance the method's speed and responsiveness.
[0048] In embodiments the method may further comprise: a) eliminating microtriangles by replacing them with a single vertex.
[0049] In embodiments the method may further comprise: a) maintaining a pool of eliminated vertices from removed triangles, allowing these vertices to be reused during the triangulation process.
[0050] In embodiments the method may further comprise: a) the method is accelerated using GPU compute capabilities.
[0051] In a further aspect, the invention is directed to a computer program which, when running on at least one processor (for example, a processor) of at least one computer (for example, a computer) or when loaded into at least one memory (for example, a memory) of at least one computer (for example, a computer), causes the at least one computer to perform the above-described method according to the first aspect. The invention may alternatively or additionally relate to a (physical, for example electrical, for example technically generated) signal wave, for example a digital signal wave, carrying information which represents the program, for example the aforementioned program, which for example comprises code means which are adapted to perform any or all of the steps of the method according to the first aspect. A computer program stored on a disc is a data file, and when the file is read out and transmitted it becomes a data stream for example in the form of a (physical, for example electrical, for example technically generated) signal. The signal can be implemented as the signal wave which is described herein. For example, the signal, for example the signal wave is constituted to be transmitted via a computer network, for example LAN, WLAN, WAN, for example the internet. The invention according to the second aspect therefore may alternatively or additionally relate to a data stream representative of the aforementioned program. In a third aspect, the invention is directed to a non-transitory computer-readable program storage medium on which the program according to the fourth aspect is stored.
[0052] In a further aspect, the invention is directed to at least one computing system (for example, a computing device(s) ), comprising at least one data processor (for example, a semi-conductor based data and instructions processor circuitry) and at least one memory (for example, a systems memory, a graphics memory or secondary nonvolatile memory), wherein the program is running on the processor or is loaded into the memory, or wherein the at least one computer comprises the computer-readable program storage medium.
[0053] What is proposed herein is a novel method and system for performing, or at least facilitating, preferably real-time Boolean subtraction of an arbitrary sphere or other primitive, from an arbitrary closed mesh. This method and system is particularly beneficial for applications such as medical simulations and computer graphics, offering unique advantages in terms of performance, simplicity, and mesh integrity.
[0054] The present invention introduces a novel method and system for modifying a three- dimensional mesh using, for example, the sphere, primarily designed for applications in medical simulations, computer graphics, and related fields. In embodiments, the method identifies and processes vertices of the mesh that lie inside the, for example, sphere, leading to the modification of associated triangles (of the mesh). As a result of these modifications, holes or gaps may form in the mesh, which are identified as loops of edges.
[0055] To restore the integrity of the mesh, the method calculates a centroid or other geometric average per loop. The centroid computation can be performed in either spherical or cartesian coordinates, or other. In the cartesian approach, the centroid is determined as a weighted average of the loop's vertices, with weights based on edge lengths. This cartesian centroid may then projected onto the sphere using a combination of the average normal of the loop's surrounding faces and the centroid itself, employing for example a spherical linear interpolation (such as Slerp or other) technique.
[0056] Once the centroid is determined, the method may proceed to triangulate the holes in the mesh. This triangulation generates a series of polygonal strips that extend towards the centroid, ensuring that vertices are shared across triangles to maintain a closed and continuous mesh structure.
[0057] The method and system is optimized for real-time performance and can be further accelerated using GPU compute capabilities or acceleration data structures. It may operate using standard mesh data, eliminating the need for complex data structures or mesh traversals. The method or system may also offer provisions for subsequent optimizations, such as any one or more of: I) elimination of microtriangles, II) and maintenance of a pool of eliminated vertices for reuse, in particular of their memory space, eg when computing new triangles / mesh elements to fill up the void, eg by triangulation, or other.
[0058] The present invention provides, amongst others, a method and system for performing real-time Boolean subtraction of a sphere from a mesh, particularly useful in applications such as medical (eg surgical or other) simulations, computer graphics, and other fields of endeavor, where mesh modifications are required, in particular in real-time. In yet more detail, what is proposed herein is, inter alia, a method and system for 3D mesh modification, in particular Boolean Subtraction, that offers several distinct advantages over traditional approaches, addressing many of the challenges previously faced in the field of computer graphics, simulations and some such:- i). Real-time Performance: method and system has the ability to operate in realtime. This ensures quasi-immediate feedback during mesh modifications, which is of consideration for applications like medical simulations where timely and accurate representation of changes are beneficial. ii). Simplicity and Efficiency: The method and system capitalizes on the inherent characteristics of sphere-mesh intersections, maximizing simplicity and computational efficiency. This design choice eliminates the need for complex data structures or extensive mesh traversals, which are common bottlenecks in traditional mesh modification techniques.
[0059] Hi). Sharp Results: The method and system may deliver sharp and precise modifications to the mesh, ensuring that the resulting structure closely aligns with the intended modifications, enhancing visual fidelity and realism. iv). Standard Mesh Data Utilization: The method and system operates using standard mesh data, specifically a vertex buffer and an index buffer. This compatibility ensures that the invention can be seamlessly integrated into existing graphics pipelines without necessitating significant changes to the data structures or workflows. v). GPU Acceleration and Optimization The method and system may be easily accelerated using GPU compute capabilities. This ensures that even in graphicsintensive applications or scenarios with highly detailed meshes, the method remains responsive and efficient. vi). Maintaining Mesh Integrity: The method and system takes special care to maintain a closed and continuous mesh structure. By reusing vertices and (optionally) handling different cases of vertex-sphere intersections (also referred to herein as revenant mesh elements of type 1 and type 2), the method and system ensures or at least facilitates that the mesh remains intact and free of unintended gaps or holes. vii). Optimizations and Enhancements: The method and system offers provisions for subsequent optimizations, such as: viii). Acceleration Data Structures: The method and system can be further optimized using acceleration data structures, enhancing its speed and responsiveness. ix). Microtriangle Elimination: The method and system can eliminate microtriangles, replacing them with a single vertex, ensuring that the mesh remains clean and free of unnecessary complexities. x). Vertex Pooling: The method and system may maintain a pool of eliminated vertices from removed triangles. These vertices can be reused for triangles added during the triangulation process, optimizing memory usage and computational efficiency.
[0060] In sum, the proposed method and system offers a holistic solution for 3D mesh modification, addressing both the computational and quality challenges faced in the field. Its unique combination of efficiency, precision, and adaptability makes it a valuable tool for a wide range of applications, from medical simulations to interactive design and gaming.
[0061] The invention as proposed herein does not involve or in particular comprise or encompass an invasive step which would represent a substantial physical interference with the body requiring professional medical expertise to be carried out and entailing a substantial health risk, even when carried out with the required professional care and expertise. For example, the invention does not comprise a step of positioning a medical implant in order to fasten it to an anatomical structure or a step of fastening the medical implant to the anatomical structure or a step of preparing the anatomical structure for having the medical implant fastened to it. More particularly, the invention does not involve or in particular comprise or encompass any surgical or therapeutic activity. The invention is instead directed as applicable to simulation and rendering of graphics that use Boolean Subtraction. For this reason alone, no surgical or therapeutic activity and in particular no surgical or therapeutic step is necessitated or implied by carrying out the invention.
[0062] Use of the system
[0063] The present invention also relates to the use of the system or any embodiment thereof for graphics rendering. The use may comprise for example at least one of the following steps: receiving the modified mesh model having the closing off surface as provided by the proposed system, and passing same on for rendering into a graphics display by a graphics pipeline in viewport of a display device.
[0064] DEFINITIONS
[0065] In this section, definitions for specific terminology used in this disclosure are offered which also form part of the present disclosure.
[0066] Computer-implemented Method
[0067] The method in accordance with the invention is for example a computer implemented method. For example, all the steps or merely some of the steps (i.e. less than the total number of steps) of the method in accordance with the invention can be executed by a computer (for example, at least one computer). An embodiment of the computer implemented method is a use of the computer for performing a data processing method. An embodiment of the computer implemented method is a method concerning the operation of the computer such that the computer is operated to perform one, more or all steps of the method.
[0068] The computer for example comprises at least one processor and for example at least one memory in order to (technically) process the data, for example electronically and / or optically. The processor being for example made of a substance or composition which is a semiconductor, for example at least partly n- and / or p-doped semiconductor, for example at least one of II-, III-, IV-, V-, Vl-semiconductor material, for example (doped) silicon and / or gallium arsenide. The calculating or determining steps described are for example performed by a computer. Determining steps or calculating / computing steps are for example steps of determining data within the framework of the technical method, for example within the framework of a program. A computer is for example any kind of data processing device, for example electronic data processing device. A computer can be a device which is generally thought of as such, for example desktop PCs, notebooks, netbooks, etc., but can also be any programmable apparatus, such as for example a mobile phone or an embedded processor. A computer can for example comprise a system (network) of "sub-computers", wherein each subcomputer represents a computer in its own right. The term "computer" includes a cloud computer, for example a cloud server. The term "cloud computer" includes a cloud computer system which for example comprises a system of at least one cloud computer and for example a plurality of operatively interconnected cloud computers such as a server farm. Such a cloud computer is preferably connected to a wide area network such as the world wide web (WWW) and located in a so-called cloud of computers which are all connected to the world wide web. Such an infrastructure is used for "cloud computing", which describes computation, software, data access and storage services which do not require the end user to know the physical location and / or configuration of the computer delivering a specific service. For example, the term "cloud" is used in this respect as a metaphor for the Internet (world wide web). For example, the cloud provides computing infrastructure as a service (laaS). The cloud computer can function as a virtual host for an operating system and / or data processing application which is used to execute the method of the invention. The cloud computer is for example an elastic compute cloud (EC2) as provided by Amazon Web Services™. A computer for example comprises interfaces in order to receive or output data and / or perform an analogue-to-digital conversion. The data are for example data which represent physical properties and / or which are generated from technical signals. The technical signals are for example generated by means of (technical) detection devices (such as for example devices for detecting marker devices) and / or (technical) analytical devices (such as for example devices for performing (medical) imaging methods), wherein the technical signals are for example electrical or optical signals. The technical signals for example represent the data received or output by the computer. The computer is preferably operatively coupled to a display device which allows information output by the computer to be displayed, for example to a user. One example of a display device is a virtual reality device or an augmented reality device (also referred to as virtual reality glasses or augmented reality glasses) which can be used as "goggles" for navigating. A specific example of such augmented reality glasses is Google Glass (a trademark of Google, Inc.). An augmented reality device or a virtual reality device can be used both to input information into the computer by user interaction and to display information outputted by the computer. Another example of a display device would be a standard computer monitor comprising for example a liquid crystal display operatively coupled to the computer for receiving display control data from the computer for generating signals used to display image information content on the display device. A specific embodiment of such a computer monitor is a digital lightbox. An example of such a digital lightbox is Buzz®, a product of Brainlab AG. The monitor may also be the monitor of a portable, for example handheld, device such as a smart phone or personal digital assistant or digital media player.
[0069] The invention also relates to a program which, when running on a computer, causes the computer to perform one or more or all of the method steps described herein and / or to a program storage medium on which the program is stored (in particular in a non- transitory form) and / or to a computer comprising said program storage medium and / or to a (physical, for example electrical, for example technically generated) signal wave, for example a digital signal wave, carrying information which represents the program, for example the aforementioned program, which for example comprises code means which are adapted to perform any or all of the method steps described herein.
[0070] Within the framework of the invention, computer program elements can be embodied by hardware and / or software (this includes firmware, resident software, micro-code, etc.). Within the framework of the invention, computer program elements can take the form of a computer program product which can be embodied by a computer-usable, for example computer-readable data storage medium comprising computer-usable, for example computer-readable program instructions, "code" or a "computer program" embodied in said data storage medium for use on or in connection with the instructionexecuting system. Such a system can be a computer; a computer can be a data processing device comprising means for executing the computer program elements and / or the program in accordance with the invention, for example a data processing device comprising a digital processor DPR (such as a central processing unit (“CPU”)) which executes the computer program elements, and optionally a volatile memory (for example a random access memory or RAM) for storing data used for and / or produced by executing the computer program elements. Within the framework of the present invention, a computer-usable, for example computer-readable data storage medium can be any data storage medium which can include, store, communicate, propagate or transport the program for use on or in connection with the instruction-executing system, apparatus or device. The computer-usable, for example computer-readable data storage medium can for example be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared or semiconductor system, apparatus or device or a medium of propagation such as for example the Internet. The computer-usable or computer-readable data storage medium could even for example be paper or another suitable medium onto which the program is printed, since the program could be electronically captured, for example by optically scanning the paper or other suitable medium, and then compiled, interpreted or otherwise processed in a suitable manner. The data storage medium is preferably a non-volatile data storage medium. The computer program product and any software and / or hardware described here form the various means for performing the functions of the invention in the example embodiments. The computer and / or data processing device can for example include a guidance information device which includes means for outputting guidance information. The guidance information can be outputted, for example to a user, visually by a visual indicating means (for example, a monitor and / or a lamp) and / or acoustically by an acoustic indicating means (for example, a loudspeaker and / or a digital speech output device) and / or tactilely by a tactile indicating means (for example, a vibrating element or a vibration element incorporated into an instrument). For the purpose of this document, a computer is a technical computer which for example comprises technical, for example tangible components, for example mechanical and / or electronic components. Any device mentioned as such in this document is a technical and for example tangible device.
[0071] Graphical Objects / Models
[0072] Also referred to herein as “model(s)”, are preferably surface models. They are shape representatives that represent a shape of an anatomical structure or of any other virtual or real physical object, such as a work piece, or other. Models can have their shape changed or modified. Models are data that includes components, or mesh elements, that together make up the model when visualized. The mesh elements, which may include atomic or compound mesh elements, may carry attributes such as texture, light luminosity, shading, color / grey values, etc, Models may be visualized in a viewport of a display device or other. Processing and visualization may be facilitated by a graphics pipeline of a computing system. 3D models are 2D surface models embedded in 3D data space. Such models can be rendered in still or motion pictures. Various perspective views on the model can be rendered by manipulating model’s mesh elements, given a virtual camera position from which the view is computationally projected onto a view plane that is visualized on the viewport. Not all models are mesh models. Other models are geometric primitives. Unlike mensh models, such geometric primitives can be expressed as loci / locus of a geometrical condition and often admit representation in terms of closed-form analytical expression. No representation is generally available for mesh models, which are defined by enumeration of their mesh model elements, in particular their atomic mesh model elements (eg, vertices). Examples of geometric primitive shape representatives include straight lines, planes and geometric figures. Geometric figures can be one-dimensional such as for example axes or circular arcs, two-dimensional such as for example polygons and circles, or three-dimensional such as for example cuboids, cylinders, and spheres or spheroids more generally. The relative position between the primitive shape representatives and / or mesh models can be described in reference systems, for example by coordinates or vectors, or can be described by geometric variables such as for example length, angle, area, volume and proportions. The characteristic aspects which are represented by the shape representatives are for example symmetry properties which are represented for example by a plane of symmetry. Another example of a characteristic aspect is the direction of extension of the anatomical structure, which is for example represented by a longitudinal axis. Another example of a characteristic aspect is the cross-sectional shape of an anatomical structure, which is for example represented by an ellipse. Another example of a characteristic aspect is the surface shape of a part of the anatomical structure, which is for example represented by a plane or a hemisphere. For example, the characteristic aspect constitutes an abstraction of the actual shape or an abstraction of a property of the actual shape (such as for example its symmetry properties or longitudinal extension). The shape representative for example represents this abstraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] In the following, the invention is described with reference to the appended figures, and represent specific embodiments of the invention. The scope of the invention is, however, not limited to the specific features disclosed in the:- context of the figures, wherein:-
[0074] Figure 1 shows a schematic block diagram of a computer graphics arrangement;
[0075] Figure 2 illustrates geometric objects such as a mesh model and a geometric primitive; Figure 3 is an illustration of a Boolean subtraction operation;
[0076] Figure 4 shows a Boolean subtraction operation in more detail with identification of one or more loops that may be used to define a closing-off surface as envisaged herein in some embodiment;
[0077] Figure 5 shows different categories of mesh elements as may be formed due to the Boolean subtraction operation;
[0078] Figure 6 shows a block diagram of components of a computing system as may be used herein in some embodiments;
[0079] Figure 7 shows components of a graphics pipeline or Tenderer as may be used herein in some embodiments;
[0080] Figure 8 shows a block diagram of components of a Boolean subtraction facilitator that may be used to implementing a Boolean subtraction operation in respect to at least two input models;
[0081] Figure 9 shows a flow chart of a computer implemented method of supporting a computer graphics operation, in particular a Boolean subtraction operation in respect of at least two models; and
[0082] Figure 10 is an illustration of a Boolean subtraction operation using a sphere primitive as a cutter, and a triangular mesh model as cuttee.
[0083] DESCRIPTION OF EMBODIMENTS
[0084] Referring now first to Figure 1 , there is shown a schematic block diagram of a computer graphics arrangement CGA. This may include a computing system CS capable of generating a graphics display GD on one or more display devices DD. Applications of the computer graphics arrangement CGA is manifold, and all are envisaged herein: the computer graphics arrangement CGA may be used in all manners for simulation, animation or other, preferably dynamic, graphical representation of a technical process, such as in the medical field, engineering or any other field of endeavor. It may be used in supporting movie-making such as animation, CGI and special effects, visualization and “bringing to life” of virtual or real scenes, such as interacting agents in virtual or reality-simulated landscapes.
[0085] The graphics display generatable by the computing system CS may include two or more graphical objects GO, such as mesh models, primitives or others which are made to interact. Specifically, a Boolean subtraction may be visualized on graphics display GD by operation of computing system CS.
[0086] Broadly, the computing system CS may include, or may be capable of interfacing with, an accelerator module BSF that allows facilitating quick and memory efficient rendering of such Boolean subtraction operations. Use of such Boolean subtraction operations abound across fields: they may be used for example to simulate a cutting operation, carve out or digging of material in plural guises, as will be described herein in more detail. The accelerator module BSF may be referred to herein as the Boolean subtraction facility BSF. It may be part of the computing system CS, or its services may be supplied and sourced from elsewhere, eg in a computing network infrastructure, interfaceable by computing system CS, when and if needed.
[0087] Computer system CS may include one or more processors (such as a CPU and / or GPU), and memory MEM, which may include main (system / volatile memory), graphics memory, and, optionally, secondary / non-volatile memory, such as one more hard drives, or other data storage. Processor fetches data and performs certain data or algorithmic operation(s) thereon, to so effect generating the graphics display GD, as will be explained in more detail below.
[0088] Generation of one or more still imagery as graphics display GD is not excluded, but video footage is preferred, as a stream of frames ft that together form the graphics display GD as a motion picture, animation, footage, or the like. 2D imagery is one option, but the generation of 3D motion imagery (“CGI”) is preferred. Thus, video / animation of 3D imagery is preferred herein where the frames are displayed in sequence one after the other in suitable short succession as determined by the desired frame rate, thereby causing on user / viewer an optical illusion (motion picture or “cine” effect) of motion in respect of one or more graphical objects GO that, together with background, make up the graphics display GD.
[0089] The generated (video) graphics display GD may represent a dynamic scene unfolding, involving the one or more, preferably two or more, graphical objects GO. Such dynamic scene may be a simulation of medical, engineering, or other operation. Specifically, such dynamic scene may represent interaction(s) of two or more graphics objects GO.
[0090] The dynamic scene may be caused by user interaction via a suitable interface Ul, a computer mouse, touch screen, and the like. For example, user may effect, via interface Ul, repositioning of at least one of the objects GO over plural frames, which, when displayed in cine sequence, furnish to user the visual effect of a virtual motion. We refer to this virtual motion herein simply as motion or repositioning, not least because in some simulations such (virtual) motion is taken to represent real motion of physical objects represented by the graphical objects GO. During, before, or after such motion, user may adjust interactively, preferably in real time, a field of view and / or position of a virtual camera VS. The virtual camera VS determines the projection of the 3D scene onto the display device DD’s viewport, thus conferring a perspective view from the virtual camera on the scene.
[0091] Broadly, and in some embodiments, the dynamic scene may represent relative motion between the two objects GO. The objects GO may be conceptualized as one being passive, the other active ,at least at times during the footage, r Such roles may switch however.
[0092] The interaction being so modelled or simulated may be one of the active object GO modifying the passive object GO. The graphical objects GO may be models, and for such they will be referred to herein in the main. More details of types of models envisaged herein in the main will be described later, below at Figure 2.
[0093] The modification may be one of Boolean subtraction, and may be thought of as a minuend model MN less the subtrahend model SB. For example, a machining operation, in particular a cutting operation, may be simulated, where a cutter model CTR cuts into a cuttee model CTE to so simulate removal, or carve out, of material therefrom for example. User may use user interface Ul to effect such Boolean subtraction by virtually moving at least part of cutter CTR model into cuttee model CTE.
[0094] In more detail, the computing model CS may include a graphics or rendering pipeline GPL to generate the graphics display GD. Broadly, and as envisaged herein, the computing system CS may include, or may interface with, the Tenderer facilitator component BST that allows real time and efficient rendering of dynamic modification operation of one model M, CTE by another model S, CTR. In particular, the Tenderer facilitator component BST may be understood to facilitate rendering of Boolean subtraction operation. The modifier component may be referred to herein as a Boolean subtraction facilitator component, or simply ’’facilitator” BSF. Facilitator BSF may be fully or partly included in the computer graphics pipeline GPL. The computing system CS may be implemented wholly or partly by a mobile device, eg in an application (“app”) installable on such mobile device, such as on a smart phone, tablet or other, such as laptop or desktop type device, etc. Implementations across a computing network, such as an edge computing networks, are also envisaged. Implementation may be wholly or partly on one or mor servers, preferably communicatively couplable among each other, and or with one or more user end devices, such as smart phone, tablet, lap-or desktop, etc. Load balancing may be used for better, that is, more responsive, delivery of the computer graphics display GD.
[0095] Applications of the above abound. For example, the computing system CS, as supported by the facilitator BSF, may be operative to simulate a medical intervention or procedure, where a cutting tool is used. Examples of this include fitting an implant in patient, such as in hip surgery, where a fitting of a new hip joint may be called for. Alternatively, the graphics display may be used as planning or training data for training junior medial staff. Alternatively, outside the medical field, applications are also envisaged such as various engineering applications, such as machining, in particular the said cutting operations (drilling, milling, lathing / turning, etc), or dredging harbor or river systems, estuaries, etc, to counteract their silting up, or in excavations such as in archaeological sites may be supported by such computing system CS. In the latter example, ancient tombs may be sometimes difficult to access without causing damage to potentially unique cultural artifacts. The facilitator BSF can be used to efficiently simulate, plan, or cause the controlling / performing of such delicate instruction / cutting operations. Simulation of a relative motion among models CTE, CTR is sufficient herein in some applications, such is in turning where it is the passive part that is moving against stationary tool. Thus, cuttee CTE, M may be a work piece, and cutter S, CTR may be the tool, cutter, etc, with the cuttee CTE being moved into the cutter CTR.
[0096] In some embodiments, the cuttee model CTE, S may be fashioned from measurements m of physical quantities acquired by a measuring device IA off a physical object, animate or inanimate. The measuring device IA may include a signal source SS and a detection device DD. The signal source SS may be operable in a data acquisition operation to issue forth an interrogation signal IGS, which interacts with the physical object or system of interest. Signals that result from such interaction may be detected by detection device DD, and converted by DAQ circuitry into a set of numbers, the said measurements m. Thus, model CTE, S may be based on medical imagery, such as x-ray, US (ultrasound), tomographic volumes such as in CT, MRI, PET, OCT, or other. In other applications, such as the engineering or archaeological example applications mentioned above, model CTE may be based on bathymetric sonar measurements, (side scan) radar or sonar, geological seismic measurements, etc.
[0097] A model maker MM may convert the measurements m into the graphical model CTE, CTR, S, M, such as a mesh model or geometric primitive. For example, model maker MM may use segmentation to segment in a medical image (such an X-ray or CT volume, MRI volume, etc) for bone tissue or other tissue or organ of interest, etc. For example, the model S, CTE me in some embodiments represent a part of a patient’s hip bone. Thus, model S, CTE may be fashioned into a mesh model of patient’s bone. Such may be used in simulation of a hip joint replacement intervention, with the second model representing a milling tool that carves into the bone to define a cut-out where the new hip joint may be received. Having said that, in other application examples, neither model CTE, CTR, or at least one such model CTE, CTR is not derived from such measurements of a real, physical, object. Thus, the system CS may be used in CGI in motion picture production, special effects generation, animation etc, from virtual landscapes and actors, not necessarily tied to real physical objects.
[0098] Reference is now made to Figure 2, which is a schematic representation of more details of the graphical objects GO that may be used herein in embodiments. One of the graphical objects, is the Cuttee model CTE, as opposed to the Cutter model CTR. The two models, the Cuttee model CTE and the Cutter model CTR, may be both geometric primitives, or may be both mesh models, as needed. However, in preferred embodiment, and is illustrated in Figure 2, it is the cuttee model CTE that is a mesh model, whilst the Cutter model CTR is a primitive, such as a sphere, ellipsoid, spheroid, or other preferrable, spherical or convex, shape. Symmetric shapes may be preferred herein for their efficient handling in terms of storage and manipulation. A dual setup is also envisaged herein, where it is the cutter CTR model that is a mesh model, whilst it is the cuttee CTE model that is the geometric primitive. All the below described, with roles reversed, is of equal application herein for this dual setup. As simulation of a cutting operation is of main interest herein, the naming of “cuttee” model vs “cutter” model has been adopted herein, with the understanding that this is naming convention is for exemplary convenience only, and does not limit the principles described herein.
[0099] . It is an objective herein to enable responsive, real time, rendering of simulation of the virtual cutter CTR as may be operated by user, It is an objective to so graphically render an animation how the cuttee CTE changes in shape and form as the cutter CTR “eats” into it. The facilitator BSF helps achieve this by enabling realistic rendering of the dynamics of the cut surface(s) of the cuttee CTE as they emerge, whilst, and as a result of, the cutter CTR carving into the cuttee mesh model CTE. Having said that, in some alternative embodiments, it may well be that the Cuttee is a geometric primitive, whilst it is the Cutter model CTR that is a mesh model as per the dual setup mentioned above. However, this variation may be lesser interest herein (but is still envisaged in some embodiments), and we will confine the following descriptions to the embodiment where the Cuttee model CTE is a mesh model whilst the Cutter CTR is a geometric primitive, in particular for simplicity of presentation.
[0100] Turning first to the geometric primitive CTE, this may be described as points p(x,y,z) in a data space DS. The data space DS may preferably be conceptualized as a vector space, or an affine vector space, referred to herein as set D. A suitable such vector space structure may include Rn,n > 3.The space D may be assumed to be endowed with a norm || ■ ||, or a metric more generally, to conceptualize distance and length in that space DS. The points p may be defined in an at least three dimensional coordinate system (X,Y,Z) located at an origin O in space / set D. The geometric primitive CTR may be understood as a set of points G, a geometric locus, made up of spatial points that fulfil a certain condition C:
[0101] G = {xe D\ C(x) true} (1)
[0102] Thus, for example in the case of sphere with a given radius r centered at center point C=(ci, C2, C3), (1) may be formulated as the locus G of the set of points that evaluate a dot product x * c of an given point with its vector x to a constant r, such as unity: (eg, r =1 or unit sphere) (2)
[0103] Geometric primitives allow efficient computational processing as, for example, it can be readily established to any given point p with vector whether or not it is in, on or outside the sphere by evaluating the above equation (2). For example, in terms of sphere equation (2), this evaluates to radius r, if the point p is indeed on the sphere, it evaluates usually to values less than r for points inside the sphere, and to values larger than radius r for points that are outside the sphere. In short, closed-form analytical expression such as (2) may exist for primitives that allow definition of the said primitive and allow deciding membership queries of points by evaluation of said expression. However, geometric primitives in general only allow representation of relatively simple shapes. Mesh models allow for more liberties in terms of representational capability of shapes. Mesh models, such as polygonal mesh models, are envisaged in particular for the Cuttee model CTE.
[0104] Aspect of mesh models are now explained in more detail with reference to the left of Figure 2. Such mesh models can represent complex shapes with corners, foldovers, drapings, furrows, grooves, etc. Alas, in general, no (single) analytically-closed formula such as (2) above exists for convenient and efficient evaluation and definition. Instead, specification of mesh models is usually in terms of enumeration, a list / set of mesh elements ME, that make up the mesh model. Thus, mesh models are generally definable by ostension, rather than, as is the case of primitives, analytically as geometric loci. Mesh models may or may not be convex, whilst primitives often are. At an initial phase, the mesh model is without gaps or holes, that is, it has (spatial) integrity. That is, any line that is cast from an arbitrary point towards the mesh model and this is not tangential, will intersect the model in at least two points that are, or are part of, a mesh element.
[0105] For illustration’s sake only, an example mesh model CTE of a protrusion is shown to the left of Figure 2. Such examples may come about when one wishes to represent certain aspects of bones, for example in the medical realm, as indeed envisaged herein in some embodiment, eg, in the simulation of certain interventions, such as hip replacement and others.
[0106] Broadly, the (polygonal) mesh model CTE is made up of said mesh elements ME. The structure of mesh elements may admit to definition of a hierarchy in construction, proceeding from the lower level mesh elements to higher level mesh elements. For example, at lowest level, there are atomic mesh elements ME from which compound mesh elements at higher levels are composable. One example of a polygonal mesh type referred to herein throughout for simplicity, but also for their usefulness, are triangular mesh models as illustrated in Fig 2. Such mesh elements of such models CTE are made up of vertices, from which are defined edges, and said edges in turn form, preferably planar, faces, such as the said triangles. The mesh elements are contiguously arranged to form the desired shape as shown to the left of Figure 2 for some example mesh elements. For computational and memory efficiency, the mesh models, but also the primitives, are “hollow” inside. That’ is, they are 2D-surface models embedded in the surrounding 3D space D. They enclose portion(s) of volume, but points of space D inside the volume enclosed by the mesh or primitive are not part of the mesh or primitive, respectively.
[0107] The upper right of Figure 2 shows polygonal (in particular triangular) mesh elements ME1 , ME2 in more detail. For clarity, only two such higher level mesh elements ME1 , ME2 are shown which are faces F1 , F2 of contiguous triangles. These are made up of connecting edges e=eij that connect to the respective vertices shown as Vjj. Thus, the atomic mesh models, such as the vertices V=V are points in the at least 3D data space relative to the co-ordinate system (X,Y,Z). Pairs of vertices are connected by its edge, and three such edges connect to define the triangle mesh element with its respective face F=Fj. Such mesh models form a 2D surface in 3D space. More generally, they form an n-dimensional surface in the surrounding (n+^-dimensional space D, n > 2. Mesh models may be understood as hyper-surfaces, a generalization of the concept of hyperplanes. For computational and memory efficiency, contiguous two triangles F1 and F2 may share an edge so that two contiguous triangles need only five edges as opposed to six, and equally, points can be shared so that only four points are needed for storing information that codes for two contiguous triangles F1 ,F2. The mesh surface CTE, and also the primitive CTR, enclose a certain respective volume in 3D space D. The mesh model, in its initial phase, is closed: that is, there are no gaps, holes or other discontinuities. An orientation of the faces Fj = F1 , F2 of the triangles ME1 , ME2 can be defined by a respective surface normal nj (not shown) in the usual classical geometrical manner. For example, each of the three vertices may be used to define plane of the respective face Fj. And that plane has a respective normal nj, a 3D vector that is perpendicular to the face Fj spanned by its three vertices. Definition of normal is canonical. Dot-products may be used. By convention, the respective normals nj per face Fj (eg triangle) are so defined that they point to the outside of the enclosed volume. Certain accelerator structures may be used to store and / or process such mesh models, in order to speed up access, retrieval, traversal or other operations in respective of the mesh’s mesh elements. For example, such accelerating data structure may include octrees, BVHs (“bounding volume hierarchy”), etc or other tree structures. Such accelerating data structures may divide the mesh space. This may facilitate quickly determining vertex positions of mesh CTE relative to the sphere CTR.
[0108] Triangular mesh models are useful as they can be defined by merely three vertices Vn- i3 per face Ft, and yet, by contiguous composition, such triangular faces allow defining geometric objects of next to any desired spatial shape complexity. However, other polygonal mesh models are not excluded herein such, as those made up of quadrangles, quintangles, hexagons, or any other. Whilst the respective faces of the mesh models are general planar, this too may be relaxed in some embodiments where curved faces are also envisaged herein. In general, whilst the surrounding space is 3D, the principles described herein may well also be practiced in higher dimensions, if needed.
[0109] The described hierarchy of mesh elements in terms of atomic and compound mesh elements is a concept that can be extended to any sort of mesh models as needed. In the described example of triangular meshes, the vertices form the atomic mesh elements, whilst edges and the triangles / faces are compound mesh models at higher hierarchy with three levels: the face / triangle being at the highest (third) hierarchy, whilst at the lower, second level, there are the edges, and at the lowest (the first level) are the atomic mesh models, namely the vertices. Mesh models with more than three such levels of compositional hierarchy are also envisaged, and the herein-described principles are not confined to triangular mesh models / mesh elements. In general, a reference herein to “mesh element(s)” ought to be construed as a generic reference to any of the higher-level compound mesh elements or to the atomic mesh elements. However, for the sake of definiteness, we will refer exclusively herein in an exemplary manner to triangular mesh models, thus there will be reference to vertex / vertices, to edge(s), and the face(s) / triangle(s) at the highest level of the triangular mesh model. Thus, any specific reference herein to a face(s) / triangle(s), edge(s), vertex / vertices, is a reference to a “mesh element” more generally.
[0110] Reference is now made to Figure 3, which shows a timeline t of a Boolean subtraction operation as implementable herein, three phases may be distinguished herein in a graphics display GD capable of representing a 3D dynamic scene of such Boolean subtraction operation. For ease of representation, and in order to explain the concepts proposed herein more clearly, models CTR, CTE are shown in cut side elevation view along axis X, in respect of the approach direction v of cutter CTR.
[0111] At first phase A) the Cutter model CTE, taken to be a primitive, is approaching the mesh model CTE along motion vectors. This motion may be a virtual one and may be brought about by the user using a user interface III, such as a computer mouse or any other pointer tool, to effect repositioning of the cutter CTR across the screen in order to so effect the Boolean subtraction operation. Such use case may arise for example in the medical field: a trainee medic or a senior medic may wish to train / plan, based on the simulation, an upcoming intervention, such as a hip replacement operation. A milling tool represented by the cutter model VTR may thus be moved into the cuttee mesh model CTE, which may represent shape of a relevant piece of hip bone for example. At phase B), the cutter CTR’s surface penetrates that of the Cuttee CTE to cause a (non-empty) intersection to be formed, and to so define intersection volume IS. The intersection volume is bounded by parts of surfaces of both models CTE, CTR.
[0112] Thus, the intersection IS may be bounded by partial surface portions from both models CTR, CTE. Fig 3 represents a graphical representation of the Boolean subtraction. Denoting cuttee model CTE as set “M” and the cutter model CTR as set “S”, Boolean subtraction may be set-theoretically written as:-
[0113] M’ = M\[M nS]
[0114] With M’ denoting the leftover set of cuttee model CTE after the Boolean subtraction. As such, the Boolean subtraction may leave a remainder with a void GP (hole, gap) in M, which is capped off by inclusion of a cut surface COS, to leave a modified cuttee model CTE’ of the earlier input model CTE, whose integrity is re-established by operation of Boolean subtraction facilitator BSF.
[0115] Thus, the intersection volume IS including its bounding surfaces is removed as shown in phase C), and as such would leave a gap GP on account of the mesh model being a surface model, rather than a solid volume model, if it was not for the Boolean subtraction facilitator BSF. Surface models (as opposed to “solid” models with inside points) as used herein, can be handled more efficiently, as fewer data points (namely only the surface points) need to be stored, tracked and manipulated. The proposed Boolean subtraction facilitator BSF is of main application and benefit for Boolean subtraction simulation in a motion-picture graphics display, in respect of the mesh models, where the intersection IS is carved out of the mesh model CTE.
[0116] Phase D) represents operation of the Boolean subtraction facilitator BSF, also referred herein for brevity as the “facilitator”, which computes, in a memory efficient and responsive manner, the closing-off or caping surface COS for the gap GP. The closing off surface COS is again a mesh model surface of two-dimensional character, located in 3D space so as to close off the gap GP left by the Boolean subtraction as effected by the Cutter model, the primitive CTR. Thus, the computed closing-off surface COS is in effect a simulation of the cut surface that is left by the cutting action by cutter, as if the meh model was a solid model (which it is not). Thus, the Boolean subtraction facilitator allows securing the benefits from both worlds: 1) the efficient processing and storing of mesh models and yet 2) retain a higher level of realism in being able to faithfully (and efficiently) model 2D cut surface(s) COS, that may otherwise only be available in solid 3D models.
[0117] The closing-off surface COS may partly close off the gap GP, but this is less preferred and more preferred is that it closes off the gap fully and completely with no follow up gap(s) remaining. The curvature of the surface COS roughly follows that of the primitive, in particular of the surface of the primitive that defines one side of the intersection volume, IS mainly the one that was inside the mesh model.
[0118] The closing-off surface is fashioned herein so as to combine with the remaining, extant, mesh model CTE to form a continuously differentiable surface that is of sufficient smoothness of a class C1surface function. In effect, what the Boolean subtraction facilitator BSF has done is fashion a new surface model CTE’, a combination of extant surface portion(s) of the old mesh model CTE prior collision, and the computed closing off or “cap” surface COS.
[0119] The Boolean subtraction facilitator BSF facilitates in a memory conservative and a very quick manner computing such a closing-off surface COS, even for highly involved and complex situations and / or structures of cuttee mesh model CTE and / or cutter CTR. This is achieved by using one or more of a set of multiple judiciously chosen algorithmic steps or arrangements and geometric insight: for example, the subtraction facilitator BSF may be operable to re-use some of the removed mesh models that have left the gap GP. For example, some of the inside mesh elements of the mesh CTE that bound the intersection volume IS may be stored in a portion of the graphic pipelines GPL’s vertex buffer, index buffer, or other parts of graphics memory. The so removed mesh elements may be shifted or projected along constructor direction s towards the mesh model, in a manner to be described in more detail hereinunder, to so compose the closing off surface COS. There is no need to produce new triangles making up the closing off surface from scratch, although this may still be done, instead of or in addition to reusing such removed mesh models. Complex computational calls and / or memory commit / retrieve calls for new data can be saved, thus partly fueling the responsiveness of facilitator BSF’s operation. In addition, or instead, of so projecting the removed mesh elements, the “reuse” of the said mesh elements may relate to how hardware stores mesh data in memory. Memory space of remove mesh elements may be reused for the new ones, eg triangulated one (see next paragraph). In general, there is a fixed- size vertex buffer for vertices, and a fixed size index buffer for mesh element indices. The reuse of such removed mesh elements may entail reuse of the memory space in the 'index buffer' from mesh elements that have been removed (such as in prior iterations).
[0120] Triangulation may be used for so forming the closing-off surface COS. Another insight that helps accelerate facilitator BSF’s operation is that the opening / gap GP itself can be readily identified / defined by certain closed loops L formed by certain new mesh elements, in particular edges, that emerge as a result of the intersection operation, that is, the Boolean subtraction operation, and as is indicated in Figure 4’s top part, to which reference is now made. The view affords by Figure 4 is one along spatial axis X extending into the drawing plane of Figure 4 and as indicated by encircled “X” in the Figure.
[0121] Thus, certain of the edges e’, namely intersecting edges that are formed by intersection of the primitive CTR with the mesh CTE, form a closed loop LP it has been recognized, and this can be harnessed herein to construct the closing-off surface in an efficient manner. The lower part of Figure 4 shows more details in this connection. The intersection volume formed as a result of the Boolean subtraction gives rise to at least three categories of mesh elements. For example, there are those mesh elements ME* as illustrated in Figure 4, that are wholly outside the intersection volume, and there are those that are wholly inside it.
[0122] Those inside and outside mesh elements ME*, are of lesser concern herein and can be discarded and left out of consideration altogether. Having said that, in some embodiments, some of the inside mesh element ME*, inside the intersection volume IS, may be stored herein in the said buffer or other memory MEM, and may be, as mentioned briefly above, re-used to construct the closing-off surface COS.
[0123] It will be appreciated that the lower part of Figure 4 shows a cross sectional side elevation view of the 3D mesh model CTE, as earlier indicated in Figure 2 with the cutter model proceeding along vector s. However, this representation is for simplicity only, and not limiting of any principles described herein. Also, it may be stressed that referring to the cutter as a sphere is merely for example’s sake, and any other preferably, convex shaped cutter model, preferably of the primitive type, can be equally used herein. Reference herein to “sphere” is simply synecdochial shorthand. Thus, such reference is to be construed as a reference to any otherly shaped cutter model. Having said that, using a convex shaped primitive such as sphere, ellipsoid and the like, may be advantages when modelling for cutting tools as envisaged herein in some embodiments. The convex shape, in particular or rotational symmetry, may be well suited to represent the region of sweep or swath of the cutting tools rotational elements, such as of a milling tool or lathe.
[0124] The third category of mesh elements, shown as ME’, are the intersecting or “revenant” mesh elements as they may be referred to herein, on account of their being partially in and out (relative to the intersection volume IS) of mesh model CTE.
[0125] Two different sub-types of this revenant category of mesh elements ME’ may be distinguished by an optional logic (not shown) as indicated in Figures A), B) of Figure 5, to which reference is now made: For example, as shown in Fig 5A), there may be one category of revenant mesh elements where only one vertex is inside the intersection volume, whilst the two other vertices, shown exemplary as Vn and V13, are outside the intersection volume IS. Another such category of revenant mesh models is shown in Figure 5B) where the reverse is true in that there is only single vertex outside the intersection whilst the other two of the three vertices are situated inside. By convention, the sub-type in 5A) may be referred to herein as of the “1- revenant type” (“type 1” for short), and the sub-type in 5B) may be referred to herein as of the “2-revenant type” ("type 2” for short). However, such distinguishing by such logic into the two types 1 and 2, may not be needed, such logic being optional. In such instances, Fig 5 may be merely considered an illustration of an intersection event of the two models CTR, CTE.
[0126] The exact manner in which this sort of revenant intersection types -1 and -2 (Figs A), B) ) come about is essentially down to chance. It may be understood as the result of the specific shapes of models CTE, CTR involved, the attack vector v along which the cutter is urged forward, etc. These and other aspects may the thought of as representing, in combination, the manner in which the two models are intersecting. The intersection surface points themselves that are on both surfaces CTE, CTR are defined by intersecting lines e’. These may or may not be extant edges of the extant triangles making up the remaining mesh model. However, more often than not, the intersecting surface edges e’ may not be part of extant edges, as shown in Figures 5A) and B). As the cutter CTR may have a curved shape, the said intersecting lines e’ may not necessarily be lineal segments, but may be curved such segments. However, such curved lines e’ can be straightened if needed in approximation, eg by calculating suitably closely situated tangential line segments, by splines or other numerical techniques.
[0127] The intersecting segments e’, either curved or lines or interpolated in such lines, together form a closed loop or chain LP. It has been found that this geometric insight can be harnessed herein to implement the Boolean subtraction operation in a memory efficient and responsive manner.
[0128] For example, the loop LP, and thus the shape it outlines, can be characterized by a geometric descriptor GED, such as a centroid, or other as is indeed envisaged herein in some embodiments, and as schematically shown in bottom Figure 5C) and earlier in top part of Figure 4. This “looping” of intersecting line segments e’ allows a “compressed” description of features of the loop and affords computational efficiency downstream. The loop LP and its constituting line segments e’ may be used to construct the closing-off surface COS. More than one loop may be needed. Such loops may be disjoint or intersecting. Each of such set of loops LPj may be processed separately or in combination to form the closing off surface. Processing may be done in a single or few mesh traversal(s). As can be seen in Figs 5A), B) the interesting lines e’ may divide up extant triangles into smaller polygons. If the line e’ happen to run sufficiently close to an extant vertex, micro-polygons, such as micro-triangles, may form which is undesirable as these have been found to consume excessive computational resources. Microtriangles may require additional compute and memory and are of little, if any, actual benefit for rendering. A guardian logic GL (see further below at Figure 8), may be envisaged in some embodiments to screen for such newly formed triangles or polygons, if their area size is found below a threshold Ao. The relevant polygon is then collapsed into a vertex is such threshold is not met.
[0129] Before explaining operation of the facilitator BSF in more detail, reference is now made first to Figures 6 and 7, which show computational infrastructure that may be used herein to implement such Boolean facilitator BSF, or such computational infrastructure may define the context in which the facilitator BSF may be used.
[0130] Reference is now made to Figure 6 which shows a block diagram of such a computational infrastructure of a computing system CS as may be used herein in some computing systems. The system CS may be operable to implement at least part(s) of the Boolean subtraction facility BSF.
[0131] In more detail, the computing system CS may include data processor circuitry capable of executing instructions, in particular that corresponding or relating to the Boolean subtraction facility BSF. The computing system CS may further include memory MEM to store therein instructions, data, including intermediate and final data generated in the course of executing the said instructions. Instructions may be derived from program code for example, or some or all may be hardcoded.
[0132] In more detail, the data processor circuitry DPC may include a semiconductor chip, such as CPU (“central processing unit”), that may be used to handle data manipulation, execution of instructions, and of storing of data in memory, etc. For example, the CPU may run certain applications that may be in need of graphical support. The CPU may place a call to a graphics processor GPR, such as graphical processing unit GP (“GPU”), that can perform at least parts, or all, of the graphics pipeline GPL. The GPU may have parallel processing capabilities, that may be particularly geared for graphics processing such as vector, matrix or tensor operations such as dot products, matrix multiplication, etc. In particular, the GPU may implement some or all of the Boolean subtraction facilitator BSF. Having said that, the Boolean facilitator BSF may also be implemented in part, or wholly, by the CPU. The CPU may have a multi-core design so may also allow for some degree of parallelization. Chiplet design for GPU and / or CPU may also be considered herein. In particular, the facilitator BSF may be arranged as one or more of such chiplets.
[0133] The chipset’s data transfer / flow and other coordination tasks may be controlled or implemented by a controller arrangement CTA. The controller arrangement CTA may use a bus system BUS for data flow. This may be arranged in a north bridge NB vs south bridge SB arrangement as shown, and as in some systems, but this may not be so in all embodiments, where there is just a single bridge, a north bridge, and / or where some or all of the bridge functionalities are incorporated into any one or more of the CPU, GPU or into other devices / circuitry of the chipset.
[0134] The system CS includes (volatile) memory, such as system’s main memory MEM-S for loading into instructions and data to perform the intended task. Preferably, the system CS, may include dedicated graphics memory MEM-G which can be accessed directly by the GPU.
[0135] The GPU operates to perform computations in relation to graphics pipeline GPL and / or in particular the Boolean subtraction facility, and the graphics display may then be dispatched for view on a display device DD. Specifically, information generated by the graphics processor GPU may be used to drive video circuitry that effects display of the graphics display GD, be it a still image or a frame, or a stream of frames as is envisaged herein for dynamic scenes in embodiments.
[0136] If a north / south bridge arrangement of the controller CTA is used, this can be arranged in the north bridge NB handling data traffic between CPU, main memory and the GPU at higher transfer rates, than does the south bridge. The south bride SB handles data traffic in relation to peripheral devices or other devices, such as secondary (nonvolatile) data storage, cloud storage, etc., on which some of the data generated herein may be held or retrieved from. Such peripheral devices may include the user input interface Ul. The user input device Ul may be used by user to, possibly repeatedly, cause the cutter model CTR to be moved / repositioned as displayed in viewport of display device, thus causing the stream of graphics display frames ft as facilitated by the facilitator BSF. Such user interface Ul may include any one or more of touch screen functionality TS, a pointer tool such as computer mouse MS or stylus STY, and / or others still.
[0137] The above system CS may be used to receive and send data to and from the periphery. Memory Virtualization techniques may be used to swap in or out data from secondary memories such as hard drives or other data storage (not shown). Memory Virtualization may also be used by the graphics processor unit GPU to process larger chunks of data.
[0138] Upon receiving a call from the CPU for the handing of a graphics tasks, such as forming of a Boolean subtraction footage, the vertex buffer data may be transferred by the controller CTRA, such as the faster north bridge, into the graphics memory MEM-G for storage there and for processing by GPU. For example, the mesh elements may be so transferred, including the removed ones in connection with the intersection volume IS as explained above in lower part of Figure 4.
[0139] The chipset of system CS is preferably one of system-on-chip (SoC), where plural, or all the above components, are integrated onto a single semiconductor substrate or super-chip. However, this may not necessarily be so in all embodiments. In particular, the Boolean system facilitator may or may not be arranged as a separate module on the chip. It may be integrated as one or more software modules, suitably coded, that are loaded into the GPU for processing. But, as said, parts or all of the Boolean system facilitator may instead be performed by the general CPU of the system as needed. In addition, or instead to software implementation, parts of the whole the facilitator BSF may be arranged in hardware.
[0140] Reference is now made to Figure 7 which shows more details of the graphics pipeline or Tenderer GPL. The graphics pipeline GP may manage the mentioned vertex buffer VB, which stores the mesh elements of the original cuttee mesh model CTE and / or the parameters of the geometric primitive cutter model CTR. The cutter model CTR can be stored and processed as a geometric primitive as described above, and thus only needs very few parameters for its definition (in case of the sphere, only two: the center vector c and the radius r), as opposed to the parameters needed to store the mesh model. For instance, storing the mesh model may, in particular, require storing the parameters (in particular the spatial co-ordinates) of all the vertices that make up the model. As said earlier, the geometric primitive can be understood as a geometric locus. In some embodiments the geometric locus may be represented by a closed form analytic expression that allows rapid evaluation, for example, in order to establish whether a point is inside or outside or on the geometric primitive such as the sphere as needed. In addition, the GPU may set aside a portion of the vertex buffer to store the removed mesh elements ME*.
[0141] The Boolean subtraction system facilitator BSF may be integrated, partly or fully, into the graphics pipeline GPL. The Boolean subtraction system facilitator BSF may supply the vertices (new and / or old) that are computed or rearranged in the course of generating the closing-off surface COS. The vertices of the closing off surface COS may be stored in the vertex buffer VB or index buffer (not show) of the graphics pipeline.
[0142] Based on the vertex information in the buffer VB, including those of the closing-off surface COS, and of the input models CTR, CTE, a vertex shader VS processes the same to add attributes such as color, luminosity or any other to the respective mesh elements such as vertices, edges or faces.
[0143] An assembler AS uses the so processed output of the vertex shader to determine the final position of the vertices on the screen, for example, in the viewport of the display device DD. The virtual camera VS which determines the view on the 3D scene may be established for instance by the vertex shader, and corresponding occlusion and visibility of mesh elements may be so determined. The assembler AS may assemble vertices suitably, for example, into triplets. Furthermore, the assembler may interpolate pixel positions that are not vertices but are points on the faces of the triangles for example to assign values thereto.
[0144] A rasterizer RS may be used that is operative to establish which pixels are inside the triangle and may interpolate various variables from the vertices of each of the triangles to establish the corresponding attributes to the pixels that are not vertices.
[0145] Fragment shader FS may use texture mapping. In texture mapping, image structure is mapped onto the pixels and vertices making up the mesh elements.
[0146] The so interpolated data is then passed to a fragment shader FS that determines for example, certain attributes of the interpolated pixels such as the color, luminosity etc.
[0147] The so processed data is then passed into a frame buffer FB. The data in the frame buffer FB may then be sent to video circuitry to effect display of the frame buffer data on the graphics display in viewport of display device DD.
[0148] Other components such as the Z-buffer may be used to keep track of depth information, to so effect suitable occlusion or visibility or mesh elements or parts thereof.
[0149] Reference is now made to Figure 8 which shows a block diagram of components of the Boolean subtraction facilitator BSF as envisaged in some embodiments.
[0150] At an input interface IN, the at least two models to interact, the Cutter CTR and the Cuttee CTE, are received, the cuttee CTE being a mesh model as said, the other model CTR being a geometric primitive.
[0151] An intersection or collision event identifier module IED identifies whether the two models intersect. Such intersection event can be brought about by design, or by user using the user interface Ul to reposition one of the models across the screen, such as by moving the cutter tool model CTR into the cuttee CTE as illustrated above. Based on the intersection IS, a mesh element identifier MEI identifies mesh elements ME’ of mesh CTE that can be used to define the opening GP that emerges after removal of the intersection volume IS. Such removal may be caused by the identifier MEI upon having identified the intersecting mesh elements, and by no longer considering the surface of the cutter model that bounds the part of the intersection volume within the cuttee mesh CTE. The mesh element identifier MEI identifies one more loops LP made up from the intersecting edges / lines or other segments e’. Outside mesh elements ME0* are removed and so may be the inside mesh elements ME*. However, at least the inside mesh elements ME* may be stored in memory MEM, such as in a dedicated portion DP of the vertex buffer VB, to be used later reused to fashion new mesh element as may be needed to define the closing-off surface COS. In relation to the loop and its segments e’, identifier MEI may identify the revenant mesh elements ME’ and may distinguish their type, type 1 -revenant or type 2-revnant by using the said optional logic (as described above at Fig 5).
[0152] The closing-off surface COS is formed by the closing-off surface former COSF. The closing-off surface former OSF may retrieve some of the mesh elements ME’ that are involved in defining the loop as the intersecting, the revenant, mesh elements ME’.
[0153] A loop identifier LPI identifies the one or more loop LPs that defines the outer perimeter(s) of the opening GP, to which the closing-off surface or cap may be fitted onto.
[0154] The new mesh elements of the closing-off surface may be based on the computed geometric descriptor GED of the loop. Such may be computed by the geometric descriptor determiner GEDD as a centroid per loop LP. Thus, there is one centroid per loop and hence per gap, should the intersection event leave more than one gap.
[0155] Based on the geometric descriptor GED, the remaining new mesh elements of closing- off surface COS are triangulated by a triangulator TRG, based on the intercepting edges ME’ found to define the loop and, optionally, on the removed and stored extent mesh elements of the volume IS previously stored in memory such as in the vertex buffer VB or any other memory as needed, such as an index buffer. A mesh element retriever MER may fetch the earlier stored and removed mesh elements, that were removed as a result of removal of the intersection volume. The retrieved mesh elements are projected or shifted / translated, into place to build up the closing-off surface COS. Optionally, rotations may also be used, possibly in combination with such shifts.
[0156] Output interface OUT then passes on the new mesh model CTE’, now including the closing-off surface COS, for consumption by data consumer. The new mesh model CTE’ is a modification of the original mesh model CTE, with the intersection volume IS removed, and the opening GP closed-off by the capping / closing-off surface COS.
[0157] The so provided / output modified mesh CTE’ may then be processed, stored, or is otherwise used. For example, the modified mesh CTE’ having the closing-off surface COS may now be rendered by graphics pipeline GPL as explained above to render a frame of a graphics display stream. Specially, the modified mesh CTE’ may in turn be processed and modified as above to further adapt the surface COS, or expand same, in case the Boolean subtraction is ongoing to so generate a sequence of modified meshes CTE’, CTE”,..., CTE(m), one or more per frame ft. An event handler may be used to trigger such recomputing. The sequence of frames having each a different, modified mesh CTE(m), may be used to represent the graphics display GD as video footage or animation, CGI, or other moving picture data, etc. The processing of the above described may be applied to some or each of the frames on a per frame basis as needed to so generate animation or video footage of the Cutter model CTR cutting into the Cuttee model CTE. The cutter model CTR may or may not be displayed together with the modified cutee model CTE’, CTE(m). The cutter model CTR may be faded out to afford to user a yet better view of the cut surface that is the closing-of- surface COS. Alternatively, cutter model may be continued to be displayed, but may be renderer at a higher transparency, etc.
[0158] Thanks to the proposed facilitator BSF, the mesh model CTE has its integrity maintained at all times with the closing-off surface preventing gaps to be formed as a result of the Boolean subtraction operation as performed by the Cutter model CTR.
[0159] Other, or additional forms of consumption of the modified mesh CTE’ may include controlling, based on mesh CTE’, one or more technical devices DV. Such control operation, based on such mesh or meshes CTE’, may be via suitable API or control interface CL. For example, the control device may be a 3D printer such as in rapid prototyping. The new cuttee mesh CTE’ with closing-off surface COS may be encoded in a 3D instruction file (such as TSL format). It may be passed on by suitable interfacing, over a wired, wireless, or partly both, network connection to the 3D printer. The 3D printer may then form a physical model from one or more raw materials by additive techniques, eg in layers, or others, based in the 3D instruction file. Alternatively, in a machining or medical setting, the new cuttee mesh CTE’ may be part of control data for a robot or other equipment DV, that uses the mesh data to effect an operation, such as a cutting operation of a physical object, a work piece, by a cutter tool such as a milling tool, drill, broach, lathe, etc.
[0160] Reference is now made to Figure 9 which shows a flow chart of a method of supporting generation of a graphics display in computer graphics applications. In particular, the method that may be used to facilitate a Boolean subtraction operation in respect of at least two graphics models / objects, such as at least one mesh model and at least one geometric primitive.
[0161] Specifically, the proposed method may be considered for interaction between at least one cuttee model, which is a mesh, versus cutter model, which is primitive, such as a sphere, ellipsoid or other. The mesh may be defined by mesh elements, such as its vertices, edges, and triangles (or other polygons), while the sphere is defined by way fewer parameters, such as sphere’s center c and radius r, or corresponding other parameters for other primitives. As little as a single or two, or less than 5 parameters may be sufficient for most primitives, which usual have one or more symmetries, are convex, or have other simplifying properties. Broadly, the method identifies which vertices of the mesh lie inside the sphere. Based on these identified vertices, associated triangles of the mesh are modified. In more detail:-
[0162] At step S910, the input graphics models are received, including a mesh model, referred to herein as the cuttee model and the cutter model. Whilst so naming the at least two input models is done in view of modelling or simulating all manners and kinds cutting operations in the general sense as may encountered in engineering or the medical fields, such naming is not limiting herein, but chosen for clarity of exposition. The cuttee model may be a mesh model, and for such it may also be referred to herein, and the latter model, the cutter model, may be a geometric primitive, such as a sphere or other, preferably convex, shape. Shapes of rotational symmetry may be preferred herein for the primitive. The cuttee may have arbitrarily complex shape, possibly with irregularities: the cuttee mesh may not necessarily be convex or concave, it may or may not have any symmetry. However, both models, which are n-dim surface models, embedded in a surrounding (n+fj-dim data space (n >1), such as a vector space, are assumed to have spatial integrity, in that they have (initially) no gaps, such as holes or other openings.
[0163] The models and their position in a data space are relative to a co-ordinate system (X,Y,Z) may be the result of user input S905, for example by a suitable user interface III, to effect positional changes such as by any one or more of rotation, shifting, or a combination thereof, at at least one or more than one (eg, both) of the models. For example, the cutter may be repositioned / rotated, etc, whilst the cuttee remains stationery and fixed, although the reverse is also envisaged, such as in the simulation of lathing operations or others.
[0164] At step S920, for some or each changed position / relative distance of the model(s), it is detected whether the two models are intersecting so as to detect a collision event, also referred to herein an intersection event. Dot-prod ucti ng may be used, or evaluation of the primitive’s underlying geometric locus equation (eg, eqs (1), or (2) as above) may be used for this detection operation S920.
[0165] At step S930, an intersection volume formed by the intersection of the at least two models is removed. Such removal may be done by discarding in particular mesh elements of mesh CTE that bound the intersection model and of points that make up the cuttee model. This constitutes the Boolean subtraction. As such, this may leave a gap in the mesh model in particular, and thus may undermine its spatial integrity. The proposed method is geared to prevent such from happening and to generate or ensure a closed model CTE’ from the input mesh model, whose integrity is maintained despite having suffered a Boolean subtraction by the Cutter model CTR. Such integrity is ensured by a closing off surface being formed, details of which are now explained with reference to the following steps. In more detail:
[0166] At step S940 certain of the extent triangles of the mesh model are identified that may be used to compute the closing-off surface COS. This step may include identifying certain lineal elements, such as edges or lines, that form a closed loop across the identified mesh triangles. The edges so identified are intersections of mesh elements of the mesh that are intersected by the primitive. Two categories of intersecting mesh elements (eg triangles) may be optionally distinguished as revenant mesh elements of type 1 and type 2 as illustrated in Figs 5A) and B).
[0167] The proposed loop identification steps is geared to address one of the challenges in Boolean subtraction, which is the identification of gaps or holes that form in the mesh as a result of the subtraction. The present approach recognizes these gaps as loops of edges. These loops may be of benefit in subsequent step(s) of the proposed method, particularly for the triangulation and for the geometric descriptor (eg, centroid) computation, as will be expanded in more detail below.
[0168] At step S950 the closing-off surface COS is formed based on the identified triangles / loop. Some of the earlier discarded mesh elements (step S930 above) may be set aside, eg in vertex buffer or other memory as maintained by the graphics pipeline) and may be reused, such by shifting or projection, to help build up the closing off surface.
[0169] At step S960 the modified mesh CTE’, which is now made up from the original mesh and the formed closing-off surface COS applied thereto, is then made available for storage or further processing as needed. For example, the modified mesh ay be made available for use in rendering a graphics display, either as a still, or as a frame of CGI footage.
[0170] For example, at step S970 the modified mesh model CTE’ having the closing-off surface COS is passed to graphics pipeline for rendering visualization, based on a user defined viewing direction (virtual camera) on a 3D scene including at least the modified mesh model, for example in a viewport of a display device.
[0171] The method proceeds in the context of CGI video per frame, and the above can be repeated for each frame as received at input S910, each frame including a representation of the two models possibly with their mutual position / distance changed, either due to user interaction as per step S905, or by initial design.
[0172] The closing-off surface forming step S950 is now explained in more detail. This step may include at step S950_10 computing of geometric descriptor GED of the loop LP identified in step S940. If there are more such loops identified, some or each such loop may have its own geometric descriptor, such as its own centroid, or other.
[0173] The centroid of each identified loop may be computed in any 'one of two potential coordinate systems: a) spherical and b) cartesian. In the spherical approach, the centroid is directly computed in spherical coordinates on surface of cutter model, eg sphere. In the cartesian approach, an auxiliary centroid is determined first, eg, as a weighted average of the loop's vertices based on edge lengths. Thus, the weights may be modulated based on length of the various edges that make up the loop. The said averages of vertices may be conceptualized as respective center of mass of the vertices.
[0174] This auxiliary (eg cartesian) centroid is then projected along constructor vectors sonto the inside of surface of the cutter primitive ( eg, the sphere) that bounds the intersection volume, using a combination of the average normal of the loop's surrounding faces and the auxiliary centroid itself through, a spherical, preferably linear, interpolation technique, such as “Slerp” (spherical linear interpolation). The so projected centroid, now situated on the surface of the cutter model that bounds part of the intersection volume, is the final centroid. Use of the generic (cartesian) coordinate system may require a detour via the described projection to arrive at the centroid, whilst using the geometry aware spherical coordinate system allows construction of the centroid “on- surface”. In general, as can be seen herein, the use of the geometric descriptor allows” transferring” the geometry of the loop onto the cutter model. This allows the closing surface to be formed to inherit some geometrical characteristics of the cutter model primitive, such as its overall curvature, which informs aspects of the shape of the closing off service. Thus, the closing off surface as fashioned herein may be suitably used as a realistic, approximate, representation of a “cut surface”, as imparted by the cutter. The constructor vectors s may be defined implicitly by the manner in which the centroid is computed, such as based on edge-averaging, or other.
[0175] As to slerp, see for example K Shoemake in “Animating rotation with quaternion curves, in SIGGRAPH '85: Proceedings of the 12th annual conference on Computer graphics and interactive techniques”, July 1985, pp 245-254, https: / / doi.Org / 10.1145 / 325334.325242. Any other suitable interpolation may be used, such as splines, or other. The choice of the interpolation may harness the underlying geometry of the cutter model, and non-spherical interpolation techniques may be called for in other contexts than spherical primitives. The choice of a symmetry of the coordinate system at a) above may also correspond to the geometric symmetry of cutter model primitive, and may differ from being spherical, if the cutter is not a sphere, but, say, a cylinder, in which case a cylindrical coordinate system may be used instead. Thus, the geometric descriptor computing step may be geometry-aware as may other be other steps of the proposed method.
[0176] In one scenario, the method step S950_10 may include flipping the centroid of the loop, to ensure centroid is situated on the desired side of the average normal for the loop. Dot-prod ucti ng may be used for this. This flipping may be needed to resolve an ambiguity: given the loop, as such, the centroid may be placed either side, popping 'inward' (canyon-type) or 'outward' (mountain-type). The flipping may ensure the centroid is generally moved towards the mesh element CTE.
[0177] Based on the loops and extant mesh elements, such as triangles, a triangulation at step S950_20 may be performed to triangulate with new triangles (mesh elements) in order to so close the gap(s), thus arriving at the closing of surface. In more detail, based on the centroid per loop as computed in step S950_10 above, the identified holes or gaps in the mesh are triangulated to restore the integrity of the mesh. This may be achieved by generating a series of polygonal (eg, triangle) strips that extend towards the centroid or other geometric descriptor from the loop. Preferably, for efficiency, vertices across triangles are shared during the triangulation process. This ensures that the mesh remains closed and continuous, preventing any unwanted gaps or inconsistencies from emerging.
[0178] There may be plural such closing-off surfaces formed in step S950, one for each loop if there are more than one gap GP. Other numerical interpolation methods, instead of triangulation, may also be used in some embodiments.
[0179] It may be understood that the intersection operation caused by the Boolean subtraction may not necessarily result in one opening, but in plural openings not necessarily topologically connected. Thus, the above loop identification at step S940 for the triangles to be modified may thus include identifying multiple such loops across the mesh and each is processed accordingly as described herein. However, in other, simpler embodiments, the gap is indeed topologically connected and a single such loop may be sufficient in such circumstances although, again, for a single opening left as a result of the Boolean subtraction, multiple loops can still be used pieced together to implement step S940.
[0180] Whilst in the above reference has been made to the gap GP emerging as a result of the Boolean subtraction, such gap may be considered conceptual as it may not become apparent to the user, and indeed specification of such gap may not be output at no stage during the processing with the closing-off surface applied immediately. However, if needed, such a rendering of the mesh model without the capped gap may also be made available if needed for display or other processing as required. Thus, data in relation to mesh-integrity-compromising gap resulting from the Boolean subtraction may reside as data in memory or buffer, such as intermediate data, not necessarily output or apparent to the user for example during the visualization. Thus, in terms of user experience, there is visual impression of a smooth dynamic process where the closing-off surface appears in effect in real time upon as user effecting moving the Cutter CTR into the Cuttee CTE.
[0181] Lastly, reference is made to Figure 10 which shows a perspective visualization of the above-described Boolean subtraction operation. The user interface Ul controls position of a spheroidal cutter model, cutting into cuttee mesh model that represents part of a patient’s hip bone. The user interface Ul may also include a view selector VS that allows selecting virtual camera view on the 3D scene which can be changed in real time dynamically either separately or together with repositioning of the Cutter model CTR. Whilst rendering of the triangular mesh elements (edges and vertices) visible is shown in Figure 10, this is not a necessity herein, and can be done without.
[0182] As a refinement, the method may use micro-polygon (eg, micro-triangle) elimination as a guardian step S940_10 to ward off overly complex computations of such micro- . polygons that would yield very little, if any, benefit. In certain scenarios, the Boolean subtraction can result in the formation of such micro-triangles for example. These are small triangles, smaller than a given area size threshold Ao, that can introduce noise or unwanted artifacts in the mesh. The present system BSF may provide as an option a mechanism to eliminate these micro-triangles by replacing them with a single vertex, if a new triangle, or other polygon, has an area size that drops under Ao.
[0183] As a yet further refinement, vertex pooling S930_10 may be used. This allows optimizing memory usage and performance. The method may maintain a pool of eliminated vertices from removed triangles. Memory allocation space, eg indices in index buffer, of these vertices can be reused during the triangulation process, ensuring efficient memory utilization and reducing the need for frequent memory allocations.
[0184] The proposed method is able to operate in real-time. This ensures, for the user, immediate feedback during mesh modifications, making it particularly useful for applications that require instantaneous results, such as medical simulations or in other time critical applications.
[0185] The method may utilize standard mesh data, specifically a vertex buffer and / or an index buffer (not shown). This simplicity in data structure ensures compatibility with a wide range of applications and platforms. Additionally, the method can be accelerated using GPU compute capabilities, further enhancing its real-time performance. The method can also employ acceleration data structures to enhance its speed and responsiveness.
[0186] The present method provides a robust, efficient, and real-time method for performing Boolean subtraction of a sphere from a mesh. Its ability to handle complex mesh structures, combined with its real-time performance and memory optimization features, makes it a valuable tool for a wide range of applications.
[0187] The following include snippets of pseudocode, on how to carry the above steps into practice in some non-limiting embodiments. Thus, the pseudocode is for illustration of the general principles described hereinabove, and shall not be construed so as to limit such general principles of Boolean Subtraction facilitation disclosed herein. A host of alternative code formulations toward the same end are also envisaged herein in embodiments:-
[0188] Overall Alqorithm:-
[0189] Alqorithm SphereMeshSubtraction:
[0190] Input: Mesh (vertices, triangles) , Sphere (center, radius)
[0191] 1. Initialize empty lists for newVertices, newTriangles, loopEdges, and loopEdgeNormals .
[0192] 2. For each triangle in Mesh: a. Determine the number of vertices inside the Sphere. b. If all vertices are inside:
[0193] - Skip this triangle. c. If one vertex is inside:
[0194] - Find the intersection points of the edges with the Sphere .
[0195] - Modify the triangle using the intersection points.
[0196] - Add the modified triangle to newTriangles. d. If two vertices are inside:
[0197] - Find the intersection points of the edges with the Sphere .
[0198] - Modify the triangle using the intersection points.
[0199] - Add the modified triangle to newTriangles.
[0200] - Add the edge of the triangle that's on the Sphere's surface to loopEdges .
[0201] 3. If there are loopEdges (indicating holes in the mesh) : a. While there are loopEdges: i. Identify a continuous loop of edges from loopEdges. ii. Compute the centroid of the loop based on vertex positions and normals. iii. Triangulate the hole using the centroid and the loop of edges . iv. Add the new triangles to newTriangles.
[0202] 4. Update Mesh with newVertices and newTriangles . 5. Return the modified Mesh.
[0203] Triangulating the Mesh:
[0204] Given a loop of edges (which forms a hole in the mesh) and a centroid, the hole can be triangulated by creating a series of strips towards the centroid, ensuring vertices are shared across triangles.
[0205] Function TriangulateHole:
[0206] Input: loopEdges (a list of vertices forming a loop) , centroid
[0207] Output: List of triangles
[0208] 1. Initialize an empty list for newTriangles .
[0209] 2. Initialize a dictionary fanVertex for storing vertices of the strips .
[0210] 3. For each pair of vertices VI, V2 in loopEdges: a. If VI is not in fanVertex: i. Create a strip of vertices between VI and centroid. ii. Store the strip in fanVertex with VI as the key. b. If V2 is not in fanVertex: i. Create a strip of vertices between V2 and centroid. ii. Store the strip in fanVertex with V2 as the key.
[0211] 4. For each pair of vertices VI, V2 in loopEdges: a. Retrieve the strips for VI and V2 from fanVertex. b. Generate triangles using the strips and the centroid, ensuring vertices are shared across triangles. c. Add the triangles to newTriangles.
[0212] 5. Return newTriangles .
[0213] Creating a Strip of Vertices
[0214] This function creates a strip of vertices between a vertex from the loop and the centroid.
[0215] Function CreateStrip:
[0216] Input: Vertex V, centroid, capSegments (number of segments in the strip)
[0217] Output: List of vertices forming the strip 1. Initialize an empty list stripvertices.
[0218] 2. Add V to stripvertices .
[0219] 3. For i from 1 to capSegments - 1: a. Compute the position of the new vertex as a weighted average of V and centroid based on i and capSegments . b. Add the new vertex to stripvertices.
[0220] 4. Return stripvertices .
[0221] Centroid Calculation:
[0222] The centroid of a loop of vertices can be computed as a weighted average of the loop's vertices. The weights can be based on the lengths of the edges or other criteria.
[0223] Function ComputeCentroid:
[0224] Input: loopEdges (a list of vertices forming a loop) , loopNormals (a list of normals for each edge in the loop) , sphereCenter, sphereRadius
[0225] Output: Centroid position
[0226] 1. Initialize a vector sumPosition to (0, 0, 0) .
[0227] 2. Initialize a vector accumulatedNormal to (0, 0, 0) .
[0228] 3. Initialize totalweight to 0.
[0229] 2. For each pair of vertices VI, V2 in loopEdges: a. Compute the mid-point of the edge formed by VI and V2. b. Compute the weight as the distance between VI and V2 (edge length) . c. Add the weighted mid-point to sumPosition. d. Add the normal corresponding to the edge to accumulatedNormal . e. Add the weight to totalweight.
[0230] 3. Compute the cartesian centroid as sumPosition / totalweight .
[0231] 4. Compute the average normal as accumulatedNormal normalized.
[0232] 5. Compute the ratio as the magnitude of the cartesian centroid divided by sphereRadius .
[0233] 6. Use Slerp to interpolate between the average normal and the normalized cartesian centroid based on the ratio.
[0234] 7. Adjust the result by the sphereRadius and add the sphereCenter to get the final centroid position.
[0235] 8. Return Centroid. As in the remaining disclosure, in the above pseudocode snippets, any reference to “sphere”, “spherical”, “triangle”, “centroid”, etc, is for illustration only and not limiting. As said, non-spherical cutter primitives are not excluded herein, as are non-triangular meshes. Also, centroid are merely one example of a form of average computation that is capable of capturing geometric, in particular shape, information of the loop. Computing other than centroids to capture such symmetry is also envisaged herein.
[0236] It should be noted that embodiments of the invention are described with reference to different subject matters. In particular, some embodiments are described with reference to method type claims whereas other embodiments are described with reference to the device type claims. However, a person skilled in the art will gather from the above description that, unless otherwise notified, in addition to any combination of features belonging to one type of subject matter also any combination between features relating to different subject matters is considered to be disclosed with this application. However, all features can be combined providing synergetic effects that are more than the simple summation of the features.
[0237] While the invention has been illustrated and described in detail in the drawings and foregoing description, such illustration and description are to be considered illustrative or exemplary and limiting. The invention is not limited to the disclosed embodiments. Other variations of the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed invention, from a study of the drawings, the disclosure, and the dependent claims.
[0238] In the claims, the word “comprising” does not exclude other elements or steps, and the indefinite article “a” or “an” does not exclude a plurality. A single processor or other unit may fulfill the functions of several items re-cited in the claims. The mere fact that certain measures are re-cited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage. Any reference signs in the claims, be they numerical, alphanumerical, or a combination of one or more (capital) letters, should not be construed as limiting the scope.
[0239] The above description, while indicating preferred embodiments of the invention, is given by way of illustration only. Various changes and modifications within the spirit and scope of the invention will become apparent to those skilled in the art from this detailed description.
Claims
CLAIMS1 . A computer graphics facilitator system (BSF) capable of facilitating Boolean subtraction between at least two 3D surface models of a 3D data space, referred to herein as the first model (M, CTE) and at least one second model (S, CTR), the models resideable in at least one computer memory, the system capable to: d) remove an intersection portion between the two models from one of the models, referred to herein as the first model (M, CTE), the first model (M, CTE) being a mesh model, thereby leaving at least one opening in the said first model, e) identify the at least one opening (GP) so formed as at least one loop (LP) based on extant mesh elements of the first model, and f) at least partly close-off the said at least one opening by forming a closing-off surface (COS) from new mesh elements based on at least one or more of the, or at least one other, extant mesh elements of the first model (M, CTE).
2. The System of claim 1 , further comprising a Tenderer (GPL) capable of rendering at least the first model (M, CTE) now having the closing-off surface in a 3D graphics display (GD) for displaying on a display device (DD).
3. The System of claim 1 or 2, further comprising a user interface (Ul), capable of allowing user to change a mutual position of the said models.
4. The System of any one of the preceding claims, wherein the at least one other model, referred to herein as the second model (S, CTR), is a geometric primitive.
5. The System of any one of the preceding claims, wherein the system is to so form the closing-off surface based on one or more mesh elements part of the removed intersection portion.
6. The System of claim 5, comprising a buffer (MEM, VB) for storing one of more such mesh elements for reuse of same in forming the closing-off surface.
7. The System of any one of the preceding claims, wherein the system is to so form the closing-off surface based on triangulation from extant or new mesh elements.
8. The System of any one of the preceding claims, wherein the system in so forming the closing-off surface to modify at least one of the extant mesh elements.
9. The System of claim 8, wherein the system, when such modification results in a micro-mesh element, to replace same by a single such mesh element, wherein a micro-mesh element is one whose area size is below a pre-defined threshold.
10. The System of any one of the preceding claims, wherein the forming of the closing-off surface by the system is based on computing a centroid (GED) in respect of the said at least one loop.11 . The System of any one of the preceding claims, wherein the forming of the closing-off surface (COS) by the system is based on projecting the said centroid on the second model (M, CTR).
12. A computing arrangement (CA) comprising any one of more of the following: i) the system of any one of the preceding claims, ii) the at least one or more memories, ii) a computer graphics pipeline (GPL), iii) at least one or more processors (PR) or chipset capable of implementing the system of any one of the preceding claims, iv) the controlled device.
13. The computing arrangement of claim 12, wherein the system is at least partly included in the computer graphics pipeline (GPL).
14. A computing-implemented method for facilitating Boolean subtraction between at least two 3D surface models of a 3D data space, referred to herein as the first model (MN, CTE) and at least one second model (SN, CTR), the models resideable in at least one computer memory, the method comprising:removing (S930) an intersection portion between the two models from one of the models, referred to herein as the first model (MN, CTE), the first model (SB, CTR) being a mesh model, thereby leaving at least one opening in the said first model, identifying (S940) at least one opening so formed as at least one loop based on extant mesh elements of the first model, and closing-off (S950) the said at least one opening by forming a closing-off surface from new mesh elements based on at least one or more of the, or at least one other, extant mesh elements of the first model.
15. A program which, when running on a computer or when loaded onto a computer, causes the computer to perform the method steps of the method according to claim 14; and / or a program storage medium on which the program is stored; and / or a computer comprising at least one processor and a memory and / or the program storage medium, wherein the program is running on the computer or loaded into the memory of the computer; and / or a signal wave or a digital signal wave, carrying information which represents the program; and / or a data stream which is representative of the program.