-
I've downloaded some meshes for a map I'm working on and on some of the meshes, like trees for example, there is black surrounding all the leaves. Is there a way to fix the material code so it's just the leaf, not like..a picture of the leaf?
Example
(http://i1264.photobucket.com/albums/jj497/Bloo336/screenshot_03172016_164333119.png)
Here's the material code for it:
material whbl3
{
technique
{
pass
{
texture_unit
{
texture 9cdc8b28_D.tga
filtering trilinear
}
}
}
}
Thanks for any help received!
-
I believe you have to add the line "alpha_rejection greater_equal 128" over the texture_unit line so that the code is more like this:
material whbl3
{
technique
{
pass
{
alpha_rejection greater_equal 128
texture_unit
{
texture 9cdc8b28_D.tga
filtering trilinear
}
}
}
}
If that doesn't work, I'd try changing the image file to a .png and then trying it. Hopefully this helps!
-
Ahhh that's got it working! Thanks so very much!!!<3333
-
You're welcome! Glad its working c:
-
Ooooiiii another issue, I've come across a mesh that has green instead of black, and another mesh that has grey instead of black...adding that bit of code doesn't seem to remove those ones.
-
I'm not sure what could be causing that, do you have any screenshots of it?
-
Aye, here ya go:
(http://i1264.photobucket.com/albums/jj497/Bloo336/screenshot_03182016_102410197.png)
(http://i1264.photobucket.com/albums/jj497/Bloo336/screenshot_03182016_102429621.png)
They already have the alpha thing in their code too, otherwise it just looks like a normal material code.