Difference between revisions of "TG3 File Format"

From TexGen
Jump to navigationJump to search
 
(38 intermediate revisions by one other user not shown)
Line 1: Line 1:
[http://treasroc.strefa.pl/comment11.html steve francis] [http://qetrfev.iquebec.com/resource290.html activation key for maya 6.0 unlimited] [http://page.freett.com/themotion/comment-252.html natural supplement] [http://s1.shard.jp/cest1avie/text-496.html sparkasse bank nurnberg] [http://nehalef.fr.nf/page223.html jobs in retail in grenada ms] 
 
[http://s1.shard.jp/dentage/article148.html union city high school mr lindo] [http://ntifuxac.strefa.pl/maui-income.html maui income properties] [http://tacnaco.321webs.com/page-352.html car rental san jose costa rica] [http://ackrofl.ibelgique.com/text-330.html asterisk password crack] [http://www.qetosane.nets.hk/resource40.html free fantasy football trade calculator] 
 
[http://kogaaget.iespana.es/387.html poker rule video] [http://delnrtrvo.strefa.pl/amatuer-indian.html amatuer indian] [http://roclorocz.ibelgique.com/comment-150.html pinder videos] [http://tacnaco.321webs.com/page-93.html car rental coupons] [http://rofirelc.321webs.com/article181.html business travel england] 
 
[http://trwiutamr.strefa.pl/text-296.html private photos of wives] [http://kogaaget.iespana.es/448.html acereader serial] [http://izziewithay.sov.tw/need-loan-republic.html need loan republic ireland have bad credit rating] [http://roclorocz.ibelgique.com/comment-119.html alias season 4 torrent freeware] [http://bugalpa.isuisse.com/text154.html any dvd 4.5.6.2 crack] 
 
[http://oxygenthiefmusic.com/wpThumbnails/pictures/article222.htm realtime traffic] [http://unkl347.com/games/pong/img/topic-1212.html respiratory therapist] [http://proehlificpark.com/images-unwriteable/file/icons/text1756.htm goldrush] [http://onesourcesolutions1.com/media/docs/page1199.html quake shareware cd crack] [http://raleighwesley.org/subscription/files/comment-1506.html quirrell] 
 
[http://pulpitclothing.com/images/thumbs/news-1402-20090923.html aruba teen] [http://chef-girl.net/halifax/wp-content/uploads/2009/index.html page] [http://chef-girl.net/halifax/wp-content/uploads/2009/news-1179-2009-09-17.html cingular harry potter ringtone] [http://gregorybaker.ca/wp-content/uploads/2009/05/pics/news-142-2009-09-22.html movies plots] [http://nantya.com/wp-content/uploads/2009/05/article59.html manners of dying movie] 
 
[http://disdatdesigns.com/justme/uploads/2008/topic-1677.htm put movies on psp] [http://rebelsoul.org/wp-content/uploads/2007/11/article1414.html los angeles bands] [http://pulpitclothing.com/images/thumbs/news-556-20090924.html teamwork] [http://janedoelatex.com/store_images/icons/text1525.htm movie maker tutorials] [http://raleighwesley.org/subscription/files/index.html http] 
 
[http://superpress.finito-web.com/text-137.html male infertility message board] [http://insanofangirl.finito-web.com/article486.html free shareware for streaming stock market ticker software] [http://nehalef.fr.nf/page258.html foro de bolsa el zorro] [http://nehalef.fr.nf/page100.html female muscle growth comics] [http://www.roogaacp.coms.la/article331.html british premier league] 
 
[http://ntifuxac.strefa.pl/electric-grills.html electric grills] [http://allibaswb.321webs.com/page-350.html boutique hotels washington dc] [http://nikitinac.sov.tw/topic-117.html job corps center illinois] [http://voureelfv.ibelgique.com/103.html apply for texas drivers license] [http://qedelkomf.nengu.jp/article456.html playing hockey in winnipeg] 
 
[http://ackrofl.ibelgique.com/index.html top] [http://voureelfv.ibelgique.com/index.html index] [http://awackwro.tonosama.jp/resource175.html city national bank of florida] [http://cxialacka.iespana.es/text-191.html abee chm maker pro crack] [http://www.roogaacp.coms.la/article371.html stafford loans] 
 
[http://izziewithay.sov.tw/kayunga-town-council.html kayunga town council jobs] [http://listlisalove.finito-web.com/comment-101.html business portal] [http://awackwro.tonosama.jp/resource436.html case montagna affitti gratis] [http://qedelkomf.nengu.jp/article477.html pepe red card video footage] [http://deltrmxre.ojaru.jp/comment409.html family annual travel insurance] 
 
[http://zvlraac.your2000.net/index.html site] [http://xrkodew.oueb.eu/new197.html key bank logo] [http://xrkodew.oueb.eu/new266.html can you wire transfer money with rbc] [http://nehalef.fr.nf/page39.html ost metal gear solid ddl] [http://page.freett.com/jemariel/birthday-traditions.html birthday traditions] 
 
[http://qedelkomf.nengu.jp/article333.html asn board] [http://koongetlq.mukade.jp/new122.html big bank hank sugar hill gang] [http://ackrofl.ibelgique.com/text-342.html avi fixer crack] [http://cxialacka.iespana.es/text-292.html a free sample software license agreement] [http://rofirelc.321webs.com/article350.html canadian car rentals] 
 
[http://bugalpa.isuisse.com/text164.html avi joiner serialz] [http://roofvaw.suppa.jp/text-179.html sample business letter for any advertisement with example3] [http://kogaaget.iespana.es/27.html anaerobic respiration in yeast equation] [http://yulcha1106.finito-web.com/new373.html desired thickness of sheet metal] [http://xrkodew.oueb.eu/new412.html against professional athletes making mega money] 
 
[http://qedelkomf.nengu.jp/article405.html example for invitation letter for visa] [http://roclorocz.ibelgique.com/comment-286.html az dmv drivers license] [http://www.roogaacp.coms.la/article499.html buy didrex with western union] [http://allibaswb.321webs.com/page-126.html best western mission inn] [http://s1.shard.jp/dentage/article401.html washington state employees credit union] 
 
[http://wicaencxi.suppa.jp/article472.html pinners bar and grill message board] [http://listlisalove.finito-web.com/comment-350.html forgiving credit card debt] [http://easplro.your2000.net/index.html top] [http://listlisalove.finito-web.com/comment-92.html yamamay collezione primavera estate 2009] [http://roofvaw.suppa.jp/text-398.html sas jobs in toronto] 
 
[http://ifanepal.org.np/images/icons/article1303.htm free ringtone and wallpaper for verizon wireless] [http://exelib.com/webmasters/files/news-612-20090809.html the orchard theatre dartford] [http://folkelef.mukade.jp/index.html index] [http://elerenexp.suppa.jp/page-144.html annabel chong] [http://divertigenio.es/bk_subscription/files/news-1981-20090804.html dick licking] 
 
[http://www.bibliopolio.gr/images/banners/mini/sitemap.htm link] [http://elusivemoose.com/ssp_director/albums/album-25/page408.html the plug in drug] [http://prisonbreakmania.com/galeria/albums/userpics/10003/topic-1248.htm air pressure and winds] [http://badmoviezone.com/backup_files/dump/article1323.htm annapolis movie preview] [http://ciimet.org/alumni/uploaddata/images/article2204.html richards realm.com the choice] 
 
[http://rohutson.finito.fc2.com/topic-622.html county by county election results] [http://ralowly.myspace1.nazca.co.jp/topic-866.html michigan woman seeking man] [http://hestaton.finito-web.com/1672.html turn signal switch replacement] [http://shrochel.finito.fc2.com/topic-1244.html notice to increase rent form] [http://martovskiy.netrend.jp/244.html lace long tank] 
 
[http://cavaliersonline.com/photos/icons/text758.htm bra unclasped] [http://aarh.net/generator/assets/gallery3/topic-1015.html malacanang website] [http://capstonerealty.ph/gallery/Farm_Lots/mini/resource-1212.html argentina drug trafficking] [http://marja-leena-rathje.info/ssp_director/config/conf/article1728.html atomic book clock guest] [http://pixsoulmedia.com/dev/images/thumbs/article2403.html phone ringtone sprint wallpaper] 
 
[http://atomized.ca/2006/12/news-2525-20090623.html queens of the stone age video code] [http://woningpagina.com/pics/flash/comment-1702.html maryland nursing license] [http://ackcsc.org/club.bak/media/flash/ertabrme.htm niversity of texas] [http://sahardesign.com/files/styles/article176.html av consultant design new york] [http://brixhost.net/my/attachments/media/news-68-2009-07-04.html powerpuff girls xxx] 
 
[http://tatlin.com/gallery/wp-content/uploads/2008/topic-280.htm role of media in democracy in india] [http://rubyarts.org/images/icons/news-199.html anne diary frank video] [http://capstonerealty.ph/gallery/Farm_Lots/mini/resource-382.html raskolnikovs theory] [http://mdabc.net/test/files/new1112.htm massage licensed therapist phoenix] [http://sahardesign.com/files/styles/article262.html office 2003 confirmation crack] 
 
 
__NOTOC__
 
__NOTOC__
 
The file format for storing TexGen data has the extension TG3 which stands for TexGen v3. It is an XML file where each element usually corresponds to a class within TexGen core. When a TG3 file is saved, there is an option as to how much data is saved:
 
The file format for storing TexGen data has the extension TG3 which stands for TexGen v3. It is an XML file where each element usually corresponds to a class within TexGen core. When a TG3 file is saved, there is an option as to how much data is saved:

Latest revision as of 13:37, 26 November 2009

The file format for storing TexGen data has the extension TG3 which stands for TexGen v3. It is an XML file where each element usually corresponds to a class within TexGen core. When a TG3 file is saved, there is an option as to how much data is saved:

No matter which of the options is chosen TexGen is able to read the data and recreate the exact some model as was originally saved provided files are saved and loaded by the same version of TexGen. Results may vary when loading a file from a different version of TexGen depending on the output type. For example, if the class to represent a specific textile (e.g. CTextileWeave2D) is modified so that the geometry is created in a different way. Files saved with an old version with minimal output will have the new geometry whereas files saved with standard or full output will retain the old geometry.

Minimal

When minimal output is selected only the information within the Textile derived class is saved. For example, if a textile was created with the CTextileWeave2D class then only the weave pattern, fabric thickness, yarn heights, widths and spacings will be saved. From this the yarn path can be reconstructed. If the textile being saved is not a derived class then it will save as Standard instead.

Standard

When standard output is selected then the information about the yarns will be saved as well. This includes yarn master nodes, interpolation function, yarn section, repeats, etc...

Full

When full output is selected then everything that TexGen stores in memory is saved to file. This includes information such as the actual points lying on the surface of a yarn. These files tend to be very large and should not be used unless it is absolutely necessary.

Structure

The file follows the XML conventions and as such is human readable. Here is an example file saved with Standard output:

<?xml version="1.0" ?>
<TexGenModel version="3.0.0">
    <Textile name="2DWeave(W:2,H:2)" type="CTextileWeave2D" NeedsBuilding="0" NumXYarns="2" NumYYarns="2" GapSize="0" FabricThickness="0.4" Refine="0">
        <Domain type="CDomainPlanes">
            <Plane Normal="1, 0, 0" d="-0.5" />
            <Plane Normal="-1, 0, 0" d="-1.5" />
            <Plane Normal="0, 1, 0" d="-0.5" />
            <Plane Normal="0, -1, 0" d="-1.5" />
            <Plane Normal="0, 0, 1" d="-0.02" />
            <Plane Normal="0, 0, -1" d="-0.42" />
        </Domain>
        <Yarn index="0" NumSlaveNodes="25" NumSectionPoints="20" NeedsBuilding="7">
            <Interpolation Periodic="1" type="CInterpolationBezier" />
            <YarnSection type="CYarnSectionConstant">
                <SectionList index="0" type="CSectionEllipse" NeedsMeshing="1" Width="0.8" Height="0.2" />
            </YarnSection>
            <Repeat value="2, 0, 0" />
            <Repeat value="0, 2, 0" />
            <MasterNode index="0" Position="0, 0, 0.1" Tangent="0, 0, 0" Up="0, 0, 1" />
            <MasterNode index="1" Position="1, 0, 0.3" Tangent="0, 0, 0" Up="0, 0, 1" />
            <MasterNode index="2" Position="2, 0, 0.1" Tangent="0, 0, 0" Up="0, 0, 1" />
        </Yarn>
        <Yarn index="1" NumSlaveNodes="25" NumSectionPoints="20" NeedsBuilding="7">
            <Interpolation Periodic="1" type="CInterpolationBezier" />
            <YarnSection type="CYarnSectionConstant">
                <SectionList index="0" type="CSectionEllipse" NeedsMeshing="1" Width="0.8" Height="0.2" />
            </YarnSection>
            <Repeat value="2, 0, 0" />
            <Repeat value="0, 2, 0" />
            <MasterNode index="0" Position="0, 1, 0.3" Tangent="0, 0, 0" Up="0, 0, 1" />
            <MasterNode index="1" Position="1, 1, 0.1" Tangent="0, 0, 0" Up="0, 0, 1" />
            <MasterNode index="2" Position="2, 1, 0.3" Tangent="0, 0, 0" Up="0, 0, 1" />
        </Yarn>
        <Yarn index="2" NumSlaveNodes="25" NumSectionPoints="20" NeedsBuilding="7">
            <Interpolation Periodic="1" type="CInterpolationBezier" />
            <YarnSection type="CYarnSectionConstant">
                <SectionList index="0" type="CSectionEllipse" NeedsMeshing="1" Width="0.8" Height="0.2" />
            </YarnSection>
            <Repeat value="2, 0, 0" />
            <Repeat value="0, 2, 0" />
            <MasterNode index="0" Position="0, 0, 0.3" Tangent="0, 0, 0" Up="0, 0, 1" />
            <MasterNode index="1" Position="0, 1, 0.1" Tangent="0, 0, 0" Up="0, 0, 1" />
            <MasterNode index="2" Position="0, 2, 0.3" Tangent="0, 0, 0" Up="0, 0, 1" />
        </Yarn>
        <Yarn index="3" NumSlaveNodes="25" NumSectionPoints="20" NeedsBuilding="7">
            <Interpolation Periodic="1" type="CInterpolationBezier" />
            <YarnSection type="CYarnSectionConstant">
                <SectionList index="0" type="CSectionEllipse" NeedsMeshing="1" Width="0.8" Height="0.2" />
            </YarnSection>
            <Repeat value="2, 0, 0" />
            <Repeat value="0, 2, 0" />
            <MasterNode index="0" Position="1, 0, 0.1" Tangent="0, 0, 0" Up="0, 0, 1" />
            <MasterNode index="1" Position="1, 1, 0.3" Tangent="0, 0, 0" Up="0, 0, 1" />
            <MasterNode index="2" Position="1, 2, 0.1" Tangent="0, 0, 0" Up="0, 0, 1" />
        </Yarn>
        <PatternCell x="0" y="0">
            <PatternElement value="1" />
            <PatternElement value="0" />
        </PatternCell>
        <PatternCell x="1" y="0">
            <PatternElement value="0" />
            <PatternElement value="1" />
        </PatternCell>
        <PatternCell x="0" y="1">
            <PatternElement value="0" />
            <PatternElement value="1" />
        </PatternCell>
        <PatternCell x="1" y="1">
            <PatternElement value="1" />
            <PatternElement value="0" />
        </PatternCell>
        <XYarnData index="0" Width="0.8" Height="0.2" Spacing="1" />
        <XYarnData index="1" Width="0.8" Height="0.2" Spacing="1" />
        <YYarnData index="0" Width="0.8" Height="0.2" Spacing="1" />
        <YYarnData index="1" Width="0.8" Height="0.2" Spacing="1" />
        <XYarns index="0">
            <XYarn yarnindex="0" />
        </XYarns>
        <XYarns index="1">
            <XYarn yarnindex="1" />
        </XYarns>
        <YYarns index="0">
            <YYarn yarnindex="2" />
        </YYarns>
        <YYarns index="1">
            <YYarn yarnindex="3" />
        </YYarns>
    </Textile>
</TexGenModel>

Elements

Elements have the following format: <NAME> ... </NAME>. Everything between the tags is part of the element. All XML files have a single root element, the root element in this case is named "TexGenModel".

Attributes

Elements can contain attributes which come after the name of the element. For example the element "TexGenModel" has an attribute named "version" which specifies what version of TexGen the file was saved by ("3.0.0" in this example). All variables that can be expressed as a single string are stored as attributes (i.e. All the integral data types and small structs like XYZ and XY). The attribute name usually corresponds to the variable name without the Hungarian notation.

Child Elements

Variables that cannot be expressed as a single string are stored as child elements. For example the "Textile" element which is an instance of CTextile cannot be expressed as a single string. Hence "Textile" is a child element of "TexGenModel". The element name usually corresponds to the variable name without the Hungarian notation.

Collection Classes

When a variable is a collection class (i.e. vector, list or map) a child element is created for each item in the collection. For example, CTextile contains a vector of yarns, for this model the number of yarns within the vector is 4. Thus the "Textile" element contains 4 child "Yarn" elements. Sometimes the index of the element is given as an "index" attribute. This value is provided only for human readability, when TexGen reads the file this number is ignored. The true index is obtained simply by the order in which the elements appear.

Subclasses

In some cases a variable may be a pointer to a base class. It may represent any of the subclasses of the base class. In these cases an additional attribute is added to the element which represents it. The name of the attribute is "type" and its value corresponds to the name of the subclass. For example the "Textile" element in this example is an instance of the "CTextileWeave2D" class.

API

Please refer to the API for information on what the elements and attributes represent.