3D Tattoo Editor
How to place a tattoo on the freemode ped in 3D by zone, tune its uvPos, scale and rotation, and get the overlay XML or a Durty Cloth Tool project out of it.
Эта документация пока на английском.
The 3D Tattoo Editor lets you upload a tattoo image, pick a body zone and position it on mp_m_freemode_01 or mp_f_freemode_01 in 3D. You click the body to place it, fine tune the numbers, then copy the overlay XML or hand everything to Durty Cloth Tool. It is for anyone making addon tattoos who is tired of guessing uvPos values and restarting the game to check them.
What it is for
GTA V tattoos are overlays: each one sits in a body zone (head, torso, each arm, each leg) and is placed by three values in the overlay XML:
| Value | Meaning |
|---|---|
uvPos |
Centre of the tattoo inside the zone, x and y from 0 to 1. |
scale |
Size, x and y from 0 to 1. |
rotation |
Angle in degrees. |
These numbers are hard to guess by hand. The editor shows the tattoo on the real freemode body while you move it, and what you see is where the game puts it.
Quick start
- Open the tool. The male ped loads in the viewer.
- Under Tattoo image, click Upload tattoo image or drop a PNG, JPG or WebP on it. No image yet? Click No image at hand? Try a sample for a test design with an arrow that shows which way is up.
- Pick Male or Female and the Zone.
- Click the body where the tattoo should go. The zone switches to the part you clicked and the position jumps there.
- Fine tune with the UV X, UV Y, Scale and Rotation (deg) sliders, or type the numbers.
- Set the Overlay name and Collection, then Copy overlay XML or press Create in Durty Cloth Tool.
The viewer
Drag to orbit, scroll to zoom, click the body to place the tattoo there (a click only counts when you did not drag). The label in the top left shows the ped model and the current zone. The buttons in the top right:
| Button | What it does |
|---|---|
| Background colour | Colour picker for the viewer background (default near black). |
| Focus zone | Moves the camera to the current zone. The camera also moves there when you change zone. |
| Save screenshot | Downloads the current view as a PNG named <overlay name>_<zone>.png, for example my_tattoo_zone_torso.png. |
Panels
Tattoo image
Accepts PNG, JPG and WebP. A PNG with a transparent background works best, because everything that is not transparent shows on the skin.
Tattoo textures are square in GTA. When your image is not square, a dialog asks what to do:
- Crop centre cuts the largest centred square out of the image.
- Fit with padding keeps the whole image and pads the short side with transparency.
After loading you see a thumbnail with the file name and size, Change to pick another file, and the X to remove it. Uploading a file also fills the Overlay name from the file name (lower case, anything but letters, digits and underscores turned into _).
Placement
| Control | What it does | Default |
|---|---|---|
| Male / Female | Switches between mp_m_freemode_01 and mp_f_freemode_01. |
Male |
| Skin tone | Pale, Light, Medium, Tan, Brown, Dark. Preview only, it does not change the export. | Light |
| Zone | Head, Torso, Left arm, Right arm, Left leg, Right leg. | Torso |
| Quick spots | Preset positions for the current zone (see below). | |
| UV X, UV Y | The uvPos centre, 0 to 1 in steps of 0.001. |
0.5, 0.5 |
| Scale | One slider for both axes while X + Y linked is on. Click the lock to switch to X and Y separate and get Scale X and Scale Y. | 0.2, linked |
| Rotation (deg) | Minus 360 to 360. | 0 |
| Show tattoo | Hides the tattoo to compare with bare skin. | On |
| Wrap around | Continues the tattoo past the edge of the zone, the way the game does around limbs. | On |
| Reset placement | Back to the defaults above. |
Each slider has a number box, so you can paste exact values from an existing overlay file.
Quick spots
| Zone | Spots |
|---|---|
| Torso | Chest, Stomach, Upper back, Lower back, Right ribs, Left ribs |
| Head | Forehead, Left cheek, Right cheek, Left temple, Right temple |
| Left arm, Right arm | Shoulder, Upper arm, Forearm, Wrist, Hand |
| Left leg, Right leg | Thigh front, Thigh back, Shin, Calf, Ankle |
A quick spot only sets UV X and UV Y, scale and rotation stay as they are.
How the zone coordinates run
Knowing this saves a lot of trial and error when you type values:
yruns from bottom (0) to top (1): waist to neck on the torso, hand to shoulder on arms, ankle to hip on legs.- On the torso,
xwraps around the body: about 0.25 is the back, 0.5 the right side, 0.75 the chest, and both 0 and 1 are the left side. - Arms and legs are mirrored on
x, so the same values on the left and the right limb land on matching spots.
Export
| Field | What it does | Default |
|---|---|---|
| Overlay name | Written to nameHash, txdHash and txtHash in the XML, and used in the Lua snippet. |
my_tattoo |
| Collection | Only used in the Lua snippet, as the collection argument. | mpfivemad_overlays |
Buttons:
- Copy overlay XML copies the
<Item>block shown below the editor. - Create in Durty Cloth Tool opens Durty Cloth Tool (v3.1 or newer must be installed) with the zone, gender and placement filled in. The tattoo image is passed through your clipboard, so allow clipboard access when the browser asks.
- Copy share link copies the page URL with the current gender, zone, skin tone and placement.
Output
Below the panels you get two code blocks: the overlay item and a Lua snippet. With the defaults and an image named dragon.png on the torso:
<Item>
<uvPos x="0.500000" y="0.500000" />
<scale x="0.200000" y="0.200000" />
<rotation value="0.000000" />
<nameHash>dragon</nameHash>
<txdHash>dragon</txdHash>
<txtHash>dragon</txtHash>
<zone>ZONE_TORSO</zone>
<type>TYPE_TATTOO</type>
<faction>FM</faction>
<garment>All</garment>
<gender>GENDER_MALE</gender>
<award />
<awardLevel />
</Item>-- Apply the tattoo to the local player (collection = your overlay .ymt / dlc name)
local ped = PlayerPedId()
AddPedDecorationFromHashes(ped, `mpfivemad_overlays`, `dragon`)
-- Remove all tattoos
-- ClearPedDecorations(ped)The tool does not make the .ytd itself. Durty Cloth Tool builds the .ytd, the overlay file and the stream folder for you; by hand you need to do those steps yourself.
Getting it into FiveM
With Durty Cloth Tool
Press Create in Durty Cloth Tool and follow its steps. Its tattoo guide covers the resource it creates.
By hand
- Put your tattoo texture in a
.ytdwhose name matchestxdHash(heredragon.ytd), with a texture inside named liketxtHash. The Texture Editor can build that dictionary from a PNG. - Add the copied
<Item>to the<presets>list of your collection’s overlay XML (the file name, without extension, is the collection name you pass to the natives). - Stream the
.ytdand register the overlay file in your manifest. - Apply the tattoo in a script with
AddPedDecorationFromHashes(orAddPedDecorationFromHashesInCoronain character creators).
A sketch of the resource:
my_tattoos/
fxmanifest.lua
overlays/mpfivemad_overlays.xml
stream/dragon.ytdfx_version 'cerulean'
game 'gta5'
files {
'overlays/mpfivemad_overlays.xml',
}
data_file 'PED_OVERLAY_FILE' 'overlays/mpfivemad_overlays.xml'Tip
Tattoo shops read a separate shop list (shop_tattoo.meta) for prices and names. If you only apply tattoos from your own scripts, the overlay file and the .ytd are enough.
Tips
- The URL always holds the current gender, zone, skin tone and placement (
?gender=MALE&zone=ZONE_TORSO&uvx=...). Bookmark it or send it to a teammate to pick up where you left off. The image and the Wrap around setting are not part of the link. - Keep Wrap around on for bands around arms and legs. Turn it off to see exactly where the tattoo gets cut at the zone edge.
- Make one version per gender. Female and male bodies differ, so place the tattoo on each and copy both items; the XML says
GENDER_MALEorGENDER_FEMALE. - Use Save screenshot for your store page or changelog.
Common mistakes
- Tattoo upside down or mirrored. Use the sample image first: its arrow shows which way is up for each zone. Then flip or rotate your artwork, or use Rotation (deg).
- Scale too big. A scale of 1 fills the whole zone. Most tattoos sit between 0.1 and 0.4.
- Names that do not match.
txdHashmust match the.ytdname andtxtHashthe texture inside it. Changing Overlay name changes all three. - Clipboard blocked. If Durty Cloth Tool opens without the image, the browser did not allow clipboard access. Allow it and try again.
Limitations
- Placement only. The tool does not write
.ytdfiles or a complete overlay file. - Skin tone tints the preview skin, it is not the game’s skin shader.
- Everything runs in your browser. The image is not uploaded anywhere; for Durty Cloth Tool it goes through your own clipboard.
Related tools
- Clothing Designer for painting clothing textures in 3D.
- Texture Editor to build the tattoo
.ytdfrom a PNG. - YMT Creator for addon clothing files.
- Hash Calculator to get the joaat hash of an overlay or collection name.
