WildFyr Documentation > FiveM/GTA V Tutorials > Texture Relationships

Texture Relationships

GTA can allow you to share textures between your models, this can help keep the size of each YTD down, and also make it easier to change textures on a large scale. I will show you how to set these up.


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 - models

In this example I will use my newly released rental truck pack, this pack had a total 6 vehicles, and all of them use my shared texture wfd-sharedtextures.ytd I want to have all the models use this shared texture for the extras, bed, and other equipment that all the cars use.

  • hd16f250
  • hd20f250
  • hd25f250
  • hd20ram
  • hd23sierra
  • hd16silver


Model files

Setting up shared textures - vehicles.meta

First, fill out your YTD like normal, entering in your model name, texture name, handling ID, game name, etc.

			﹤modelName﹥vehicle1﹤/modelName﹥
			﹤txdName﹥vehicle1txd﹤/txdName﹥
			﹤handlingId﹥vehicle1hand﹤/handlingId﹥
			﹤gameName﹥Vehicle 1﹤/gameName﹥

main vehicles.meta settings

Now, we want to scroll to the bottom of the meta file to enter each vehicle, and our shared textures. Ensure you are listing your textures the right way, parent and child, like in real life with DNA, a child will get parts of a parents DNA, it gets passed down. The same thing occurs here, each child will get the textures from their parent, all the way up the chain.

Remember, vehicle1txd includes shared-textures, which includes vehicles_btype_interior, which then includes vehshare, this is because the vehicles.meta in the update.rpf already has the default game textures inherit vehshare, so we do not need to specifically specify that one, unless you are not using a different default game texture dictionary.

	﹤txdRelationships﹥
		﹤Item﹥
			﹤parent>vehicles_btype_interior﹤/parent﹥
			﹤child>shared-textures﹤/child﹥
		﹤/Item﹥
		﹤Item﹥
			﹤parent﹥shared-textures﹤/parent﹥
			﹤child﹥vehicle1txd﹤/child﹥
		﹤/Item﹥
		﹤Item﹥
			﹤parent﹥shared-textures﹤/parent﹥
			﹤child﹥vehicle2txd﹤/child﹥
		﹤/Item﹥
	﹤/txdRelationships﹥

shared texture setup

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

GTA V FiveM meta texture share share