Difference between revisions of "Modeling with 3D Editor"

From Custom Mario Kart
Jump to navigation Jump to search
Line 34: Line 34:
 
===3.===
 
===3.===
  
Save your image as a PNG file. Make multiple image files, each with a different part of the road: One with the normal road, one with the offroad, one with the walls, etc. You have to do this so each can have it's own texture and each gets it's own behaviour ingame. To put the track you just made inside the file, you must use the [[Modeling#Tools|Model Creator]] tool.
+
Save your image as a PNG file. Make multiple image files, each with a different part of the road: One with the normal road, one with the offroad, one with the walls, etc. You have to do this so each can have it's own texture and each gets it's own behaviour ingame. To put the track you just made inside the file, go to the next part of the tutorial: [[Modeling#Importing Your Model|Importing Your Model]].
  
 
== Using a 3D modeling program ==
 
== Using a 3D modeling program ==
Line 86: Line 86:
 
Now you are ready to import into the szs modifier, and that's the end of the GSU section.
 
Now you are ready to import into the szs modifier, and that's the end of the GSU section.
  
 +
==Importing Your Model==
 +
 +
In SZS Modifier, open the file "course_model.brres". In it, open the folder "3DModels(NW4R)" and the only file in it, "course".
 +
 +
Wait, and soon a model of the course will appear. Select the polygon you want to import the model to, and...
 +
 +
===Image===
 +
 +
Open the Tools--->Model Creator. A window should pop up, similar to this:
 +
[[Image:Modeltut-import.PNG|thumb|center|440x451px|The Model Creator window]]
 +
Uncheck "Automatically Detect" - that will probably make your track too big. But now, you're going to set values for your model, and you must use the same ones for every piece of the model that you're going to import, so it's better if you write then up.
 +
 +
Anyways, the Minimum X and Z must each be set to the same, and so the Maximum X and Z do (and it's better if all four are the same number, except for the Minimum being negative and the Maximum being positive - that's what you should do if the image is a square).
 +
 +
The Minumum and Maximum Y can't be the same, and you shouldn't make any of then under 0. Usually the original ones that appear will do it, but you have to test - if your slopes end up too steep, decrease the difference between then. If your slopes end up too gentle, increase the difference between then. If there aren't slopes at all, it means that the Minimum and Maximum Y are the same.
 +
 +
'''Culling''': This is not a sport, that would be "Curling"
 +
 +
Culling sets which is the size of the model you're importing. That means:
 +
* If you want to make a road, set it to Clockwise
 +
* If you want to make a ceiling, set it to Counterclockwise
 +
* If you want to make walls, set it to None
 +
 +
If you, for example, accidentally import the road as Counterclockwise, the character will try to stay under the road, but only for a second before being naturally pushed down by gravity. If you set it to None, both sides of the model will be visible and solid. That might sound like the better option, but it actually glitches a lot - there are hugh chances that your shells, bananas and bullet bills won't know what side to go and will disappear.
 
== Tools ==
 
== Tools ==
 +
Those are all avaliable in the BRRES editor:
 +
* Create KCL
 +
This is explained in the [[Important Stuff (Custom Track Tutorial)|Important Stuff]] section.
 +
* Apply a Matrix
 +
Used to increase and decrease the size of the model, as well as moving it certain distances.
 +
* Model Creator
 +
This is what you use to insert your Paint images in the file.
 +
* Delete Polygon
 +
After you imported all of your models, you'll notice that the ones you didn't mess with are still there. You might want to let then there for a visual (such as a Rainbow Road track with Moonview Highway right under it), but in most cases you want to delete then with this option.
 +
* Retexture Polygon
 +
This is explained in the [[Texturing]] section.
 +
* Pinch
 +
This will immediatly switch to a top-down view of the model. You are able to disort the models with this tool.
  
 
+
== After The Model Is Done ==
== After Importing ==
 
 
Now, you follow the [[Texturing]] tutorial to see how to fix the colors of the track so that they're the way you want to.
 
Now, you follow the [[Texturing]] tutorial to see how to fix the colors of the track so that they're the way you want to.

Revision as of 22:04, 20 March 2011

Under Construction
This article is not finished. Help improve it by adding accurate information or correcting grammar and spelling.

This is part of the Custom Track tutorial. Back to the main tutorial page

Modeling can be done either in MS Paint (only MS Paint, not any other image editor) or in a 3D model editor.

Using Miscrosoft Paint

1.

Open Paint and create a new 150x150 image. You have to make the image as small as possible, as long as it contains all of your map. You can make it bigger if you need to.

Before starting to paint make the whole picture black (color #000000). This doesn't get recognized in the model importer.

First, set up some basic greyscales. Greyscales are colours with the same RGB values (e.g. #3F3F3F). If you use any 'colored' color, SZS Modifier won't be able to import it.

2.

After the setup you can start painting now. Paint the map of your track, the same one that would get displayed in the bottom right of the screen ingame.

Remember that simpler drawings have higher chances of getting imported:

Higher chance of being imported
Lower chance of being imported

The grayscale must be set up like this: The higher you want the track to be, the closer to white. So...

Modeltut-height.PNG

If you want the track to be highter, you make it lighter. If you want it to be lower, make it darker.

To make ramps, use a gradient.

To make straight walls, you have to import really steep slopes, and use the Pinch tool to transform then into walls.

3.

Save your image as a PNG file. Make multiple image files, each with a different part of the road: One with the normal road, one with the offroad, one with the walls, etc. You have to do this so each can have it's own texture and each gets it's own behaviour ingame. To put the track you just made inside the file, go to the next part of the tutorial: Importing Your Model.

Using a 3D modeling program

The most used programs for making CT's are 3ds max and Google Sketch-up (GSU).

To make a track with 3D modeling software, you need to export your model as obj file.

Exporting obj files with:


3ds max

to be made by someone who uses 3ds max


Google SketchUp

Even when pro GSU has an obj exporter, you can't use it. It exports in a format the szs modifier can't read. Instead you have to use a plugin: obj exporter by Marten van der Honing

Put the .rb file in the plugins folder of GSU.

Settings to tick:

Export back faces, UV helper, selected only.

Export back faces to create clockwise culling (white faces are the visible and solid (after kcl creation) sides), UV helper to export texture mapping and selected only to separate polygons.

To enable texture mapping support, you need to texture BOTH sides of the face.


How to model the track:

Start with drawing a simple square, than draw your track on it in 2D (so the road). After that, make the road in 3D (raising some parts). When you're done with the road, you start making walls etc. Make smart use of GSU's tools to realise it. When you're done with your model, start de-complexing it, aka delete everything you don't need. Finally texture the model, and you're ready to export.

TIP: make use of the component tool to separate different parts of the track (at the same way your polygons will appear).

Export everything OUTSIDE components, the obj exporter can't export components, and no texturing if you export inside a component.


What to do with the exported obj files:

Before you can import the files into the szs modifier, you need to do some things, else you'll get an "invalid" error.

Open all your exported files with notepad. Remove the 1st 2 lines of each file, and replace all dots into comma's (use replace tool). Than save.

Now you are ready to import into the szs modifier, and that's the end of the GSU section.

Importing Your Model

In SZS Modifier, open the file "course_model.brres". In it, open the folder "3DModels(NW4R)" and the only file in it, "course".

Wait, and soon a model of the course will appear. Select the polygon you want to import the model to, and...

Image

Open the Tools--->Model Creator. A window should pop up, similar to this:

The Model Creator window

Uncheck "Automatically Detect" - that will probably make your track too big. But now, you're going to set values for your model, and you must use the same ones for every piece of the model that you're going to import, so it's better if you write then up.

Anyways, the Minimum X and Z must each be set to the same, and so the Maximum X and Z do (and it's better if all four are the same number, except for the Minimum being negative and the Maximum being positive - that's what you should do if the image is a square).

The Minumum and Maximum Y can't be the same, and you shouldn't make any of then under 0. Usually the original ones that appear will do it, but you have to test - if your slopes end up too steep, decrease the difference between then. If your slopes end up too gentle, increase the difference between then. If there aren't slopes at all, it means that the Minimum and Maximum Y are the same.

Culling: This is not a sport, that would be "Curling"

Culling sets which is the size of the model you're importing. That means:

  • If you want to make a road, set it to Clockwise
  • If you want to make a ceiling, set it to Counterclockwise
  • If you want to make walls, set it to None

If you, for example, accidentally import the road as Counterclockwise, the character will try to stay under the road, but only for a second before being naturally pushed down by gravity. If you set it to None, both sides of the model will be visible and solid. That might sound like the better option, but it actually glitches a lot - there are hugh chances that your shells, bananas and bullet bills won't know what side to go and will disappear.

Tools

Those are all avaliable in the BRRES editor:

  • Create KCL

This is explained in the Important Stuff section.

  • Apply a Matrix

Used to increase and decrease the size of the model, as well as moving it certain distances.

  • Model Creator

This is what you use to insert your Paint images in the file.

  • Delete Polygon

After you imported all of your models, you'll notice that the ones you didn't mess with are still there. You might want to let then there for a visual (such as a Rainbow Road track with Moonview Highway right under it), but in most cases you want to delete then with this option.

  • Retexture Polygon

This is explained in the Texturing section.

  • Pinch

This will immediatly switch to a top-down view of the model. You are able to disort the models with this tool.

After The Model Is Done

Now, you follow the Texturing tutorial to see how to fix the colors of the track so that they're the way you want to.