Jump to content

XML:OFGA: Difference between revisions

365 bytes removed ,  20 November 2023
m
link fix
m (seems fixed now)
m (link fix)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{XML_File_Header | type=OFGA | prev=OBAN | next=ONCC | name=Object Furniture Geometry Array }}
{{XML_File_Header | prev=OBAN | type=OFGA | next=ONCC | name=Object Furniture Geometry Array}}


===general information===
==General information==
* The xml code on this page is compatible with onisplit '''v0.9.61.0''' and '''v0.9.68.0'''
* The XML on this page is compatible with OniSplit '''v0.9.61.0''' and '''v0.9.68.0'''.
* OFGA are level specific<!-- and maybe global? (not tested) -->.
* OFGA are level-specific (and maybe can be global too? Not tested).
* OFGA files were rarely used in game, only to get the bounding box of the geometry.
* OFGA files were rarely used in-game only to get the bounding box of the geometry.
* Nowadays they are used to import objects with no functions. (Doors, consoles, etc. becomes imported by their object collections. See [[XML:ONLV|ONLV]] for more information.)
* Nowadays they are used to import objects with no function. (Doors and consoles get imported through object collections. See [[XML:ONLV|ONLV]] for more information.)


 
==XML tags==
===tags===
{| class="wikitable" width="100%"
{| class="wikitable" width="100%"
!width=150px| XML tag
!width=150px| XML tag
!width=120px| content type
!width=120px| Content type
! description
! Description
|-
|-
| <OFGA id="...">
| <OFGA id="...">
| integer
| integer
| marks the beginning of OFGA content
| Marks the beginning of the OFGA content.
|-
|-
|valign=top| <EnvParticle>
|valign=top| <EnvParticle>
Line 24: Line 23:
| <Elements>
| <Elements>
| -
| -
| You can put here quite any number of <OFGAElement> tags. The array is an int32.
| You can put here practically any number of <OFGAElement> tags. The array is an int32.
|-
|-
| <OFGAElement>
| <OFGAElement>
Line 32: Line 31:
|valign="top"| <GunkFlags>
|valign="top"| <GunkFlags>
|valign="top"| flag
|valign="top"| flag
| for more theoretic possible AGQG flags see ''onisplit -help enums''
| Here are the common flags. For more theoretically-possible AGQG flags, see ''onisplit -help enums''.
: None
: None
: NoCharacterCollision
: NoCharacterCollision
Line 51: Line 50:
| <Particles>
| <Particles>
| -
| -
| You can put here quite a number of <ENVPParticle> tags. The array is an int16.
| You can put here practically any number of <ENVPParticle> tags. The array is an int16.
|-
|-
|valign="top"| <ENVPParticle>
|valign="top"| <ENVPParticle>
|valign="top"| -
|valign="top"| -
| ENVP is used to store particles attached to objects or furniture: Locklights, lights, fire, smoke, steam, "electricity" etc. Loose particles are normally added to the level [[XML:BINA/OBJC/PART|particle collection]].
| ENVP is used to store particles attached to objects or furniture: locklights, lights, fire, smoke, steam, bolts of electricity, etc. Loose particles are normally added to the level's [[XML:BINA/OBJC/PART|particle collection]].
|-
|-
| <Class>
| <Class>
Line 71: Line 70:
| <Transform>
| <Transform>
| matrix
| matrix
| Float 3*3 + float X Y Z position of the particle. Can be used to orient and stretch the particles (decals, locklights, etc). (How?)
| Float 3*3 + float X Y Z position of the particle. Can be used to orient and stretch the particles (decals, locklights, etc.). (How? Expand on this.)
|-
|-
| <DecalScale>
| <DecalScale>
Line 84: Line 83:
|}
|}


===Example 1===
[[Image:OFGA_extracted_M3GMs_of_V_tctf_cruiser.png|thumb|200px|right|Extracted "V_tctf_cruiser.oni" (OFGA) from shared folder (furniture), seen in Mod Tool, Wireframe mode.]]


;Example 1
{| border=0 cellspacing=20 cellpadding=0 style="float:right"
|width=200px|
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/OFGAV_tctf_cruiser.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XML_modding/OFGAV_tctf_cruiser_tn.png]
extracted OFGAV_tctf_cruiser.xml file led to the 8 M3GM instances
the single parts were then imported into Mod Tool
|}
  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
  <Oni>
  <Oni>
Line 135: Line 127:
  </Oni>
  </Oni>


===Example 2===
[[Image:OFGA_streetlights_with_particle_ingame.png|thumb|200px|right|Streetlights are originally part of the level geometry. For import tests they have been transformed into a M3GM and OFGA file.]]


;Example 2
{| border=0 cellspacing=20 cellpadding=0 style="float:right"
|width=200px|
[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/streetlights_zps47653ed9.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/streetlights_tn_zps4d4f227f.png]
|}
  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
  <Oni>
  <Oni>
Line 172: Line 161:
  </Oni>
  </Oni>


==Export==
To extract the OFGA file:
OniSplit -extract:xml out in/OFGA*.oni


 
To extract M3GM parts only:
==export==
A)
  OniSplit -extract:obj out in/OFGA*.oni
  OniSplit -extract:obj out in/OFGA*.oni


 
==Import==
B) You can also identify the single geometry parts by going through the xml file and then export the M3GM file of your interest.
Be sure your OBJ file contains triangulated meshes. Quads can give you visual glitches.
OniSplit -extract:xml out in/OFGA*.oni
OniSplit -extract:obj out in/M3GM*.oni
 
 
==import==
Be sure your obj file contains triangulated meshes. Quads can give you visual glitches.


  OniSplit out_folder -create:m3gm [-tex:texture_name] input_folder/file.obj
  OniSplit out_folder -create:m3gm [-tex:texture_name] input_folder/file.obj
: -tex argument is optional but you should use it to prevent bugs
: The "-tex" argument is optional but you should use it to prevent bugs.
 
After TXMP, M3GM and OFGA creation you can go on to [[XML:ONLV#Furniture.xml|furniture file]].


After the creation of the TXMP, M3GM and OFGA, you can go on to the [[Creating a level#Furniture.xml|furniture file]].


{{XML}}
{{XML}}