How to add transparency to cloth? (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
User avatar
Delta-1035
Sith Master
Sith Master
Posts: 2651
Joined: Mon Aug 04, 2008 10:32 am
Projects :: TOR GCWII GCW1035 BF1035
xbox live or psn: Johnny_Sciroppo
Location: Pizza Land

How to add transparency to cloth? (FAQ)

Post by Delta-1035 »

How is it possible to do that???
Image
Image of a skin by Culvar

Thanks in advance.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: How is possible do that???

Post by AceMastermind »

I assume you mean the "holes" in the cloth piece?
Add an alpha channel to the cloth texture and paint the parts you want transparent as black (white is visible) in the alpha channel.
Then in the cloth ODF under [Properties] add this line:
Transparent = 1
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: How is possible do that???

Post by Teancum »

Whoa, I didn't know that! Ripped capes here we come!
User avatar
Delta-1035
Sith Master
Sith Master
Posts: 2651
Joined: Mon Aug 04, 2008 10:32 am
Projects :: TOR GCWII GCW1035 BF1035
xbox live or psn: Johnny_Sciroppo
Location: Pizza Land

Re: How is possible do that???

Post by Delta-1035 »

Ok... I'll try... :thumbs:
obiboba3po
2008 Most Technically Challenging Avatar
Posts: 2376
Joined: Tue Feb 12, 2008 7:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: League of Legends
xbox live or psn: No gamertag set
Location: NJ, USA

Re: How is possible do that???

Post by obiboba3po »

Teancum wrote:Whoa, I didn't know that! Ripped capes here we come!
lol i didnt know it was that easy either :o thanks!
Commander_Cody771
Vader's Apprentice
Posts: 1069
Joined: Thu Jun 07, 2007 5:02 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: Looking for a new CPU
Contact:

Re: How is possible do that???

Post by Commander_Cody771 »

Lol. Finally something Teancum didn't know. Coolies! I'll try it.
User avatar
SBF_Dann_Boeing
Groove Walrus
Groove Walrus
Posts: 1529
Joined: Wed Aug 31, 2005 11:33 pm
xbox live or psn: No gamertag set
Location: An Igloo High Upon a Mountain Top

Re: How is possible do that???

Post by SBF_Dann_Boeing »

Woah i didn't know that either. You could reskin cloaked anakin and make his cloth opaque, to turn it in to a veil or something, that would be cool. You could also make cool cloth styles with jagged or other shaped edges...tho that would look silly.
User avatar
Culvar
1st Lieutenant
1st Lieutenant
Posts: 429
Joined: Thu Jul 10, 2008 10:36 am

Re: How is possible do that???

Post by Culvar »

You have to change something in the mesh of the soldier too if I recall.(It was in the transparency tut)
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: How is possible do that???

Post by AceMastermind »

Culvar wrote:You have to change something in the mesh of the soldier too if I recall.(It was in the transparency tut)
Nope, cloth geometry is handled differently by the engine than normal geometry, all you need is a texture with an alpha channel and that 1 line of code added in the cloth odf for it to work.
Another way cloth geometry is handled differently is that it is never backface culled ingame, meaning your cloth geometry doesn't need to have "thickness" which causes nasty clipping, nor does it have to be flagged as double sided in Edit Flags which will likely cause it to split ingame.
MandeRek
Sith Master
Sith Master
Posts: 2766
Joined: Tue Oct 02, 2007 10:51 am
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set
Location: Ghosting around GT
Contact:

Re: How is possible do that???

Post by MandeRek »

I always thought that cloth was messy when having a 3d model for it, but Frag discovered it works fine as long as it's not frozen.. This is how they did Ki-Adi's ponytail i guess! And sweet about that transparancy; loads of new capes can be made just be using new, partly transparent textures :D
User avatar
Delta-1035
Sith Master
Sith Master
Posts: 2651
Joined: Mon Aug 04, 2008 10:32 am
Projects :: TOR GCWII GCW1035 BF1035
xbox live or psn: Johnny_Sciroppo
Location: Pizza Land

Re: How is possible do that???

Post by Delta-1035 »

AceMastermind wrote:I assume you mean the "holes" in the cloth piece?
Add an alpha channel to the cloth texture and paint the parts you want transparent as black(white is visible) in the alpha channel.
Then in the cloth odf under [Properties] add this line:
Transparent = 1
Whic name for the alpha channel???
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: How is possible do that???

Post by Teancum »

Hmm... can you do transparent = 1 for models themselves? That'd be handy.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: How is possible do that???

Post by AceMastermind »

MandeRek wrote:I always thought that cloth was messy when having a 3d model for it, but Frag discovered it works fine as long as it's not frozen.. This is how they did Ki-Adi's ponytail i guess!...
Well Kiadi's ponytail would hardly look good if it was looking like a flat sheet of paper, plus it's too small and the vertices are spread out just far enough to avoid clipping itself. :)
By the way, kiadi's ponytail geometry transforms were frozen, U3D shows it's coordinates at 0,0,0 :wink:

Delta-1035 wrote:Whic name for the alpha channel???
I'm not sure what you're saying....please explain

Teancum wrote:Hmm... can you do transparent = 1 for models themselves? That'd be handy.
I don't think so, it may be a special property of ClassLabel = "cloth", but you could always try it and see.
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: How is possible do that???

Post by FragMe! »

Yes I take back my comment about freeze the model and or transforms you can.
I do stick by my saying you can use any primitive for the cloth, case in point is for something I am working on for Dann I used and open bottom
cone and removed the top point and it works just fine as a cloth (now if I could get the collsions right it would be better :faint: ).

Just staying on the cloth topic I also found out that when you are UVing the cloth anywhere the polies are not connected to another poly it creates a split in the cloth in game. Once again on the cone cloth, it is mean to be a total wrap around no breaks but if I just UV it so it is flat with the center front of the cloth at either edge of the TGA it splits in game but if I select those edges and do a "heal" so they join the split goes away. That was a fun one to figure out.

anyway that is all for now.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: How is possible do that???

Post by AceMastermind »

FragMe! wrote:I do stick by my saying you can use any primitive for the cloth, case in point is for something I am working on for Dann I used and open bottom cone and removed the top point and it works just fine as a cloth..
Yep, you can use whatever primitives you want, it's what you do with those primitives that determines the outcome.
In your case you say you used an open bottom cone then removed the top point, this makes it a cloth piece without "thickness" which will work and look fine. :)
User avatar
Delta-1035
Sith Master
Sith Master
Posts: 2651
Joined: Mon Aug 04, 2008 10:32 am
Projects :: TOR GCWII GCW1035 BF1035
xbox live or psn: Johnny_Sciroppo
Location: Pizza Land

Re: How is possible do that???

Post by Delta-1035 »

"Add an alpha channel to the cloth texture and paint the parts you want transparent as black(white is visible) in the alpha channel."

How add an alpha channel???
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: How is possible do that???

Post by Frisbeetarian »

Check the FAQ thread:
The FAQ / Everything You Need Thread Version 2.0 wrote:How to work with alpha channels in GIMP(video tutorial)
User avatar
Delta-1035
Sith Master
Sith Master
Posts: 2651
Joined: Mon Aug 04, 2008 10:32 am
Projects :: TOR GCWII GCW1035 BF1035
xbox live or psn: Johnny_Sciroppo
Location: Pizza Land

Re: How is possible do that???

Post by Delta-1035 »

Thanks Frisbeetarian :thumbs:
ForceMaster
Lieutenant General
Lieutenant General
Posts: 737
Joined: Fri Aug 08, 2008 11:27 pm
Projects :: Tron The Grid
Games I'm Playing :: The best..SWBFII
xbox live or psn: No gamertag set
Location: C:\Program Files\ForceMaster\Bin\ForceMaster.exe

Re: How to add transparency to cloth? (FAQ)

Post by ForceMaster »

The line:
Transparent = 1

works perfectly for clothes, I tried to put that into the ODF of an object and does not work, color that alpha added to the texture is black as I did in the clothes of the sniper but is white space of the object.
already tried?
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: How to add transparency to cloth? (FAQ)

Post by DarthD.U.C.K. »

thats something different
this line works only for cloth
fi you want to know how to make other objects transprent click me!
Post Reply