hy every one i'll start saying that im no expert in maping i know how to use normal maps on irlicht.So i created a farm model for my rts game(project for my license on college) and i added to the farm some plants made after an tutorial in 3ds max with black and white alpha chanel and texture.The model i exported in .3ds format.The problem with this model is that it doesn't renders the texture of plants,it makes white transparent and i dont know what to do to make it render as it should green and solid
Here is the image as it shows irrlicht when it render:
pls help me urgent...i still have lot of work and i can't get further without this finished
please urgent help with alpha maps
-
- Competition winner
- Posts: 1123
- Joined: Sun Jun 10, 2007 11:14 pm
Re: please urgent help with alpha maps
If you're using a texture and an alpha map, you'll need to combine them since irrlicht doesn't currently support that. If you have them combined together already, you can post it so we can check it out. If you don't and aren't sure how to do it, you could send me the alpha map and the texture and I can combine them if you needed.
Re: please urgent help with alpha maps
here they are...
if by combining the you mean this:
i've already did this and it's useless...it shows some green on the plant bot it's transparent(i modified the original texture and let engine load itself,if it is another way please tell me)
Re: please urgent help with alpha maps
If I set your alpha mask as the image's alpha channel, it looks just fine:
If this is what you expected, put the alpha in the alpha channel of the png and render with one of the alpha modes.
If this is what you expected, put the alpha in the alpha channel of the png and render with one of the alpha modes.
Re: please urgent help with alpha maps
you tested in irrlicht? it looks lice a plant? if so can you post your example code please?
Re: please urgent help with alpha maps
No, I only made the picture properly.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: please urgent help with alpha maps
The thing with automatically loading the texture is that this not only depends on the texture alone, but also on the material that you assign in the 3ds model. Better make sure (manually or with an editor such as irrEdit/coppercube) that you have the correct material. In the case of a texture with alpha channel it's EMT_TRANSPARENT_ALPHA_CHANNEL. Then have the correct texture (as shown by hendu, where there's no background at all, black background or anything else is just bad) and Irrlicht will load this correctly.
Re: please urgent help with alpha maps
i did it...sry for posting so late i separated the plants from house in 3ds max and after when introducing the house in game introduced also plants in same coordinates and plants material flag set EMF_TRANSPARENT_ALPHA_CHANEL,true here is an screen with preview(i know the plants aren't quite good/nice but for now it work )