Kitty Corp Meow Mix Forums

Help & Tutorials => Model Tutorials => Topic started by: ramonM64 on December 10, 2011, 06:09:12 PM



Title: Adding Transparency to Textures - wh00t
Post by: ramonM64 on December 10, 2011, 06:09:12 PM
alright     instead of postin this over 'n over again for others, i thought i should make it it's own proper guide so its "OUT THERE". adding transparency doesnt take that much work. if yer familiar with brawlbox, it should be simple

CLICK ..for the recycled guide
i layed on my back and thought.. "what the hell is going on??" so then i posted a help thread that didnt get me much closer to a solution. i didnt want to wait for the solution so i went in brawlbox and studied very closely on how character's materials are for the transparent textures and non-transparent textures. and found out what was going on. this isnt exactly the best guide but i hope it helps.

Download this - http://www.mediafire.com/?2hkpz7v46l7s5sn (http://www.mediafire.com/?2hkpz7v46l7s5sn)
it should have the proper shaders and materials you need for this.

Quick Help : what your doing in this guide is making a new or replacing a MLD0's existing shader and material with the corresponding Shader"number" and Material"number" including in da download. after that, you link and assign the shader to the material. then assign the material's textures to the material references. read on to go more in-depth..

---

"Sharp Transparency"

1. right-click the MLD0 and "Add New Shader"
2. right-click and replace that new shader added with "Shader1 - Sharp"
3. expand the MLD0's Materials Folder and go to the Materials you want transparency (or "Add New Material")
4. right-click the material and replace it with "Material1 - Sharp"
5. change ("link") that material's "Shader" drop box to that new shader made in step 2.
6. after that, expand that new/replaced Material and click the blank material reference
7. then, assign proper textures and palettes in the "Texture" and "Palette" box at the top. found under the "Misc" section
8. lastly, make sure your new edited material is assigned to the proper Object in the MLD0's Objects Folder
7. it should work from there, Brawlbox 0.66 now does most of the manual work.

[use the rest of the steps to make sure it works 100% how you want]

---

8. in those Materials, "AllowTransparency" is at True ("EnableAlphaTest" in Brawlbox 0.65c and up) and scroll to the very top to the "ALPHA FUNCTION"
9. use these settings..

[ALPHA FUNCTION]
Ref0 - 128
Comp0 - COMPARE_GEQUAL
Logic - ALPHAOP_AND
Ref1 - 255
Comp1 - COMPARE_LEQUAL

[in Brawlbox 0.65c and up]
[Alpha Function]
Ref0 - 128
Comp0 - GreaterOrEqual
Logic - ALPHAOP_AND
Ref1 - 255
Comp1 - LessOrEqual

10. make sure that texture yer messin with has a ALPHA layer with everythin you dont want erased, like ike's bandana
11. make sure all non-transparent textures set to "Allow Transparency - False "
12. that should make it transparent, the rest is experimenting with the "Cull Option".

the cull option is settings from where the polygon's textures are invisible from. example, if ya choose "cull_inside", it makes the poly's textures invisible from the back. also, you can set the Ref0 in the ALPHA function to a lower senstivity (lower number) to control how strong the transparency is.

You dont have to use that shader and material from the "Download This" above. Just make sure it originates from a brawl character's shader and material that does use Transparency.


Note : When typing in and assigning the Material's textures, remember, all Material Texture References are case-sensitive. So make sure they are EXACTLY the same as the texture's name

-------------------------------
[Continued.. ?]

If you want a transparency to be blended more smoothly around edges and want semi-transparency (half-see-through areas) too.. follow this instead

"Blended Transparency"

1. follow steps 1-7 in the "Sharp Transparency" guide up there except instead of using "Shader1 - Sharp" and "Material1 - Sharp", use "Shader2 - Blend" and "Material2 - Blend"

[follow the steps below to make sure it works 114% how you want]

---

2. in their material settings, scroll the right window up to "Blend Mode"
3. make sure "EnableBlend" is set to "True"
4. scroll down the right window to "Z Mode"
5. make sure "EnableDepthUpdate" is set to "False"
6. that should be it.. test it in-game
7. you need experiment with the Z Mode stuff after that to get it exactly how you want.

use the same cull options, like the other type of transparency from above, for reference. also, the transparency might bleed or eat polys. if that happens you have to change the materials you dont want it to eat at with transparency set to False and mess with the Z mode on the Blended Transparency material

I also included a Null shader (from Mewtwo2000) that works with blended transparency and it also can keep materials assigned to it always BRIGHT. its the "Shader3 - Blend_Null" and "Material3 - Blend_Null". follow the above except replace it with this. also, in Brawlbox 0.65c, change the material's "C0Enums1" and "C0Enums3" settings from 3 to 1. that should make it unaffected by stage's lighting.

Note : setting "C0Enums1" and "C0Enums3" settings from 3 to 1 to make a material unaffected by lighting should work on any Material.

If you want to add a ALPHA layer to yer texture so it can have transparency..
using GIMP, go to File>New.. and while makin a new canvas the exact size of yer texture, click the + on advanced settings and then change "Fill with: " to "Transparency".

  • you should see a blank checkered background.
  • after that you go to File>Open Layer As..>then choose yer texture

to know if and wheres the transparency, you should see a checkered background where its transparent. if you dont and you see it white or something where you want it transparent, use the eraser tool or wand (fuzzy select tool) to erase it.

  • continue to use the eraser and tools to erase what you want to become transparent
  • after yer done editing, make sure to save in a transparency compatible format (like .png)
  • that should do it
--------------------
if theres a step ya need help with, lemme know.


Title: Re: Adding Transparency to Textures - wh00t
Post by: DemonBoy on December 13, 2011, 08:54:13 AM
I followed this guide exactly but I can't seem to get it right. It either goes full transparent or not at all. I'm working on the SSBM Wireframes if that helps get an idea of what i'm trying to do.


Title: Re: Adding Transparency to Textures - wh00t
Post by: Spex130 on December 13, 2011, 11:04:37 AM
Hey Ramon! I followed this guide for an Import I'm doing, and I noticed that if you set Ref0 to 128 and Ref1 to 255, anything that's slightly see-through in the textures becomes completely invisible.

I found that if you set Ref0 to 100, however, you can make things see-through instead of invisible. Just thought I'd tell you.


Title: Re: Adding Transparency to Textures - wh00t
Post by: DemonBoy on December 13, 2011, 12:08:26 PM
Hey Ramon! I followed this guide for an Import I'm doing, and I noticed that if you set Ref0 to 128 and Ref1 to 255, anything that's slightly see-through in the textures becomes completely invisible.

I found that if you set Ref0 to 100, however, you can make things see-through instead of invisible. Just thought I'd tell you.

I love you for that. now i can finish the wireframes

Edit: Nevermind I still cant get it. I must be messing something up


Title: Re: Adding Transparency to Textures - wh00t
Post by: ramonM64 on December 13, 2011, 04:09:31 PM
niice find Spex, ill add it in the OP notes.

I love you for that. now i can finish the wireframes

Edit: Nevermind I still cant get it. I must be messing something up
actualy my bad. i completely forgot about the OTHER option, which i think is what you need. if i remember right.. its a blended transparency, do the same thing in the tutorial except dont mess with the alpha function, scroll up and in "blend mode", EnableBlend - True, and then allow transparency is false.. it MIGHT not work and reguires a specific character's shader that uses this, like zero suit samus's pony tail shader.    

try that out.  ima fix up the OP

in case im missin something, DemonBoy, tell me the exact settings you changed and what you changed them to. by full transparent, yer talking about the WHOLE texture going transparent or like how Spex noted? also, which shader did you use?


Title: Re: Adding Transparency to Textures - wh00t
Post by: DemonBoy on December 13, 2011, 04:30:07 PM
niice find Spex, ill add it in the OP notes.
 actualy my bad. i completely forgot about the OTHER option, which i think is what you need. if i remember right.. its a blended transparency, do the same thing in the tutorial except dont mess with the alpha function, scroll up and in "blend mode", EnableBlend - True, and then allow transparency is false.. it MIGHT not work and reguires a specific character's shader that uses this, like zero suit samus's pony tail shader.    

try that out.  ima fix up the OP

in case im missin something, DemonBoy, tell me the exact settings you changed and what you changed them to. by full transparent, yer talking about the WHOLE texture going transparent or like how Spex noted? also, which shader did you use?


I did exactly what you just told me to do and it worked. I made a new shader, replaced it with Zero suits ponytail shader, (shader1) linked it to what i wanted transparent, Blend mode enabled, transparacy false, and cull inside.

got exactly what I wanted. Thanks

(http://i607.photobucket.com/albums/tt157/cottenballs/al_111213_1757binout.jpg)


Title: Re: Adding Transparency to Textures - wh00t
Post by: Spex130 on December 13, 2011, 06:45:58 PM
I did exactly what you just told me to do and it worked. I made a new shader, replaced it with Zero suits ponytail shader, (shader1) linked it to what i wanted transparent, Blend mode enabled, transparacy false, and cull inside.
([url]http://i607.photobucket.com/albums/tt157/cottenballs/al_111213_1757binout.jpg[/url])


So, you put the same settings as the OP,  and then changed Blend mode, Transparancy, and Cull right?

I got the same effect you did with the Wireframes by changing Ref0, but that was a real pain to go through.


Title: Re: Adding Transparency to Textures - wh00t
Post by: DemonBoy on December 13, 2011, 06:54:21 PM
I did exactly what I said I did in my last post and nothing more. I didn't mess with the alpha section at all.


Title: Re: Adding Transparency to Textures - wh00t
Post by: ramonM64 on December 13, 2011, 07:28:54 PM
niice wireframe DemonBoy.. so many wires everywhere

thank you both    i updated the OP, it should be good for now


Title: Re: Adding Transparency to Textures - wh00t
Post by: Funzy <3 on December 30, 2011, 02:40:36 PM
niice wireframe DemonBoy.. so many wires everywhere

thank you both    i updated the OP, it should be good for now
So is this like to make it so ok like an example on our Rikku Import she has a ribbon on the back of her shoes that is just an image of a ribbon with transparency around it, and if you look from the back you see through her shoe? you understand what im asking?


Title: Re: Adding Transparency to Textures - wh00t
Post by: DevMasters on December 30, 2011, 11:55:24 PM
I was wondering how can you make a Alpha layer for the parts you dont want erased?


Title: Re: Adding Transparency to Textures - wh00t
Post by: DemonBoy on December 31, 2011, 12:19:29 AM
So is this like to make it so ok like an example on our Rikku Import she has a ribbon on the back of her shoes that is just an image of a ribbon with transparency around it, and if you look from the back you see through her shoe? you understand what im asking?

Actually, to fix that you would need to find the material that the shoe is and change cull_all to cull_none.

it will disable all transparency on the shoe so you won't see through it.



Title: Re: Adding Transparency to Textures - wh00t
Post by: Funzy <3 on December 31, 2011, 01:48:35 AM
Actually, to fix that you would need to find the material that the shoe is and change cull_all to cull_none.

it will disable all transparency on the shoe so you won't see through it.


really thank you soooo much!!
on more question we have a model with hair that is transparentable and its alot of dif polygons and you see through them because of the others so is the fix a different case?


Title: Re: Adding Transparency to Textures - wh00t
Post by: DemonBoy on December 31, 2011, 02:11:06 AM
really thank you soooo much!!
on more question we have a model with hair that is transparentable and its alot of dif polygons and you see through them because of the others so is the fix a different case?

Sorry, but I don't know how to fix that.


Title: Re: Adding Transparency to Textures - wh00t
Post by: Funzy <3 on December 31, 2011, 02:36:40 AM
Sorry, but I don't know how to fix that.
oh and i tried the cull thing and it didnt work for her shoes when looking at the ribbon you could still see through it :/


Title: Re: Adding Transparency to Textures - wh00t
Post by: DemonBoy on December 31, 2011, 02:53:40 AM
oh and i tried the cull thing and it didnt work for her shoes when looking at the ribbon you could still see through it :/

I must have misread your post. try it again but with the ribbon, not the shoe


Title: Re: Adding Transparency to Textures - wh00t
Post by: Funzy <3 on December 31, 2011, 02:55:37 AM
I must have misread your post. try it again but with the ribbon, not the shoe
i also tried that no luck :/


Title: Re: Adding Transparency to Textures - wh00t
Post by: DemonBoy on December 31, 2011, 03:01:58 AM
i also tried that no luck :/

hmm, well them i am unsure how to fix it. sorry


Title: Re: Adding Transparency to Textures - wh00t
Post by: Funzy <3 on December 31, 2011, 03:51:38 AM
hmm, well them i am unsure how to fix it. sorry
its fine ^_^ thank you anyways


Title: Re: Adding Transparency to Textures - wh00t
Post by: Darkpuff on December 31, 2011, 10:55:39 PM
whats the shader?


Title: Re: Adding Transparency to Textures - wh00t
Post by: ramonM64 on January 08, 2012, 02:36:51 AM
I was wondering how can you make a Alpha layer for the parts you dont want erased?
if i read that right, you want to add transparency in general to a texture. if yer using GIMP, go to File>New.. and while makin a new canvas the exact size of yer texture, click the + on advanced settings and then change "Fill with: " to "Transparency".

  • after that you can either go to File>Open Layer As..>then choose yer texture or right-click the texture then copy the texture you want transparency and Edit>Paste Into it into the new image canvas you made in a different window.
    to know if and wheres the transparency you should see a checkered background where its transparent. if you dont and you see it white or something where you want it transparent, use the eraser tool or wand (fuzzy select tool) to erase it.
  • that should do it, lemme know if it doesnt

So is this like to make it so ok like an example on our Rikku Import she has a ribbon on the back of her shoes that is just an image of a ribbon with transparency around it, and if you look from the back you see through her shoe? you understand what im asking?
its fine ^_^ thank you anyways
X_funtaztic_X, i looked in the most recent riku you have uploaded in the vault and i think i understand what your tryin to fix. how where it should be transparent it is transparent but eats over polys behind it where its transparent? you have a "Blend Mode" going on there. blends are usualy overlayed on a non-Blend Mode enabled material. try the Cull_None suggestion for the ribbon with new shader replaced with zero suit samus's shader1, if that doesnt work..

  • go back and make the ribbon's material settings how they would be by default, like turning off the Blend Mode and allow transparency to true then follow the tutorial.

lemme know what happens, making a Blend Mode Enabled material to work properly is annoyin. any material editing really.. since it always resets after re-importing a .dae

---

had the chance to update the guide. should be simpler and faster now


Title: Re: Adding Transparency to Textures - wh00t
Post by: StupidMarioFan1 on April 22, 2012, 05:29:37 PM
I don't understnad, I follow this tutorial exactly, but when ever I pick the texture name I get an error, and when I save it after that BrawlBox crashes when trying to open it again. I need tranparance for for SM64 Wings, but they don't have any transparencey even though the texture I used in 3ds Max had it, it just isn't applied for some reason. DX


Title: Re: Adding Transparency to Textures - wh00t
Post by: ramonM64 on April 23, 2012, 04:41:47 AM
after replacing the material and then assigning the texture to the material, do you make sure to type in your texture's name with proper spelling and caps? are you making sure to link the material's shader to the newly added added and replaced shader? and if its a texture that has a palette, are you assigning da palette?

if yer sure you got those and the guide points down, PM me the file. ill try to spot da problem


Title: Re: Adding Transparency to Textures - wh00t
Post by: Iwvi on May 19, 2012, 12:31:30 AM
What material is the one in the download? or did you do it?
It gives me a weird result everytime I use it, but I found an alternative that works with a better result everytime. So I was curious as to the origin of the material and shader in the download.

Here is what I mean:
The character on the left is using the material and shader from this tuto, the one on the right is using the alternative (Pit's wing material zzz_pit07_hane, and the corresponding shader, shader 6 if i remember correctly). The little square is the texture used in both characters. Compared to the square the one in the right looks better in my opinion. The left one seems too dark. The one on the right is slightly lighter than the texture reference, but it may be due to lightning (in the last pic they look almost identical).
(http://i.imgur.com/TvUAH.png)
(http://i.imgur.com/AyN5P.png)
(http://i.imgur.com/5nAOg.png)

EDIT: I checked and the material I used was pit's "Kanmuri" and Shader 5


Title: Re: Adding Transparency to Textures - wh00t
Post by: ramonM64 on May 19, 2012, 01:04:16 AM
i forget the specific names but uh.. the one used for the Sharp transparency is Ike's cape material and object's shader. the Blended transparency.. i cant remember. i think it was Zero Suit Samus's ponytail material and shader. The Nulled one i dont know, Mewtwo sent me it a long time ago for Kratos's wings. i might have renamed some wrong with others, ill update the tutorial's downloads when i get the time

did you get transparency working following the guide EXACTLY? i ask cuz some people cant get it to work (i follow it and i get it to work for them). i might have to rewrite it to be clearer and have screenshots of where to find things

yeh, mine seems a bit darker than yours, kinda too dark. which one of ours is closer to how normal lighting would go onto a character?

the weird thing about those results though is i found Ike's (that the one used in those screens?) cape shader and material to be too bright sometimes when i use it


Title: Re: Adding Transparency to Textures - wh00t
Post by: Iwvi on May 19, 2012, 02:47:51 AM
I used blened transparency so It means the one from the tut comes from ZSS. The tutorial gets me transparency if I follow it. It just happens to be too dark sometimes. I think that they look better depending on what you use them for. But if I compare it to the texture used (the little square) pit's shader and materials seem to be closer, but sometimes it  looks too bright. Final destination one seems to be the brighter.


Title: Re: Adding Transparency to Textures - wh00t
Post by: BlueBrain on August 22, 2012, 05:24:38 PM
ive done what this says, using the blend shader and material, but now the whole model is 50% see-through... i only want the transparencies of the textures to show up as transparency!! xD


Title: Re: Adding Transparency to Textures - wh00t
Post by: ramonM64 on August 22, 2012, 08:31:57 PM
you have to be careful with blended and semi-transparency. its the reason why lots of brawl models are broken into separate objects and materials (like Marth's hair). its sorta since blended materials eat at other polygons at some angles.. dunno why, i just know some work-arounds

i would suggest having the object that needs blended transparency its own object and material. if thats what you did and its still happening, would you mind sending me a .PAC of it?

i kinda forgot about this guide. i use shaders with better lighting and such now, ill update the 1st post with them when i get the chance


Title: Re: Adding Transparency to Textures - wh00t
Post by: BlueBrain on August 23, 2012, 04:29:15 AM
ok cool, i think i'll first check how it looks using the sharp one anyway