Overheating Parts on Vehicles
To add further detail to your vehicle mods, you can add the overheating effect often seen on the exhaust pipes of Nomad cars onto your own vehicles.



Theory
The overheating effect requires several pieces to work. As an effect, it requires an EntEffectSpawnerComponent to trigger and control the animation. On the mesh itself, the shader works similarly to decal shaders, which means that it gets drawn onto whatever geometry is immediately below the overheating mesh. So, for the effect to work, you need a base mesh, for example an exhaust pipe, and a slightly bigger copy of that pipe. Both meshes need to be separate .mesh files. The base one uses a Multilayer setup for its materials, while the slightly bigger one uses the overheating shader which is controlled by the EntEffectSpawnerComponent and styled by properties inside the .mesh file.
Finding Donor Files
The Mesh File
Open WolvenKit's Asset Browser and enter "overheat" into its search field.
Add
v_standard2_thorton_galena_q000__engine_overheating.meshto your project.Move it to a folder of your choice and rename it to something more managable. In this example, we'll use "supersport_engine_overheat".
Open the file and navigate to
preloadLocalMaterialInstances > overheat > values > MaskTexture.Add
base\vehicles\standard\v_standard2_thorton_galena\entities\meshes\textures\galena_engine_overheat_d01.xbmto your project.Export the
.meshfile to.glband the.xbmused by theMaskTexturementioned above to.png.

Adding The Mesh To The App
Open the
.appfile of your vehicle and navigate to thecomponentsarray of the appearance you want to add the overheating effect to.Add a new mesh
componentto the.appfile of your vehicle by duplicating an existing one.Give it an easy to remember name, it'll be important later. Here, we'll use "engine_overheating".
If needed, reset necessary values such as the
meshAppearance,chunkMask, and thelocalTransformarray. Adjust the settings for the shadows as well and generate a newCRUID.In this case, we'll be adding the overheating effect to the exhaust pipe which is attached to the body of a motorbike. As such, the
bindNameof theparentTransformof thecomponentneeds to be set tobody_a_01as that is the name of thecomponentof the body.Copy the relative path to your
.meshfile into themesh DepotPathof yourcomponent.

The Effect Spawner
Back inside the Asset Browser, right click on
v_standard2_thorton_galena_q000__engine_overheating.meshagain and select "Find files using this".Right click
v_standard2_thorton_galena__ext01_body_q000_01.entand select "Open without adding to project".Open its
componentsarray and scroll down to entry #18 titledEffectSpawner6660.Right click it and select "Copy from Array/Buffer".
Go back to the
.appfile of your vehicle, right click thecomponentsarray and select "Paste into Array/Buffer".Open the newly created
EntEffectSpawnerComponentand expand theeffectDescsdropdown.Delete all
entEffectDescentries except the one calledoverheating.Navigate all the way down to
entEffectDesc overheating > compiledEffectInfo > componentNamesHere, you need to enter the name of the
mesh componentwhich will be overheating. In the tutorial above, the name has been set as "engine_overheating" and as such doesn't need to be changed inside theEntEffectSpawnerComponent.

Creating The Mesh

Separating Vertices
In Blender while in Object Mode, select the Object which contains the exhaust pipe of your vehicle.
Switch to Edit Mode and select all the vertices of the exhaust pipe.
Hit
Shift + Don your keyboard to duplicate themHit
Pand thenEnterto separate the vertices into a new submesh.Scale the separated mesh slightly up for example by using a Shrinkwrap Modifier.

Add New Material
Switch to Object Mode and then go to the Shading Workspace and make sure your duplicated exhaust pipe is selected.
If necessary, remove any materials used by the mesh.
Create a new material. This should add a Principled BSDF and a Material Output node to the Shader Editor.
Hit
Shift + Aon your keyboard to add a new Image Texture node.Choose
galena_engine_overheat_d01.png, which we've exported earlier and connect the Color link from the Image Texture Node to the Base Color link on the Principled BSDF node.

UV Editing
Switch to the UV Editing Workspace
Inside the UV Editor on the left, click the dropdown to select an image as the background for the UV Editor and choose
galena_engine_overheat_d01.png.In the 3D Viewport on the right, make sure your overheating mesh is selected and that the Viewport is in Edit Mode.
Unwrap the UV of the overheating map and place the UV Island of the pipe over a gradient on the image.
White means that the overheating effect is fully applied. The part of the mesh which is white in the Viewport will receive full discoloration. The light grey parts receive no discoloration. The gradient between the two shades fades out the overheating effect. The goal here is to spread the effect evenly across the pipe and to exclude parts which shouldn't overheat. This requires a lot of back and forth between checking how it looks in-game and repositioning/scaling in Blender.


In Blender, export the mesh to
.glb, overwriting the file we've exported earlier and import it in WolvenKit.Open the
.meshand navigate topreloadLocalMaterialInstances > overheat > valuesagain.Leave the values as they are if you want your exhaust pipe to have a smouldering effect. If you only want discoloration, adjust the look of the effect as follows:
Temperaturedictates where the overheating effect on the gradient of theMaskTexturestarts. Leave it at25.EmissiveEVis the brightness of the light emitted by the smouldering. setting it to0will prevent the pipe from emitting light, which means it'll only be discoloured.HSV_Modallows setting the Hue (X), Saturation (Y), and Value (Z) of the discolouration. Setting X to the hue0.899999976and Y to a saturation of0.660000026will give it a red-purple-ish tint.EmissiveAlphaContrastdictates at what brightness of theHeatDistributionimage the smouldering effect starts. Setting it to something like 4 removes the smouldering effect.
Again, a lot of trial and error is required.


Last updated