GRT-File

From GentRacing Wikipedia
Jump to navigation Jump to search

Track file format (*.grt) / (G)ene(R)acing(T)rack

The invention of the format

The GRT-file format is an invented and an open format, from GeneRacing, which is managed under license “CC” – Creative Commons. The “CC” – Creative Commons license is legally binding on every downloaded, uploaded, used or passed on file of this file format, regardless of the place or time. Regarding licensing, please read more at the end of the page.

The content of a GRT File

All *.grt container files, including the packaged content, are a part of GeneRacing and could be shared, provided, edited by the functionalities of the game and the users.

You, as an editor, are explicitly allowed (following the CC0 license) to unzip the grt-container to modify the content with included and external tools.

A *.grt file is a zip container which includes generally following three files:

A normed XML-File which holds all track related informations in format: <trackname>.xml A non-compressed PNG-file which stores the pixelinformation of all texture layers in format: <trackname>.png A non-compressed PNG-file which stores the pixelinformation in grey-scale of all heightmap-points from the terrain in format: <trackname>_heightmap.png This 3 filed are compressed in the grt-container in format: <trackname>.grt

Formats and limitations for the “Texture” File (<trackname>.png):

File extensions *.jpg and *.png are supported by reading, *.png is used for writing Following texture resolutions are supported: 64×64 256×256 512×512 1024×1024 2048×2048 4096×4096 Following heightmap resolutions are supported: 64×64 65×65 512×512 513×513 1024×1024 1025×1025 2048×2048 2049×2049 (+1 pixels because each pixel from the texture must be mapped to a polygon (consisting of two triangles), not a pixel, in the terrain mesh)

The *.xml file is following the xml standards, well formed: XML documents must have a root element XML elements must have a closing tag XML tags are case sensitive XML elements must be properly nested XML attribute values must be quoted The *.grt xml scheme is following this structure

The XML Structure

<?xml version=”1.0″ encoding=”UTF-8″?>
<GeneRacingTrackInfos>
	<Trackname>Trackname</Trackname>
	<TrackVersion>0.1</TrackVersion>
	<TrackPart>1/1</TrackPart>
	<TrackTime>0.5</TrackTime>
	<CamDefaultAngle>45</CamDefaultAngle>
	<CamDefaultRotation>0</CamDefaultRotation>
	<CamDefaultZoom>50</CamDefaultZoom>
	<TrackSize>310</TrackSize>
	<WaterLevel>50</WaterLevel>
	<TexturePath>Trackname.png</TexturePath>
	<TextureWidth>2048</TextureWidth>
	<TextureHeight>2048</TextureHeight>
	<HeightmapPath>Trackname_heightmap.png</HeightmapPath>
	<HeightmapWidth>2049</HeightmapWidth>
	<HeightmapHeight>2049</HeightmapHeight>
	<LampObjects>0</LampObjects>
	<PitCrewObjects>0</PitCrewObjects>
	<CheckPointsObjects>0</CheckPointsObjects>
	<TrackObjects>0</TrackObjects>
	<PitCrewObjectList>
		<PitEntry>
			<id>0</id>
			<X>150</X>
			<Y>0</Y>
			<Z>150</Z>
			<RotationY>0</RotationY>
			<ScaleModifierX>0</ScaleModifierX>
			<ScaleModifierY>0</ScaleModifierY>
			<ScaleModifierZ>0</ScaleModifierZ>
		</PitEntry>
	</PitCrewObjectList>
	<CheckPointsObjectsList>
		<CPEntry>
			<id>0</id>
			<X0>2</X0>
			<Z0>5</Z0>
			<X1>126</X1>
			<Z1>5</Z1>
			<Y>512</Y>
		</CPEntry>
	</CheckPointsObjectsList>
	<TrackObjectList>
		<TOEntry>
			<id>0</id>
			<Class>SpawnPoint</Class>
			<X>269</X>
			<Y>0</Y>
			<Z>259</Z>
			<RotationY>0</RotationY>
			<ScaleModifierX>0</ScaleModifierX>
			<ScaleModifierY>0</ScaleModifierY>
			<ScaleModifierZ>0</ScaleModifierZ>
		</TOEntry>
	</TrackObjectList>
	<CreativeCommonLicense-CC0>
		<Link>https://creativecommons.org/licenses/</Link>
		<License>CC0</License>
		<LicenseOwner>GeneRacing</LicenseOwner>
		<LicenseOwnerLink>http://www.gene-racing.com</LicenseOwnerLink>
	</CreativeCommonLicense-CC0>
</GeneRacingTrackInfos>

This GRT file format definition represents v0.2 – dated 9.2.2021 and is constantly being extended/updated

The license

“CC” – Creative Commons License – CC0 1.0 Universal – Public Domain Dedication

The * .grt is an open file format to ensure that user content can be exchanged and transferred quickly, simply and easily. The legal basis for this is the Common Creative License, CC0 1.0 Universal Public Domain Dedication.

The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.

You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission. See Other Information below.

For detailed informations for this license click >here< or >here<.


Source: creativecommons.org via Wikimedia Commons

Creative Commons Legal Code CC0 1.0 Universal Official translations of this legal tool are available CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN “AS-IS” BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.

Statement of Purpose The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an “owner”) of an original work of authorship and/or a database (each, a “Work”).

Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works (“Commons”) that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.

For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the “Affirmer”), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.

1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights (“Copyright and Related Rights”). Copyright and Related Rights include, but are not limited to, the following:

the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; moral rights retained by the original author(s) and/or performer(s); publicity and privacy rights pertaining to a person’s image or likeness depicted in a Work; rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; rights protecting the extraction, dissemination, use and reuse of data in a Work; database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof. 2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer’s Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the “Waiver”). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer’s heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer’s express Statement of Purpose.

3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer’s express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer’s Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the “License”). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer’s express Statement of Purpose.

4. Limitations and Disclaimers.

No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person’s Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.

CC0

To the extent possible under law, GeneRacing has waived all copyright and related or neighboring rights to GeneRacing. This work is published from: Österreich.

Trackfile elements (*.grt) explained

For a better understand of the file format structure here are the infos of the content:

<GeneRacingTrackInfos> The first root element of our XML structure defines the GeneRacingTrackInfos, this element is static and must not be changed.

<Trackname>trackname</Trackname>

The second element of the structure is the definition of the trackname without an extension. To avoid case-sensitiv problems, every trackfilename must be written in lowcase. This trackname also describes the names for the texture map and the heightmap.

<TrackVersion>0.1</TrackVersion>

The trackversion number to identify different versions. This version is currently not used, but placed for a later usage.

<TrackPart>1/1</TrackPart>

The trackpart number describes connecting terrains for a later usage, and aren´t used at the moment.

<TrackTime>0.5</TrackTime>

The tracktime gives the default value for the starting time of the track, which can be overruled by the host at any time. Values between 0 and 1 are possible, 0.5 stands for noon.

<CamDefaultAngle>45</CamDefaultAngle>

The camera default angle describes the ingame camera angle if the game starts and will be stored as default angle for the F3 key, so it will be set the camera back to this angle value. Its the euler angle in degrees of the camera.

<CamDefaultRotation>0</CamDefaultRotation>

The camera default rotation describes the ingame camera rotation if the game starts and will be stored as default rotation for the F3 key, so it will be set the camera back to this rotation value. Its the euler rotation in degrees of the camera.

<CamDefaultZoom>50</CamDefaultZoom>

The camera default zoom describes the ingame camera zoom if the game starts and will be stored as default zoom for the F3 key, so it will be set the camera back to this rotation value. This zoom value is possible between 5 (close) and 169 (far).

<TrackSize>310</TrackSize>

The tracksize values describe the relation between the world to scale the world and all related objects in it. This tracksize values are possible between 10 and 510.

<WaterLevel>50</WaterLevel>

Depending on the choosen tracksize the waterlevel value will be used to set the level of the water plane. In a smaller world (255-510) the waterplane is adjusted in a lower range, in a bigger world (10-255) the waterlevel is adjusted in a higher range.

<TexturePath>Trackname.png</TexturePath>

The texturepath describes primarly the name of the texture image and is prepared for a later usage of cloud-pathes/addresses.

<TextureWidth>2048</TextureWidth>

To got the information without reading or opening the texture image the resolution will be stored in texturewidth value.

<TextureHeight>2048</TextureHeight>

To got the information without reading or opening the texture image the resolution will be stored in textureheight value.

<HeightmapPath>Trackname_heightmap.png</HeightmapPath>

The heightmappath describes primarly the name of the heightmap image and is prepared for a later usage of cloud-pathes/addresses.

<HeightmapWidth>2049</HeightmapWidth>

To got the information without reading or opening the heightmap image the resolution will be stored in heightmapwidth value.

<HeightmapHeight>2049</HeightmapHeight>

To got the information without reading or opening the heightmap image the resolution will be stored in heightmapheight value.

<LampObjects>0</LampObjects>

Gives information about the count of lamp objects on this track for quality settings, lower qualitys settings, etc.

<PitCrewObjects>0</PitCrewObjects>

Gives information and overview about the count of PitCrew objects on this track.

<CheckPointsObjects>0</CheckPointsObjects>

Gives information and overview about the count of CheckPoint objects on this track.

<TrackObjects>0</TrackObjects>

Gives information and overview about the count of other Trackobjects objects on this track.

-<PitCrewObjectList>

This is the next element of the structure and holds all PitEntry elements.

-<PitEntry>

A pitentry element holds the important information for every PitCrew object on the track.

<id>0</id>

The consecutive number of PitCrew objects, sorted by placement

<X>150</X>

The x-coordinate value on the track

<Y>0</Y>

The y-coordinate value on the track

<Z>150</Z>

The z-coordinate value on the track

<RotationY>0</RotationY>

The y-rotation value on the track

<ScaleModifierX>0</ScaleModifierX>

The object will be scaled according to the tracksize. This modifier will give the opportunity to modifiy the x-size of this object.

<ScaleModifierY>0</ScaleModifierY>

The object will be scaled according to the tracksize. This modifier will give the opportunity to modifiy the y-size of this object.

<ScaleModifierZ>0</ScaleModifierZ>

The object will be scaled according to the tracksize. This modifier will give the opportunity to modifiy the z-size of this object.

</PitEntry>

</PitCrewObjectList>

-<CheckPointsObjectsList>

This is the next element of the structure and holds all Checkpoint object elements.

-<CPEntry>

<id>0</id>

The consecutive number of CheckPoint objects, sorted by placement

<X0>2</X0>

The first X-coordinate of the Checkpoint

<Z0>5</Z0>

The first Z-coordinate of the Checkpoint

<X1>126</X1>

The second X-coordinate of the CheckPoint

<Z1>5</Z1>

The second Z-coordinate of the CheckPoint

<Y>512</Y>

The y-height of the CheckPoint

</CPEntry>

-<TrackObjectList>

This is the next element of the structure and holds all other trackobject elements.

-<TOEntry>

<id>0</id>

The consecutive number of CheckPoint objects, sorted by placement

<Class>SpawnPoint</Class>

The class describes the kind of the trackobject, which are following the existing objectlist to assign the object to the correct ingame object for spawning.

<X>269</X>

The x-coordinate value on the track

<Y>0</Y>

The y-coordinate value on the track

<Z>259</Z>

The z-coordinate value on the track

<RotationY>0</RotationY>

The y-rotation value on the track

<ScaleModifierX>0</ScaleModifierX>

The object will be scaled according to the tracksize. This modifier will give the opportunity to modifiy the x-size of this object.

<ScaleModifierY>0</ScaleModifierY>

The object will be scaled according to the tracksize. This modifier will give the opportunity to modifiy the y-size of this object.

<ScaleModifierZ>0</ScaleModifierZ>

The object will be scaled according to the tracksize. This modifier will give the opportunity to modifiy the z-size of this object.

</TOEntry>

</TrackObjectList>

Dies is the license information, about the used Creative Commone License – Zero which is applied to all grt files and stored in the file in order to record the licensing conditions in every file.

-<CreativeCommonLicense-CC0>

<Link>https://creativecommons.org/licenses/</Link>

<License>CC0</License>

<LicenseOwner>GeneRacing</LicenseOwner>

<LicenseOwnerLink>http://www.gene-racing.com</LicenseOwnerLink>

</CreativeCommonLicense-CC0>

</GeneRacingTrackInfos>