Creating a BRRES with BrawlBox

From Custom Mario Kart
Revision as of 19:32, 2 September 2014 by Omonimo747 (talk | contribs)
Jump to navigation Jump to search
Under Construction
This article is not finished. Help improve it by adding accurate information or correcting grammar and spelling.

This page describes how to create a Custom Track BRRES with BrawlBox, if you only want to use some features of BrawlBox, but create it with CTools, look at BrawlBox Tricks. This page does not describe how to create a Custom Character, but it may will in the future.

Importing

To create a brres in BrawlBox you need to import a DAE file, this DAE file needs to be in the 3ds Max 2010 format, OpenCOLLADA or newer versions of 3ds Max won't work. If you have a version of 3ds Max newer than 2010, export the model in FBX format instead and convert it to DAE with Autodesk FBX Converter 2010.2.

First make a new BRRES (File -> New -> Brres Resource Pack). Then right-click the BRRES node and click Import -> Model. Use the following settings:

  • Type: Stage/Item
  • Tick: Force float vertices, Force float normals, Force float UV's, Remap materials and Force triangle primitives only (can't be un ticked).
  • Untick: Add color nodes, if none and Force CCW primitive culling.

If you are importing a model without vertex coloring, such a model exported as OBJ from Sketchup, imported on 3ds Max and re-exported as DAE, you have to check also "Add color nodes, if none" and "Remap all objects to one color node".

You might walk against some problems, most noticably randomly moved faces/polygons and rotated models. This can be fixed by swapping the Axis Conversion setting when exporting the model, from Y-up to Z-up or vice versa. If that doesn't work instead try setting the pivots in 3ds Max. Set all pivots' positions to the origin (0,0,0) and rotate them -90 degrees on the X axis.

If you've imported it you might wish to rename things for more readability. And you need to change some bone settings. Go in the MDL0 and change the to bones and right-click TransN and select Add to parent. Then delete TopN. Also make sure that the model version is set to 11 rather than 9. Now you can save the brres as backup.

Now go to "Shaders", select Shader 0 and open, then select Stage 0; look for ColorScale and set it from "MultiplyBy4" to "MultiplyBy1"; this will avoid your texture become too much bright.

At this stage before doing anything else save the BRRES file and open it in SZS Modifier and open the model, if the polygon list on the right does not populate with the names of the polygons and you have correctly followed the steps go back to Brawlbox and go to the MDL0's Colors section and make sure that at least one of the colors in each color node has an alpha value of less than 255. You will need to do this anyway for any objects that use a transparent material but this will ensure the stability of the BRRES file. Save again and if the polygon list gets populated correctly in SZS Modifier (the model will either not show or be completely white even when you add the textures, don't worry) you can now move on to fixing the materials, shaders and making other changes to improve the look of your model.

Color Nodes

You shouldn't have problems if you are importing a model with vertex coloring, but if not (therefore you checked also "Add color nodes, if none" and "Remap all objects to one color node") you have to go to the Colors folder inside the MDL0, click on the only color node which you see (it should be the unique), and in the lateral table click "Colors" and set the color node to:

  • A: 254
  • B: 255
  • G: 255
  • R: 255

Now you can save as backup.

Materials and Textures

After importing you only have the MDL0, a lot of things need to be set now, and the textures need to be imported. You can import textures with Right-click BRRES -> Import -> Texture. Material settings are very important to make your track look good, but it's very complicated. Only the critical stuff is explained here:

Materials for Textures without Transparency

The settings for textures without transparency (fully opague textures) are almost completely right after importing. The only changes they require are for the light channels. Under SCN0 References you should have all set to -1 except FogSet, which should be 0.

Materials for Textures with Transparency

For textures with fully opague and fully transparent parts you need some additional settings. This is to fix the Harry Potter effect.

AlphaFunction:

  • Ref0 = 128
  • Comp0 = GreaterOrEqual
  • Logic = And
  • Ref1 = 255
  • Comp1 = LessOrEqual

The following settings are also important but should already been set on import. But it's good to check this too:
Material:

  • EnableAlphaFunction = True

Z Mode:

  • EnableDepthTest = True
  • EnableDepthUpdate = True
  • DepthFunction = LessOrEqual

Materials for Textures with Opacity

It still needs to be done, look at BrawlBox Tricks