Alpha channel on skins? (FAQ)

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
wazmol
High General
High General
Posts: 892
Joined: Sat Sep 02, 2006 6:47 pm
Projects :: Thinking...
Games I'm Playing :: Black Ops
Location: London
Contact:

Alpha channel on skins? (FAQ)

Post 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
Last edited by wazmol on Tue Dec 25, 2007 2:01 pm, edited 1 time in total.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: alpha channel on skins?

Post 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.
wazmol
High General
High General
Posts: 892
Joined: Sat Sep 02, 2006 6:47 pm
Projects :: Thinking...
Games I'm Playing :: Black Ops
Location: London
Contact:

Re: alpha channel on skins?

Post 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'
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: alpha channel on skins?

Post 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.
wazmol
High General
High General
Posts: 892
Joined: Sat Sep 02, 2006 6:47 pm
Projects :: Thinking...
Games I'm Playing :: Black Ops
Location: London
Contact:

Re: alpha channel on skins?

Post 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?
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

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

Post 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.
wazmol
High General
High General
Posts: 892
Joined: Sat Sep 02, 2006 6:47 pm
Projects :: Thinking...
Games I'm Playing :: Black Ops
Location: London
Contact:

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

Post 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
The_Emperor
Supreme Galactic Ruler
Posts: 2118
Joined: Sat Dec 10, 2005 6:30 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Waaaaay over there.

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

Post by The_Emperor »

:D Nice ripped kama, looks cool during heavy battle I'd say
User avatar
Culvar
1st Lieutenant
1st Lieutenant
Posts: 429
Joined: Thu Jul 10, 2008 10:36 am

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

Post by Culvar »

I'm using Rep's Clone(Phase 1) with kama, but there is no HTARB in front of the cape's tga.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

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

Post 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.
User avatar
Culvar
1st Lieutenant
1st Lieutenant
Posts: 429
Joined: Thu Jul 10, 2008 10:36 am

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

Post 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.
User avatar
666rulerofclones
Command Sergeant Major
Command Sergeant Major
Posts: 281
Joined: Fri Aug 08, 2008 1:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The Badger State!

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

Post by 666rulerofclones »

cool, will this work on removing scopes from weapon models?
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

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

Post 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.
Post Reply