Feral Heart

Help & Guidance => Game Help => Topic started by: Bloo. on March 17, 2016, 08:46:09 pm

Title: Mesh Help?
Post by: Bloo. on March 17, 2016, 08:46:09 pm
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:

Code: [Select]
material whbl3
{
    technique
    {
        pass
        {
            texture_unit
            {
                texture 9cdc8b28_D.tga
                filtering trilinear
            }
        }
    }
}

Thanks for any help received!
Title: Re: Mesh Help?
Post by: greenart6 on March 17, 2016, 08:50:29 pm
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:

Code: [Select]
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!
Title: Re: Mesh Help?
Post by: Bloo. on March 17, 2016, 08:54:34 pm
Ahhh that's got it working! Thanks so very much!!!<3333
Title: Re: Mesh Help?
Post by: greenart6 on March 17, 2016, 08:55:59 pm
You're welcome! Glad its working c:
Title: Re: Mesh Help?
Post by: Bloo. on March 17, 2016, 09:19:31 pm
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.
Title: Re: Mesh Help?
Post by: greenart6 on March 17, 2016, 09:21:54 pm
I'm not sure what could be causing that, do you have any screenshots of it?
Title: Re: Mesh Help?
Post by: Bloo. on March 18, 2016, 02:28:31 pm
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.