Page 1 of 1

Alpha channel on skins? (FAQ)

Posted: Tue Dec 25, 2007 5:10 am
by wazmol
is it possible for example to add an alpha channel to the heavy troopers or snipers kamas?

if i was to JUST edit the skin it wouldnt work would it?

i do beleive i need to do some hex editing but im not totally sure, can someone help me out a little?

thanks

Re: alpha channel on skins?

Posted: Tue Dec 25, 2007 5:24 am
by Maveritchell
What you'd need to do, in addition to adding the correct alpha channel to the kamas's textures, would be to hexedit the MODL chunk for the cloth to allow for transparency. I've never tried adding an alpha channel to a cloth model chunk, though, so there could be snags.

Re: alpha channel on skins?

Posted: Tue Dec 25, 2007 8:34 am
by wazmol
so if i get to work on the alpha channel on the texture itself maybe i'll check later to see if anyone can tell me what to change in the msh in hex, maybe repsharpshooter knows?

anyone else is welcome to give me some ideas...

PS Thanks Mav'

Re: alpha channel on skins?

Posted: Tue Dec 25, 2007 1:20 pm
by Maveritchell
If you want to enable transparency, open up your .msh file with a hexeditor and find the name of the texture to which you're going to give transparency (search for .tga), say it's rep_inf_sharpshooter_cape. Once your cursor is on the name of the .tga, move it back a few places to where it says HBATRB - place your cursor on the place immediately after the last "B." The next 8 places should be "04 00 00 00 00 00 00 00." Change that to "04 00 00 00 04 00 00 00." Then save the mesh file and give your actual texture an alpha channel.

Re: alpha channel on skins?

Posted: Tue Dec 25, 2007 1:32 pm
by wazmol
thanks my friend, im guessing as you knw how to make models have an alpha channel maybe you could tell me how add a few more things like shine and what not.

PS i am trying what you told me now...

EDIT: I tried it but it didnt work, i dont think its the msh i think its the .Tga, i just selected the area i wanted to delete and pressed ctrl+k in theGIMP and on the layer thing i selected add alpha channel but in game it didnt work, also i opened the tga in irfanview and it was weird it wasnt black where it was transparent like how it usually is it had the image there still, what could be wrong?

Re: alpha channel on skins? Need Help. Check My Edit

Posted: Tue Dec 25, 2007 3:27 pm
by AceMastermind
Put this in your cloth odf:

Code: Select all

// Does this cloth have an alpha channel? 1 or 0, Default is 0
Transparent = [value]
You don't need to hex edit the msh file for transparency to work with cloth.


Notes:
  • Properly exported cloth only requires a texture with alpha channel and the ODF line posted above, no hex editing or special flags added to the msh file.
    If you're trying to add transparency to cloth that was hex edited then you may also need to hex edit the unit's msh file for transparency in order for it to work.

Re: alpha channel on skins? Need Help. Check My Edit

Posted: Tue Dec 25, 2007 3:34 pm
by wazmol
Thanks Ace' that did it

Heres a Pic
*missing image*

So does anyone know what other things i can use? for example shine or light or whatever?

Thanks

Re: alpha channel on skins? Need Help. Check My Edit

Posted: Tue Dec 25, 2007 3:48 pm
by The_Emperor
:D Nice ripped kama, looks cool during heavy battle I'd say

Re: alpha channel on skins? Need Help. Check My Edit

Posted: Fri Sep 26, 2008 10:37 pm
by Culvar
I'm using Rep's Clone(Phase 1) with kama, but there is no HTARB in front of the cape's tga.

Re: alpha channel on skins? Need Help. Check My Edit

Posted: Sat Sep 27, 2008 2:41 am
by Maveritchell
Culvar wrote:I'm using Rep's Clone(Phase 1) with kama, but there is no HTARB in front of the cape's tga.
Loath as I am to admit it :lol: my original information was incorrect. Fortunately the correct information was posted just a couple posts down:
AceMastermind wrote:Put this in your cloth odf:

Code: Select all

// Does this cloth have an alpha channel? 1 or 0, Default is 0
Transparent = [value]
You don't need to hex edit the msh file for transparency to work with cloth.

Re: alpha channel on skins? Need Help. Check My Edit

Posted: Sat Sep 27, 2008 7:47 am
by Culvar
the cape only seems to work with transperancy if I add that though. I've already added the line in the sniper's cape and added a alpha channel in Paint.net(The same I did for my medic's skin), but where I added the alpha channels it is black.

Re: alpha channel on skins? Need Help. Check My Edit

Posted: Wed Oct 15, 2008 1:44 pm
by 666rulerofclones
cool, will this work on removing scopes from weapon models?

Re: alpha channel on skins? Need Help. Check My Edit

Posted: Wed Oct 15, 2008 2:04 pm
by Frisbeetarian
666rulerofclones wrote:cool, will this work for removing scopes from existing weapon models?
This is what you posted before in the same topic, and you got a resounding no.