Dynamic UK License Plates

GTA:V Modding with ZModeler3 discussion.
Post Reply
Lukewilson12
Posts: 3
Joined: Sat Oct 15, 2022 2:09 am

Dynamic UK License Plates

Post by Lukewilson12 »

Hello,

I am in need of some support or guidance for modifying licenseplate materials. I will start from the beginning.

Static UK License Plates
Static UK License Plates have already been created on a bunch of models and simple as they do not use the 'vehicle_licenseplate' shader, instead they use 1 texture.
This is an issue for me as every model of that vehicle which spawns, will have the exact same license plate regardless of the GTA Licenseplate number.


I do not wish to create textures / mods for new licenseplates, I want them to be dynamic.



Dynamic UK License Plates
I am attempting to create Dynamic UK License Plates on a vehicle, but I am having difficulty getting it right.
Font
I have created a new texture for the Font. This works in game. Font is no issue.


Texture Change
I have changed the plate01.dds, plate02.dds, plate03.dds, plate04.dds, plate05.dds and yankton_plate.dds textures from the vehshare.ytd



However, as you can see both front and rear plates are Orange. ~
UK Plates are Orange at the back, and White at the Front.

I understand why this happens, both front and rear licenseplates have the same material, and therefore whatever is on the front, is on the back.


Zmodeler Material
After looking into the material properties of the licenseplate, I noticed the licenseplate material was set to 'vehicle_licenseplate.sps' which is the shader file for the licenseplates, without this, the text does not spawn on the plate.
The licenseplate material has two textures, the licenseplate background (called 'plate01.dds') and the font (called 'vehicle_generic_plate_font.dds') these can be found in vehshare.ytd


My goal is to create a WHITE front plate, with a ORANGE rear plate. The dynamic FONT can then overlay on the top of the front and back.
I want to separate the FONT from the plate background, therefore I removed the 'plate01.dds' texture from the material.
However, even though there is no background texture on the material (plate01.dds), a background is ALWAYS visible on the plate.

This leads me to where I am right now.

I can only see two options to solve this problem.
1. Is it possible to remove the background from the plate? This is by either:
- Removing the background texture (plate01.dds) from the 'vehicle_licenseplate.sps'
Example:


- Making the background texture (plate01.dds) invisible!
If the background texture (plate01.dds) was able to be made INVISIBLE, that would mean only the Text is VISIBLE.
I could then overlay the licenseplate Text ('vehicle_generic_plate_font.dds') onto new blank License Plates which would be ORANGE at the Rear, and WHITE at the Front.



2. Alternatively, as I could not solve the first solution, I have therefore moved onto a 3D Modelling solution.
In order to create the UK plates, I set the license plate background to WHITE for both Front and Rear.

The Front License Plate is White - All license Plates are dynamic and are able to be changed.

I then modified the rear license plate, so that it had a ORANGE/YELLOW glass over the top.
NEW ORANGE GLASS

OVERLAY ONTOP OF WHITE REAR PLATE


As seen below, now the licenseplate is White at the Front, and Orange/Yellow at the Rear.


This is not perfect, and I am no expert at material properties. The White Front Plate is Perfect. The Orange Rear Plate is not - the Black Font is affected by the Yellow Glass overlay and appears dull and hard to read.
Is there any improvements that could be made to make the Black Font stand out more underneath the Yellow Glass??
Lukewilson12
Posts: 3
Joined: Sat Oct 15, 2022 2:09 am

Re: Dynamic UK License Plates

Post by Lukewilson12 »

As far as I'm aware, many have tried but nobody has been able to create Dynamic UK License Plates, however I think I am close.

Any help is much appreciated - See a video of progress below:
https://youtu.be/uHQNpy3JxIc
User avatar
Oleg
Site Admin
Posts: 14044
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Dynamic UK License Plates

Post by Oleg »

just wondering, what happens if you create another vehicle_licenseplate material for the rear license plate with a different DETAIL texture? will game ignore second license plate material and produce no letters/text on it?
Lukewilson12
Posts: 3
Joined: Sat Oct 15, 2022 2:09 am

Re: Dynamic UK License Plates

Post by Lukewilson12 »

Hello Oleg,

I appreciate your response. I will try this now and let you know the outcome.

From messing about with this over the past few days, I think I know what the outcome will be.
Its very, very weird, but what seems to happen with 'vehicle_licenseplate' is that when you remove the 'DETAIL' texture (plate01.dds) - When I load into GTA, it somehow has all of the plate backgrounds (plate01/plate02/plate03/plate04/plate05/plate_yankton available to select, and mapped over the material even though it is removed.

I'm unsure how a texture can be removed, and somehow it always comes back in game. It makes absolutely 0 sense to me...

I will let you know the result of your suggestion

Kind regards
Luke
User avatar
Oleg
Site Admin
Posts: 14044
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Dynamic UK License Plates

Post by Oleg »

when you remove the texture in material, game's shader still needs a texture to be loaded into an associated texture slot. if material has no texture there, then the last used texture is retained. for example, if game rendered some other vehicle with vehicle_licenseplate shader, the plate02 texture might got loaded into DetailTexture feeding slot and was not replaced with another texture when the game started to render your vehicle's license plate (as material has no texture specified there to assign for this slot).

an alternative would be to assign small transparent texture there. the one with absolutely black alpha channel. I assume the licenseplate shader respects texture's alpha, so it could render no underlayer, just a text overlay. in such a case, all you need is to create another set of polygons with regular vehicle_mesh or vehicle_badges shader and proper plate (white / yellow) texture assigned.
Post Reply