Alpha

Posted By: Mythran

Alpha - 02/24/13 11:28

I have a model with a skirt. It has alpha. When i import the object how can i make it visible from the back and front? Must it be imported apart from the other objects? Also why do i can see objects with alpha through other objects with alpha settings?

P.S: I'm still looking for a a animator.

Thanks
Posted By: Ch40zzC0d3r

Re: Alpha - 02/24/13 11:32

32 bit textures (alpha mapped) always disable the Z-Buffer (renders to front)
You have 2 options now:
1. Set your texture to 24bit
2. Apply this material with shader:
Code:
MATERIAL *mat_alphatest = 
{
  effect =
  "
    technique alpha_test
    {
      pass p0
      {
        zWriteEnable = true;
        alphaTestEnable = true;
        alphaBlendEnable = false;
      }
    }
  ";
}

Posted By: Mythran

Re: Alpha - 02/24/13 12:29

Canīt It be done in med? I have no code...
Posted By: Ch40zzC0d3r

Re: Alpha - 02/24/13 15:04

Originally Posted By: Mythran
Canīt It be done in med? I have no code...


As I said set Textures to 24 bit, this can be done via MED.
But remind, everything ehich is transparent will be black.
Posted By: Mythran

Re: Alpha - 02/24/13 15:26

It made no diffrence.. I have de texture map and the alpha map. I applyed them, and it works. Then i export it into the med. And the alpha map is doing nothing in there... Just the texture appears..
Posted By: Mythran

Re: Alpha - 02/24/13 15:49



This is how it looks after i do all that.

The Alpha is 24bit Targa.

The Texture is 24bits Bitmap.

Besides that the texture wont appear on both sides of the faces..
Posted By: Ch40zzC0d3r

Re: Alpha - 02/24/13 16:01

MED doesnt show the alpha maps...
Open the model with the engine and see how it looks there.
Posted By: Mythran

Re: Alpha - 02/24/13 16:02

It looks the same as in med..
Posted By: ratchet

Re: Alpha - 02/24/13 16:32

I read an old tree tutorial on MED.
they had the model in two parts :
- main part without alpha
- 2nd part with aplha
By importing in MED the two models it worked.

What modeler do you use ?
Perhaps make one map only TGA having alpha ?
Posted By: Mythran

Re: Alpha - 02/24/13 16:39

i'm using 3ds max. I've been seeing tutorials too.. It works just fine in max the problem is importing into med...

Yes that is correct. The alpha is measured in greyscale. In wich Withe is absolutely opaque and black shows nothing. All greys in between are levels os transparency. I have the texture as i explaned (Part 1 (i guess?)) and Part 2 the alpha itself (Black & White). When i import into med it seems to be ignoring the alpha, i've been messing arround, but nothing works. And this happends even inside the game.

You can see the model in the What are you working on section.. everything is working as it should...
Posted By: sivan

Re: Alpha - 02/24/13 16:58

you can modify viewer.c probably in incudes or somewhere else in ganestudio folder, it is used for showing models edited in MED, where you can set the material of transparent entities properly, or set simply the OVERLAY flag always for models. I can share my modified code tomorrow if anybody interested...
Posted By: 3run

Re: Alpha - 02/24/13 17:05

Mythran@ you don't need to have an alpha channel as a third skin with 24 bits/pixels file! Please check you messages!

Everything works pretty nice (MED viewer):

There is another small alpha problem, but I always face it myself as well, you can fix it by using the material, that was suggested by Ch40zzC0d3r!
Quote:
First:

Second:

Maybe there are some other ideas, how to fix this, I would be glad to hear them too.
Posted By: Mythran

Re: Alpha - 02/24/13 17:32

Actually i was just worried about getting it to work. Those problems are for programmers tongue
Thank you all,
Thank you very much 3run.
Posted By: 3run

Re: Alpha - 02/24/13 18:43

Mythran@ you are welcome man
© 2024 lite-C Forums