Page 1 of 2

How to create Alpha mapping ?

Posted: Wed Aug 13, 2008 11:44 am
by anhdung86
Ok, my game must has so many trees and i want to create lowest poly tree (for good frame rate), but i don't know how to create alpha mapping for leaf in trees, like that:

Image

Anybody please help me about that, thankz verymuch :(

Re: How to create Alpha mapping ?

Posted: Wed Aug 13, 2008 12:32 pm
by Danimita92
You need the texture of the leaves, then make a targa (.tga) image out of it. This image is gray, black and white. Black will be fully transparent, white will stay, and gray will be a little transparent.
Use the original texture on the tree's actor, and then use the tool "tga2gebmp2", load the tree's actor, and replace the leaf texture with the targa. Save, and there you are. An alpha texture

Re: How to create Alpha mapping ?

Posted: Wed Aug 13, 2008 12:36 pm
by anhdung86
Thank Danimita, i will try it :D

Re: How to create Alpha mapping ?

Posted: Wed Aug 13, 2008 8:43 pm
by anhdung86
Now, I have a problem with this:
-First i create 2 texture, one for tree body and one for leaf (.bmp):
ImageImage

-Then i create alpha texture for leaf (.tga):
Image

-After convert my tree to .act file i use "tga2gebmp2" and replace the leaf texture with the targa. But when i view my tree with Equity, those leaf didn't transparent:
Image

This is my tree actor and .tga file:
tga: http://www.mediafire.com/?adlaazma0ao
actor: http://www.mediafire.com/?ys3x3cd1men

Anybody know why? :(

Re: How to create Alpha mapping ?

Posted: Wed Aug 13, 2008 8:58 pm
by bernie
You don't need to use "tga2gebmp2".
just load the actor into equity and change the texture there for your tga.
Which version of Equity are you using?

Re: How to create Alpha mapping ?

Posted: Wed Aug 13, 2008 9:11 pm
by anhdung86
You don't need to use "tga2gebmp2".
just load the actor into equity and change the texture there for your tga.
I used Equity then the result didn't change.
Which version of Equity are you using?
I used Equily 4.2.1

Re: How to create Alpha mapping ?

Posted: Wed Aug 13, 2008 9:15 pm
by bernie
The version of equity you are using is out of date.
download the latest version from my filefront account http://hosted.filefront.com/bernieRF/
version 4.2.5 supports tga and will show transparencies correctly in the viewer.

Re: How to create Alpha mapping ?

Posted: Wed Aug 13, 2008 9:22 pm
by Juutis
You need to combine the texture and the alpha map to a .tga file with the AlphaCreate program (in your tools folder). Right now your alpha map is a .tga.

So, save your alpha map as .bmp -> open AlphaCreate -> enter the bitmap and the alpha map and hit 'Create'. And then you can use Equity to replace the texture.

Re: How to create Alpha mapping ?

Posted: Wed Aug 13, 2008 9:29 pm
by bernie
You need to combine the texture and the alpha map to a .tga file with the AlphaCreate program (in your tools folder). Right now your alpha map is a .tga.
Yes true, I didn't spot that

Re: How to create Alpha mapping ?

Posted: Wed Aug 13, 2008 9:30 pm
by anhdung86
@Juutis & bernie: I made it !!! :D Thank you very much :D

Re: How to create Alpha mapping ?

Posted: Fri Aug 15, 2008 8:47 pm
by anhdung86
I have a problem with those leaf, when i put it in my level, they look very dark:

Image

I think it's dark because i put a dynamic light above, so the surface which is not being light will dark, so how can i made it not being effect by light? (i try StaticMess entity but my tree look very bad). Any body help me please! :(

Re: How to create Alpha mapping ?

Posted: Sat Aug 16, 2008 4:24 am
by steven8
Make sure your fillcolor is 255,255,255 on the entity for the tree.

Re: How to create Alpha mapping ?

Posted: Sat Aug 16, 2008 9:08 am
by anhdung86
I used fillcolor 255,255,255 but it didn't change :(

This is my tree actor:
http://www.mediafire.com/?ldlaabn1jpw

Re: How to create Alpha mapping ?

Posted: Sat Aug 16, 2008 9:26 am
by steven8
Have you tried removing (or just moving) the dynamic light and trying say, a sunlight entity to see if there is a difference?

Re: How to create Alpha mapping ?

Posted: Sat Aug 16, 2008 10:05 am
by anhdung86
I tried both Sunlight and Sun entity, but the result didn't change, i don't know why :(