Difference between revisions of "Object Editing"

From Custom Mario Kart
Jump to navigation Jump to search
(Moving the Minimap article to a new page.)
Line 1: Line 1:
This page covers some important, but short [[Custom Track]] topics.  The only tutorial on this page that is truly necessary for all tracks to work properly is creating a minimap.  Move on to the [[KMP Editing]] tutorial when you're ready.
+
This page covers some important, but short and optional [[Custom Track]] topics.  Move on to the [[KMP Editing]] tutorial when you're ready.  
 
 
==Creating a Minimap==
 
 
 
In the previous tutorials, we used the BRRES Editor to import our course model.  While the BRRES ''is'' capable of creating a map model, the minimap will usually not be displayed under the minimap icons in the correct positions. Additionally, trying rescale a BRRES Editor-imported minimap will also fail to maintain the correct position on the screen.  So even if the minimap does line up, it usually won't be the right size.  Instead, it is better to use SZS Modifier to import the minimap.  Additionally there is more than one method to isolate surfaces on your track so that the minimap model only displays roads. 
 
 
 
===Step 1: Creating a Minimap OBJ Model===
 
 
 
====SketchUp====
 
 
 
[[File:MapmodelcreationSketchup.jpg ‎|200px|thumb|Roads selected in [[SketchUp]], then pasted into a new file.]]
 
:Most likely you will be using either one texture or a few different textures exclusively for roads in your model.  Select one instance of each texture used on your roads, then from the right click menu choose ''Select > All with same Material'', then ''copy''.  Next go to ''File > New''.  Select ''Paste In Place'' from the Edit Menu.  Next, delete any lines separating textures or holes in your map model to reduce the number of polygons.  If there are a lot of height variations on your road, it may be necessary to flatten your model to further reduce the number of polygons.  Search google for a plugin that does this. <!--- I haven't been able to find it.  Someone post a link please. ---> Save as a new SketchUp file, then export as an OBJ file.
 
 
 
 
 
====SZS Modifier====
 
 
 
[[File:MapmodelcreationSZSModifier.jpg ‎|200px|thumb|Roads selected in [[SZS Modifier]].]]
 
:Load your SZS in SZS Modifier.  Click on the course_model for your level, which will open up a new windo displaying your model.  Zoom in once the textures have finished loading.  On the right hand pane will be displayed all the of textures used in your model.  Holding the CTRL button, select only the textures used on your roads.  Next choose ''Export'' from the File Menu and save as an OBJ file. 
 
 
 
===Step 2: Importing the Minimap Model===
 
 
 
 
 
====BRRES Editor====
 
 
 
 
 
====SZS Modifier====
 
 
 
 
 
===Step 3: Minimap Position===
 
 
 
 
 
The next step is to find the position values for your minimap. 
 
 
 
====BRRES Editor====
 
 
 
 
 
====Sketchup====
 
 
 
===Step 4: Positioning the Minimap===
 
 
 
====SZS Modifier====
 
 
 
To make the map you do this:
 
# These settings control how large the minimap will be when displayed on screen.  Import your whole model into the BRRES editor with map_model selected. Then open the map_model with szs modifier, go to tools -> Minimap Control and write down the settings.  You can also get these values from Sketchup.  Measure (in meters) from origin (where the red, green and blue axes meet) a bit farther than the edge of your drivable roads in each direction.
 
# Open the course_model with SZS modifier, select the polygons to make your map from, and export it as .obj
 
# Open a big map_model (like that of Mushroom Gorge or Rainbow Road) and import the just exported .obj file
 
# Go to tools -> minimap controls and fill in the settings you've written down.
 
 
 
If you get an error (model is too complex) you can try the following things:
 
 
 
After exporting the map polygons as obj, import this as map_model in BRRES editor, then export it again as obj, this merges the polygons to one and may solve the problem. Go on with step 4.
 
 
 
Flatten the map, you do this in a 3D modeling editor. First make a copy of the model, then delete all things that are not needed for the map. Then flatten the model (If you use SketchUp, search on Google for a plugin that can do that for you). Export this as obj, make it a single polygon (in SketchUp, give everything the same texture/no texture). Go on with Step 4.
 
  
 
==Creating a Cannon==
 
==Creating a Cannon==

Revision as of 23:20, 1 December 2011

This page covers some important, but short and optional Custom Track topics. Move on to the KMP Editing tutorial when you're ready.

Creating a Cannon

*KMP Modifier might be required*

Cannons are anything that trigger your vehicle to fly enourmous distances. They are present in Mario Kart games since Mario Kart 64, and in Mario Kart Wii they appear in DK Summit/Snowboard Cross, Maple Treeway, Rainbow Road, N64 DK's Jungle Parkway and GCN DK Mountain. They also appear in a variety of custom tracks; Altough Cannon City is a track dedicated specially for cannons, the one with the biggest number of then is SixKingLabyrinth.

To place one in your track, you first need to add one to your KMP file. To do so, you can use Khacker35000vr's KMP Modifier. The points in the KMP files tell you where you'll land at, at the end of the cannon. The cannon's y-angle must point in the direction that you want the cannon to launch, or else it will mess up and not go to the position you set it to. The value under ? controls the cannon type, which is explained below.

Now, you must add a new polygon to your Solidity model. It's the cannon trigger. As soon as you touch this polygon, the cannon will be activated and you'll appear in the point you've set at the KMP in record speeds (kinda). So make it a square at the edge of the ramp, right at the place where you're probably going to put the DK cannon or the Star Launcher at (those objects are just for decoration, just to let you know that there is a cannon there).

After you've imported your new polygon, generate the KCL. The value for the cannon trigger polygon is 0x11. If you test ingame now, the cannon should work.

Extra Info

  • If you want to place multiple cannons in your track, add more cannon KMP points and more launcher KCL polygons. When generating the KCL, the variation of the flag must be the same as the Point ID you're supposed to get to.
  • The settings for the KMP point are like this: FFFF is straight (like most cannons), 0001 is curved (like N64DKJP), 0003 is slow (unused, goes about 1/10 or 1/15 of the normal speed), 0002 is similar to 0001.

Editing models other than the course's

This is as easy as editing the actual course model. It's actually even easier.

If you want, for example, edit the texture of a goomba, that's an object, you just have to open kuribo.brres (it's the BRRES file for the Goomba) and edit it. It has a model and textures, just like the course. It's the same for the skybox, it's located in vrcorn_model.brres. The itembox is in itembox.brres, obviously. If you don't know what is the BRRES for a spcific object, just look for it. You'll find it soon.

Porting objects between courses

*SZS Explorer or Wiimms SZS Tools required*

This explains you how to port objects between course files. For example, if you want to place a thwomp in a track that's based off from GCN Mario Circuit, you must port a thwomp there. You can't simple place a dossunc (object for the Twhomp) in the KMP and expect it to work.

To do that, you must put the object's files (usually a BRRES, but sometimes includes effect and brasd files as well) in the other track's SZS file. Doing this requires either the SZS Explorer or the Wiimms SZS Tools.

SZS Explorer

This will teach you how to port with the SZS Explorer using a Goomba as an example.

  • Open both course files (the course with the object you want to move, and the destination course) with two SZS Explorer windows.
  • Export the files for the goomba from the course that has it. They're kuribo.brres and the kuribo folder (along with the two files that are in it, of course) that's in the brasd folder. Right click then to do so.
  • Import the files into the new SZS file. Right click the root folder and import kuribo.brres into it, and right click into the brasd folder and import the kuribo folder into it. If there isn't a brasd folder in your new course file, right click the root and create one.

You should already be able to use a goomba in your new course. Remember that different objects use different files - some objects use stuff in the effect folder, some use multiple BRRES files, some use KCL files, and some don't have BRRES files (those are the ones without a 3d model, such as light emissors for example).

Porting skydome models, map models, course models, KCLs and KMPs is the same proccess: you export it from the original course, and you replace it in the new course. The best KCL to use is Maple Treeway's and the best map_model.brres to use is Mushroom Gorge's, if you want to know. The KMP to use varies depending on the track you want to make, some people say that the N64 Bowser Castle one it the best.

Wiimms SZS Tools

Assume, we have 2 SZS files called SOURCE.szs and DEST.szs in the current directory. We plan to copy some objects from source to dest:

  1. Extract the files of both SZS files:
    wszst extract SOURCE.szs DEST.szs
    Now we have to new directories: SOURCE.d and DEST.d
  2. Copy the objects from SOURCE.d to DEST.d with a file browser of your choice. Be sure to use the same sub directories.
  3. Create a new destination file:
    If you want to overwrite the old DEST.szs use:
    wszst create DEST.d --overwrite
    If you want to crate a new SZS file use:
    wszst create DEST.d --dest NEW.szs
  4. If is possible to compare the SZS files on sub file level:
    wszst diff DEST.szs NEW.szs
References

Changing Post Effects

Post effects are meant to simulate the natural environment of the world. There are post effects to make courses look snowy, desert-like, very hot, etc. For example, if you decide to change a daytime course like Luigi Circuit so that it appears to be night time but don't edit the post effects, the course will still look bright and your characters will still seem to be in the sun, even if the level has been given a night-time sky. You must change post effects for lightning to be correct.

Swapping Post Effects

To change post effects, you simply export them from one course's file and import them into another, using SZS Explorer or Wiimms SZS Tools, the same as you would do with object files. Post effects, unsurprisingly, are found in the posteffects folder.

  • BBLM files - Glow, bloom
  • BDOF files - Focus, Sharpness and blur
  • BFG files - Fog
  • BLIGHT files - Lighting
  • BLMAP files - Post effect controller
  • ***1 files - Used for multiple post effects in the same course. Mushroom Gorge, for example, has post effect data for inside and outside the cave.

Editing Post Effect Files

A view of SZS Explorer's Hex Editor window with the Edit Menu displayed.

Currently the only method to edit post effect files is by Hex Editing. It is possible to find attributes by experimentally changing various hex values and then testing them in-game. The following attributes are currently known:

Fog

First you will need a posteffect.bfg file in your level; if there isn't one in the posteffect folder, import it from another level. You will want to find fog that already has the desired intensity because color is the only attribute currently known. Using SZS Explorer, open the file. Select Goto from the Edit Menu. Search for offset 0x0C. Then select Overwrite Mode to enable editing. The color is 4 bytes long and is in RR GG BB AA format; the alpha is seemingly ignored. Intense red fog, for example, would have the value FF 00 00 00.

Links