Today, I received a question from Marc about the use of External References (XRef nodes) in 3D models. I decided to post this message to let the community know about the subject.
In chapter 6 of CDB Spec 3.2, External References are discussed in sections 6.2.4 and 6.2.5. An example of their use is also proposed in section 126.96.36.199.5.
Now, here are the cases where External References are allowed.
A GSModelGeometry in dataset 300 is not allowed to make external references... However, its interior (dataset 305) can do so. There are two cases.
1) The interior is complex and divided into floors and/or rooms; in this case, the files that are pointed to by XRef nodes are other GSModelInteriorGeometry files and must be stored in the same ZIP file as the GSModel making reference to them.
This is the case of dataset 305 referencing dataset 305. At this point, I will ask the reader to open the Spec at section 188.8.131.52.5 and locate the file named N62W162_D305_S001_T001_L07_U38_R102.zip that contains all GSModelInteriorGeometry files of the tile such as this one, N62W162_D305_S001_T001_L07_U38_R102_AL015_116_AcmeFactory.flt. The file could contain a reference to N62W162_D305_S001_T002_L07_U38_R102_AL015_116_AcmeFactory.flt. Pay attention to the second component selector, Txxx. When you see two (or more) files whose name is identical but for their Txxx token, you know that they are related to each other by a XRef node. Here, the T001 file refers to the T002 file.
2) A fixture (see Figure 6-29) that is part of the Interior of a GSModel makes a reference to a GTModel (a piece of furniture for instance). In that case, the GSModelInteriorGeometry makes a reference to a GTModelGeometry Entry File (dataset 500).
Obviously, GTModelGeometry Entry File (dataset 500) uses XRef nodes to refer to individual GTModelGeometry LODs stored in subfolders of the model folder. This the case of files named D500_S001_T001_FACC_FSC_MODL.flt referencing files named D510_S001_T001_Lxx_FACC_FSC_MODL.flt as illustrated in section 184.108.40.206 of the Spec.
Again, in the case of its interior, a GTModelInteriorGeometry can use XRef nodes to reference floors and rooms stored in separate files located in the same folder. This is the case of a file such as D506_S001_T001_Lxx_FACC_FSC_MODL.flt referencing files named D506_S001_Txxx_Lxx_FACC_FSC_MODL.flt where Txxx is T002, T003, T004, and so on.
And yet again, you may use XRef nodes to reference GTModelGeometry Entry Files representing fixtures inside the interior of your model.
In a way that is similar to the previous two cases, a Moving Model can reference other parts that are located in the same folder as the model itself. You can also reference another Moving Model residing in a different folder. See section 220.127.116.11 for details.
This is the first time I post a message to explain a specific topic in the Spec. If I see enough interest, I may continue doing so :-)