Jump to content
  • entries
    251
  • comments
    818
  • views
    192739

Tattoo Workshop


DocClox

4267 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



Sunsetter

Posted

Yeah, I checked a some more tutorials on this and I seem to be doing it right but no dice - Blender seems to hate me as much as I hate it :D

 

I'll try a few more things, different versions of Blender etc but it seems I'll be sticking to making non-seam tats

DocClox

Posted

If it helps, it took me a bit of flailing around with different buttons and setups before I got it working. Then I saved the blend.

 

Actually, what I could do is post the .blend file. I've got one saved and set up ready to go - two button pushes away from application. I might do that when I get back home tonight.

 

Don't know why I didn't think of that sooner.

 

[edit]

 

I found a file I'd used to experiment with stocking top tattoos. It seems to work here. PMed you since I can't seem to attach files to blog comments.

PubliusNV

Posted

Doc, I don't know if you're still active and reading this, but in hopes you are, here goes.

 

From what I've been reading, it seems that in order to get a nif file into Blender, I need to import it into Blender 2.5.9 using nif tools that require the installation of Python 2.6.6, pfyyi 2.2.3, and blender nif scripts 2.5.9.77.  However, the install.bat for pfyyi says that it needs Python 3.0 or above, and even after installing both Python 2.6.6 and 3.6.0, the install.bat still can't find any installed Python.  Maybe the bat file needs changes to run on Windows 10?
 
Some of the posts I've been reading are now 4 years old, is this still all necessary?  Is it still necessary to import the nif into Blender 2.5.9 and then export it as a blend file, then import it into Blender 2.78?  If so, do you know if pfyyi is still needed, and how to install it?

 

Edit: Never mind, I got help in another forum thread and found a plugin for Blender 2.78 that seems to work.

 

Thanks.

DocClox

Posted

Ah, ok. I just replied to the slave tats post because I saw that first. Glad you got it working.

Mortalwombat

Posted

Thanks for a great guide. I'm a total n00b with Blender, but your steps worked well. :-)

But, I do have a slightly weird issue. Sometimes when using the quick edit function, only the original texture layer get updated with my edits. That is, instead of the empty UV layer, only the FemaleBody_1.dds get the "edited star" after photoshopping. Blender completely refuse to let the blank UV file get updated whatever I do.  Found a solution of sorts, that is I replace the FemaleBody_1.dds after edit with the blank UV file. Then I get my edits on the blank file and can save that like I wanted.

Any suggestion what I'm doing wrong?

DocClox

Posted

Hmmm. Not sure to be honest. I must admit, I have to mess around a bit sometimes before I get the layers set up right so the right one gets the apply.

 

Generally I find I need to have a UVmap window open and the transparent layer selected in that, but it's not an aspect of the process I understand very well.

 

One trick that can work is to remove the skin texture entirely and set the body mesh material to a colour that contrasts with the design you're applying. That way you can make the transparent textture the only layer and if it applies at all it'll apply to that one. Meanwhile having a bright purple (or whatever) model means you can still see what you're doing.


×
×
  • Create New...