Custom Backgrounds

New Super Mario Bros. Wii has a lot of backgrounds, even more possibilities when it comes to mixing around with both  (front) and   (back) BGs. There may be a level theme you're trying to achieve that just simply doesn't cut it, thus this is where creating custom backgrounds comes into play.

Custom Backgrounds allow us to make unique level themes and styles as well as bringing a message or story to a level, it's important to know how to make BGs especially with bigger mod packs that involve unique worlds.

DISCLAIMER: THIS TUTORIAL IS BEST SUITED FOR BLENDER USERS AND ALSO ASSUMES YOU HAVE BASIC KNOWLEDGE OF HOW TO USE BLENDER

It is recommended you have BrawlCrate, especially when using Blender as there's a feature that is unique to BrawlCrate that can aid Blender users. Additionally Autodesk FBX Converter is also recommended for Blender users for converting between .dae, .fbx, and other filetypes.

Now lets get into the tutorial.

Getting The Base Background Ready
First step is to get a background you want to use as a base. When looking for a background to choose, think of what background are you trying to make. Also don't limit yourself to the base background's theme, you can turn the Desert background into a Snow Plains background easily. New Super Mario Bros. Wii comes with many backgrounds to play with and edit, there's all sorts of possibilities you can do. You can find what you want with Reggie Level Editor's background previews.

Another tip, it is highly recommend you start small, starting something big can overwhelm you with what changes or fixing you have to do. For this example lets use  which is 1-1's Overworld Hills background. The tutorial will guide you to add random blocks scattered across the hill.

Find your copy of, it is located in the   folder of NSMBW as well as other models and backgrounds. BG models begin with bgA or bgB.

Open BrawlCrate, File, Open..., then select the bgA or bgB, (both work for this tutorial.)

Once done, there should be a file tree, open the, then the   folder, then the   file, the name will vary depending on which background you use. It should automatically show the background in the preview section.



With the background opened in BrawlCrate, export the model. Do this so you can get the skeleton for when you add the model(s) to Blender. To do this, right click the, Export, then export as a. Name does not matter just know where you put it.

Now after installing Autodesk FBX Converter, open it, select Add FBX Converter, a window should pop up with input and output tabs, click Add.., select the .dae you just exported, the preset should automatically have a destination file output of a FBX 2013 file, if not, click the Destination Format box and change it.

If you've done everything correct thus far you should now be able to export as a, you can change output file name and folder location if needed, when satisfied click Convert. Remember where the  you just made is.



Now we can open the  in Blender and continue, you should get something like this, make sure the models are accurate to your background.



Making Edits
Here you are free to edit anything in the BG, add/import models you want to add, delete models you don't want. You should get the models you want and make it look good, when finished you're going to be deleting everything but the models you edited/added. For this tutorial, lets add cubes that use a cardboard texture, point of this tutorial is to be simple and to get you a good boost on how to make custom BGs.

If Importing Models From a Separate File
Do the process using the FBX Converter to convert the  to a   for the model file you want to import as well, even if it's already a , as there are multiple  types. Failure to do these steps can be detrimental in the rest of the tutorial, so best if you follow along.

If Making Own Models
If making models from scratch, make sure everything is good before you export, such as normals, transforms, and UV's, and the mesh in general. You can change it later but it's best practice to do this.

Understanding the Bones
Your model has a lot of bones, it's essential that one understands what they do and their purpose. There should be 2 types of bones that you should take into account, Scroll and Rotate. Others, less common, include Effect and Trans_ Since NSMBW is orthographic, Nintendo has to simulate perspective and parallax using these bones. Keep in mind the bones' speed values and such cannot be changed without hacks and things like that.

Scroll Bones
Scroll Bones, usually consisting of ScrollA-ScrollF, are bones that define the scroll speed of a mesh(es). Scroll A is the fastest, Scroll F being the slowest, it's important to know how to use these when making backgrounds. Usually you would use lower values (ScrollF) to simulate something being farther away, but use higher values (Scroll A) to simulate something closer.

Rotate Bones
Rotate Bones, consisting of Rotate0-9 except 3 (3 is invalid), are bones that define the rotate speed of a mesh(es). Rotate 0 is the slowest, Rotate 9 is the fastest. As the background scrolls, the bones will rotate accordingly, the speed varying on the Rotate#. Rotate0 should simulate something farther away, and Rotate9 should simulate something closer, since it is the fastest.

Effect Bones
Effect Bones, only being used in bgA_0C02, controls effects, such as the volcano rocks firing out the volcano.

Trans_ Bones
Trans_ Bones, only being used in bgA_A302 and bgB_A302, controls movement of bones, depending on scrolling. Different functionality to Scroll.

Common Practices

 * Model inside the BG, not outside as it can cause visual glitches with scrolling.
 * Give the Models materials, not doing so will make BrawlCrate give exceptions when importing or crash.
 * Name the objects, it isn't required but it can make everything more nice and neat, I like to name it   or   to distinguish between the original models and mine. You can always rename it in BrawlCrate after importing.
 * When done with everything, apply transforms for all the models to prevent a model being placed in a certain place only to be moved to another place in-game.
 * Add bones when needed, see what bones control which, this will help when making the bones to the models as you'll know which bones you should use and make. Make sure when you're done to reset the bone transforms. Do not confuse with the skeleton transform.

Making the BG
Now you got the BG, know what you want, then execute it. Make sure to read the above section for tips.


 * 1) Make sure the models have an Armature modifier linked to the BG skeleton, and also that the models have the skeleton as it's parent. Parenting the armature to the object should automatically do that though, but keep in mind that you will have to do this manually if it wasn't done automatically. Also make sure the model has materials as stated in the Common Practices section.
 * 2) Move the models to where you want them to be, don't make them too big and don't make them too small, be cautious on size and proportions as the BG will be looked at often and you don't want it looking incorrect.
 * 3) Make bones inside the Scroll# (# is A, B, C, etc.) Bone for each model you place on the BG, this will make it easier to edit the positioning, scale, and rotation in BrawlCrate if extra things are needed. Make sure you attach the models to the bones too. As you can see in the screenshot of the model in Blender, there are bones for each hill, try to mimic that.

Exporting Once Done
This is a background with cubes added, making sure of what is said in Making the BG and Common Practices. It is vital that you re-read the tips and practices stated before, as it will help you learn how to avoid common mistakes.

However, as you can see, bones were made for each of the cubes, as well as materials, and making sure the models were in the BG and not outside. It is also parented to the skeleton and moves accordingly, as well as has proper names.

Exporting from Blender
Once you have made sure you are done, be sure to save your project as a .blend before the next step, as if a mistake is made you can revert back to the original, and have the preview of the scenery and bones in case you need it to reference something. The next step involves deleting all the original model files, not the skeleton, but keeping our added models. If you have made a BG from none of the vanilla models, you can export everything, making sure no vanilla models are kept from the BG. With everything deleted but the models and skeleton, export everything as a. Open up Autodesk FBX Converter if it isn't opened already, and open the  you just made, make sure the destination format is set to. Then convert. You should now have a final  of your BG, with only the skeleton and models you want.

Process Explained
Why don't you just export to dae in blender?

From experience, Blender exports the  very weirdly, and makes it inaccurate to how it is shown in Brawlcrate.

Why are you deleting everything?

Unless you edited the OG models, you have to delete everything as when importing to BrawlCrate, you only want to import the objects you made, not the whole BG, as then you would have a lot of duplicate objects and materials in BrawlCrate you will then have to get rid of.

'''For more complex backgrounds, will this method still work? '''

No matter what you're trying to do, as long as you're trying to reference the original BG skeleton, even if you completely make a new background and have no trace of the original and the skeleton is modified, the skeleton is needed for general movement and bone data for scrolling.

Importing to BrawlCrate
Now with your, open BrawlCrate and the BG you opened earlier/used as base, then right click on the  , then to  , then. Now select the  you made, then 2 pop ups should show up, (2nd should show if model importing was a success, if you crash before, that usually means you have to recheck your models for missing data e.g materials) First one is import settings. Only option you have to enable to Blender Bone Fix, which fixes Blender naming skeletons to Armature, it however does not fix _end bones as it says, you have to do that manually.

Second Pop Up should show you the models, if you have multiple objects including the vanilla models, make sure you deleted the vanilla models, if you only see the models you added, you're on the right track, make sure you check "Merge both Models". This will add every mesh into the BG without you having to do it individually. The Skeleton Root Box, what you put there varies as BrawlCrate doesn't read the root correctly and only the parent of the objects.. It's most commonly the root of the skeleton, if not it might be another bone you assigned your objects to, in that case just match the bone mentioned in "Base Bone" to "Skeleton Root". Checking if you selected the right root is if your skeleton doesn't have a bunch of new bones that match the whole skeleton in 1 bone, e.g having Scroll# bones in a bone with Scroll# as a parent. You can check this in the Bones tab of your model. If you didn't select the right one, you can always reload the .arc (if you didn't save) and redo the previous steps until you get it right.



If everything is correct, you should now have your models in the background, if you don't see it, you have to refresh the preview.

Optimizing the Background
You may see that your models you have imported don't look correct and have either, no shading, no texture, or both. This can be fixed by importing the proper textures, materials, and shaders (if you copied from another BG).

Shaders
Shaders are used to determine the final output color of your material, and have loads of settings that determine how it will look. Each BG has different shaders for different materials that accomplish different looks or effects. The Sky and Clouds in bgB backgrounds have their own shaders respectively. However, you can always copy shaders from other BGs, try to use the shaders that isn't used by clouds, skies, but the actual objects in the BG (e.g the hills in Overworld Hills use Shaders).

The best way to test/learn shaders is experimenting with how they look like in BrawlCrate's preview. Change the settings and see what they do and how they affect how it looks in-game as well. '''Keep in mind BrawlCrate's shader engine can be inaccurate and often times you have to restart the program for it to render correctly. That's why it is recommended alternating between NSMBW and BrawlCrate.'''

Materials
Materials define the textures and other settings used by objects. No object has 2 materials. Keep this in mind when importing models with different texture attributes, as you may have to split the model. Materials rely on shaders, but also contain additional info that is used by the shader, as well as containing which information on which shader to use and colors for certain shader types. There can be 2 materials that use the same shader, that does not make them the same as they often have different textures that are used or settings.

Objects
Objects are each mesh that is in a BG. From hills to the planes that hold the sky, they are all objects. From this tab in BrawlCrate, you can change which material the object uses as well as the visibility bone, draw pass, and draw priority. You only should worry about draw pass and when using semi-transparent things such as clouds or XLU materials.

Textures
Textures are images that hold information on model colors/images to lighting/specular. (Specular and Environment things are labeled . It is recommended you do not touch these textures.) You may need to add additional textures, such as in this tutorial, cardboard textures for the blocks need to be added. You can import textures via right clicking the. Be cautious on the image format and mip-maps as well as resolution, it is recommended to duplicate a original texture used in the BG, then replacing the image so you can maintain settings such as the image format and not run into problems. When naming new textures, I suggest using the format of the rest of the Original textures but then adding that word at the end to distinguish it from the others.

Adding the Various Assets
Everything can be imported, from animations to shaders. This is done by either right clicking the  or the , then going to import/import asset.

Workflow
The way you should go about making sure everything is good to go to test in game is first to see if the bone system is correct and similar to the vanilla's, and also deleting any  that Blender has made in the   tab in BrawlCrate.

Then you should import all the necessary materials and textures that you need, experimenting will give you info on how each image format works.

You then want to make sure the objects imported is linked to the correct material and nothing is not rendering incorrectly.

Those are the 2 major steps, everything else is experimenting to make it look nice in game and what can you do to fix it. If you're doing something more complex you may have to experiment with shaders, materials settings, object settings, and animations. does not have any animations, so if your following along you should have no worries in that regard.

When you think you're done, make sure everything is correct, no duplicates or nothing of the sort, and everything is in place. Then export it to a .arc, save, then launch New Super Mario Bros Wii.





Saving as a New Background File
If you want to preserve the original background but save the background you made as a separate, you can rename the file name to the ID you want, e.g the background is named, former being. It's not as simple as renaming however, as you're going to have to rename every instance of  in the   file, from the brres, MDL0, skeleton, to animations. Once all instances of the ID you want to replace with the new ID have been replaced, you may now save as the ID you used.

The Background In-Game
Now your background is in-game, it may not look correct, but make sure to follow all the tips and tricks stated above and optimize/replace anything needed. However, if your background crashes or scrolls weirdly or anything that is not stated, It'd do best to read below as it goes in depth on troubleshooting. If you are satisfied please skip onto the next section.

Troubleshooting
These are some common issues ran into while making backgrounds. If more problems become common and a fix is available, it will be added to the list.

X is not where it's supposed to be
Check the animation folder, called, this controls the bone movement, if there is a bone entry in there that your objects are parented to, delete that entry or set the animation values to it's default. Additionally, if there is no entry, make one for the bone, and experiment with moving the bone in it's X, Y, or Z position in Blender and see if you get any results with the position of the models changing.

Make sure when you exported your model you applied all transforms, then re-export the models, delete the broken models in BrawlCrate in the  tab, then re-import the models using the same process discussed.

X starts to move in front of the screen (over tileset) whenever one get a power up and a Flagpole renders/ BG Objects move incorrectly
Make sure your BG has a bone index order going from the root, to all the children in DESCENDING order. (e.g, bone root would have bone index of 0, while it's child would have an index of 1).

Visual Glitches whenever Mario moves (flickering models)
This is caused by the models not being kept inside the BG, and begins overlapping the scroll. To fix this make sure the model is inside the BG and doesn't go outside the BG.

In BrawlCrate the textures don't wrap properly
This is caused by the material the object has, go into the material, then the texture inside the material, go to the  tab, then experiment with   and   This controls how the material is wrapped, whether being mirrored or clamp, you can google what each does.

X is this color when the texture is grayscale
This is caused by the material, more often used with clouds and sky gradients to determine colors. Go to the material, then the  and change the RGBA values of.

X doesn't scale correctly when importing even after reading FAQ 1
BGs can actually use scales. Not in animation, but their default scale in the bone menu. For example bgA_0302 has different scale values to their bones, which can cause the models on import to be either bigger or smaller. Fix to this is to adjust the bone's attached to your model accordingly, making sure it fits.

My issue is not here
Ask in the [Horizon Discord], and ping. He may not know what your issue is, but others might. If not don't give up, redo every step but with a different model or different background, every background is different and has different things,  is by far the simplest however, so you should start there.

What's Next?
The rest of the learning experience is up to you. A good way to learn is with experimenting. Don't be afraid to think outside the box and try new things to see if something can work one way or the other. Please read this tutorial whenever you need that extra confirmation when making backgrounds.

AnmChr
These are skeletal animations. These control the bones of the background and move things according to keyframes. As stated before you can use this type of animation to move objects without having to move them in Blender then re-importing. NSMBW uses this for clouds and also objects that may be too small or too big or in a bad position.

AnmClr
These are color sequences. These control colors of a material that may use the  tab. One example of this being used is in NSMBW's Volcano BG, where the glowing and dimming lava is controlled by the change of color in the sequence (black being dim, white being brighter).

AnmTxtSrt
These are texture animations. These control the UV positions of a material. This is used for idle fog/clouds that stay in 1 position, but animate texture-wise. This can be controlled by keyframing the position of the UV's and the transition from 1 keyframed UV position to the other will play. These animations can also animate specific textures in a material rather than the material as a whole.