/path/to/Wreckfest/tools/
)/path/to/Wreckfest/tools/
)/path/to/Wreckfest/BagEdit/
)In this tutorial, I'll cover how to make a track for Wreckfest from scratch with Blender. Everything needed will be covered (softwares, Blender plugins, basic Blender commands & shortcuts).
Be aware I am not a Blender' power-user, i.e. I can use basic tools in a basic way. Things I do are correct, but there's certainly a faster or better way to achieve the same.
I also have absolutely no art skills, so all textures used in this tutorial are from the base Wreckfest game.
A lot of informations here come from the Wreckfest - Technical Art Guide.doc
file, which can be found in /path/to/Wreckfest/tools/
folder.
The track I'll try to recreate is Thruxton.
/path/to/Wreckfest/tools/
)This tool is used to convert .bmap files to .png files. We will use it to open Wreckfest textures.
/path/to/Wreckfest/tools/
)This tool is used to convert .tga files to .bmap files. We will not use it directly.
/path/to/Wreckfest/BagEdit/
)This tool is used to open & modify Wreckfest files.
Download from Blender official website and install it.
All the external plugins you need are listed here : https://vga.mywire.org/wf/.
You will need to enable the Import image as plane one, which is an official addon, meaning it is shipped with Blender.
To enable it, just go to Edit->Preferences
. In this window, select Add-ons
menu and search for the Import-Export: Import image as plane addon. Then you just have to check the checkbox on the left of its name to enable it.
This plugins allow you to export your Blender file to a bgo file. The bgo file will then be converted to a scne file, which is the right format for WF tracks.
Download it and do not extract it.
This plugins allow you to import WF files in your Blender file, like tirestacks, spectators, etc ...
Download it and do not extract it.
In Blender, go to Edit->Preferences
. In this window, select Add-ons
menu and click on the Install
button.
Select the plugin archive and click on Install add-on
button.
Do it for all plugins.
For Import-Export: Bugbear SCNE format (.scne) (subscenes only), you will need to select the Breckfest.exe (in /path/to/Wreckfest/tools/
) & BagEditCommunity.exe (in /path/to/Wreckfest/BagEdit/BagEdit/
) path.
Or any software able to convert png files to tga, like Photoshop or GIMP.
This is optionnal, as both Blender and build_assets.bat can handle png files
Download it here : https://mega.nz/file/vR8wSIyD#vRr48UJMVFhbYmUPmRFFTz70R4yFeNaVUbat6iU2KTA.
This archive contains a complete folder tree for a track mod. Within each folder you will find a .txt
file explaining what to put in it.
Simply extract the Wreckfest Essential Track Files
in the /path/to/Wreckfest/mods/
folder.
your_mod
∟ modinfo.modi // Here lies your mod' informations
∟ preview.jpg // Image for mod selection menu
∟ data
∟ art
∟ textures
// Here are the textures shared across all your tracks
// Use .tga files to manipulate them
// Then convert them to .bmap thanks to "/path/to/Wreckfest/mods/build_assets.bat"
∟ menu
∟ textures
∟ env_{trackname}_large_832x386_raw.bmap // Large image for track selection menu
∟ env_{trackname}_small_250x116_raw.bmap // Small image for track selection menu
∟ env_{trackname}_{eventname}_small_250x116_raw.bmap // Small image with track layout for track selection menu
∟ env_{trackname}_loading_1920x1080_raw.bmap // Large image used as loading screen
∟ env_{trackname}_skew_182x70_raw.bmap // No one knows what it is used for
∟ property
∟ event
∟ {trackname}
∟ {trackname}.envi // Informations about the track
∟ {trackname}_{eventname}.evse // Informations about the layout
∟ track
∟ {trackname}.tcat // Other informations for your track, such as "starting grid generation" and "starting & replay cameras"
∟ track
∟ {trackname}
∟ {trackname}.scne // The track itself
∟ {trackname}_{eventname}.scne // The track layout (with AI lines, checkpoints, starting grid)
Replace {trackname}
by your trackname, and {eventname}
by your ... event name.
In my case :
{trackname}
=> thruxton
{eventname}
=> 01
Before you start, know that WF support tracks up to 4000 m * 4000 m and that its coordinates should never go further than +2000 & -2000 (the car starts acting funky if it goes over +/- 2000).
Open Blender and start a new project File->New...->General
. Remove everything Blender added by default.
if you want to recreate a track, you can import an aerial shot of it to help you. If not, you can skip this part.
I screenshoted Google Map view of Thruxton and I'll import it into Blender.
So, File->Import->Image as plane
, select the image your need and press Import Images as Planes
.
Now the image is imported, I will use the scale preent in the screenshot to resize my image accordingly.
So I'll add a plane and resize it to be 100m long and I'll then scale my plane to have the scale having the same size.
To add a plane to the project, in the Layout
tab, in Object
mode, Add->Mesh->Plane
. By default it measures 2m*2m, so I'll scale it to 50x on its X
axis to be 100m long.
So select the plane : in the right upper menu, click on "Plane"
, press S
(for scale) to open the Resize
sub-menu and enter "50" in the Scale X
input and press enter.
Now, do the same for the track map plane, resize it until te scale as the the right size according to the 100m plane.
Now add a plane to the project. In the Layout
tab, in Object
mode, Add->Mesh->Plane
. Rename it to "terrain" (not necessary for WF, but more practical for us). To rename it, double click on it in the right upper menu and enter the new name.
By default, a plane measuring 2m*2m is added, and it is exactly what we need : Wreckfest driving surfaces should be made from 1.5m to 4m squares. 2m is perfect because it is easy to calculate size.
We will use a 10m wide road and 4m grass on each sides. We could scale it, but I'll show you 2 techniques using the expand
tool.
So, select the "terrain" plane and either click on the green symbol near its name or simply change from Object Mode
to Edit Mode
.
Then, put yourself in edge edit mode and select the left edge.
Now press e
(for expand), then x
(to limit the expand to the X axis) then -
(minus) (because we well expand on the inverted axis) and finally press 2
.
You should see this :
Now we need to add 3 more squares. So we either redo the previous manipulation manually or do it "automatically". Blender has a shortcut to let you repeat the last action, Shift + R
(or Edit->Repeat last
).
So we'll press Shift + R
3 times. And you should see this :
For the second technique, we'll select the right edge and press e
, x
and 8
. And the result :
So, yeah, we have a big 8m*2m square. We will now cut it in even pieces, thanks to the Loop Cut and Slide
tool.
Select the tool, set the Number of cuts
to 3 (because making 3 cuts into a 8m wide plane will give us 4 planes measuring 2m wide).
Put your cursor over the plane to cut anc click.
And you should now have 4 squares instead of a big one.
Now we have our basic primary piece of track, let's configure it a little bit.
Select the "Orange square sub-menu" on the bottom right panel (Sorry, I don't know its name and hovering it doesn't help).
Open the "Custom Properties" accordion and click "Add" and then "Edit" the newly appeared property.
In the "Edit property" menu, fill as follows :
String
(only if you're using Blender version > 3)CustomData
col = true
And validate.
We just enabled collision for the plane. If we don't do this, cars will pass throuht it (not ideal).
Now, click on the "Green triangle sub-menu" on the bottom right panel (don't know its name either) and open the "UV Map" accordion. By default, you should find a UVMap named UVMap. If so, good. If not, add one by clicking on the +
(plus) button.
Ok, so now we have our most basic piece of track. Let's create materials to define textures & driving surfaces and then assign them accordingly to our needs.
But first, let's find the textures we want to use.
Wreckfest textures are located in various places :
data\art\textures
common textures across all tracks and objects.data\art\levels\{env_name}\textures
common textures across all tracks and objects inside the same environment.For this tutorial, we'll use the following textures in data\art\levels\forest\textures
:
ground_tarmac04d2_c.bmap
ground_grass08_c.bmap
ground_grass08_ns.bmap
Copy them to your mod textures folder (mods\{modname}\data\art\textures
). For each of the 2 "_c.bmap" files, drag them over your Breckfest.exe. A file with the same name but with ".dxt5.PNG" file will appears. Open it in your image editing software and save it as a ".png" or ".tga" file. Do not keep the ".dxt5" in the final name.
The ".dxt5.PNG" files won't be needed for the track, so you can delete them.
So let's go to the "Shading" tab. If you don't have it on your header menu, do not panick, just click the +
(plus) and select General->Shading
.
On the center lower panel, click on "New" and a basic material configuration will appears.
Add a new "Image texture" with Add->Texture->Image Texture
.
Click "Open" and select the ground_tarmac04d2_c.tga
file. Let the default options as they are.
And then connect the yellow "Color" output dot of the node to the input "Base Color","Specular" and "Specular Tint" of the "Principled BSDF" node.
Finally, add a new "UV Map" node with Add->Input->UV Map
.
Select "terrain" 's UV Map and then connect the purple "UV" output dot to the input "Vector" dot from our previously added texture node.
And now, rename our material ground_tarmac_01#asphalt
:
ground_tarmac_01
is the human readable name#
is a separatorasphalt
is the driving surfaceOnce this is done, let's do the same for the ground_grass_01#default
.
Now our firsts materials are set, let's apply them. SO go back to the Layout
tab, in Edit Mode
.
Select the "terrain" plane and click on the "red sphere sub-menu" in the bottom right panel.
Click on the +
(plus) button and assign the ground_grass_01#default
material to the slot. Then do it again and add the ground_tarmac_01#asphalt
one.
Now, select the 5 squares in the center of the plane. To do so, swith to the "face edition mode" and then :
Shift
pressed and click on each square to select them one by oneCTRL
pressed and click on the last square. It will select all the squares on the path.Shift method
CTRL method
Now, in the material list on the right, select the ground_tarmac_01#asphalt
one and press "Assign".
Now the center of our plane is made of asphalt while its side are made of grass.
Hey, but that looks ugly, no ? Well yes. I can show you how to make it look prettier, but it will go to waste once we expand our "terrain" 's plane.
So let's not worry about it yet.
The basic and long path... once you know the one I'll explain in the next part, you will not want to use this one anymore. But let's take no shortcuts.
To expand a straight line, easy, just repeat (and adapt) the techniques we saw in the first steps.
But what if you want to expand a straight line not following an axis ?
Use the "Edge edit mode", select a side edges, press e
and move your mouse.
But how to expand and make a curve ? There's a tool for that : "Spin".
Use the "Edge edit mode", select a side edges, press Shift
and then right click
to place the center of the curve. Then press the blue +
(plus) to start expanding the plane.
The "Spin" menu will appear to let you tune your settings. Until you validate, you can move the center of the curve and edit the angle. The "Steps" let you define the number cuts.
And now, the easier and faster way, using the power of path and modifiers.
First, lets delete what we've done. Go back in "Face edit mode", press CTRL
and select all outside faces.
Then, press CTRL
and Shift
and select the bottom right inside face.
And now press Del
and select "Faces"
And we're good to start the new technique.
First, in "Object Mode", add a "path" by Add->Curve->Path
. Rename the newly added "NurbsPath" as "TerrainPath".
Move and rotate the path to align it with the center of the plane.
Then select the "terrain" plane and, in the bottom right panel, click on the "Blue wrench sub-menu".
Add an "Array" modifier and set as follows :
Fit Curve
TerrainPath
and activate the "4 squares" symbol (right after the "camera" & "screen" ones at the top of the modifier)
Then add a "Curve" modifier and set as follows :
TerrainPath
and activate the "4 squares" & "Inverted 3 dot triangle" symbol (right after the "camera" & "screen" ones at the top of the modifier)
The result you should see :
Now, select back the "TerrainPath" curve, select the first or last dot and expand it (by pressing e
).
Hmmm, the plane didn't follow the path. It's because its "Array" modifier isn't set properly. By default, it defines a repetition following the "X" axis. And this time, we need it to repeat along the "Y" axis. (I'm not gonna pretend I understood why, I just tried it and it worked. If you know why, tell me and I'll update this part).
It's better ! We can see the plane following the curve. But the right part, with all the faces overlapping each other isn't good. We can manually merge vertexes later, but better safe than sorry, avoid as much as possible faces overlapping.
Once you have drawn your path, it is time to close the loop. Select the first and last vertices of the path and press F
to close the path.
Now the track loop is complete, time to check we have no overlapping faces. Select the "terrain" plane and check. If you notice faces overlapping, select back the "TerrainPath" curve and move the vertices accordingly.
Once done, go back to "Object mode" and apply modifiers on the "terrain" plane, starting by the "Array" one.
Ok, what now ? Now we'll make the track a little prettier regarding textures and then we'll make our first layout, to test the track. The scenery, curbs/kerbs and decals will come once we're happy with the track.
Head to the "UV Editing" tab, select the "terrain" plane, press a
(to select all the vertices) and, in the left panel, right click
and Unwrap
.
Wow, look how ugly and useless it is. The problem ? Our "terrain" plane has vertices sharing the same coordinates but not merged. Hence the fact the UV Map is composed of multiple 9 squares columns & lines.
So, on the right panel, press a
again (just to be sure all the vertices are selected), right click->Merge Vertices->By Distance
. All the vertices sharing the same coordinates will be merged. Select back all vertices (use a
),right click
and Unwrap
again.
Doesn't it look better ? On the left panel, yes. On the right one, eeerm, not so much.
So, on the right panel, in "Face edition mode", select one square with Shift + left click
. The selected square will appear on the left panel, alone (you might need to zoom to find it).
Now, on the left panel, select two vertices and Right click->Align auto
.
Select two other vertices and press Shift + r
(to repeat). Once we have a beautifully aligned square, on the right panel, press a
and in the left one, Right click->Follow active quads
.
Hurray, a beautyfull grid ! Now let's press a
, then s
(to "Scale") and edit the values to make a single square the same size as the background texture.
Uuuuh, our road texture is not the right way... Again, left panel, press a
, then r
and type 90
. It will rotate the whole UV Map by 90°.
Better ! But it still looks weird, I guess we scaled it up too much. Let's scale it down a little until it looks good.
Ah, perfect (or nearly). Now it looks sufficiently good, time to make a first layout in order to test the track ingame and make some changes (if needed) before adding scenery, curbs/kerbs, etc...
So File->Export->Bugbear Game Object V3 (.bgo3)
. The plugin will export our .blend
file into a .bgo3
and will then call the build_assets.bat
to convert the .bgo3
to a .scne
.
Copy the StartingScene.blend
file from Wreckfest Essential Files/Blender Scene
into path/to/wreckfest/mods/{your_mod}/data/track/{trackname}
and rename it {trackname}_01.blend
.
Now let's open it
Everything we need to make a valid track layout are here except ... the track base itself !
So let's head up to File->Import->Bugbear Scene as Subscene (.scne)
and import {trackname}.scne
3 Airoutes are defined in the file, the 3 mandatories Airoutes required by Wreckfest :
#ai_route_main
(blue) : defines the area where you can drive without seeing a "wrong way" sign#ai_safe_main
(red) : defines the area where the AI can drive without risking to encounter an obstacle (hence the "safe")#ai_race_main
(green) : defines the area where the AI will race.It is possible to define alternatives AI routes, but it will be covered in the "advanced techniques" part.
As you may have noticed, we have a curve named "ai_path". As its name indicates, this curveallows us to draw the AI lines path. So let's do it, the same way we did the track base. But we will not close the loop.
Note the first AI sector must be long enough to place all startpoints in it.
We have 2 types of starting points :
#startpoint0X
: the starting position for gridspot X in the race#startpointcarchange
: the position used to display the car before the race in solo mode / where you can select your car & tune it in multiplayer.By default, the game auto-generate the starting grid unless you modify the {trackname}.tcat
file, which will be manually generated using an ingame debug menu.
So for now, just place the #startpointcarchange
in order to not have your car falling into the void while you tune it before the race.
Checkpoints are just planes named #checkpointXX
. The have to be large enough to cross the whole AI line. It is possible to place checkpoints on alternatives AI routes, but it will be covered in the "advanced techniques" part.
Just place at least 2 of them on the track. Beware, the first checkpoint must be placed AFTER the first AI line sector.
Now, same as the track base, export your track layout as .bgo3
.
Now, let's verify all our mandatories configuration files are ok :
data\property\event\{trackname}\{trackname}.envi
data\property\event\{trackname}\{trackname}_{eventname}.evse
Note that I used a custom Wheather List
in my {trackname}_{eventname}.evse
file. It is possible to use a weather list from the game data.
Once done, launch your game, head up to the "mods" menu and activate your mod. Reload the game and start a custom event on your track !
Aaaaaand I started out of the track, falling in the void ... Time to generate the {trackname}.tcat
file !
Wait, what ? How come it will solve this problem ? Well, as written a little before, by default, Wreckfest automatically place startpoints, and in our case, it places them somewhere useless. To tell Wreckfest to use the startpoints we manually placed, we have to do it in the {trackname}.tcat
file, which doesn't exists at the moment. So we'll generate it.
Ingame, while we're falling, hit *
(default key for debug menu)
Press K
, then J
then T
.
From what I feel, the tarmac part is too narrow for such a fast track. So, open back {trackname}.blend
, select the "terrain" plane and set yourself in "Edit mode" with face selection.
Keep Alt
pressed and click on one of the grass squares, it will select the whole line. Then head up to the material assignment menu, select the ground_tarmac_01#asphalt
and click Assign
.
Do the same on the other side of the track if needed.
And now, the tricky part, aka extending the track sides. I unfortunately have no good advices here, all I would tell you is to do it bit by bit :
Do the same for corners, but as you'll realize, we can only expand in srtaight line. So for the exterior of the turn, you'll have to fill holes between expanded faces. And for the inner side of the turn, you'll have to leave some holes.
To fill them, select their outside vertices and press F
(for "Fill").
This is a long and quite dull process, and I don't think experimented track makers do it this way.
Stick with it for now, I'll update this tutorial as soon as I know their secret technique :p
Note : you don't have to fill the full available space, just the ones that will be visibles while racing or in replays.
If, like me, you made a flat track, it is now time to add some elevation changes before adding kerbs, decals and scenery.
The trick to make a smooth uphill/downhill section is to activate this usefull option :
Using the mouse wheel, you'll be able to expand/shrink its action radius.
Quick with/without comparison :
Test your track before continuing this tutorial.
A racing track without kerbs / curbs is like ... erm ... fill this space with a racing driver quote.
We're gonna do it in 4 steps :
For an easier time, we'll also create a new collection named "curbs".
The texture we'll use are :
\path\to\WF\data\art\textures\gameplay_curb_c.bmap
\path\to\WF\data\art\textures\gameplay_curb_n.bmap
\path\to\WF\data\art\textures\gameplay_curb_s.bmap
So copy them in your textures folder. Convert the gameplay_curb_c.bmap
to png
in order to use it in Blender.
Once done, we'll create a new material named curb#curb
because it's a curb that should behave as a curb.
Now, in "Layout" tab, Add -> Mesh -> Plane
but make it 1.5m * 1.5m. Then apply the curb#curb
material to it.
Now, we'll select its edge facing the interior of the turn and expand it alongside the Z axis (0.15m should be high enough).
Once done, keep this edge selected and select the one facing the exterior and press F
to create a face using those 2 edges.
Luckily for me, the texture is ideally placed. Otherwise, we would have to select the newly created face and head back to the UV Editing
tab.
And finally for that sample curb, let's close it by adding the 2 missing side faces.
Those side faces don't need to look nice texture wise, they'll be hidden.
Now, just copy our sample curb and we'll work on the copy.
Place it where the curb needs to start, we'll expand it using the array & curve modifiers.
So add a new curve Add -> Curve -> Path
. Add the array & curve modifiers to our curb copy.
Once happy with the curb, just apply the modifiers (you need to be in "Object" mode). Do not forget to merge all vertices by distance. Once done, time to add the final touch to it.
In "Edit" mode, with the "Vertex" selection mode, on one of the side of the curb, select the vertex showed in the following screenshot (sorry, I have no idea on how to describe that).
Then expand it and connect it to the other vertices in order to create that triangle shaped start/end of curb.
Then create the faces and apply the curb texture to the visible triangle face.
One curb side done, repeat for the other one.
Tadaaaa. One done. Let's check ingame what it looks like.
"WTF is that ?" You might ask. "Ahah, 'normals'" I'd respond. "Normals" define the visible side of a plane. What happens here is that our top planes of the curb have inverted normals.
To display normals, do the same as the following image :
To invert normals, in "Edit mode", with "Face" selection, select all the upper faces.
Then press alt + N
and click on "Flip".
For all the other ones you need, just repeat the process.
We'll start by the white lines delimiting the track.
First, let's get the texture we need : \path\to\wf\data\art\textures\decal_whiteline_c5.bmap
, copy it in your textures folder and convert it to tga thanks to Breckfest.exe.
Now let's make a material out of it :
Map color
to color
and alpha
to alpha
. Name it white_line#decals
.
Now, "Edit" mode, "Face" selection on the "terrain" plane. Press ALT
and select a square on the very left of the track :
Now the complete left edge of the is selected. Mesh -> Duplicate
. Keep those squares selected.
Then press Z
(to "move" along the "Z" axis) and move your mouse upward.
Now, add the newly created material to the materials list :
And then apply it to the selection :
As expected, the line is not rotated the way we want it. So head up to "UV Editing" tab, and let's rotate it by 90° (R
,Z
,90
) and then resize it.
But the white line is too wide now. So Right click -> Subdivide
and let it be subdivided by one cut.
So, press ALT
, click on one of the right squares to select the complete right side. Then press del
and select Faces
.
And now move the remaining UV Map to have the white line centered.
Once done, let's move down those planes to be just a little bit above the track surface.
Hmmm, the line still feels to wide, so let's subdivide it again. So Right click -> Subdivide
and let it be subdivided by one cut, then press ALT
, click on one of the right squares to select the complete right side. Then press del
and select Faces
.
Aaah, waaay better !
And now, let's do it for the right side of the track.
This one is a homemade one ! You can get the &
.
Place them in your textures
folder.
In "Object" mode, let's File->Import->Image as plane
and select it.
Then just rotate and expand it.
And let's pay a visit to our best friend, the "UV Editing" panel and stretch it.
Hmmm, the image doesn't repeat. Let's set it correctly by changing the "Clip" to "Repeat".
Ah, waaaay better !
Now our track's driveable part is done, let's some scenery, to create a nice feeling.
We'll use the same technique as for curbs.
For this one, we'll use the prop_metalfence3
texture wich can be found in \path\to\WF\data\art\textures
. As usual, copy the _c
, _n
, _s
& _ao
in your textures
folder and convert the _c
to tga.
Now we make a new collection named "metalfences" and in "Object" mode we add a new cube we'll rename metalfence_base
. We'll make this cube 2m large, 1.2m high and 0.2m thick.
Picture to be added
Don't forget to activate collision on it with CustomData
col = true
. We'll now assign it a new material named metal_fence#metal
.
Picture to be added
Duplicate the metalfence_base
and we'll work on the copy. As for curbs, add a new path
Curve, and select back the newly duplicated fence. It's
In "Edit" mode, add Array
(in fit curve
mode) & Curve
modifiers. Then expand the path
until you're happy with your work.
Then go back in "Object" mode, select the fence and apply the modifiers (starting with the Array
one).
Once done, head to "UV Editing" tab to apply the material correctly.
Head up to File -> Import -> Bugbear Scene as subscene
and navigate to \path\to\WF\data\art\objects
. One done, select one or more objects and click import SCNE as Subscene
.
Tadaaa, a tree from Wreckfest is now on the track. It is possible to move, rotate and scale it.
To be added.
To be added.
To be added.
If an error occurs during the export, it will be noted in the Error.log
file, located in the {trackname}
folder.
Most of them are covered here : https://tads.me.uk/wfwiki/index.php?title=Modding:Build_Errors.