- Switch Toolbox
- Image editor with channel editing. (for ambient maps)
- 3D program like blender for baking maps. (optional)
- Prior knowledge on baking in 3D programs (for normal and ambient maps)
2. Useful Resources
Note the gfbmdl implimentation for the toolbox is wip! Materials will need to be exported/imported as .json for any needed edits!
There might be a bit of confusion on how the game handles it's texture maps so I will help break them down.
The game has multiple texture maps used by Pokemon, NPCs, trainers, and maps. Color being the main texture, ambient for multiple ambient effects, normal maps for normal world space lighting effects, etc. This tutorial will divide into multiple sections to explain each in detail.
Textures typically have types at the end of their names.
- _col = Diffuse/Color map
- _amb = Ambient map
- _nor = Normal world space map
- _emi = Emission map
- _spc = Specular map
- _lta = Light table map
This is jut a few textures as there's many more types.
3. Color MapsThese are simply the color/diffuse map of your model. The main texture you use. Often game freak will scale these using the "ColorUV" parameter in materials (can be edited in the toolbox if you export/import material as .json).
These maps can be previewed if you open a .gfbmdl, go-to materials and select one.
Notice how they also mirror the UV map. This is very often done on the X axis and done on most Pokemon and NPCs.
If you need to edit these, they are called the "WrapMode" under the texture mapping options in the .json file.
0 = repeat
1 = clamp
2 = mirror
4. Ambient MapsThese are somewhat confusing looking but it's actually quite simple.
The map has 3 channels used for 3 different effects.
- Red channel : Ambient occlusion
- Green channel : Shadows or cavity map effects.
- Blue channel : intensity/factor? Usually always gray (128,128,128)
Note red and green channel are also inverted!
For this tutorial you will want a program like Photoshop that can edit channels. If you don't intend on making these maps you can use the blanked out texture here or you can still use it as a base to build off of.
Blue channel is simply jut a basic gray map.
If you want to you can simply make the red and green channel fully white, and the blue channel gray to fully blank out this effect.
So lets try inserting our own.
5. Ambient Occlusion/Shadow MapsThere can be multiple ways to create these. They can be baked onto a texture from programs like blender or 3ds max. They also can be baked from vertex colors.
They must have the UVs not overlap (ie one vertex over another) which would cause them to bake the same data for each vertex.
There are many guides out there on creating these.
A quick a simple guide in blender for ambient occusion:
Once you finished making your maps make sure to save them. Open them up in an image editor like Photoshop.
Then invert your image (Photoshop do Image - Adjustments - Invert)
Now paste it in the red channel for ambient occlusion. If you use shadows paste it into green channel.
6. Normal Maps (World Space)These can be simply baked using the normals option as the bake render and using world for normal space.
More maps will be explained in an update and hopefully a more detailed guide. Currently more research is needed for some additional maps so I will be sure to keep updated.