The present disclosure relates to a system and method for generating an outer layer representation of a three-dimensional representation of an object.
Three-dimensional (3d) representations of objects are used in many different fields. For instance, 3d representations of objects are used to design parts and for performing analytical applications such as safety testing, vibration analysis, and computational fluid dynamics analysis. 3d representations of an object are typically comprised of millions or tens of millions of triangles, where each triangle can be represented by 3 vertices, having three coordinates apiece. Each coordinate is typically represented by a floating point decimal, which is typically represented by 24 bits. Thus, a 3d representation of an object that is comprised of 10,000,000 triangles can take up to 2 GB to represent. In applications that require complex computations to analyze the motion of the object, the computational resources that are required to handle a 2 GB 3d representation of an object are great. For example, a complex vibration analysis performed on a 3d representation of an engine may take up to 70 hours to execute on multiple processors. Thus, there is a need for an efficient manner to represent a 3d representation of an object.
Further, in the supply chain environment, it is common place for a product manufacturer to outsource the production of ancillary components, e.g., widgets such as hoses, screws, and clips, to a third party. The manufacturer will typically send a CAD design of an object to a third party, so that the third party can design an ancillary component therefor. The design of the primary component, however, may contain representations of internal components that are not meant for the third party's viewing. By providing a full CAD design of the primary product to the third party, the third party can inspect the internal components of the primary product. Thus, there is a need for an efficient manner for rendering an outer layer of a 3d representation of an object.
In one aspect of the disclosure, a method for generating a representation of an outer layer of a three-dimensional object is disclosed. The object is represented by a plurality of two-dimensional triangles. The method comprises receiving the plurality of two-dimensional triangles representing the object and determining a three-dimensional bounding box having dimensions sufficient to encapsulate the object. The bounding box being is comprised of a plurality of voxels. The method further includes determining an intersecting set of voxels from the plurality of voxels. Each member of the intersecting set of voxels intersects with at least one triangle of the plurality of triangles. The method further comprises determining an outer set of voxels from the intersecting set. Each member of the outer set of voxels shares a face with a voxel that is not a member of the intersecting set of voxels. The method also includes determining an outer layer set of triangles from the plurality of triangles, the outer layer set of triangles being comprised of triangles that have three vertices that intersect the outer set of voxels.
In another aspect of the disclosure, a system for generating a representation of an outer layer of a three-dimensional object is disclosed. The object is represented by a plurality of two-dimensional triangles. The system comprises a bounding box determination module that receives the plurality of two-dimensional triangles representing the object and that determines a three-dimensional bounding box having dimensions sufficient to encapsulate the object, the bounding box being comprised of a plurality of voxels. The system further comprises an object-to-voxel module that determines an intersecting set of voxels from the plurality of voxels. Each member of the intersecting set of voxels intersects with at least one triangle of the plurality of triangles. The system further includes an outer layer determination module that determines an outer set of voxels from the intersecting set of voxels. Each member of the outer set of voxels shares a face with a voxel that is not a member of the intersecting set of voxels. The outer layer determination module further determines an outer layer set of triangles from the plurality of triangles, the outer layer set of triangles being comprised of triangles that have at least one vertex that intersect the outer set of voxels.
Further areas of applicability of the teachings of the present disclosure will become apparent from the detailed description and the drawings provided hereinafter. It should be understood that the detailed description, including disclosed embodiments and drawings referenced therein, are merely exemplary in nature intended for purposes of illustration only and are not intended to limit the scope of the present disclosure, its application or uses. Thus, variations that do not depart from the gist of the present disclosure are intended to be within the scope of the present disclosure.
The description herein makes reference to the accompanying drawings where the reference numerals refer to like features throughout the several views.
The present disclosure relates to a system and method for rendering an outer layer of a 3d representation of an object. The outer layer can be thought of as a skin of the object. The outer layer of a 3d representation of the object can be used in lieu of the 3d representation of the object in many applications.
Referring to
A 3d representation of an object is generated using a plurality of triangles. Each component 102, 104, or 106 is comprised of thousands or millions of triangles, which form the entire object, including wholly contained portions of the object.
A triangle can be represented by three vertices, where each vertex defines a point in a space or a point in relation to the other triangles. Thus, each vertex in a 3d representation may include 3 values, i.e., an x-value, a y-value, and a z-value. For example only, a triangle can be represented by the following data structure:
As can be appreciated, each vertex is represented by a floating point decimal to provide an accurate representation of the object. It is appreciated that the triangle does not need to be represented by floating point decimals, and can be represented by other variable types as well. But for purposes of example, an exemplary floating point decimal may be represented by a predetermined amount of bits, e.g., 48 bits. Thus, for each vertex, 144 bits may be used to represent the vertex and 432 bits to represent the triangle. In a complex object, such as a vehicle engine, the complex object may be represented by 10,000,000 triangles, which is approximately 4 GB. As mentioned, many analytical computations may require iterative rendering of these complex objects. Thus, the amounts of computational resources to perform these computations can become very large.
The bounding box determination module 202 receives a 3d representation 100 of an object from an object source. The object source may be a user or another application. The bounding box determination module 202 will determine a bounding box that fits around the object.
The bounding box is divided into a plurality of voxels, e.g. voxel 302 and voxel 304. A voxel is a volumetric pixel, or a 3d pixel. The bounding box 300 has i voxels spanning the width of the bounding box 300, j voxels spanning the height of the bounding box 300, and k voxels spanning the depth of the bounding box 300. Thus, the bounding box 300 is comprised of i×j×k voxels. The voxels can represent a predetermined amount space. For instance, one voxel may represent a 2 mm×2 mm×2 mm space. It is appreciated that because the voxels are located a predetermined location and are of predetermined size, the voxels can be represented by a single point representing a predetermined location, e.g., the top front left corner of the voxel or the center point of the voxel. In some embodiments, a voxel is represented by a data structure that includes a reference vertex and a state variable indicating a state of the voxel. As will be discussed below, the state variable can be used to identify whether the corresponding voxel is intersected by the 3d representation of the object, whether the voxel is an outer layer of a voxel representation of the 3d representation of the object, or whether the voxel is a non-intersecting voxel. Initially, the voxels all have a default value, e.g., 0. The default value indicates that the corresponding voxel has not yet been determined to be in the intersecting voxels, either because it is not an intersecting voxel, or the voxel has not yet been analyzed. The voxel may also include an array of pointers that point to the neighboring voxels. Each element in the array would point to the voxel that shares a particular face with the voxel. Thus, the array would include 6 pointers, one pointer for each face of the voxel. An exemplary voxel data structure is provided below:
It is appreciated that other data structures may be used in place of the foregoing. For instance, a data structure may not include a neighbor array. Rather, neighbors of a voxel can be referenced by incrementing or decrementing one of the x, y, or z values in start_point. For example, where a voxel has an upper, left, front corner at 4,4,4 and each voxel is 2×2×2 in volume, neighboring voxels can be determined by adding two or subtracting two from one of the x, y, or z values of the voxel. Thus, in this example, the upper neighbor (assuming the z direction is up) would have an upper, left, front corner at 4, 4, 6 and the lower neighbor would have an upper, left, front corner at 4, 4, 2.
The bounding box determination module 202 is further configured to embed the object into the bounding box 300.
Referring back to
Referring to
Referring back to
Once the voxel representation of the object has been determined, the outer layer determination module 206 receives the voxel representation of the object and determines a set of triangles comprising the outer layer of the 3d representation of the object, e.g., the skin of the object. As an intermediate step, the outer layer determination module 206 may determine an outer set of voxels, where a member of the outer set of voxels shares at least one face with a non-intersecting voxel. A non-intersecting voxel is a voxel that does not intersect the 3d representation of an object and, therefore, is not in the voxel representation of the object, i.e., a voxel having a state variable equal to the default value. The outer layer determination module 206 then determines which triangles have three vertices residing in the outer set of voxels. If a triangle has all three vertices in one or more voxels in the outer set of voxels, then the triangle is included in the outer layer set of triangles, i.e., the skin of the object. The outer layer set of triangles can then be stored in the outer layer datastore 208, can be used by a testing module, or can be provided to a third party.
Upon receiving the 3d representation of the object, the bounding box determination module 202 will determine a bounding box for the 3d representation of the object, as shown at step 604. In some embodiments, the bounding box determination module 202 will determine the minimum and maximum x-values, y-values, and z-values in the entire set of triangles. For example, the bounding box determination module 202 can sort the x-components of each vertex of each triangle, the y-components of each vertex of each triangle, and the z-components of each vertex of each triangle. The maximum value and the minimum value of each set of components would define the maximum and minimum x, y, and z values of the bounding box. Further, in some embodiments, the bounding box determination module 202 can add an extra layer of voxels around the bounding box, such that the representation of the object does not intersect any of the voxels located at the outer edge of the bounding box 300.
The bounding box determination module 202 further defines the voxels of the bounding box. The size of each voxel with respect to the object can be defined by a user. The bounding box determination module 202 initializes the state variable value of each voxel to the default value, e.g., 0.
The bounding box determination module 202 may also embed the 3d representation of the object into the bounding box, as also shown at step 604. The term embed is used broadly, as the bounding box determination module 202 may simply adjust the values of the coordinates of the voxels to ensure that all of the triangles of the 3d representation of the object are contained within the domain of the bounding box 300.
Once the bounding box determination module 202 has determined a suitable bounding box for the 3d representation of the object, the object-to-voxel module 204 determines an intersecting set of voxels, as shown at step 606. A member of the intersecting set of voxels includes at least one vertex or edge of at least one triangle from the 3d representation of the object. Thus, the object-to-voxel module 204 can analyze each voxel to determine if at least one vertex of any triangle in the 3d representation is located in the voxel. If so, the state variable value of the voxel is changed to a first value, e.g., 1. Alternatively, the object-to-voxel module 204 can analyze each triangle and determine which voxel or voxels the triangle resides in. If the triangle is located within a particular voxel, the object-to-voxel module 204 adjusts the state variable value of the particular voxel to indicate the intersection. It is appreciated that the intersecting set of voxels can be used as a voxel representation of the object, as the intersecting voxels take up approximately the same area as the 3d representation of the object. It is noted, however, that the voxel representation of the object is not as smooth as the 3d representation when observed from a high resolution.
After the intersecting set of voxels has been determined, the outer layer determination module 206 determines an outer set of voxels. A voxel in the outer set of voxels has at least one face in common with a non-intersecting voxel, e.g., the voxel neighbors another voxel having the default value as the state variable value. That is—the outer set of voxels are the outermost voxels in the voxel representation of the object. It is appreciated that any suitable means for determining the outer set of voxels can be used.
The outer layer determination module 206 will iteratively check the state variable value of each voxel neighboring each face of a current voxel. Thus, a face variable is initially set to 0, as shown at step 704. The face variable indicates a face of the current voxel that is to be analyzed in the coming iteration.
At step 706, the outer layer determination module 206 dequeues a voxel from the check voxel queue. The dequeued voxel is the current voxel, i.e., the voxel to be analyzed.
The outer layer determination module 206 checks the state values of the voxels neighboring the current voxel, as shown at step 708. Thus, the outer layer determination module 206 will read the state variable value of the voxel pointed to by neighbor[face]. If the state variable value of the voxel pointed to by neighboring[face] is equal to 0, the neighboring voxel is inserted into the check voxel queue, as shown at step 712. The state value of the neighboring value can be set to a value indicating that the voxel has been analyzed once and has been inserted into the check voxel queue. For example, the state value of the neighboring voxel may be set to −1, thereby indicating that the voxel has been checked.
If the state variable value of the voxel pointed to by neighbor[face] is not equal to 0, i.e. −1, 1 or 2, the outer layer determination module 306 determines whether the voxel has previously been checked. The outer layer determination module 306 checks the value of the voxel pointed to by neighbor[face], as shown at step 709. If the value of the voxel pointed to by neighbor[face] is equal to 1, i.e., the voxel has not been analyzed but is a member of the intersecting set of voxels, the state value of the voxel is changed to 2, thereby indicating that the voxel is a member of the outer layer of voxels. If the state variable value of the voxel pointed to by neighbor[face] is equal to −1 or 2, the voxel has already been analyzed and is hence, disregarded.
Once the neighbor referenced at neighbor[face] of the current voxel has been analyzed, the outer layer determination module 206 will determine whether all the faces of the current voxel have been analyzed, as shown at step 714. If not all of the neighboring faces have been analyzed, the face variable is incremented, as shown at step 716, and the outer layer determination module 206 analyzes the next face of the current voxel, as shown at step 708. If, however, all of the faces of the current voxel have been analyzed, then the outer layer determination module 206 checks the contents of the check voxel queue to determine if there are more voxels to analyze. If the check voxel queue is not empty, the outer layer determination module 206 resets the face variable and obtains the next voxel in the check voxel queue, as shown at steps 704 and 706. If no more voxels remain in the check voxel queue, the outer layer determination module 206 assumes that all of the non-intersecting voxels have been checked. It is appreciated that the following assumption holds true if the bounding box includes an outer layer of voxels that are all non-intersecting voxels. It is appreciated that the method may be altered to ensure that non-intersecting voxels have been analyzed.
It is appreciated that the foregoing method is provided for example only. Alternative methods for determining an outer layer of voxels can be used in place of the foregoing method. Further, the steps of the method can be altered, and some steps described above can be performed in multiple steps.
Once the outer layer determination module 206 has executed the foregoing method or an equivalent thereof, the outer layer determination module 206 has determined an outer set of voxels.
Referring back to
Once all of the triangles have been analyzed, the method stops executing. The triangles included in the outer layer set of triangles makes up the outer layer of the 3d representation, or the “skin” of the object. It is appreciated that the outer layer can be stored in the outer layer datastore 208.
The outer layer can also be used to provide a representation of an object to a third party manufacturer without divulging the interior components of the object to the third party. For example, an engine manufacturer may outsource the production of widgets for a particular engine to a third party manufacturer. The engine manufacturer may wish to provide the third party manufacturer with a 3d CAD representation of the engine so that the third party can design the customized widgets to fit the engine. The engine manufacturer, however, may not wish to divulge the internal components of the engine to the third party manufacturer. Thus, the engine manufacturer can generate an outer layer of the 3d CAD representation of the engine, as described above, and can provide the outer layer to the third party manufacturer.
The outer layer of an object can also be used by analysis applications. For example, the outer layer can be used to perform vibration analysis on an object. Vibration analysis is performed when designing objects that are expected to vibrate over extended period of time. For instance, vibration analysis is performed on representations of components of a vehicle.
In some embodiments, the vibration analysis engine will calculate the position of the outer layer of the object at each time instance between t=1 and t=T. After each iteration, the position information of the outer layer, i.e., the position of each triangle represented by the vertices of each triangle, can be combined with the previous position information from the previous calculations. This set can be thought of as the union of the position information for each iteration, which will be referred to as the union set. Once the T iterations have been performed, a new bounding box can be determined, such that the new bounding box represents the range of values of the entire union set. The new bounding box can be determined in the manner described above. The union set of triangles is then used to determine a voxel representation of the union set. That is, the union set of triangles is embedded in the new bounding box and an intersecting set of voxels is determined for the embedded union set, as described above. From the intersecting set of voxels, the outer layer of the union set can be calculated in the manner described above. The outer layer of the union set describes the vibration volume of the object. The vibration volume is the total space that is used during the vibration period. It is appreciated that other types of vibration analysis can be performed using the outer layer of the object.
As used herein, the term module may refer to, be part of, or include an Application Specific Integrated Circuit (ASIC); an electronic circuit; a combinational logic circuit; a field programmable gate array (FPGA); a processor (shared, dedicated, or group) that executes code, or a process executed by a distributed network of processors and storage in networked clusters or datacenters; other suitable components that provide the described functionality; or a combination of some or all of the above, such as in a system-on-chip. The term module may include memory (shared, dedicated, or group) that stores code executed by the one or more processors.
The term code, as used above, may include software, firmware, bytecode and/or microcode, and may refer to programs, routines, functions, classes, and/or objects. The term shared, as used above, means that some or all code from multiple modules may be executed using a single (shared) processor. In addition, some or all code from multiple modules may be stored by a single (shared) memory. The term group, as used above, means that some or all code from a single module may be executed using a group of processors. In addition, some or all code from a single module may be stored using a group of memories.
The apparatuses and methods described herein may be implemented by one or more computer programs executed by one or more processors. The computer programs include processor-executable instructions that are stored on a non-transitory tangible computer readable medium. The computer programs may also include stored data. Non-limiting examples of the non-transitory tangible computer readable medium are nonvolatile memory, magnetic storage, and optical storage.
This application claims the benefit of U.S. Provisional Ser. No. 61/584,408, filed Jan. 9, 2012.
Number | Date | Country | |
---|---|---|---|
61584408 | Jan 2012 | US |