WildFyr Documentation > Blender Tutorials > How to render colourful templates

How to render colourful templates

Object Space Templates

Have you ever looked at templates from GeorgieMoon or Kane and wondered how they get that nice colour? Well today I am going to show you how exactly to do it, and you only need a few items!

What you will need for this tutorial:

  1. An unlocked car (That is either already templated or you templated in ZMod)
  2. Blender
  3. Sollumz Blender Plugin
  4. CodeWalker RPF Explorer
  5. A basic understanding of Blender and texture baking

Getting prepared for Blender import

To start off, you want to get your unlocked .yft file. You can either export this from ZMod or use an existing unlocked car. I would suggest using the _hi.yft to ensure you are baking the template on the highest poly version of the car. For this example, I am going to use Raz3r's latest 2023 Tahoe PPV release. After you have your car, open the CodeWalker RPF explorer and import it (I recommend making a new folder and using that for your XML exporting). Right-click on your model and select "Export XML", select a location to put it and let it export (You also want to rename your XML, remove the _hi so it will import correctly).

I cannot stress this enough, you need an unlocked car model for this. Using a locked model and exporting the XML violates ToS of almost every dev. This would be considered "unlocking" or "ripping". Only use this tutorial on unlocked cars you have rights to use. WildFyr Development is not responsible if you use this tutorial in malices ways.

The Tahoe I will be using
Exporting the XML file for Blender

Importing your XML into Blender

Create a new Blender workspace and go to file>import>CodeWalker XML (If you do not see this, ensure you installed the Sollumz plugin correctly and it is activated). The first thing you will see after it imports is a giant box, don't freak out, this is simply the vehicle collisions. Open the collection in the hierarchy and click the eye icon on all the collisions, you can delete them if you want, I just prefer t hide them.

Importing the XML
Turning off the collisions
Imported car

Selecting all the body panels

We need to select all the body panels to ensure our UV mapping is correct. Select all the car's mesh and switch Blender into Edit mode. Select a poly that is on a piece of the bodyshell and press Shift+G and select "Material". This will select everything that uses the paint material and everything we need for UV mapping and baking.

Edit mode
Selection
Selecting all the paint material

This next part is optional, however I like to do it to ensure my model's base stays untouched. If you want to skip this part jump down after the screenshot. Now we can press Shift+D to copy this selection, press Z to snap it to the zed axis and move your copied bodyshell to above the car.

Moving the duplicated mesh

We need to detach this mesh selection for the existing mesh, to make anew mesh. Press P and click selection. Go back into object mode and select the new meshes we just made and drag them out of the car.mesh, into the main collection. Select everything and press CTRL+J to join them all to a single mesh. Also, make sure "Backface Culling" is enabled in the Viewport shading dropdown.

If you see any parts of the model that is painting inside the vehicle (door sill, handles, etc.) You will want to delete that before we render the object space map.

Detaching by selection
Combining the mesh
Backface culling

Getting the UV Map

To get the proper UV map, we will need to select the combined mesh and head to the Data tab, open the UV Maps setting and select "UV Map 1". Then we can switch to UV Editing tab. In the UV Editing tab you should see your bodyshell, switch to wireframe and select the whole model, if the texture window shows you a UV map that looks like a normal template then you have done it right. Click on UV>Export UV Layout, set the size to 4096x4096 for 4K, and the fill opacity to 0, then click Export.

UV Map Selection
UV Editor
Exporting the UV Map
Export Settings
exported wireframe UV map

Preheating the oven

Now let's get a little fun, Switch over to the Shading tab and add a new node, Shift+A search for "Image Texture" and click it. Click the new button to make a new texture for your Object Space Normal Map to be backed onto, set the size to 4096x4096 and the colour to transparent (set the alpha level to 0). Open a new window by draging down from the top left corner of the 3D Viewport and switch this one to "Texture Editor", then select your new texture (It should be blank). Now to bake, first off, head to the Render tab and switch your Engine to Cycles. Baking is currently not supported in the EEVEE engine. Then change the Render samples to 100, this is to make sure the render does not take too long.

Image Texture Node
A New Image
Texture Editor
Selecting the texture
Cycles engine
Max Samples

Baking the Object Space Normal Map

To bake the map, select your model, and the Image Texture node. In the bake tab, select Normal from the dropdown, and change the space from Tangent to Object. Then click "Bake" If you get an error saying you have initialized images, you will need to delete all the other materials. Head to the materials tab and remove any that are not "vehicle_generic_smallspecmap" then, bake again.

Bake settings
Removing other materials
Baked texture

Combining the Wireframe and the Normal map

Open the normal map in your favorite photo editing program, and simply put the wireframe texture over the top. I do feel that is is a little too dark, so I also add a 35% opacity white fill ontop of the normal map. Add your logo and maybe the name of the car if you fancy, and apart from that you are golden! Thank you for reading, and I hope you enjoyed!

The final version
The car with the new template

Related Articles


Suggest an edit

Review this page

wildfyr

gtav blender zmod template

1 recommend this page