Difference between revisions of "OCCL"

From GTAMods Wiki
Jump to navigation Jump to search
Line 28: Line 28:
  
 
==Viewing It==
 
==Viewing It==
Vice City's occlusions can 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.
+
Vice City's occlusions can 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 manually or using a script.
  
 
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 [[IPL]]
 
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 [[IPL]]
  
For Vice City you can import correctly with and export (with a minor post edit) using {{U|Deniska}}'s script pack {{ref|1}}
+
For Vice City you can import correctly and export (with a minor post edit) using {{U|Deniska}}'s script pack {{ref|1}}
  
 
[[Image:Occlusion.png|center|frame|Occlusion boxes in KEd]]
 
[[Image:Occlusion.png|center|frame|Occlusion boxes in KEd]]
Line 41: Line 41:
  
 
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 [[IPL]] section.
 
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 [[IPL]] section.
 
+
Remove For Vice City the SA format trailing comma and zeros ", 0.0, 0.0, 0". Then save the <code>occlu.ipl</code>
For Vice City, remove SA format trailing comma and zeros ", 0.0, 0.0, 0". Then save the <code>occlu.ipl</code>
 
  
 
==Problems==
 
==Problems==

Revision as of 11:45, 8 August 2011

40px-Ambox rewrite orange.svg.png This article may need to be rewritten.
Please help improve this article. The discussion page may contain suggestions.
OCCL (IPL section)
Short description:Creates zones for separated rendering
Supported games:GTA VC, GTA SA, GTA IV
IPL Sections:
2DFX AUZO BLOK CARS CULL ENEX GRGE
INST JUMP LINK LODM MLO+ MULT OCCL
PATH PICK RTFX SLOW TCYC VNOD ZONE

OCCL is a section in the 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.

Location

Occlusions are controlled by the occl section of the IPL files. Rockstar created the occlusions through the occlu.ipl in Vice City and the occlu.ipl, occluint.ipl, occluLA.ipl, occlusf.ipl, and the occluveg.ipl 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.

Format

mid x, mid y, bottom height z, width x, width y, height from bottom height to top, rotation
Identifier Description
mid x, mid y
The middle of the occlusion box in X and Y coordinates.
bottom height z
The bottom Z coordinate of the occlusion box.
width x, width y
The width of the occlusion box in units.
height from bottom height to top
The difference in height from the top of the occlusion box to the bottom.
rotation
The rotation of the occlusion box in angles.

Viewing It

Vice City's occlusions can 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 manually or using a script.

For San Andreas you can use Deniska's script pack [1] that contains an small tool to import and export the occlusion section of the IPL

For Vice City you can import correctly and export (with a minor post edit) using Deniska's script pack [1]

File:Occlusion.png
Occlusion boxes in KEd


Creating It

The following way to make occlusion boxes is practiced by 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.

Using Deniska's script [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 IPL section. Remove For Vice City the SA format trailing comma and zeros ", 0.0, 0.0, 0". Then save the occlu.ipl

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 occlu.ipl was the problem and deleted every line in that file. The pop ups disappeared.

Tools & Scripts