This invention relates to a 3D mesh model, a method for creating a 3D mesh model, and a computer-based system for displaying an image of a 3D object.
This section is intended to introduce the reader to various aspects of art, which may be related to various aspects of the present invention that are described and/or claimed below. This discussion is believed to be helpful in providing the reader with background information to facilitate a better understanding of the various aspects of the present invention. Accordingly, it should be understood that these statements are to be read in this light, and not as admissions of prior art.
Repetitive patterns are ubiquitous in both nature and man-made artefacts. The discovery of repetitive patterns is an important tool for numerous 3D model processing applications. For example, 3D model compression algorithms that exploit repetitive patterns yield a significant improvement in the compression ratio. Although there are several works for discovering the repetitive patterns, discovering repetitive patterns without pre-knowledge is still difficult. On the other hand, instancing, which is similar to “copy and paste”, is frequently used when making 3D models with 3D modelling software tools, such as “3Ds Max” and “Maya”. Instancing saves lots of tedious work, as a scene or an object often has many identical or very similar parts. Thus, it would be desirable to store necessary information of instancing operations, i.e. the “pattern-instance” relationship, together with the 3D model data, so that a repetitive pattern discovery is much easier. This would highly improve the efficiency of 3D model processing algorithms for compression. However, common 3D modelling software tools can record only very limited instancing information while creating a 3D model. For example, the instancing information can only be preserved when the instances of a model are not changed after being created. In the following, the terms “3D model” and “3D object” are used as equivalents. The term “3D mesh models” denotes a sub-type thereof.
The present invention solves at least the above-mentioned problems, and enables simplified and improved compression of 3D models by using a pattern-instance record table, which provides the pattern-instance relationship for all instances of repetitive patterns within a 3D object.
According to the invention, in one aspect a pattern-instance record table (PIRT) records the “pattern-instance” information, i.e. all information about model instancing operations during the whole modelling process. An accompany file recording the “pattern-instance” information is maintained during the modelling process. When an instance model is created, a new “pattern-instance” record is inserted into the accompany file, which includes the transformation information between the corresponding pattern model and the actual instance model. The record can be changed later when an operation is applied on the pattern and instance model.
In one aspect, the invention relates to a 3D mesh model stored in an electronic storage device and comprising data of at least one first reference 3D mesh model, an electronic pattern-instance record table comprising first and second instance data, wherein the first instance data comprise a pointer to the first reference 3D mesh model, first position data, first orientation data and first scaling data, and the second instance data comprise a pointer to the first or a further reference 3D mesh model, second position data, second orientation data and second scaling data, and said electronic pattern-instance record table further comprising an instance record for third instance data of at least one secondary 3D mesh model instance, wherein the third instance data comprise said first and second instance data, or comprise references to said first and second instance data. The first and second instance data have no separate instance record in the pattern-instance record table, since their previous records have been deleted.
In another aspect, the invention relates to a method for creating a 3D mesh model, comprising steps of storing on an electronic storage device shape data of one or more first reference 3D mesh models, storing in an electronic pattern-instance record table (PIRT) on the electronic storage device a first instance data record and a second instance data record that define at least two instances of the one or more first reference 3D mesh models, wherein each of the first and the second instance data records comprises a reference to one of the first reference 3D mesh models, position data, orientation data and scaling data, and wherein the first instance and the second instance become visible on a display, storing in said electronic pattern-instance record table a third instance data record for at least one third 3D mesh model, wherein the third 3D mesh model comprises data of said first and second instance data records, or copies thereof. The method further comprises a step of deleting in said electronic pattern-instance record table the first and second instance data record, wherein the display remains unchanged. The first instance of the at least two instances can be an Initial instance and have default position data, default orientation data and default scaling data.
In a further aspect, the invention relates to a computer readable medium having executable instructions to cause a computer to perform a method comprising steps of storing on an electronic storage device shape data of one or more first reference 3D mesh models, storing in an electronic pattern-instance record table on the electronic storage device a first instance data record and a second instance data record that define at least two instances of the one or more first reference 3D mesh models, wherein each of the first and the second instance data records comprises a reference to one of the first reference 3D mesh models, position data, orientation data and scaling data, and wherein the first instance and the second instance may become visible on a display, storing in said electronic pattern-instance record table a third instance data record for at least one third 3D mesh model, wherein the third 3D mesh model comprises data of said first and second instance data records, or copies thereof, and deleting in said electronic pattern-instance record table the first and second instance data record. A first instance of the at least two instances may be an initial instance and may have default position data, default orientation data and default scaling data. During the storing and deleting steps, the display remains unchanged.
In yet another aspect, the invention relates to a computer-based system for displaying an image of a 3D object, the system comprising an electronic storage device having stored a set of data points being shape data of one or more first reference 3D objects, and having stored an electronic pattern-instance record table comprising a first data record that defines an object comprising at least two instances of the one or more first reference 3D objects, wherein the first data record comprises references to at least one of the first reference 3D objects, and wherein the first data record comprises for each of the at least two instances of the one or more first reference 3D objects position data, orientation data and scaling data, and wherein the first instance and the second instance are visible on a display, and a processing element for processing said first data record, including said shape data, to obtain said image of a 3D object on a display. The system may include one or more processing elements for performing steps as described above.
Advantageous embodiments of the invention are disclosed in the dependent claims, the following description and the figures.
Exemplary embodiments of the invention are described with reference to the accompanying drawings, which show in
a) four exemplary 3D objects (toruses) and b) their data structure;
a) creation of a complex model and b) a prior art solution for a data structure;
a) a data structure for a complex 3D mesh model according to the invention; b) data sets for two primary instances of a reference 3D mesh model; c) a data set for an exemplary secondary instance of a complex 3D mesh model; d) a data set for a further secondary instance of the complex 3D mesh model according to one embodiment; e) a data set for a further secondary instance of the complex 3D mesh model according to another embodiment; and f) a data structure of a compressed secondary model;
The following terminology is used herein: A pattern is a set of vertex data, connectivity data and property data that can be used to generate a visible object. Patterns, also called shapes sometimes, are not visible.
In order to obtain a visible object, an instance of the pattern must be created. Instances are visible objects. A user can use a GUI (Graphical User Interface) to create an instance. Programs may create instances automatically. Any plurality of instances can be created for each pattern. An instance that refers to a single pattern is called primary instance herein, while an instance that refers to two or more patterns is called secondary instance. According to one aspect of the invention, each instance has a corresponding instance record in a table, which is called pattern-instance record table (PIRT). The first instance of a pattern is primary and called “initial instance” or “special instance” herein. It is visible (i.e. a visible object is created from an invisible pattern), and the user can select it interactively using a GUI in order to move, rotate or scale it. Further, a selected instance can be used for creating further instances thereof, e.g. in a copy operation; in general the copy can be independently moved, rotated and scaled. According to the invention, an initial instance can also be integrated into a so-called secondary instance, which is an instance that comprises at least two instances of equal or different patterns. Once an initial instance is copied to a further instance or integrated into a secondary instance, it is not required anymore and its record in the PIRT may be deleted or integrated into the new record of the secondary instance. Upon definition of a secondary instance, an instance record for the secondary instance is created, and the instance record of any involved primary instance is automatically deleted from the pattern-instance record table during integration into the secondary instance.
Table 1 below shows an exemplary syntax of one embodiment of a pattern record and an instance record in the PIRT.
Exemplary syntax semantics are as follows:
PatternPointerArray is an array of pointers p[i] pointing to all corresponding patterns used in a current instance. One instance can have more than one pattern. Each pattern corresponds to one part of the instance.
PositionArray is an array of position data. Each position data entry pos[i] has some bits indicating the position of the part of the instance model which corresponds to p[i].
OrientationAxisArray and ScalingFactorArray have corresponding meaning, but relate to orientation axis and scaling factor.
PatternNum is the number of the corresponding patterns of the instance. For example, if an instance comprises any six patterns, PatternNum of the instance is six. Thus it is easy to determine whether an instance is a primary instance (if PatternNum=1) or a secondary instance (if PatternNum>1). This simplifies the repetitive pattern detection process during compression.
ShapePointer is a pointer s[i] pointing to the geometry, topology and property data of the corresponding pattern mesh.
InstancePointerArray is an array of pointers ins[i] pointing to all the instance records which comprise the pattern. E.g. if a pattern is used in two primary instances and five secondary instances, the InstancePointerArray has seven elements, each pointing to one of the instances. This makes it easier to track usage of patterns. E.g. unused patterns may be easily detected and may be eliminated during compression.
PositionArray, OrientationAxisArray and ScalingFactorArray constitute the Transformation of the corresponding instance model.
Those instances whose PatternNum=1 and whose PositionArray, OrientationAxisArray and ScalingFactorArray have default values (e.g. pos[0]=<0,0,0>, ori[0]=<0,0,0,0,0,0> and sca[0]=<0,0,0>), are the initial instances (or special instances). That is, initial instances are a particular type of primary instances. The purpose of an initial instance is just to provide a visible object for the user, so that it is possible to perform any editing operation using a GUI.
a) shows four toruses PT1, . . . , PT4 as being exemplary 3D objects, and
a) shows a secondary instance PS1 that comprises two instances PT2,PT3 of single patterns that are in this case equal, namely toruses. The single pattern instances are integrated into the secondary instance PS1, which is visibly shown. That is, in terms of a corresponding data structure according to the invention, the toruses are not primary instances, but a secondary instance. Therefore, they are regarded as a single logical unity, and any operation that is performed is performed on the unity. At this point, a simple straight forward solution may produce the same visible image, but it would require a different data structure with more data and a separate pattern model for the integrated new model. An example is shown in
b) shows relevant parts of exemplary data sets for the two primary instances pt1,pt2 of a reference 3D mesh model. E.g., a primary instance pt1 comprises at least a pointer *p_t1, position data pos_t1, orientation data ori_t1 and scaling data sca_t1.
d) shows a data set for a further secondary instance ps2 of the complex 3D mesh model according to one embodiment. In this embodiment, there is no difference between a first secondary instance and a further secondary instance, since both use the same data structure.
The 3D object whose structure as a secondary instance is shown in
The situation shown in
It is to be noted that the pointers of secondary instances may also point to other secondary instances. A particular advantage of the invention is that a plurality of hierarchy levels may be defined. An example is shown in
The Operation-Classifier block 100 performs an Operation classification step. It classifies all the operations during the whole processing of making 3D models into one out of four types.
In a first type, an Instancing block 210 creates new instances from visible models. A new instance is added in an Add-New-Record block 220 as a new record to the pattern-instance record table, and the pattern-instance record table is updated in a PIRT-Updating block 600. The new instance is based on a reference, also called pattern herein, as described above.
In a second type, an Initial-Instance-Operations block 310 performs pre-defined operations on any initial instance of a pattern model. The operations may include translation, rotation and scaling operations. An initial instance of a pattern model is the first instance of this pattern model
In a third type, an Instance-Model-Operations block 410 performs pre-defined operations on instance models. These operations may include translation, rotation, scaling and Boolean operations.
In a fourth type, a General-Operations block 510 performs alt the other operations that may be useful and that are not performed by any of the other mentioned blocks.
The Add-New-Record block 220 adds new records to the pattern-instance record table. When an instance model is created, a new instance record is added to the “pattern-instance” record table. If there is already a pattern record corresponding to the pattern model, the pointer pointing to the new instance record will be added to the corresponding pointer array, e.g. InstancePointerArray. Otherwise, a new pattern record is added to the “pattern-instance” record table. After addition of a new instance record, the PIRT may be updated 600 if necessary (e.g. previously made records may have become obsolete).
After the Initial-Instance-Operations block 310 performed pre-defined operations on any initial instance of a pattern model, the user can decide in a Decide-New-Pattern-Model block 320 whether the same operations shall be applied also to other already existing instance models of the pattern. If the answer is yes Y, the shape of the corresponding pattern is changed according to the operations in a Pattern-Model-Update block 340, and the pattern model is updated. Thereby, also all the existing instances of the pattern model are updated, since they comprise a reference to the pattern model. However, no records in the pattern-instance table needs to be modified; only the respective shape model in the accompany file is updated. If the answer is no N, only the transformation (i.e. position, rotation and/or scale) of the corresponding instance is changed according to the operation in a Transform-Initial-Instance block 330, and the Initial instance record is transformed into an ordinary primary instance record. As mentioned above, no Initial instance record is required if an ordinary primary or secondary instance record is available.
After performing pre-defined operations on ordinary instance models in the Instance-Model-Operations block 410, the related record in the PIRT is updated in the Instance-Model-Record-Update block 420. If the update of the instance model record requires further updates in the PIRT, these are performed in the PIRT-Updating block 600. However, the Instance-Model-Record-Update block 420 may also be part of the PIRT-Updating block 600. Except the Boolean operations, transformation of the related instance record is changed according to the corresponding operation. The pattern & instance record will be updated according to Boolean operations on the instance models.
For example, to combine the two models PT2 and PT3 into a new model PS1, as shown in
The pointer to the instance record of pNewTorus will be added to the InstancePointerArray of the pattern record of the employed pattern (pattern_torus1, not shown). The instance records corresponding to pTorus2 and pTorus3 will be deleted, as torus2 and torus3 don't exist anymore.
The corresponding instance record pointers are deleted from the InstancePointerArray of the pattern record pattern_torus1. The “pattern-instance” records corresponding to pTorus2 and pTorus3 will be deleted, and other records are kept unchanged. This is done in the Delete-Records block 520.
For the other operations, if any pattern model is concerned, the corresponding pattern record and all its instance records will be deleted. If some instance model is influenced, only the corresponding instance record is deleted.
One advantage of the present invention is that it is still possible to define a primary instance of the pattern model, i.e. the torus1 model, e.g. as follows.
It may be considered an Initial instance again, since it is the only primary instance, or an ordinary primary instance since a secondary instance already exists.
In light of the above, the following exemplary embodiments are mentioned.
In one embodiment of the above-described 3D mesh model, said first, second and third instance data are associated as metadata items to the at least one first reference model.
In one embodiment of the above-described 3D mesh model, a primary instance comprises a single reference 3D mesh model and a secondary instance comprises at least two reference 3D mesh models.
In one embodiment of the above-described 3D mesh model, the data of the at least one first reference 3D mesh model comprise a pointer to each of its primary or secondary instances.
In one embodiment, the above-described 3D mesh model further comprises fourth instance data that define a second secondary 3D mesh model instance, wherein the fourth instance data comprise a reference to the at least first reference 3D mesh model, fourth position data, fourth orientation data and fourth scaling data.
In one embodiment, the above-described 3D mesh model further comprises fifth instance data that define a third instance of the first reference 3D mesh model, wherein the fifth instance data refers to the first reference 3D mesh model and comprises fifth position data, fifth orientation data and fifth scaling data.
In one embodiment of the above-described method for creating a 3D mesh model, the third 3D (three-dimensional) mesh model comprises references to said first and second instance data, and said pattern-instance record table is associated as metadata to the first reference model to the shape data of The one or more first reference 3D mesh models stored on said electronic storage device.
In one embodiment, the above-described method for creating a 3D mesh model further comprises a step of receiving, before storing said third instance data, user input for modifying the position, orientation and/or scale of at least one of the first instance data record and the second instance data record, whereby the display is updated according to said modified position, orientation and/or scale of the at least one instance.
In one embodiment of the above-described method for creating a 3D mesh model, the first and second instances remain visible and unchanged on the display after said step of storing the third instance data record.
In one aspect, the invention can be embodied as a computer readable storage medium having stored thereon data for enabling a computer to perform the method steps of the above-described method for creating a 3D mesh model.
In one embodiment, the above-described system for displaying an image of a 3D object further comprises position data, orientation data and scaling data for the object according to the first data record.
It will be understood that the present invention has been described purely by way of example, and modifications of detail can be made without departing from the scope of the invention. While there has been shown, described, and pointed out fundamental novel features of the present invention as applied to preferred embodiments thereof, it is clear that various omissions and substitutions and changes in the 3D mesh model and method described may be made by those skilled in the art without departing from the spirit of the present invention. It is expressly intended that all combinations of those elements that perform substantially the same function in substantially the same way to achieve the same results are within the scope of the invention. Substitutions of elements from one described embodiment to another are also fully intended and contemplated.
Each feature disclosed in the description and (where appropriate) the claims and drawings may be provided independently or in any appropriate combination. Features may, where appropriate be implemented in hardware, software, or a combination of the two. Reference numerals appearing in the claims are by way of illustration only and shall have no limiting effect on the scope of the claims.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/CN10/02140 | 12/23/2010 | WO | 00 | 6/20/2013 |