Creating and Applying Textures with Gimp and Blender (SSJ Hair Transformation)
- September 10, 2015 at 3:32 pm #3596
Alright. I never found a decent tutorial on texturing with gimp, so I thought I’d give it a go. I actually think it’s easier to do with gimp than it is with photoshop, so mesdames et messieurs, here it is! After this tutorial you should be able to do a hair transformation mod, even if you never touched gimp before. Let’s go over the credits first. Special thanks go to: kthxbai – for creating his easy-to-do CaC SSJ3 Transformation Tutorial, and thus teaching me the first things I knew about Xenoverse modding Loris Cangini – for discovering and teaching me an almost perfect method for custom super saiyan transformations and allowing me to include it in a tutorial Xan – for being patient and teaching me everything else For this tutorial you will need: blender gimp libXenoverse You will also require the DDS- plug-in for gimp. Use Google and install it. Please note that my user interface for gimp is not in english, so pardon me if I use terms that have different names in your copy of gimp. Also I’m explaining each step in great detail. I’m not doing this because I assume all readers are stupid, it’s to make sure you get the right idea even if I use the wrong vocabulary. This tutorial is more or less just an addition to kthxbai’s CaC SSJ3 transformation tutorial. It can be found here:
I’m sorry to make you switch between two different guides many times, but I think the basic stuff you need to know is perfectly explained there and didn’t see any need to copy someone else’s work if it’s already well done. Now, to begin follow the steps in kthxbai’s tutorial to Step n° 8. A note on extracting dyt.emb and .emb: When you extract the xxx_xxx_xxx.dyt.emb file it will create a folder with the name xxx_xxx_xxx, just like when you extract the .emb file. If you extract it after the .emb it’ll overwrite the contained files. I suggest extracting .dyt.emb first and rename the folder to xxx_xxx_xxx.dyt before extracting the .emb. Thought it was worth mentioning. Editing the .emb file: We’ll start on step n° 8. After you opened all the .dds files you received from extracting .emb with gimp, you need to increase the canvas size of the image. Make sure to not accidentally scale the picture. If you do: Ctrl + Z Double the canvas size. E.g.: if it was 512×512 set it to 1024×1024. It is important that you indeed double the size. If you increase it only in one dimension to make just one additional texture fit in, you will run into scaling problems once you fix the UV Map in blender. You will notice that although the canvas appears to be bigger, the original picture has a yellowish border. Selecting a tool and trying to paint outside of the outlined area will have no effect. To fix this we’ll need to create a new layer. The name doesn’t matter, you can keep the default name. Now select the whole layer of the texture found in the other .emb file(s) and presst Ctrl + C. Back to the modified texture file and press Ctrl + V. Then just place the texture next to the original one and left click somewhere on the picture to place the selection. Important: You have to have the new layer selected for this to work. Next, you have to combine all visible layers. (Ctrl + M by default) Nothing you can do wrong here, no matter what you select. In our case everything will have the same effect. Just click combine. Now just export the texutre. You may have several textures in your folder. Select Data000.dds and click Export. You will be asked if you want to overwrite the existing file. Yes, you want, obviously. Now for the compression. The one you will want to use is BC3 / DXT5, and only that one. Do not touch any other available options because Xenoverse isn’t compatible with those. If you have Generate mipmaps checked by default, uncheck it. After you exported the new textures, go back to kthxbai’s guide, scroll down until you reach Step n° 21 and follow his lead to fix the UV Map. Follow the tutorial until you reach n°39 Let’s assume you’re creating a transformation mod for CaC. I’ll also assume you already know about the importance of handling the object materials in your 3d modelling program, in this example: blender. Now let’s go over something interesting that’s not mentioned in the guide: It is not only important to remember the exact way you spelled the material name, you need to make sure it’s name is in a certain form aswell. If you don’t want a material to use one of the colours you selected ingame, make sure to alter all material names in blender. For example, if a texture is called “HAIR_top”, the material will take on the colours of your cahracters hair, no matter what you assign to it in the Data000 in dyt.emb and .emm. If you create a hairstyle that should have more than one colour, you need to think about your material names early on to avoid confusion later. Here is how I handled the materials for my Gotenks CaC Hair: So this would be a good time to check your model’s materials, how they’re spelled and make some adjustements if required. Editing the .emm file: Other than in kthxbai’s guide, I suggest to set up the .emm file first. This is the file which actually tells the .emd file which material will have what colour. I will explain a transformation method that’s a bit different from what the original guide suggests, but in my opinion the results are a great deal better. Again, thanks to Loris Cangini for teaching me and giving permission to use his set up in this guide. We need our model’s material names now. In my example, it’ll be those: Skip the steps from the other guide until you reach n° 56. Follow the instructions until step n° 61 and make sure you read them thoroughly. The last few lines will be a little different for us. Under every material we will add the lines <EMMParameter name=”AlphaTest” type=”65537″ value=”1″ /> <EMMParameter name=”NoEdge” type=”65537″ value=”1″ /> In our example, the finished xml will look like this: Of course you can assign the same colour to multiple materials. This is really usefull when you create more complex mods like character replacers, because materials with the same colours can still use different shaders. Now we’re ready to convert the xml back to .emm. Save the file and drag/drop it on emmxml.exe and we’re done. Editing the .dyt.emb file: First off: I am almost certain that you will have multiple materials in the object you created and thus will certainly need to use different colour slots in the dyt.emb file. To make sure you place the colours in the right spots I suggest to start off with a texture that uses more than one slot already. In this example I will use HUM_509_Hair.dyt.emb as a base, which has 3 colours. This is how it’ll look like: Since I was working on a request while I made this guide I’ll start with creating Data002.dds. As we know, this is the file that assignes colours to the object during a super saiyan transformation. Now think about what colours you want your model to have and what original characters use those somewhere. In this example we will need a golden colour for super saiyan hair and somekind of red. I’m sorry to say it, but I can’t remember exactly where I took the red I use in the pictures. Sicne I’m a pretty lazy person and don’t want to take tons of new screenshots, let’s pretend we want the exact same red as Bardock’s bandana uses. Let’s convert BDK_001_hair_scd.dyt.emb and open the contained Data002 file. Whey, we have a red and transformed hair colour. How convenient. Select what you need, Ctrl + C, back to the file you’re editing, Ctrl + V and fix the position of your selection. This is how it should look like when you’re done: If you need more slots than you have in the base file, select the last slot and all of the black area above it. Press Ctrl +C, Ctrl + V and fix the position until it is below the previous last slot. Et voilà, new slot. Once you assigned all colours you intend to use with the model you’re done. If you’re working on a transformation mod however, you still need to edit the alpha channel. This will make sure the material of your model will not show up when it’s not supposed to. We’re working on the transformation file here, so I guess we don’t want the base hair to show up. This is where we have to remember which has been assigned to which material in the .emm file. You can do it differently, but I did it like this: Slot 0: Super Saiyan Hair Slot 1: Base Hair Slot 2: Bandana Switch to the Channel panel. As you can see, all layers are selected. Unselect the channels for Red, Green and Blue by leftclicking on them until only the base channel is selected. This is IMPORTANT, so double check before you go on. Now remember, each slot is for one of your model’s materials. We mark the slot for the material that’s not supposed to show up during the transformation and select the eraser tool. This will make sure you don’t delete anything you don’t want to delete. Erase the whole selection until your picture looks like this: Aaaand you’re done. Export the file the same way as you did before, compression you want is BC3 / DXT5 again. Repeat those steps with Data000.dds. Keep in mind that this is the file for your base form, so make sure you use only colours taken from other Data000.dds files.The result should look something like this: Take a look at the colours I placed on the slot I assigned to the base hair. This is what vanilla hair styles use for all untransformed hairs for CaC, you can take it from any HUM_0xx_hair.dyt.emb or HUF_0xx_hair.dyt.emb. Once you’re done, export as Data000.dds, close gimp and you’re done. Now you can convert the folders to .dyt.emb and .emb with embpack.exe. make sure you convert them seperately, not both at once. To summarize: after we finished everything, those are the slots in the dyt.emb file and their asigned materials in the .emm: After you went through all the steps, you will have a HUM_004_Hair.emd, HUM_004_Hair.dyt.emb, HUM_004_Hair.emb and a HUM_004_Hair.emm file. Put those in your HUM folder, pack a new .cpk file and test them ingame. Boom. Done. Please let me know if something isn’t clear or you run into any issues.September 10, 2015 at 11:14 pm #3625
What for the third (#2) layer is ?September 11, 2015 at 9:00 am #3641
I was working on a model for someone else while I took the screenshots for the tutorial. he wanted to have a red bandana like Bardock, so I had to assign a red colour to the hair.September 11, 2015 at 6:28 pm #3740
would you like to tell me, what should i do in emm and dyt file if i have 3 different hair, exp.. Hair_top, Hair_saiyan, and Hair_god..
i want to Hair_top is visible and Hair_saiyan and Hair_god it’s hidden, but when transform to SSJ2, the Hair_god is active the other two is hidden.. 😀
it’s possible to do or it’s not..
thank you.. 😉September 11, 2015 at 7:15 pm #3741
If you want your base hair to use your custom textures you have to call it HAIR_top, mind the capital letters. Otherwise just do the same with Hair_god as you would with super saiyan hair. Everything you edited with the eraser tool is invisible ingame. If you want Hair_god to be invisible on base form, look in your .emm file which slot in dyt.emb you assigned to it, open Data000.dds from the dyt.emb and erase the slot in the alpha channel. NOT on the regular layer. Then you repeat the procedure with Data002, just the other way around. Erase the slot for HAIR_top in alpha channel and leave the slot for Hair_god. Actually, erase everything you don’t want to see during a transformation.September 11, 2015 at 8:40 pm #3744
Okay..Thanks Val.. 😉September 12, 2015 at 12:05 am #3755ScallioParticipant
Nice tut, finally makin some progress in the dbxv moddin 😀 So, encountered two problems, in the picture you can see my hair facin the same way as my torso, but not my head. So i thought that the hair was rigged to the torso? If that is, how can i change it? (in blender). And the seconde one is the texture difference between the two hairstyles. The hairstyle above is not as defined as the SS3 from gotenks. Whats your opinion on that? How can i make it look like ‘one’ ?
Thnx 😀September 12, 2015 at 12:59 am #3759
Pretty sure this is not a rigging problem. I think the conversion during the export was messed up.
Import your .esk file, your model, a vanilla hairstyle as a reference and HUM_000_Face_forehead, _Face_base and _Face_ear into blender and see if your model has the position it is supposed to have. If not, fix it by moving it to where the vanilla hairstyle is.
On export check on your configuration. Make it look like mine:
Depending on what version of blender you use you may not have the “Apply Unit” checkbox. If you have it, uncheck it. Important is Y Forward, Z Up.
If this doesn’t fix your issue, upload the file and let me have a look at it.
As for your problems with the Textures, that can be fixed by spending some time with the UV mapping tool. Might be a tiresome task, but it’s really the only way. I hate UV mapping because it’s boring and I’m lazy by default, but I ways thinking about doing another tutorial on that topic because it took me some time to figure it out on my own.September 12, 2015 at 11:43 am #3794ScallioParticipant
Did what you said, imported those files and as you can see everythin was in the right place. exported it, dragged it to fbxemd, imported in the game but the problem still exists :/September 12, 2015 at 12:54 pm #3797
I’m working on a request right now and ran into a similar issue like you. It is indeed a rigging issue. I usually use 3ds max only when I create hair mods, it’s a lot less work there. Tested doing it with blender just now. This is how you fix it:
After you combined all meshes go into Weight Paint mode:
Then switch to Object Data in the right panel. If it looks like this you have a problem:
Only the bone Spine2 is in the list. This is wrong.
Click “Add new vertex group”. A new Bone called “Group” will appear in the list. Rename it to “b_C_Head”, because this is where you want the hair to be rigged to. Mind the capital letters.
Next, select the Spine2 bone in the list and click “Delete active vertex group from object”. b_C_Head needs to be the only bone in the list.
Now it’s unrigged, but at least attached to the right bone. I will give you some quick instructions on how to fix that in our special case. For more information, please watch Xan’s rigging tutorial. ( http://xenoversemods.com/forums/topic/rigging-tutorial-with-blender/ )
Make sure your brush strength is set to 1000, then unselect “Limit selection to visible”. <– This is a dangerous tool, be carefull to always select it again after you’re done with a task that requires you to unselect it.
now unleash your fury and paint it red! EVERYTHING! (Shut up, Bardock)
Now export the mesh and import it into your game. Should work now.May 8, 2016 at 6:10 am #172798MadtylerpParticipant
hey am having trouble understanding this.. so does the dds change the hair to make it 2 colors or the emm
struggle all you want but, in the end you're still dead!May 8, 2016 at 6:27 am #172799MadtylerpParticipant
i understand the dds files as seen in my screen shots (i modify his face and the glow to my liking) but i dont how to equip the 2nd color of the hair
struggle all you want but, in the end you're still dead!August 15, 2016 at 5:09 pm #181821SK007Member
Thanks For Giving us this tutorial Val Without your help I didn’t find my transformable darken color problem!! =D
Hi it's me SK007 n guys if you want you can ask me about skills and pup things and request for cac cloths I will be happy to complete your request 🙂September 15, 2016 at 7:45 am #184481jamynParticipant
Hey This tutorial helped me a lot, but I’ve ran into an issue that I cant find an answer for; when i load my new .emd file into xenoviewer, the model is upside down and below the grid that the camera displays, I think this is whats caused my hair not to show up in game and was wondering if you knew any fix for this?
"Grik Los La'as"September 15, 2016 at 4:09 pm #184493
Yes, I guess you’re using blender? If so, there are two possible causes for this. Either your export settings or you forgot to load a skeleton into blender together with your model, so it is no longer rigged to the right body part.
However, since you say it looks off in xenoviewer I guess it’s option 1.
- You must be logged in to reply to this topic.