Difference between revisions of "TRN (FileFormat)"

From SWGANH Wiki
Jump to: navigation, search
('''Known Affectors''')
m (Reverted edits by Rouse (Talk); changed back to last version by Snow)
Line 6: Line 6:
  
 
<pre>
 
<pre>
- The Shader group         (SGRP)
+
- The Surface group     (SGRP)
- The Flora group           (FRGP)
+
- The Flora group       (FRGP)
- The Radial group         (RGRP)
+
- The Radial? group     (RGRP)
- The Environment group     (EGRP)
+
- The Environment group (EGRP)
- The unknown named group   (MGRP)
+
- The -unamed- group   (MGRP)
- The Layers group         (LYRS)
+
- The Layers group     (LYRS)
 
</pre>
 
</pre>
  
=='''<font color="orange">SGRP</font>''' - Shader Group ==
+
=='''<font color="orange">SGRP</font>''' - Surface Group ==
  
Where all the surfaces are declared. (Select shader group properties.)
+
Where all the surfaces are declared.
  
  
Line 31: Line 31:
 
Here its declares 2 shaders: dirt.rockmud, dirt.rockmund.a1
 
Here its declares 2 shaders: dirt.rockmud, dirt.rockmund.a1
 
using abstract/terrain_surface/harddirt.iff
 
using abstract/terrain_surface/harddirt.iff
 
=='''<font color="orange">????</font>''' - Shader Child ==
 
 
Select shader child rule properties, including family name data, and shader weight data.
 
  
 
=='''<font color="orange">FGRP</font>''' - Flora Group ==   
 
=='''<font color="orange">FGRP</font>''' - Flora Group ==   
  
Where all the flora groups are decared using appearance files. (Select flora group properties, including flora family data.)
+
Where all the flora groups are decared using appearance files.
  
 
Each one of them decalre one flora group using  multiple appearance files.
 
Each one of them decalre one flora group using  multiple appearance files.
Line 56: Line 52:
 
Here it declares a group named 'Granite.Rocks1' wich contains graniteslab of different sizes.
 
Here it declares a group named 'Granite.Rocks1' wich contains graniteslab of different sizes.
  
 
=='''<font color="orange">????</font>''' - Flora Child == 
 
 
Select flora child rule properties, including flora family name, child weight data, swaying displacement and period, scaling min/max value.
 
  
 
=='''<font color="orange">RGRP</font>''' - Radial Group ==   
 
=='''<font color="orange">RGRP</font>''' - Radial Group ==   
  
I Don't know much about this one yet. (Select Radial Group properties.)
+
I Don't know much about this one yet.  
  
=='''<font color="orange">????</font>''' - Radial Child == 
 
  
I Don't know much about this one yet. (Select Radial child rule properties, including family name data, child weight, distance, width and height data, and swaying displacment and period data.)
 
  
 
=='''<font color="orange">EGRP</font>''' - Environment Group ==   
 
=='''<font color="orange">EGRP</font>''' - Environment Group ==   
Line 78: Line 68:
 
</pre>
 
</pre>
  
=='''<font color="orange">MGRP</font>''' - unknown named Group ==   
+
=='''<font color="orange">MGRP</font>''' - -unamed- Group ==   
  
 
Where all the fractal are decalred.
 
Where all the fractal are decalred.
Line 111: Line 101:
 
=='''Known Affectors'''==
 
=='''Known Affectors'''==
  
{| class="wikitable" align="left"
+
{| class="wikitable" align="center"
|+ '''Construction Layers'''
+
|+ '''Area Delimiters'''
 
|-  
 
|-  
||'''<font color="purple">BREC</font>'''||Boundary Rectangle||Delimits a rectangle using 4 float: X1, Y1, X2, Y2 (Select rectangle boundary rule properties, including feathering distance, boundary left/right and near/far coords and local water table height, shader and sahder size.)
+
||'''<font color="purple">BREC</font>'''||Boundary Rectangle||Delimits a rectangle using 4 float: X1, Y1, X2, Y2
 
|-
 
|-
||'''<font color="purple">BCIR</font>'''||Boundary Circle||Delimits a circle using 3 float: Xo, Yo, Radius (Select circle boundary rule properties, including feathering distance, boundary center coords, and boundary radius.)
+
||'''<font color="purple">BCIR</font>'''||Boundary Circle||Delimits a circle using 3 float: Xo, Yo, Radius
 
|-
 
|-
||'''<font color="purple">BPOL</font>'''||Boundary Polygon||Delimits a n-sided closed polygon area using 2 floats (Xo,Yo) for each point. (Select polygon boundary rule properties, includibng feathering distance  and including local water table height, shader and shader size.)
+
||'''<font color="purple">BPOL</font>'''||Bondary Polygon||Delimits a n-sided closed polygon area using 2 floats (Xo,Yo) for each point.
 
|-
 
|-
||'''<font color="purple">BPLN</font>'''||Boundary PolyLine||Delimits a n-sided line area using 2 floats (Xo,Yo) for each point and a float for the width. (Select polyline boundary rule properties, including feathering distance and width.)
+
||'''<font color="purple">BPLN</font>'''||Boundary PolyLine||<font size="1">Delimits a n-sided line area using 2 floats (Xo,Yo) for each point and a float for the width.</font>
 
|-
 
|-
||'''<font color="purple">ACCN</font>'''||Affector Color Constant||Select color for rule.
+
||'''<font color="purple">FFRA</font>'''||Filter Fractal||Delimits an area generated by a 2d fractal on the ground.
 
|-
 
|-
 
|}
 
|}
Line 130: Line 120:
 
|+ '''Texture / Shaders'''
 
|+ '''Texture / Shaders'''
 
|-  
 
|-  
||'''<font color="purple">ASCN</font>'''||Affector Shader Constant||Affect a shader using the family_id and the shader_id this family. (Select rule shader and family and feathering parameters.)
+
||'''<font color="purple">ASCN</font>'''||Shader Constant||Affect a shader using the family_id and the shader_id this family.
 
|-
 
|-
||'''<font color="purple">ASCR</font>'''||Affector Shader Replace||Replace a shader with another shader (Select rule shader replace families, including source family (the family to be replaced), destination family (the family to replace with), and feathering parameters.)
+
||'''<font color="purple">ASCR</font>'''||Shader Replace||Replace a shader with another shader (not tested yet)
|-
+
||'''<font color="purple">FSHD</font>'''||Filter Shader||Select filter shader rule properties, including shader family.
+
 
|-
 
|-
 
|}
 
|}
Line 142: Line 130:
 
|+ '''Terrain'''
 
|+ '''Terrain'''
 
|-  
 
|-  
||'''<font color="purple">AHCN</font>'''||Affector Height Constant||Raises or lowers the ground using float for delta and float(scalar?) for slope-smooting. (Select terrain height value for rule.)
+
||'''<font color="purple">AHCN</font>'''||Height Constant||Raises or lowers the ground using float for delta and float(scalar?) for slope-smooting.
 
|-
 
|-
||'''<font color="purple">AHFR</font>'''||Affector Height Fractal||Raises or lowers the ground irregulary using a fractal type from the Fractal Family.Float for delta and float(scalar?) (Select terrain height value for rule for fractal family.)
+
||'''<font color="purple">AHFR</font>'''||Height Fractal||Raises or lowers the ground irregulary using a fractal type from the Fractal Family.Float for delta and float(scalar?)
|-
+
||'''<font color="purple">AHFT</font>'''||Affector Height Terrace||Select terrace height and flat ratio values for rule. (Select terrance height and flat ratio values for rule.)
+
 
|-
 
|-
 
|}
 
|}
Line 154: Line 140:
 
|+ '''Flora'''
 
|+ '''Flora'''
 
|-  
 
|-  
||'''<font color="purple">AFSC</font>'''||Affector Flora Static Collidable||Sets the amount of collidable flora. (Select to add/remove flora, specify flora tpe and set flora density for static collidable flora.)
+
||'''<font color="purple">AFSC</font>'''||Collidable Constant||Sets the amount of collidable flora.
 
|-
 
|-
||'''<font color="purple">AFSN</font>'''||Affector Flora Static Non-Collidable||Sets the amount of Non-collidable flora. (Select to add/remove flora, specify flora tpe and set flora density for static non-collidable flora.)
+
||'''<font color="purple">AFSN</font>'''||NonCollidable Constant||Sets the amount of Non-collidable flora.
|-
+
||'''<font color="purple">AFDN</font>'''||Affector Flora Dynamic Near||I don't know much about those yet. Seems like they change the near/far radial displaying. They're often coupled to the flora affectors, for instance when cleaning an area for a city.  (Select to add/remove flora, specify flora type and set flora destiny for dynamic near flora.)
+
|-
+
||'''<font color="purple">AFDF</font>'''||Affector Flora Dynamic Far|| (Select to add/remove flora, specify flora type and set flora destiny for dynamic far flora.)
+
 
|-
 
|-
 
|}
 
|}
Line 166: Line 148:
 
{| class="wikitable"
 
{| class="wikitable"
 
|+ '''Radials'''
 
|+ '''Radials'''
 +
|-
 +
||'''<font color="purple">AFDN</font>'''||Radial Constant||I don't know much about those yet. Seems like they change the near/far radial displaying. They're often coupled to the flora affectors, for instance when cleaning an area for a city.
 
|-
 
|-
||'''<font color="purple">????</font>'''||Affector Radial Far Constant||This one shows up on the Patent App.
+
||'''<font color="purple">AFSN</font>'''||NonCollidable Constant||Sets the amount of Non-collidable flora.
 
|-
 
|-
 
|}
 
|}
Line 173: Line 157:
  
 
{| class="wikitable"
 
{| class="wikitable"
|+ '''Unknown'''
+
|+ '''Unknown yet'''
 
|-  
 
|-  
||'''<font color="purple">AENV</font>'''||Environment||Select enviroment group rule properties.
+
||'''<font color="purple">AENV</font>'''||Environment||<font color="darkred">'''Unknown'''</font>
|-
+
||'''<font color="purple">????</font>'''||Filter Direction||Select filter direction rule properties, including feathering distance, and min and max angle settings for filter setting to have effect.
+
|-
+
||'''<font color="purple">FFRA</font>'''||Filter Fractal||Delimits an area generated by a 2d fractal on the ground.  (Select filter fractal rule properties incuding fractal family, low and high fractal settings and feathering distance.)
+
|-
+
||'''<font color="purple">FHGT</font>'''||Filter Height||Select filter height rule properties, including feathering, distance, filter low height, and filter high height.
+
|-
+
||'''<font color="purple">FSLP</font>'''||Filter Slope||Select filter slope rule properties, including feathering distance, filter min angle, and filter max angle.
+
|-
+
||'''<font color="purple">????</font>'''||Affector Exclude||This one shows up on the Patent App.
+
|-
+
||'''<font color="purple">????</font>'''||Affector Road||Select road rule properties, including width, shader, feathering height distance, and feathering shader distance.
+
 
|-
 
|-
||'''<font color="purple">????</font>'''||Affector River||Select river rule properties, including width, trench depth, flow velocity, bank and bottom shaders, water shader, water depth, water width, feathering distance.
+
||'''<font color="purple">ACRF</font>'''||Colorramp Fractal||<font color="darkred">'''Unknown'''</font>
 
|-
 
|-
||'''<font color="purple">ACRF</font>'''||Affector Color Ramp Fractal||Select rule family and color ramp.
+
||'''<font color="purple">FHGT</font>'''||Filter Height||<font color="darkred">'''Unknown'''</font>
 
|-
 
|-
||'''<font color="purple">ACRH</font>'''||Affector Color Ramp Height||Select rule color ramp and height low/high values.
 
 
|-
 
|-
 
|}
 
|}

Revision as of 22:31, 1 May 2007

TGEN - Terrain Generator

Terrain generator (form name : TGEN) There are 6 different sections.

- The Surface group     (SGRP)
- The Flora group       (FRGP)
- The Radial? group     (RGRP)
- The Environment group (EGRP)
- The -unamed- group    (MGRP)
- The Layers group      (LYRS)

SGRP - Surface Group

Where all the surfaces are declared.


It's sub-divied into multiple surface families (SFAM). Each one of them declare mutliple shaders using a surface file.

53 46 41 4D 00 00 00 70 04 00 00 00 66 72 73 74 5F 64 65 63 	SFAM...p....frst.dec
64 5F 72 6F 63 6B 6D 75 64 00 61 62 73 74 72 61 63 74 2F 74 	d.rockmud.abstract.t
65 72 72 61 69 6E 5F 73 75 72 66 61 63 65 2F 68 61 72 64 64 	errain.surface.hardd
69 72 74 2E 69 66 66 00 C7 AA 83 00 00 00 40 00 00 80 3F 02 	irt.iff.............
00 00 00 64 69 72 74 5F 72 6F 63 6B 6D 75 64 00 00 00 20 41 	...dirt.rockmud....A
64 69 72 74 5F 72 6F 63 6B 6D 75 64 5F 61 31 00 00 00 A0 40 	dirt.rockmud.a1.....

Here its declares 2 shaders: dirt.rockmud, dirt.rockmund.a1 using abstract/terrain_surface/harddirt.iff

FGRP - Flora Group

Where all the flora groups are decared using appearance files.

Each one of them decalre one flora group using multiple appearance files.

46 46 41 4D 00 00 01 CE 01 00 00 00 47 72 61 6E 69 74 65 20 	FFAM........Granite.
52 6F 63 6B 73 31 00 00 80 FF 00 00 80 3F 00 00 00 00 07 00 	Rocks1..............
00 00 72 6F 63 6B 5F 67 72 61 6E 69 74 65 73 6C 61 62 5F 6C 	..rock.graniteslab.l
61 72 67 65 2E 61 70 74 00 00 00 80 3F 00 00 00 00 0A D7 23 	arge.apt............
3C CD CC CC 3D 01 00 00 00 00 00 00 00 00 00 80 3F 00 00 80 	....................
                        [...]                                           [...]
00 00 80 3F 00 00 80 3F 72 6F 63 6B 5F 67 72 61 6E 69 74 65 	........rock.granite
73 6C 61 62 5F 73 6D 61 6C 6C 5F 61 31 2E 61 70 74 00 00 00 	slab.small.a1.apt...
A0 40 00 00 00 00 0A D7 23 3C CD CC CC 3D 01 00 00 00 00 00 	....................
00 00 00 00 80 3F 00 00 80 3F 	                                 ..........

Here it declares a group named 'Granite.Rocks1' wich contains graniteslab of different sizes.


RGRP - Radial Group

I Don't know much about this one yet.


EGRP - Environment Group

Declares the environement

45 46 41 4D 44 41 54 41 00 00 00 19 01 00 00 00 74 61 61 6E 	EFAMDATA........taan
61 62 5F 67 6C 6F 62 61 6C 00 FF FF 00 00 00 80 3F 	        ab.global........

MGRP - -unamed- Group

Where all the fractal are decalred. It's sub-divied into multiple groups (MFAM). Each one of them declare a labelled fractal.

4D 46 41 4D 44 41 54 41 00 00 00 27 01 00 00 00 2E 30 30 31 	MFAMDATA.........001
35 5F 6F 63 74 31 5F 6E 62 69 61 73 5F 42 61 73 65 52 6F 6C 	5.oct1.nbias.BaseRol
6C 69 6E 67 48 65 69 67 68 74 00 46 4F 52 4D 00 00 00 4C 4D 	lingHeight.FORM...LM
46 52 43 46 4F 52 4D 00 00 00 40 30 30 30 31 44 41 54 41 00 	FRCFORM....0001DATA.
00 00 34 A0 11 00 00 00 00 00 00 79 E9 E6 3E 00 00 00 00 00 	..4........y........
00 80 3F 01 00 00 00 C1 CA 61 40 FC A9 71 3D A6 9B C4 3A FA 	.........a...q......
ED EB 3A 00 00 00 00 00 00 00 00 00 00 00 00 	                ...............

This one decalres a fractal labeled 'oct1.nbias.BaseRolling Height' TODO: Add fractal notes here.

LYRS - Layers Group

Layers & Affectors

Basically the role of layers is to affect the data contained in the different families. They can contain any number of other sub-layers. Their order is important.

Trn layers.jpg

A layer deals with the families trough Affectors. There are different types of them, each one has it's own role. Can have Affector for texturing, flora, areas...

Known Affectors

Area Delimiters
BREC Boundary Rectangle Delimits a rectangle using 4 float: X1, Y1, X2, Y2
BCIR Boundary Circle Delimits a circle using 3 float: Xo, Yo, Radius
BPOL Bondary Polygon Delimits a n-sided closed polygon area using 2 floats (Xo,Yo) for each point.
BPLN Boundary PolyLine Delimits a n-sided line area using 2 floats (Xo,Yo) for each point and a float for the width.
FFRA Filter Fractal Delimits an area generated by a 2d fractal on the ground.


Texture / Shaders
ASCN Shader Constant Affect a shader using the family_id and the shader_id this family.
ASCR Shader Replace Replace a shader with another shader (not tested yet)


Terrain
AHCN Height Constant Raises or lowers the ground using float for delta and float(scalar?) for slope-smooting.
AHFR Height Fractal Raises or lowers the ground irregulary using a fractal type from the Fractal Family.Float for delta and float(scalar?)


Flora
AFSC Collidable Constant Sets the amount of collidable flora.
AFSN NonCollidable Constant Sets the amount of Non-collidable flora.
Radials
AFDN Radial Constant I don't know much about those yet. Seems like they change the near/far radial displaying. They're often coupled to the flora affectors, for instance when cleaning an area for a city.
AFSN NonCollidable Constant Sets the amount of Non-collidable flora.


Unknown yet
AENV Environment Unknown
ACRF Colorramp Fractal Unknown
FHGT Filter Height Unknown

Examples

...