Original models from Infinity Ward,Capcom,Electronics Arts, Microsoft, Ubisoft and Treyarch,Xnalara and tombraider forums Users(rexil,Oocrofty,fullmon etc)Valve,Gmod and all developers that have created those models! I don't own any credits for those models!!!!
segunda-feira, 15 de setembro de 2014
My Tutorial: How to fix Alpha channel issues for new Peds( Specially hairs)
Hey guys
Who make mods for SA know how bad SA's engine handles textures alpha textures.Those models who have complex alpha textures for hair , beards , lashes and etc look "bugged", with some "invisible" , see through parts. After 2 years searching , reading tons of articles, forums etc and tryin' tons of tricks , this is the one you'll have the best result.
I'll teach you how to solve this problem ( at least for most of the models because it didn't work for a small percentage. I didn't test it using z modeler but it should work as well.
You need:
- TXD Workshop
- 3ds Max
Open 3ds max, be sure to check that letter "a" and import your model ( in my case is one already rigged)
Select your model, Editable mesh and element
Drag and drop your textures to material editor to apply the textures to your model like i'm doing.
Important: Don't apply your hair texture now, Leave the hair textures to the final part!
The face texture
The body texture
The id texture
Ok, now as you can see my model has 4 textures
All textures are applied to the model except the hair one as you can see.
Now select your hair mesh
Drag your hair texture and apply it to your model
Now your model has all textures applied, mark skip col and click on "bone/skin export" and export your model.After that import your model again
The textures won't be applied anymore. Select your model , click on editable mesh and element
Select your hair mesh again and click on "datach"
After that delete the others meshes and keep the hair one
Also, delete all bones:
Select the hair mesh ,click on editable mesh and element
Press crtl+a to select all polygons(you'll get your mesh red)
Now scroll down untill you see the "flip" button, click on it. The interior part will be lighter.
Now deselect all polygons and the mesh
Import you model once again
Delete all bones , keeping your flipped hair mesh and the full model you have just imported. Now this part is extremelly important. You need to atach your flipped haiar to the model, if you do the opposite your model will still be bugged in game.
Select your hair mesh
Click on "attach" button
and then click on your model
A new window will pop up, select the 1st option "Match Material IDs to Material" and click on ok
Now you'll have your model with 2 hair meshes, one flipped and another one unflipped as you can see bellow
Ok, now we need to make a trick to don't need to rig the model again.Import the model again
And you'll have 2 models. A static one that with 2 hair meshes( one flipped and another one unflipped) and one rigged model ( with only one hair mesh). Select the rigged one you just imported, click on editable mesh and vertex.You'll see all those blue dots:
Press crtl+a to select all dots, they'll become red as you can see bellow:
Next,click on "attach"
After that click on your static model . A new window will pop up: Select the first option again "Match Material IDs to Material" and click on ok
After click on ok, press the "delete" key on your keyboard . It'll deleted the old rigged model and will keep the new rigged one( this new one rigged is your old static model). You'll see only blue dots like in ths picture:
Now deselect the vertex and click on editable mesh. You model is done and we need to export it.Be sure to mark "skip col" before export it and click on bone/skin export. I replaced the older model i had( in this case bmost) as you can see bellow
Now that you exported your model, you need to make some changes on your txd file. This is the second most important part to fix the alpha bug. Your hair texture needs to be the last one in your txd file.Import all textures , except the hair one.Check this pic to see my txd file with all textures except the hair. Yours should look like this:
Select the last one and press "crtl + insert". You'll make a copy of the last one as you can see:
Double click on it and you'll see the image properties, rename it to match your hair texture and compressed it.This will make it as a DXT1 layer.
Now mark that "alpha is used" option.The alpha name will appear there automatically. It's basically your texture name with an letter "a" in the end.
After that , click ok and you'll have a new image there with "hair" name on it plus the alpha channel
Click on "import" button and you'll have a browser. Search your proper hair texture and open it.
Ok , now you have everything done and fixed. Basically what we have done was leave the hair texture be the last one in the model hierarchy and the hair texture the last one in the txd file too. Since GTA engine renders complex alpha channel for the last, everything works fine to render it properly
In this tutorial, we double the meshes ( for hairs, beards etc) to get it working good since SA can't handle double faced polygons. So doing tihs trick both side of the mesh will be rendered without bugs. Plus using the right settings on TXD file, you'll make the result even better.
COOL! n_n great, this .asi file works in the world map or the player model? hehe because i have a model (is not mine) "kula diamond" from king of fighters, well, the hair also is transparent in the lower part hehe. this .asi file fix it? hehe thanks for answer n_n
Hi, excellent tutorial. I've been in real trouble with certain models because they had invisible parts that i did't know how to fix, but i guess this will help me a lot.
By the way, i would like to ask you, if there is no problem, if you could make a map conversion tutorial, i see you are good in that too, and i have some maps i'd really love to convert (for example: http://tf3dm.com/3d-model/re-spencer-mansion-hall-78105.html).
@tobias lasia Works for both , dude. It works for static objetcs , buildings ,glasses and for peds ( hairs, beards , eyelashes etc). I tested the .asi file with my settings on it, and it works flawless. No bugs there.
@Hendra natanael You're welcome ^^
@yap320 You're welcome dude. I'm glad to see my tutorial helping you guys out. Oh sure. I was about to a map tutorial for a friend a while ago but i never got time. But i think i can make one for the next week. It's no that hard, you'll see. It's easier then rig a ped.
great!!! now yes!! goodbye invisible hair!! n_n hehehe
ResponderExcluir@Tobias lasia
ResponderExcluirThat's it! xD
Oh btw man i just found an .asi file that will fix alpha even for those more complex textures. i'll upload it soon
COOL! n_n great, this .asi file works in the world map or the player model? hehe because i have a model (is not mine) "kula diamond" from king of fighters, well, the hair also is transparent in the lower part hehe.
Excluirthis .asi file fix it? hehe thanks for answer n_n
Thanks Diego !!!
ResponderExcluirHi, excellent tutorial. I've been in real trouble with certain models because they had invisible parts that i did't know how to fix, but i guess this will help me a lot.
ResponderExcluirBy the way, i would like to ask you, if there is no problem, if you could make a map conversion tutorial, i see you are good in that too, and i have some maps i'd really love to convert (for example: http://tf3dm.com/3d-model/re-spencer-mansion-hall-78105.html).
Thanks for your effort and your time.
@tobias lasia
ResponderExcluirWorks for both , dude. It works for static objetcs , buildings ,glasses and for peds ( hairs, beards , eyelashes etc). I tested the .asi file with my settings on it, and it works flawless. No bugs there.
@Hendra natanael
You're welcome ^^
@yap320
You're welcome dude. I'm glad to see my tutorial helping you guys out.
Oh sure. I was about to a map tutorial for a friend a while ago but i never got time. But i think i can make one for the next week. It's no that hard, you'll see. It's easier then rig a ped.
This only works in DOA hairs
ResponderExcluir