Jump to content
Sign in to follow this  
[frl]myke

Windows not transparent

Recommended Posts

Hello again,

i'm stuck on a problem with some windows. In Buldozer they seem fine (transparent) but ingame the windows aren't transparent...at least not from pilots seat.

Here 2 pics to illustrate what i mean:

In Buldozer: http://rapidshare.de/files/40583259/buldozer_windows.jpg.html

Ingame: http://rapidshare.de/files/40583265/ingame_windows.jpg.html

Also from exterior view, transparency seems to be fine. Only from pilots 1st person view i get those blind windows.

Anyone can see what i'm doing wrong? If you need some more info, please tell and i'll provide all necessarly asap.

Thanks in advance.

Myke out

Share this post


Link to post
Share on other sites

the windows in buldozer just look absent rather than transparent.

what filename suffix are you using? _co or _ca?

Share this post


Link to post
Share on other sites

@Messiah

Jep, you're right, on the pic it looks absent. I choosed a bad POV but the texture is there (counterchecked again after reading your post), not pretty well visible on the front windscreen but at the sides the "dust" is clearly visible.

Well, uhm, to be honest, there isn't a suffix right now (transp.paa) but now as you mention it.....i'll check the BIWIKI about it.

Share this post


Link to post
Share on other sites

Thats likely to be the cause. You need to suffix every texture with its specific role. Most textures will use the _co suffix (will only allow alpha to be on or off, not varying). _ca suffix is for varying alpha, such as glass (i.e its the one you need to use)

I assume that because you haven't given the texture a suffix at all, that the engine has assumed its to be a _co.

thus the texture file needs to be called transp_ca.paa

Share this post


Link to post
Share on other sites

Hmmm...renaming the texture didn't helped. Still same black as before. Odd thing is, the same texture ever was transparent from outside, so i can see a Pilot sitting in the vehicle. I know this is not the same LOD but it's the same texture for the windows in all LOD's.

Any other suggestions?

Share this post


Link to post
Share on other sites

Simply renaming won't help afaik. You need to rename it and convert it. So transp_ca.tga -> convert -> transp_ca.paa (in case you simply renamed teh original transp.paa into transp_ca.paa).

Although i'm not even sure if it mathers....it more depends what kind of 'codes' you used to convert the original tga.

If you add the _ca before converting, you normally don't have to tell what kind of codes it best uses as the prefix tells the convertor what is best used.

In case that doesn't fix it...you might want to previde your texture so we can check the alpha's and convert it for you etc.

Share this post


Link to post
Share on other sites
Simply renaming won't help afaik. You need to rename it and convert it. So transp_ca.tga -> convert -> transp_ca.paa (in case you simply renamed teh original transp.paa into transp_ca.paa).

Although i'm not even sure if it mathers....it more depends what kind of 'codes' you used to convert the original tga.

If you add the _ca before converting, you normally don't have to tell what kind of codes it best uses as the prefix tells the convertor what is best used.

In case that doesn't fix it...you might want to previde your texture so we can check the alpha's and convert it for you etc.

I'm not sure if it matters either, but then again I'm not sure if its there for the engine to recognise, for texview to recognise, or a combination of the two. Its a good thing to check to see if it helps.

if that doesn't help, yes, a link to your texture would help. The _co and _ca problems generally also affect the model in buldozer, so its strange that it works in buldozer but not in game.

Share this post


Link to post
Share on other sites

Ok, i've exported the texture itself to tga, opened it in GIMP, checked that transparency is as expected, saved it with _ca suffix, prted it back to .paa.....and it still doesn't work.

I've also checked the rvmat file according to the tutorial a mate linked me to: http://forum.armedassault.info/index.p....=26398&

Nothing works. Everywhere the windows are perfectly transparent (with some dust on the lower ones) no matter if in Buldozer or ingame. Only ingame in Pilot 1st Person...they are black (nearly completely) and full opaque.

Here's a link to the texture but i don't think it is related with the texture. Anyway, if someone may point me in the right direction where i'm doin something completely wrong, any help is much appreciated.

Link: http://rapidshare.de/files/40585949/Transp_ca.7z.html

Share this post


Link to post
Share on other sites

Myke... Open a BIS example p3dm mlod model of an aircraft and track down some glass textures (both primary & materials) they point too... also, compare the way you have your polygon topology in your View Pilot/Cargo LOD setup and the topo. setup of the BIS models.

In your case pay particular attention to the primary textures and materials the glass maps too and I suggest you compare their _ca textures to your own... I'm sure you'll be able to note the difference.

Take a close look at the .rvmat also associated with those glass faces...

Btw... White in the Alpha channel "says" ... please let through 100% of the RGB channels in the texture... and Black "says" let 0% of the RGB channels through...

As an example please look closely at the two following images.. again note the difference between the BIS texture and yours...

myke_1.jpg

myke_2.jpg

Also, this thread may help as well... Semi-transparent textures

Share this post


Link to post
Share on other sites

@Synide

thanks for your answer, will work on that.

Just for curiosity: do you have a clue why they are ONLY in pilot view 1st person not transparent but in any other LOD/point of view?

Share this post


Link to post
Share on other sites

Here's how I do it. Not saying it's the best way to do it. But nevertheless it works. So here we go>

1. Step one. Create your windows using 3 dimensional boxes - NOT flat planes. Putting a texture on a flat plane will not work.

window1.jpg

2. Create a transparent image in gimp, photoshop, whatever you want and name it "window_ca.png". When you open up your image software, make sure the base layer is a "transparent layer" and not a "background layer". IF it's a background layer it won't work.

3. Convert "window_ca.png" to window_ca.paa" it should look like this if it's truely transparent:

window3.jpg

If not, back to the drawing board in your image software and make sure it's transparent.

4. Create alpha'd .rvmat file for this window called "alpd.rvmat" using this code.

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

ambient[] = {1,1,1,1};

diffuse[] = {1,1,1,1};

forcedDiffuse[] = {0,0,0,0};

emmisive[] = {0,0,0,1};

specular[] = {1,1,1,0};

specularPower = 5;

renderFlags[] = {"NoAlphaWrite"};

nextPass = "ca\data\sklo-pass2.rvmat";

PixelShaderID = "Glass";

VertexShaderID = "Glass";

class Stage1

{

texture = "#(ai,64,64,1)fresnelGlass()";

uvSource = "none";

};

You can open up a empty .txt file and save it as "alpd.rvmat" when your done.

4. Apply the "window_ca.paa" texture to those windows you made. Just hi-light them all, press "A", load the "window_ca.paa" texture, press "B" to background map it to the window. Now press "A" again to return to normal mode.

5. While you have your windows still selected ( hi-lighted) click on FACES>FACE PROPERTIES this will open up the following window:

window2.jpg

6. In the top pane of this window you will see: v1, v2, v3, texture & material etc... You need to hi-light all the current faces listed in the upper pane, then you will choose a material file, you know the one we created in step 4: "alpd.rvmat" , browse to that file ensuring it's inside the folder your using to make the model. Click apply to apply it to all the faces you selected.

It will now look just like my example for face properties and show the .rvmat file applied as a material to all the surfaces you selected.

Voila! Done, it should work now. Goodluck!

*** VERY IMPORTANT SIDE NOTE: This works with the models original LOD. In cases where you have very small confined spaces, such as in a cockpit pilots LOD view, when looking left & right the panes from the window will probably interfere with the view making it for a very frustrating modeling experience as it will block out some parts of your model from that particular view point. In other words parts of your model may appear to not be there in pilots view or drivers view for that matter. Whatever view you are using from inside the model this may go the same for. I've found that vehicles with a larger interior have better results with the glass and don't interfere as much.

With the WW2 fighters I'm currently making all the glass had to be removed from the pilots view LOD because the cockpits were so small that head movements would distort the view.

Hopefully this helps.

BTW if you need to add bullet damage holes like BIS's models have, then you will need to see how they do it in their example models as I have yet to do that myself.

Share this post


Link to post
Share on other sites

@ Rip31st, Synide, Messiah & DaSquade

hell, thanks a thousand times for all your help. Finally i got those windows perfectly transparent. Can't say who gave the final solution but i guess it's a mix of all answers together that helped me to solve this problem.

Really really very much appreciated. Finally i'm a huge step closer to the release of this baby. It still has some things to fix but this one gave me the biggest headache.

Once again, thank you all, you guys really rocks.

Myke out

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  

×