OCCL: Difference between revisions

No edit summary
(contributions from myself)
Line 1: Line 1:
{{IplSection
{{IplSection
| name        = OCCL
| game        = {{Icon-square|vc}} {{Icon-square|sa}} {{Icon-square|4}}
| game        = [[Grand Theft Auto: Vice City|GTA VC]], [[Grand Theft Auto: San Andreas|GTA SA]], [[Grand Theft Auto IV|GTA IV]]
| description = Creates occlusion culling zones
| description = Creates zones for separated rendering
}}
}}
'''OCCL''' is a section in the [[Item Placement|IPL]] file that helps make the game run smoother in certain parts of the map. The occlusions are created using invisible boxes. These boxes disable models that are behind the boxes from rendering. This feature is not really effective and Rockstar did not use this feature efficiently. There are not much improvements on occlusions in San Andreas compared to Vice City. Deleting all entries in the occlu section does not have any major effects on the game.
'''OCCL''' is a section in the item placement file in [[Grand Theft Auto: Vice City]], [[Grand Theft Auto: San Andreas]], and [[Grand Theft Auto IV]]. It is used to create [[wikipedia:Hidden surface determination|occlusion culling]] zones that helps make the game run smoother in certain parts of the world. Since it is wasteful to render models behind opaque models, these zones can disable the rendering of any models that are directly behind the zones.


==Location==
== Format ==
Occlusions are controlled by the <code>occl</code> section of the [[Item Placement|IPL]] files. Rockstar created the occlusions through the <code>occlu.ipl</code> in Vice City and the <code>occlu.ipl</code>, <code>occluint.ipl</code>, <code>occluLA.ipl</code>, <code>occlusf.ipl</code>, and the <code>occluveg.ipl</code> in San Andreas. You can open these files using Microsoft Notepad. You do not need to use these files to create your own occlusions as long as the entry is in a defined IPL file.
=== GTA Vice City ===
<pre>
occl
MidX, MidY, BottomZ, WidthX, WidthY, Height, Rotation
end
</pre>


==Format==
The section is used in the <code>\data\occlu.ipl</code> file but it can be used in any IPL files.
mid x, mid y, bottom height z, width x, width y, height from bottom height to top, rotation
{|class="wikitable center-col-1 center-col-2"
{|class="prettytable" width="100%" class="collapsible"
!style="width: 3em;" |{{Icon-square|vc}}
!width="250px"|Identifier
!style="width: 12em;" |Identifier
!style="width: 6em;" |Type
!Description
!Description
|-
|-
|<center>mid x, mid y</center>||The middle of the occlusion box in X and Y coordinates.
|A,B ||MidX, MidY ||float[2] ||The X and Y coordinates of the center of the occlusion zone.
|-
|-
|<center>bottom height z</center>||The bottom Z coordinate of the occlusion box.
|C ||BottomZ ||float ||The bottom Z coordinate of the occlusion zone.
|-
|-
|<center>width x, width y</center>||The width of the occlusion box in units.
|D,E ||WidthX, WidthY ||float[2] ||The width of the occlusion zone in units.
|-
|-
|<center>height from bottom height to top</center>||The difference in height from the top of the occlusion box to the bottom.
|F ||Height ||float ||The height of the zone &mdash; the difference between the top and the bottom of the zone.
|-
|-
|<center>rotation</center>||The rotation of the occlusion box in angles.
|G ||Rotation ||float ||The rotation of the occlusion zone in degrees.
|}
|}


==Viewing It==
=== GTA San Andreas ===
Vice City's occlusions can only be viewed through [[KEd]]. KEd sees occlusion boxes as green, transparent boxes with a small triangular hole in the 3D View. KEd does not support editing the occlusions through the program so you have to create the boxes yourself.
The section is used in <code>\data\occluint.ipl</code>, <code>\data\occluLA.ipl</code>, <code>\data\occlusf.ipl</code>, and <code>\data\occluveg.ipl</code> files.
<pre>
occl
MidX, MidY, BottomZ, WidthX, WidthY, Height, Rotation, , ,
end
</pre>


For San Andreas you can use {{U|Deniska}}'s script pack {{ref|1}} that contains an small tool to import and export the occlusion section of the [[Item Placement|IPL]]
{|class="wikitable center-col-1 center-col-2"
 
!style="width: 3em;" |{{Icon-square|sa}}
==Creating It==
!style="width: 12em;" |Identifier
The following way to make occlusion boxes is practiced by {{U|spaceeinstein}}. First find a building that you want to make occlusion boxes and align it to the X- and Y-axis. Get the coordinates of the lower left corner of the building and the upper right corner of the building. The coordinates for the lower left and upper right corner of the building can be inputted as X1, Y1, and Z1, and X2, Y1, and Z2, respectively, into the occlusion tool. If you are not bothered to get the lower Z coordinate of the box, you can input any number that is lower than the foundation of your building. Making the boxes with angles is pretty tough to do and probably needs some trial and error to fit it into the building.
!style="width: 6em;" |Type
 
!Description
Using {{U|Deniska}}'s script {{ref|1}} you need only to create a box, press the Export button on the script and paste the line from the MAXScript listener to the [[Item Placement|IPL]] section.
|-
 
|A,B ||MidX, MidY ||float[2] ||The X and Y coordinates of the center of the occlusion zone.
==Problems==
|-
If you delete the buildings in Vice City or San Andreas without deleting the occlusions, you would see pop ups behind the occlusions. These occlusions had created problems for a few modifications, most notably in the Liberty City modification. In the Liberty City mod, the team experienced unexpected pop ups caused by the occlusion boxes. These boxes are loading and unloading the models behind boxes where Vice City's buildings used to be at. Someone realized that the <code>occlu.ipl</code> was the problem and deleted every line in that file. The pop ups disappeared.
|C ||BottomZ ||float ||The bottom Z coordinate of the occlusion zone.
|-
|D,E ||WidthX, WidthY ||float[2] ||The width of the occlusion zone in units.
|-
|F ||Height ||float ||The height of the zone &mdash; the difference between the top and the bottom of the zone.
|-
|G ||Rotation ||float ||The rotation of the occlusion zone in degrees.
|-
|H,I || ||float ||
|-
|J || ||int ||
|}


==Tools & Scripts==
== Issues ==
* [[KEd]] &ndash; by {{U|JernejL}}
When removing buildings from the world, you may see unexpected pop ups caused by existing occlusion zones. Deleting all the occlusion zones is the easiest solution. An example of this issue is the Liberty City project. Before this section was researched, the team experienced unexpected pop ups with models loading and unloading behind areas where Vice City's buildings used to be. Someone realized that the <code>occlu.ipl</code> was the problem and deleted every line in that file. The pop ups disappeared and the issue was resolved.


== Statistics ==
Total number of OCCL entries in:
:Vice City: 344 (max 350)


{{fdl}}
{{fdl}}

Revision as of 23:14, 30 June 2018

OCCL (IPL section)
Supported games:GTA Vice City GTA San Andreas GTA IV
Short description:Creates occlusion culling zones
IPL Sections:
AUZO CARS CULL ENEX GRGE INST
JUMP MULT OCCL PATH PICK TCYC

OCCL is a section in the item placement file in Grand Theft Auto: Vice City, Grand Theft Auto: San Andreas, and Grand Theft Auto IV. It is used to create occlusion culling zones that helps make the game run smoother in certain parts of the world. Since it is wasteful to render models behind opaque models, these zones can disable the rendering of any models that are directly behind the zones.

Format

GTA Vice City

occl
MidX, MidY, BottomZ, WidthX, WidthY, Height, Rotation
end

The section is used in the \data\occlu.ipl file but it can be used in any IPL files.

GTA Vice City Identifier Type Description
A,B MidX, MidY float[2] The X and Y coordinates of the center of the occlusion zone.
C BottomZ float The bottom Z coordinate of the occlusion zone.
D,E WidthX, WidthY float[2] The width of the occlusion zone in units.
F Height float The height of the zone — the difference between the top and the bottom of the zone.
G Rotation float The rotation of the occlusion zone in degrees.

GTA San Andreas

The section is used in \data\occluint.ipl, \data\occluLA.ipl, \data\occlusf.ipl, and \data\occluveg.ipl files.

occl
MidX, MidY, BottomZ, WidthX, WidthY, Height, Rotation, , ,
end
GTA San Andreas Identifier Type Description
A,B MidX, MidY float[2] The X and Y coordinates of the center of the occlusion zone.
C BottomZ float The bottom Z coordinate of the occlusion zone.
D,E WidthX, WidthY float[2] The width of the occlusion zone in units.
F Height float The height of the zone — the difference between the top and the bottom of the zone.
G Rotation float The rotation of the occlusion zone in degrees.
H,I float
J int

Issues

When removing buildings from the world, you may see unexpected pop ups caused by existing occlusion zones. Deleting all the occlusion zones is the easiest solution. An example of this issue is the Liberty City project. Before this section was researched, the team experienced unexpected pop ups with models loading and unloading behind areas where Vice City's buildings used to be. Someone realized that the occlu.ipl was the problem and deleted every line in that file. The pop ups disappeared and the issue was resolved.

Statistics

Total number of OCCL entries in:

Vice City: 344 (max 350)
Copyrighted

This page is licensed under the GNU Free Documentation Licence. This page has a separate license to the CC-BY-SA that applies to most of Grand Theft Wiki.

The full text of the GNU FDL v1.2 is here. Click the "History" button to see the full list of authors. See Grand Theft Wiki:Copyright for more detail on our copyright policy.

GNU Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
See Grand Theft Wiki:Copyright for more information.