KCL Tutorial (CTools and SZS Modifier)

From Custom Mario Kart
Revision as of 23:08, 24 September 2019 by KantoEpic (talk | contribs) (→‎SZS Modifier)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page is a part of the Custom Track Tutorial and will explain how to generate a KCL file from your optimized collision model using CTools's KCL Editor or SZS Modifier.

CTools

Replacing the old course.kcl in the SZS Explorer component of CTools.

KCL files generated using the CTools KCL Editor are unusable, as the resulting KCL will be very bouncy and difficult to drive on. MrBean35000vr believes the bounciness issue is caused by the grid generated being too small. You can, however, use CTools to create a large KCL file which will then be overwritten using the SZS Modifier, as explained below.

To create the file in the CTools editor, right click on your course.kcl in SZS Explorer, and choose Open withKCL Editor. Import an OBJ file of your level. Note that you might need to add extra (random) geometry to the model at this step, so the resulting KCL will be big enough for SZS Modifier. It will typically need a larger KCL than CTools generates, considering the exact same model. Setting KCL flags will not be important on this step, as they will have to be redone later in SZS Modifier.

SZS Modifier

Generating a new course.kcl in SZS Modifier's KCL Editor.

The SZS Modifier does not generate a KCL from an OBJ file; instead, it generates it from a BRRES. So you need to put your collision model in a BRRES first. So open the CTools BRRES Editor and import the collision OBJ file with the course_model option selected. Save the file with a different name like course_model_solidity.brres. Import the BRRES into your SZS with SZS Explorer and save (don't overwrite the normal course_model!). Now open the SZS file in SZS Modifier.

Next, open the model you just created with SZS Modifier. Make sure that you're not opening the course.kcl in SZS Modifier, just the actual BRRES. There will be a message at the bottom left-hand corner of the screen that says Loading Textures. The model will then display, and you can use the zoom function to get a better look. On rare occasions there will be a message that says Parsing File. If the editor becomes stuck on this message, reboot your computer.

Select Create KCL on the Tools Menu, and choose the solidity types you want for each texture. A list of solidity types and what they all do can be found in the KCL flags article. Once you have picked your solidity values, click OK and the program will begin patching the KCL file. You will typically get several error messages during this process. The first, with a yellow icon, "The KCL generation encountered a problem with one or more areas. These have been excluded from the KCL." is normal, and usually will not adversely impact your level. Click OK whenever this error pops up. If your KCL generation was successful, no more error messages will appear and the model will refresh in the preview screen. Don't forget to save your changes.

Your final error message might have a red x icon and reads "There is not enough vertex space in the KCL for this operation. Space needed: XXXX.". It is easy to miss this "not enough space" message and think that your level was patched, so keep an eye out for the red icon. This means the base KCL being used is too small for the model you're trying to generate; go back to the previous step of this tutorial and import a bigger OBJ file in CTools. You can also modify your collision model to have less faces.

Delete the collision model BRRES from your SZS after you're done generating the KCL, as it will not be loaded and only take up space.

Editing an Existing KCL

You can change solidity types without patching a KCL file. Open your SZS with SZS Modifier. Click on the course.kcl file. This will bring up the KCL editor window. Like before, refer to the KCL flags article to interpret solidity types.

Next

Proceed to the KMP Editing tutorial.

Links