Jump to content
  • entries
    232
  • comments
    773
  • views
    173,444

Tattoo Workshop


DocClox

3,402 views

Introduction

 

This is a tutorial about using Blender to project images onto body mesh. My usual approach has been to paste designs into a transparent layer on top of a skin texture then to drag, scale rotate them and hope for the best. The results have been mixed at best, with tats deforming as the body mesh curves and a lot of guess work being required to get the image correctly placed. I've also had to place them a little oddly at times to avoid seams in the UV map.

 

The approach I outline here results in precise placement and greatly reduced distortion. It also lets you map tattoos over seams without having to worry about lining them up, It isn't a perfect solution, but it's a lot better than paste-and-pray. I hope you find it useful too.
What you will need:

  • Blender 2.75 or better
  • The latest nif importer scripts for Blender
  • The Gimp
  • The Gimp dds plugin
  • Some sort of BSA unpacker - I used BSA Browser

Getting Ready

 

Start by making sure that the body mesh(es) you want to tattoo have been unpacked unpacked. I used BSA browser. You're after femalebody_1 for the body itself. Make sure you're using the body mesh you use in game - if you use UUNP you want to use that mesh rather than the one from the Skyrim - Meshes bsa.

 

While you're at it get the textures too

 

One more thing - create an empty UV map image at the texture size you want. I tend to work at 1024x1024, but if you want 2048x2048 or bigger go for it. Just bear in mind that each tat is a new texture taking up VRAM. All you do is open the Gimp, create a new image of the desired size, delete the background so you have an empty transparent image and then export it as a png. It'll be useful later.

 

Set Up the Studio

 

I use a couple of tutorials to help figure this process out. One of them is from 3dcheapskate who recommends setting up a "Tattoo Studio" in Blender. What you do is this:

  • Open Blender on the default scene
  • Delete everything. The cube, lights, camera, the lot
  • use shift-C to make sure the cursor is at the origin
  • add a light (I used a sun) and transform it 2 units up the z axis
  • add a camera and transform it one unit up the z-axis
  • point the camera at the origin
  • save the setup as tattoo_studio.blend

This probably isn't as important with the latest Blender and Quick Projection as it was with 2.49b, but it's still good to have a setup where you know where everything is and where the lighting will be good.

 

Import and position the mesh

 

I'm going to assume you have the latest nif importer setup properly. Go to file->import in Blender and import the mesh part(s) you need. Set the scale adjustment really small - something like 0.02.

 

Once the import process is complete, move the model so the area you want to tattoo at the origin point and facing upwards. Zoom in so the target area fills the screen. You want to be looking down at it as squarely as possible.

 

Quick Projection

 

Go to texture edit mode. In the tool bar on the left there should be an section labelled "external". Expand that.

 

Set the image size to the size you want to use for your textures, then click "edit" **Check**

 

The gimp will open with a screenshot of the view in the 3D window. Any changes you make here will be reflected back in the 3D window.

 

Create a new transparent window over the screenshot and paste your tattoo design into that. Scale it and position it until it looks about right.

 

Once you're happy, hide the original layer so all you can see is the tattoo design on a transparent background. The export the image. Use the filename the Gimp suggests and overwrite.

 

Apply The Projection

 

Remember the transparent UV map you made earlier? Load that into the UV window. You want to see the grey-on-grey alpha checkerboard pattern overlaid with UV mesh. Once you have that, go back to the external tool tab and press the "apply" button. If all goes well you should be able to see the tattoo in the UV window. You may need to go back to object or edit mode and play around with the selection before it appears.

 

Assuming all goes well, save the UV image with a new filename. You can now exit Blender.

 

Set up the texture for SlaveTats

 

The texture file you just saved will be in .png format. You need it to be a dds. Open the file with the gimp and export it with the .dds suffix. Choose RGBA8, BC3/DTX5 and "Generate Mipmaps".

 

Make sure there's a slavetats folder for your mod. It should be in skyrim\textures\actor\character\slavetats\yourmodname. Create the folder if it doesn't exist, then copy your new dds file into it.

 

Now edit skyrim\textures\actor\character\slavetats\yourmodname.json and add an entry for the texture. By way of example, this is the entry that adds Lady M.'s spider mark.

[	{		"section": "Young Mephalians",		"name": "Castemark",		"texture": "young_mephalians\\wide_grey.dds",		"area": "Face",		"credit":"DocClox"	},]

Test The Result

 


Start Skyrim, go to the SlaveTats MCM and apply the tattoo to your character (or whoever). Make sure it looks as you expected.

 

Post Processing

 

The technique is not perfect and there are still a lot of reasons why your texture might look strange.

 

Elven forehead geometry, for isntance, is radically different from that of humans, so a tattoo that fits on a human forehead may well be all over the place on an elf. You may need to make a separate version for elves. (And probably again for argonians and khajiiti if that's something you want).

 

Areas with a high cell density can also cause problems. The pubic mound, for example, has a lot of small UV cells and not many pixels to share between them. Your texture gets sheared and scaled to make it fit and the effects can be brutal. In cases like this it's probably best to do a little post-processing. Open the texture, create a new blank layer, draw the texture again using the distorted texture as a guide so you get the poisition and proportions correct, and then hide the old texture layer and save the new one. It's a pain, but probably nothing you haven't been doing anyway.

 

Example

 

Hildy Half-Bright decides she in need of some protection in battle and asks Ragvar Bad-Apple to give her an enchanted tattoo. Ragvar agrees and recommends this as a suitable protective talisman.

 

mGweZ8j.png

 

Hildy agrees that it looks most potent, but is a little taken aback when Ragvar tells her it will only take effect if inscribed on her ass-cheek. Reluctantly she agrees to have her bum tattooed.

 

This is what Ragvar sees. (afer clicking in the 3D window and pressing shift-space anyway)

 

RvAWo1c.png

 

Now the ideal place to put this tat is right on top of the butt-to-leg seam. You can see the seam in the screenie there. (For some reason I can never get CBBE to work quite right with Mod Organizer). Anyway, this doesn't deter Ragvar who clickes the "Qucik Edit" button there at the side. Gimp opens showing the scene in the 3D window.

 

OmNJ5lK.png

 

From there, the easiers thing is to pick "open as layers" from the file menu and open our "hurt me" design.

 

3IZnJAu.png

 

And there you see the image in the gimp. First thing to do is to rotate it and scale it so it looks about right

 

gdaxoYC.png

 

I left that at a bit of an angle so it would follow the curves of the body rather than being mechanically vertical. I have no idea if this will work or not, but that's what makes these things interesting. (Ragvar's excuse is he had too much Flinn before starting work. I like mine better...)

 

Now: there are two things you need to do. First, the tattoo image is too small. You can see that from the yellow dotted line around the edge. So right-click on the layer in the layers box and resize layer to image. Then hide the layer with the original screenshot. The result should be like this:

 

QcVPT4E.png

 

After that you can export the image. Use the name it suggests and say "yes" to overwrite.

 

I'll finish the screenshots off tomorrow.

 

Notes

 

If you can't see the section of mesh you want to tattoo, it's OK to delete sections of the model. It's not as though going to save the mesh, right?

 

This works best when the surface is fairly flat. Small curvatures are not a problem. Moderate ones can be fixed in gimp using perspective or cage transforms. More extreme cases may require you to apply the texture in settings, changing the view between projections and correcting any errors that creep in.

 

Summary

 

By now you should know how to use Blender to project a tattoo into a model and save as a texture scaled to the model's UV mesh. By doing this you can position the image precisely, automaticlly scale it to follow the UV map of the mesh and map over seams without problems. I hope you find it useful.

 

References

 

http://www.blendtuts.com/quick_projection

 

https://www.renderosity.com/mod/tutorial/?tutorial_id=2730

31 Comments


Recommended Comments



This should be more or less right.

 

There's a couple of "**check**" comments still in the text and it could use a few screenies, bit otherwise it should be usable.

 

Let me know if anyone finds any errors, omissions, improvements and the like.

Link to comment

Thank you for this... when I get a bit of free time, I'll check it out.

 

 

By now you should know how to use Blender to project a tattoo into a model and save as a texture scaled to the model's UV mesh. By doing this you can

 

References

I can what? I CAN WHAT? I need to know!

Link to comment

Just trying to summarize and keep it conversational.

 

Basically, you open up the model in blender, and adjust it so the target area of skin fills the viewport and then press a button on the blender toolkit.

 

That button takes a screeny and loads the result into Gimp. You can then adit the screeny, save it back and blender will make the model look like it did in your edited screeny.

 

Then you can save teh modified texture back to an image file and it'll have the tattoo image scaled and sheared so it looks the same in game.

 

Should I have explained that in a bit more detail up front?

 

(Also, one of those reference links is a video tutorial which walks you through the process, and is probably worth watching)

Link to comment

Yeah, I get that :)

 

I did a quick recreation of the "hurt me baby" tat from the other day

 

mGweZ8j.png

 

And mapped it across the backside, right over the seam:

 

5Mnwkdt.png

 

I'll integrate them into the main article and add some more screenies later. For now, food calls.

Link to comment

I did rather leave that last line in mid-sentence, didn't I? Oh well, fixed in the next release as they say.

Link to comment

I am also trying to make a tattoo mod though more tribal (but daedric style) however it is very annoying to keep switching from Game to GIMP to see how it looks like on my character's body.

I dont understand how your method here deals with the stretching and spread on the character's body. I am very new at this so I am using tribal tattoo build as my skeleton.

Link to comment

Basically, you get Blender to do all the work for you. You edit the picture in the 3D window in Gimp and then write it back to Blender.

 

Blender then projects that flat image back onto those areas of the model visible in the 3D window, calculates where the image would fall on the model's texture and then writes the modified image onto the texture.

 

So that reduces spread and stretch because the modelling program (Blender) is working out where the pixels need to be on the texture.

 

I hope that's a bit clearer.

Link to comment

Any chance you'll make this tutorial idiot-friendly? :)

 

I've never used blender, and I can't make heads or tails of it.

 

I did my best.

 

Did you look at this link? It's a video tut that explained to this idiot how to do it.

 

Failing that, if you have specific questions, I'll try and answer them. Maybe even make the tutorial clearer.

 

I can't do a full-on blender tutorial though - way too much stuff. Though Blender: Noob to Pro is pretty good if you need a primer.

Link to comment

Nevermind, it's too complex. I can't even get started cause it wont let me choose the image editor for whatever reason.

 

Thanks aniway :)

Link to comment

Fair enough. Sorry I couldn't be more help :)

 

[edit]

 

Also, apologies, I seem to have edited my reply into your comment rather than adding  a fresh reply. I didn't know I could do that. 

Link to comment

Figured out what the problem was, so I decided to give it another try (although I'm really starting to hate Blender :D)

 

1. How do I get a 3d unp body into blender?

2. How do I import a tattoo?

Link to comment

Blender's not so bad. It's a bit like the Gimp: seems a bit weird at first but once you get used to it, it's pretty cool. :)

 

Importing bodies:

 

If you're a max user you can import the _1 nif into Max and save as 3ds or obj and then import that.

 

Otherwise you have two choices, both of them a bit annoying: you either use Blender 2.49b and the old nif scripts and import using that, or else you try the alpha ones that support Skyrim for recent versions of Blender.

 

dev version

 

Blender 2.49b instructions

 

If you can cope with having two blender versions installed, it might be easiest to use the 2.49b version to do the import, then save it as a .blend and load it in 2.75. Actually, that seems to be the recommended workflow from the niftools people

 

 

Link to comment

Ok, so I managed to import nif file with a blender plugin, but:

 

1. The body is black, cant see any texture. I thought putting some light or something will change, but it didnt seem to (though, who knows if im even putting it right)

 

2. Camera controls in blender seem to be invented by Satan. Good stuff

 

Sorry to bother you so much man

Link to comment

No bother mate. No point in writing a tutorial if no-one uses it :)

 

Yeah. I tend to do what 3dchapskate suggested in the other link I attached, and set up a static studio layout.

 

Basically, delete the initial camera and light, and get the cursor back to the origin with shift-C. Then you can shift-a to bring up the add menu and add a lamp. Type g to move it, z to constrain to the z axis and 2 for the distance then return to lock it in and you have a sun 2 units above the xy plane. Do the same for the camera and move it up one unit. numpad 0 to check the view and then save it as "studio.blend"

 

You can also grab the camera while you're looking through it. gzz gets you grab it constrained to the camera's local z axis which means you can move the mouse to dolly in and out. Or just g and move the mouse to pan the view. Rotation is a pain until you get the hang of the pivot point. It's usually best set to either the center of the bounding box (camera rotates about itself) or the 3D cursor (set it to the origin and you rotate about that).

 

Black body: alpha shows black in blender if there's nothing underneath. Depending on how you've imported it you probably have materials and textures set up for the skin, so it's probably just a case of extracting them and putting them where blender can find them. My studio seems to be using the files in my CBBE install.

 

Worst case you can bring up the textures props, and load the files from there.

Link to comment

Ok, so I've got the base file and the camera figured out. But I don't know if I even imported the .nif correctly.

 

Basically I just searched for one on my computer, cause i've done so much copying everywhere i don't know what's what anymore, And I found one femalbody_1.nif(does it need to be a specific ony, like from a unp folder?) and copied it to desktop (do I maybe need to leave in it's location and open it there?)

 

If it's not any of that, how do I do this:

 

 

Worst case you can bring up the textures props, and load the files from there.

Link to comment

On the right hand side of the screen there's a long vertical panel. That's the properties panel. At the top there's a collapasable tree view of the elements in your scene, and under that there's a horizontal box of small icons. There should be one like a round shaded ball and after that another like a checkered flag. Click on the flag to show the textures. (You might need to widen the props panel a bit).

 

Once you've done that, you should see the textures for the current material (I think there should only be one material - the skin) and if they've loaded right they should be texture based. There's a box lower down in the texture props that lets you select and load images. Sorry if it's a little vague but I don't have my blender install available right now.

 

You might need to convert the texture to png format first. You can load it with the gimp or paint.net and save as png if it won't take dds format.

Link to comment

Ok so I got to the Applying part of your tutorial (assuming I did everything right, which I didnt :D) but I cant get the tatoo to show up applied in 3D, Is this how the UV windows is supposed to look like?

 

6Sk856s.jpg

Link to comment

I just ran a test run for a new tat. This is how mine looks.

 

BvUd3Ry.png

 

Is the testing tattoo the tat you're trying to apply?

 

[edit]

 

(if you look closely you can see the 0x444544 slavetat grey of the design against the greys of the alpha-grid background)

Link to comment

OK. I have to go to work now, but I'll look when I get back. Looks like you're not projecting it, or else you're projecting but not applying it after but just opening the screenshot file as UV.

 

I'll take a look tonight.

Link to comment

OK, I had a quick look. As far as I can see, you're bang on with the export and edit part.

 

The difference is when I come to apply that:

 

8Ifjjo1.png

 

I split the screen into two windows so the model is on one side and the UV window on the other. You can do that by dragging the little triangle icon in the top right corner of the main pane. That will split your 3d view in two and then you can change the window type on the new area.

 

The I hit apply just like you did:

 

R5nOcgm.png

 

I think what you're doing is applying the edit to the UV map directly rather than to the model, if that makes sense. Click in the 3d window to make sure it's focused and then apply and see if your edit appears on the model. If it does, then see if it's one the uv mesh. You may find it applies to the skin texture and it takes a little fiddling to get it onto the alpha sheet - or it may be easier to just save a copy, select by colour and lift it off that way.

 

Have a try anyway.

 

ycJLkVV.png

Link to comment

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use