Difference between revisions of "TG3 File Format"

From TexGen
Jump to navigationJump to search
 
(66 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[http://mariettebickers.profil.bz/fat-gay-porn.html fat gay porn] [http://www12.asphost4free.com/denisem/new/thai-lady/ thai lady boys] [http://beamcneese.profil.bz/the-pol-protect.html the pol protect] [http://heyheyyouyou.w8w.pl/new/washington-state/ washington state university chemistry department] [http://sweetestdrop.678host.com/content/build-muscle.html build muscle] [http://recycledphrase3.orgfree.com/resources/phun-forums/ phun forums] [http://www12.asphost4free.com/denisem/new/lori-loughlin/ lori loughlin] [http://www12.asphost4free.com/zossia/motorcycle-trailers.html motorcycle trailers] [http://www12.asphost4free.com/catlongtail/resources/amy-locane/ amy locane] [http://recycledphrase3.orgfree.com/resources/michigan-football/ michigan football tickets] [http://bugubudji.myxhost.com/text/atlanta-pc.html atlanta pc repair] [http://bugubudji.myxhost.com/text/pet-birth.html pet birth announcement] [http://mimiwise.profil.bz/description/jag-tv-show.htm jag tv show] [http://www12.asphost4free.com/denisem/new/dogcum/ dogcum] [http://laruereagan.profil.bz/adhd-teen.html adhd teen] [http://mariettebickers.profil.bz/rx-drug-prices.html rx drug prices compare] [http://dinatregre.profil.bz/alaska-cabin.html alaska cabin] [http://beamcneese.profil.bz/motocross-helmets.html motocross helmets] [http://recycledphrase3.orgfree.com/resources/amateur-home/ amateur home video] [http://skquek.2day.biz/description/image-in.html image in a plane mirror] [http://www12.asphost4free.com/crumplstiltskin/lib/the-huns.html the huns yellow pages] [http://shulend.hostinggratisvenezuela.com/articles/corset-bondage/ corset bondage] [http://heyheyyouyou.w8w.pl/new/potential-rapist/ potential rapist] [http://tabethacaudill.profil.bz/small/dick-in-pussy.html dick in pussy] [http://recycledphrase3.orgfree.com/resources/minnesota-state/ minnesota state parks] [http://virgietyus.profil.bz/psp-cheat-codes.htm psp cheat codes] [http://recycledphrase3.orgfree.com/resources/zx/ zx2] [http://recycledphrase3.orgfree.com/resources/time-sheets/ time sheets] [http://squealingpiglet.w8w.pl/content/handcuffed-ladies/ handcuffed ladies] [http://virgietyus.profil.bz/vote-best-butt.htm vote best butt] [http://www12.asphost4free.com/catlongtail/resources/kays-jewelry/ kays jewelry] [http://shulend.hostinggratisvenezuela.com/articles/music-sharing/ music sharing] [http://mimiwise.profil.bz/description/rescue.htm rescue] [http://recycledphrase3.orgfree.com/resources/jessica-alba/ jessica alba wallpaper] [http://recycledphrase3.orgfree.com/resources/vagina-porn/ vagina porn] [http://squealingpiglet.w8w.pl/content/sixpence-none/ sixpence none the richer] [http://margenemerriam.profil.bz/topic/jayde-indian.html jayde indian babe] [http://recycledphrase3.orgfree.com/resources/kids-campus/ kids campus child care centre] [http://lipkaya-loj.678host.com/sonya.html sonya] [http://bugubudji.myxhost.com/text/amber-nude.html amber nude] [http://shulend.hostinggratisvenezuela.com/articles/saks-fifth/ saks fifth avenue ny] [http://www12.asphost4free.com/zossia/bdsm-drawing.html bdsm drawing] [http://skquek.2day.biz/description/weight-loss.html weight loss menus] [http://lipkaya-loj.678host.com/big-tit.html big tit fuck] [http://skquek.2day.biz/description/mother-son.html mother son granny grandson sex] [http://www12.asphost4free.com/catlongtail/resources/planet-sports/ planet sports team] [http://laruereagan.profil.bz/renault-clio.html renault clio cars] [http://heyheyyouyou.w8w.pl/new/custom-hats/ custom hats] [http://sukinsa.hostinggratisvenezuela.com/resources/vagina-snake.html vagina snake insertions] [http://beamcneese.profil.bz/hypno-sex.html hypno sex] [http://recycledphrase3.orgfree.com/resources/nissan-z/ nissan 350z parts] [http://lipkaya-loj.678host.com/cleave.html cleave] [http://www12.asphost4free.com/crumplstiltskin/lib/the-aristocrats.html the aristocrats] [http://www12.asphost4free.com/catlongtail/resources/pussy-sucking/ pussy sucking movie] [http://recycledphrase3.orgfree.com/resources/free-pussy/ free pussy eating] [http://recycledphrase3.orgfree.com/resources/journey-dont/ journey dont stop believing] [http://sweetestdrop.678host.com/content/secretary-bondage.html secretary bondage] [http://lipkaya-loj.678host.com/victorian-clipart.html victorian clipart] [http://heyheyyouyou.w8w.pl/new/statutory-interpretation/ statutory interpretation definition] [http://mariettebickers.profil.bz/shaving-pubic.html shaving pubic hair for girls] [http://squealingpiglet.w8w.pl/content/christina-aguilera/ christina aguilera dirty] [http://lipkaya-loj.678host.com/prepubescent-breasts.html prepubescent breasts] [http://sukinsa.hostinggratisvenezuela.com/resources/washington-state.html washington state tourism] [http://recycledphrase3.orgfree.com/resources/ashley-bond/ ashley bond] [http://bugubudji.myxhost.com/text/flash-player.html flash player 5] [http://utgang.hostinggratisuruguay.com/view/nba-finals.html nba finals] [http://dinatregre.profil.bz/general-contractor.html general contractor] [http://shulend.hostinggratisvenezuela.com/articles/boat-graphics/ boat graphics] [http://eldritchrainbow.678host.com/web/vision-car/ vision car alarm australia] [http://www12.asphost4free.com/catlongtail/resources/sailor-moon/ sailor moon fuck] [http://dinatregre.profil.bz/top-ten-hentai.html top ten hentai movies] [http://beamcneese.profil.bz/bodsforthemods.html bodsforthemods] [http://janisdunham.profil.bz/blog/queen-fat-bottom.html queen fat bottom girls] [http://margenemerriam.profil.bz/topic/mature-sex.html mature sex] [http://lipkaya-loj.678host.com/something-old.html something old something new] [http://leannenowak.profil.bz/black-whores-fucking.html black whores fucking] [http://skquek.2day.biz/description/whats-wrong.html whats wrong with the copyright law] [http://bugubudji.myxhost.com/text/parrot.html parrot] [http://tabethacaudill.profil.bz/small/tcs.html tcs] [http://eldritchrainbow.678host.com/web/peeping/ peeping] [http://leannenowak.profil.bz/free-shemale-galleries.html free shemale galleries] [http://janisdunham.profil.bz/blog/dogs-cum.html dogs cum] [http://squealingpiglet.w8w.pl/content/anal-shots/ anal shots] [http://eldritchrainbow.678host.com/web/czarne-oczy/ czarne oczy mp3] [http://shulend.hostinggratisvenezuela.com/articles/american-victories/ american victories] [http://squealingpiglet.w8w.pl/content/rosary/ rosary] [http://www12.asphost4free.com/denisem/new/desktop-images/ desktop images] [http://shulend.hostinggratisvenezuela.com/articles/safely-remove/ safely remove usb device] [http://utgang.hostinggratisuruguay.com/view/canadian-mesothelioma.html canadian mesothelioma class action lawsuit] [http://www12.asphost4free.com/crumplstiltskin/lib/amish.html amish] [http://laruereagan.profil.bz/marketing-solutions.html marketing solutions] [http://mimiwise.profil.bz/description/criminal-defense.htm criminal defense lawyer] [http://squealingpiglet.w8w.pl/content/save-a/ save a horse ride cowboy lyrics] [http://mimiwise.profil.bz/description/shaving-women.htm shaving women] [http://www12.asphost4free.com/denisem/new/parts-unlimited/ parts unlimited] [http://shulend.hostinggratisvenezuela.com/articles/devil-may/ devil may cry] [http://eldritchrainbow.678host.com/web/accident-reconstruction/ accident reconstruction software] [http://sweetestdrop.678host.com/content/kids-panties.html kids panties] [http://leannenowak.profil.bz/lesbianpink.html lesbianpink] [http://www12.asphost4free.com/catlongtail/resources/new-ceo/ new ceo for hp]
 
 
__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.