Shared Textures

Shared textures are used to decrease the required disc space and memory usage. By default, all vehicles share the vehshare.ytd, specific vehicles share other vehshare files (for example for trucks or army vehicles), and many vehicles share interior textures (for example taxis and police cars).


Using shared textures can be very useful for vehicle packs, both in single player mode and in FiveM, if each of those vehicles uses the same set of textures. This can be the case for example when using multiple police vehicles that all use the same equipment.

.ytd texture files

To share textures, simply create a separate .ytd file and add the textures you want to share. Make sure that your vehicle's .ytd file does not include these textures and that the name of the textures themselves is the same for all vehicles.


The file structure for 2 vehicles and 2 shared textures could look like this for example:

  • vehicle.yft
  • vehicle_hi.yft
  • vehicle.ytd
  • vehicle2.yft
  • vehicle2_hi.yft
  • vehicle2.ytd
  • shared_textures1.ytd
  • shared_textures2.ytd

vehicles.meta

The shared textures need to be assigned to the specific models in the texture relationships in the vehicles.meta. Each texture can have one parent texture, which is automatically loaded when the child texture is used. To use multiple shared texture, it is necessary to chain texture relationships.

shared_textures2 automatically includes shared_textures1, which includes vehicles_poltax_interior, which then includes vehshare, as defined in the vehicles.meta in the update.rpf.


In this example, the vehicles will use the following texture files:

  • vehicle: vehicle.ytd, shared_textures1.ytd, vehicles_poltax_interior.ytd, vehshare.ytd
  • vehicle2: vehicle2.ytd, shared_textures2.ytd, shared_textures1.ytd, vehicles_poltax_interior.ytd, vehshare.ytd

If your vehicle does not use any of the shared interior textures but some of the vehshare textures, you can set vehshare as the parent of your shared texture.

Authors

  • Smanbg
    Moderator
  • Cj24
    Administrator Accurate Studio

Don’t have an account yet? Register yourself now and be a part of our community!