please urgent help with alpha maps

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
allx_90
Posts: 7
Joined: Sun Jan 30, 2011 8:07 am

please urgent help with alpha maps

Post by allx_90 »

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:
Image

pls help me urgent...i still have lot of work and i can't get further without this finished
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Re: please urgent help with alpha maps

Post by Lonesome Ducky »

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.
allx_90
Posts: 7
Joined: Sun Jan 30, 2011 8:07 am

Re: please urgent help with alpha maps

Post by allx_90 »

Image
Image
here they are...

if by combining the you mean this:
Image
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)
Image
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: please urgent help with alpha maps

Post by hendu »

If I set your alpha mask as the image's alpha channel, it looks just fine:
Image

If this is what you expected, put the alpha in the alpha channel of the png and render with one of the alpha modes.
allx_90
Posts: 7
Joined: Sun Jan 30, 2011 8:07 am

Re: please urgent help with alpha maps

Post by allx_90 »

you tested in irrlicht? it looks lice a plant? if so can you post your example code please?
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: please urgent help with alpha maps

Post by hendu »

No, I only made the picture properly.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: please urgent help with alpha maps

Post by hybrid »

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.
allx_90
Posts: 7
Joined: Sun Jan 30, 2011 8:07 am

Re: please urgent help with alpha maps

Post by allx_90 »

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 :D )
Image
Post Reply