WildFyr Documentation > Zanoza Modeler 3 Tutorials > How to make Emergency Lights in ZMod

How to make Emergency Lights in ZMod


Patrick Wee-Woo

What you need

You will need a few things...

  • A Valid ZMod 3 Licence
  • A car model
  • A light bar (Or other form of light) model
  • SirenTool or the free alternative, SirenX

If you need a car, you can use Matt's Charger and for light bar Cj24's Code3 RX2700.

These are free model from Modding-Forum, I highly recommend you check out more of the assets from Modding-Forum as it is a great resource for developers. You can also get models from devs like GeorgieMoon or Raz3r, however these models cost money so you should only purchase them after you have learned how to make emergency lights, cars in general, and feel like this is something you want to pursue long term.


Do you find articles like this useful?

Donate to WildFyr to keep the flow of free tutorials coming and to stop the gatekeeping in the dev community!

Donate via Ko-Fi


Getting started with the emissive mesh

The first thing you have to do it detach, or attach, each part of your mesh you want for your siren. The word "siren" here, refers to each light that flashes. Default GTA can only have 20 sirens, using plugins like SirenSetting Limit Adjuster increases this number to 32 total. We will talk more about sirens later when we create that Carcols file.

For this example, my light bar will have 6 sirens, 3 forward facing, and 3 rear facing. As all my siren mesh and LODs are detached from each other, I will attach them in the order of the siren. I will attach all 4 front facing red sirens from each LOD group together.

Siren break down
Attaching emis mesh into siren groups

LODing your model is recommended, other devs might have told you that it doesn't matter, or that everyone has a good computer. But the big issue is if someone is using your model in a server, with other models without LODs, they are loading multiple high poly models across the map. Pair this with some horribly optimized graphics mods like NVE or QuantV, some of the most popular GFX, and you have a recipe for frame rates in the 40s or lower. LODing does not take that much extra time and greatly improves the quality of your models.

After all of your emissive LODs are attached, you want to right-click on your L0 and select edit>copy. Do note, sometime ZMod will also duplicate other meshes from your model, like the chassis or body shell, basically if something is highlighted in blue when you right-click on your mesh, it will be duplicated too. I have no idea why this happens, you can just right-click edit>delete on any other duplicated items

After the duplicate mesh is created you want to rename it to your siren, in this case my front facing red is siren2. Select the newly named siren and head to Display>Local Axis>Reset to World and click on your mesh, follow that up by Center Local Axis. You should not see the axis of your mesh in the volumetric center of your siren mesh.

Copying the mesh
Changing the mesh's axis

With your axis now set up, right-click on the siren and go to Convert To>Dummy. You should see a sizeable blue cube where your siren axis once where, do not be alarmed, this is your dummy. To make this a little easier to look at, let's make it just an outline. This also has the positive effect of making it easier to move into place later. With your dummy selected (It should be pink with a yellow outline, you might have to deselect and resect it). Head to the Properties tab and uncheck Dummy node(s)>Solid then click Apply. Now your dummy is just a little outline.

Converting the mesh to a dummy
Making the dummy non-solid

Manipulating the dummy's location and rotation

Moving Your Dummy

Next we need to adjust the dummy's position, so the scaled mesh is not visible in game. To do this select your dummy and adjust its position until the center of the axis are hidden inside some part of your model, for a light bar you can hit it inside the mesh of the bar itself. In my case I am using a Whelen Justice, so the top part of the bar is transparent, so I need to hide my mesh inside the light head itself.

The reason we do this is that in GTA emergency lighting, a mesh is scaled down to a small size. Each time the siren should flash, the mesh is scaled back up to its original size. The mesh is still a vehicle emissive material and stays exactly how bright it is when it is scaled up. Meaning if it is scaled down somewhere visible you will see a minuscule emissive light.

Here I will move the dummy until the center axes are located inside a mesh part that players won't see though. Most of the time, you should do this from the top viewport For each light bar, light head, visor bar, etc. this will be a different location. Play with its location until you find a spot that works for you. But don't move it to far away from the light as this is also the location your environmental light will emit from.

Hiding the dummy axis
My Hidden Mesh

Rotating Your Dummy

To ensure the environmental points the correct direction in game, we have to rotate the dummy a specific direction. If your siren is facing forward, no rotation is needed and if it is facing backwards, we rotate by 180. To do this, enter the top viewport, select your dummy, and make sure "Pivot" is disabled. Then grab the rotate tool, ensure your axis mode is set to Screen and X and Y axis are selected, click once and set "180" into the angle text box and click OK. To find what direction to rotate, you can use my Carcols Cheat Sheet below

Rotate Tool, with the Axis selection
Selecting and rotating backward facing lights

WildFyr's Carcols Cheat Sheet

WildFyrs Carcols Cheat Sheet

Scaling Your Mesh

Now, for the fun part. Once your dummy has been moved and rotated so it is out of site, and facing the correct orientation for your environmentals. We can scale the mesh down to its off state. First, take all your meshes LODs and drag them into the siren dummy. Then, select your mesh and all its LODs. Head to Display>Local Axis>Reset to World like we did with the dummy, then instead of center local axis, instead we want to choose Reset to Parent. You should not see the axis for all the other mesh LODs be located in the same spot that we moved the dummy to.

Setting Axis to parent

After this has been completed, head to the Properties tab and under Transformation>Scale set all the numbers to 0.01 to scale the mesh down by a factor of 100. Click the apply button and you should notice your mesh vanish. If you disable all other models in your hierarchy and zoom in on the dummies' axis, you should see your emissive mesh very small now.

Scaling the mesh
Small mesh

LODing the siren

For the last step we need to LOD the siren so it can load in game, for this turn off all LODs in the Structure tab and highlight your dummy in the hierarchy. Then click on "Convert to Compound", you should not see the word "Default" appear in the counpound box below and the dummy should not be bold in the hierarchy. Then, click the lock button, and we can select L0 and drag our L0 mesh into that same box.

We can do the same with all other LODs, select the LOD at the top of the Structure tab, and drag the correct mesh into the box. Once all your LODs are compounded correctly, we need to verify the mesh is still facing the correct direction.

ZMod has a bug that will crash the entire program if you drag an LOD above Default, or any other LOD in the box. Make sure to only drag them into the empty space under.

It might also be a good idea to save your project file so if this does happen, you do not lose any progress.

Converting to compound
LODing the siren
Final LODing
LODs!

Select your siren and turn on isolated mode, select L0, and zoom in on the mesh. Make sure it is still facing the correct direction. For some reason ZMod will sometimes flip the mesh after compounding. If your mesh is flipped you can fix this by selecting your mesh, going to the Modify>Flip tool, and then clicking on your mesh. Followed by the Surface>Normals>Calculates Normals tool, click on the mesh again. You will need to repeat this for all LODs that are flipped, or they will be facing backwards in game. Below you can see me needing to fix my front mPOWER mesh.

Fixing flipped siren mesh

SirenTool and SirenX

To make creating carcols and sequencer files easier, the community has created tool like SirenTool, and SirenX. SirenTool is a program that runs on your computer where SirenX is a website. SirenTool used to run entierly locally, however since version 4 your siren data needs to be uploaded to the Dawnstar website. Before this change I recomended SirenTool for it's privacy and allowance to have your sirens completely local. Version 3.3, the latest version before this switch happened has been achrived by me on archive.org here. You still need a SirenTool license to use it, and I cannot say how long version 3.3 will still work. SirenX on the other hand is a fully free software website, allowing you to do everything right in your browser. Whatever option you choose you can directly draw your sirens onto the canvas, creating patterns and complex designs then exporting it directly to a carcols file.

PLEASE DO NOT USE THAT FILE. Many devs include custom carcol files with custom kits, light settings, etc. In stead select from to and copy it from the generated carcols file, to paste into the one that came with your model. This is to ensure the custom light enviromentals stay working, and custom kits also keep working.

Creating carcols file with SirenTool

After you have drawn out your flash pattern, you can click the "Create Carcols" button to open the Carcols Generator. Clicking on the add siren button will add a siren to the menu, SirenTool does not have the ability to skip sirens/ So if like me you set up sirens 1-5 and then 7 skipping 6, you don't have to set anything up. After clicking add siren you can tell it what column to pick from, the colour of the light, and what direction it is facing. If you forget what column, or want to see your paterns again click and hold on the hide button. You can also click the clode button to draw more sirens if you need. If you close SirenTool it will forget everything. You can save it using the Load/Save button on the main page, this does not save your carcol generator settings. After you are all set, give your vehicle a carcols ID (You can click random to get a random one), put the spawn code for your car into the model name section, and click "Generate Carcols". The file should not be located in your SirenTool folder.

Generating carcols file

For SirenX, it's basically the same thing. Draw out your flash pattern using the grid. However, with SirenX you change the sirection directly in the editor itself. Click the cog idon and it gives you options for the intensity, multiples, scale factor, and direction. This also means everything is saved (As long as you keep the browser tab open). After you are set let's click the Export button. It will prompt you for a siren ID, this time there is no random button so come up with any random 6-digit numer (I prefer 6 digits and they are hard to cross over with existing ones), then it will ask for the Siren Name, this is the model name from before, so enter your spawn code. After that you will get a download with your XML sirens.

SirenX drawing
Exporting the file

Carcols.meta file

After exporting your file from either option, you should open it with your prefered XML editor, I am going to use Visual Studio Code. Select from ﹤Sirens﹥ all the way to ﹤/Sirens﹥, and copy it. Then head to the carcols file that came with your car, create a new line under ﹤CVehicleModelInfoVarGlobal﹥ and paste it in, save the file and you should be abel to test it in game!

Selecting and copying
Pasting into the carcols file

Do you find articles like this useful?

Donate to WildFyr to keep the flow of free tutorials coming and to stop the gatekeeping in the dev community!

Donate via Ko-Fi




Related Articles


Suggest an edit

Review this page

wildfyr

emergency creating cars flashing lights police