Jump to content
Sign in to follow this  
Helifreak

Problem with alphachannels in hiddenselections

Recommended Posts

I have a working hiddenselection; this is the part in the config, that calls up the script:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class EventHandlers

{

init="_this exec {\FW_Basic\scr\init_ZF.sqs}";

};

And this is the "init_ZF.sqs"-script:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_man = _this select 0

[_man] exec "\FW_Basic\scr\PA.sqs"

_man setobjecttexture [0, "\FW_Basic\t\Name.pac"]

_man setobjecttexture [1, "\FW_Basic\t\A_ZF.pac"]

exit

Ingame those parts of the alphachannel are black, which are suppossed to be transparent.

The texture itsself is fine, at least it works when I'll put it on other parts of the model.

Any ideas what might be the problem?

Share this post


Link to post
Share on other sites

This usually happens to models that have not been binarized correctly. Make sure you have the texture in the folder to be binarized together with the p3d. Also transparent (or alphachannel) textures look better as a paa.

Share this post


Link to post
Share on other sites
The modell isn't binarized at all.

Ok. So it looks fine on Bulldozer? Firstly convert the texture as a paa and apply it again.

Share this post


Link to post
Share on other sites

Didn't work. As already mentioned, the texture itsself is fine. It has to be another problem...

Share this post


Link to post
Share on other sites

Is the texture preloaded correctly when loading it with setObjectTexture? (i.e. already applied to another part of the model)

Share this post


Link to post
Share on other sites
Problem is in using .pac files which do not support alpha channel IIRC. Use .paa instead.

They do, but you only have one color for the alphachannel, which means the part is either completely transparent or not transparent at all.

As I already said twice, the texture itsself is fine and works without problems, when I don't use them on this selection.

Share this post


Link to post
Share on other sites

ah, my bad, didn't read through the script example.. maybe your black comes from the modelpart behind the hiddenselection?

what happens if you dont apply a texture at all, is then everything black there?

Share this post


Link to post
Share on other sites

Maybe try moving those faces up (or down) in the alpha ordering. This is done in the 'Faces' menu in O2.

The roundel packs uses transparent PAA's with setobjecttexture, so it's not an engine problem.

Can you use PAA's instead? Do you still have the original TGA file?

Share this post


Link to post
Share on other sites

had the same issue

how to solve it:

black areas mean that the alpha channel is not used

by the method the textures been applied,

you may ahve applied the alpha texture btu onyl with teh soldi parts

and the slpha channeled part is unused

apply the alpha channel texure on the whole part yso you can see the alpha channel in oxygen

( or rather seeign thru it :P )

now at start up ud usually setobjecttexture the normal texture

then apply the otehr one

Share this post


Link to post
Share on other sites
you may ahve applied the alpha texture btu onyl with teh soldi parts

and the slpha channeled part is unused

apply the alpha channel texure on the whole part yso you can see the alpha channel in oxygen

Are you doing this on purpose? I mean come on, it's basically not possible to have 9 typing errors in three lines only. rock.gif

Or is that some trick of you so that only half of the english speaking community can understand what you're saying? huh.gif

Share this post


Link to post
Share on other sites
Can you use PAA's instead? Do you still have the original TGA file?

Yes, I have (of course ;-) ). But I want to use .pac files, because of other engine issues.

I tested around with it two days ago, and after about 2 hours it finally worked. I can't say for sure what change it made working, but I think it worked because I modelled the selection new, and laid the texture on it once more by hand. (maybe that's similar to what Nephilim now also wanted me to do).

Now it works, thanks for all your help,

Greetings, Helifreak

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×