Jump to content

Photo
- - - - -

.paa Transparency Trouble


  • Please log in to reply
23 replies to this topic
Thread Starter
-Martin-
-Martin-

    Master Gunnery Sergeant

  • Members
  • 1145 posts

  • Joined: 10-April 2009

Posted 13 January 2010 - 03:44 #1

Hey guys,

I just ran in to a little problem while working on Taviana island. Basically I'm making supermarket windows but everywhere the window.paa texture is placed, everything behind it becomes invisible.

Here is a screen shot of what I mean:

Posted Image

Here are the steps that I have taken to create the texture:

1) The .tga texture was created in Adobe Photoshop CS4, it uses RGB
colours and 1 Alpha Channel layer with one colour (Gray; #424242)

2) .tga saved as 32 bits/pixel without "Compress (RLE)" option enabled

3) .tga saved to .paa using TexView 1.0

4) .paa texture and model loaded in OFP both unbinarised.

Any help will be greatly appreciated :blush:

DanAK47
DanAK47

    Staff Sergeant

  • Members
  • 398 posts

  • Joined: 22-August 2001

Posted 13 January 2010 - 08:36 #2

I think this is a face order issue relating to the p3d model and not to the texture. Try copying and repasting the entire model EXCEPT for the windows..

Thread Starter
-Martin-
-Martin-

    Master Gunnery Sergeant

  • Members
  • 1145 posts

  • Joined: 10-April 2009

Posted 13 January 2010 - 11:40 #3

I think this is a face order issue relating to the p3d model and not to the texture. Try copying and repasting the entire model EXCEPT for the windows..


Thanks for the reply, I tried to do that and it still does the same thing.

I even replaced my texture with a glass texture from BIS (the data folder) and it does the same thing, so I guess it is a .p3d issue. Any other ideas? Maybe some properties gotta be set for the face? :(

soul_assassin
soul_assassin

    Chief Warrant Officer

  • Members
  • 3516 posts

  • Joined: 04-May 2002

Posted 13 January 2010 - 11:43 #4

select all faces using the window texture in O2. Faces>Move top

stgn
stgn

    Dances with AR-15

  • Members
  • 2358 posts

  • Joined: 18-October 2002

Posted 13 January 2010 - 12:40 #5

Its a OFP engine render problem you can't use glass in ofp with out it not showing most things that are not attached to the model via proxy go and play with the BIS islands and you will find that windows only shows certain trees and buildings no soldiers or fences. Muzzle flash has the same problem makes soldiers and fences transparent if you watch it from the side of another soldier firing. As far as I understand it has to do with how ofp, order the things that should be rendered. Those buildings behind the window are probably lacking the model property the buildings in the background has. Some of those properties has to do with with rendering of buildings. I don't have a link to the explanation of the properties but do a search. Sorry for the messy text.
STGN

sanctuary
sanctuary

    First Lieutenant

  • Members
  • 5163 posts

  • Joined: 27-March 2003

Posted 13 January 2010 - 14:34 #6

The PAA format is very annoying with window, smoke etc... sometime , even when using the O2 "moving on top" it does not prevent a model with a PAA texture to just be invisible behind a window.

By example, here you have 2 WW4 soldiers, one is using a PAC texture for the body, the other is using a PAA (as PAC was rendering the texture for it extremely ugly)
Posted Image

Then what happen if i go in the nearby Montignac pub and give a look through a window :
Posted Image

Going to make that specific soldier with a PAC texture would solve the problem, but PAATool does not allow good PAC texture to be done, as it lead into error messages.

I wish that bug never existed as i never found any solution to it (out of removing the window texture from the building of course, BIS did it apparently on several of their building too, but sadly not on every of them).

vektorboson
vektorboson

    Supreme OFP Nerd

  • Members
  • 1265 posts

  • Joined: 05-January 2002

Posted 13 January 2010 - 16:27 #7

@Sanctuary

Are you really sure about what you wrote?
I ask because PAA- and PAC-files only differ in their file extensions; internally they are exactly the same. Try to simply rename the .paa to .pac and look what happens; if the engine behaves differently on file extension alone, then this is a curious discovery...

reyhard
reyhard

    Staff Sergeant

  • Members
  • 370 posts

  • Joined: 18-October 2005

Posted 13 January 2010 - 16:34 #8

difference between paa and pac lays in handling alpha channels. Try doing same (changing extension from paa to pac) with a texture that has alpha channel - game will probably crash.

sanctuary
sanctuary

    First Lieutenant

  • Members
  • 5163 posts

  • Joined: 27-March 2003

Posted 13 January 2010 - 16:52 #9

@Sanctuary

Are you really sure about what you wrote?
I ask because PAA- and PAC-files only differ in their file extensions; internally they are exactly the same. Try to simply rename the .paa to .pac and look what happens; if the engine behaves differently on file extension alone, then this is a curious discovery...


You can additionally refer to this post by Suma.
http://forums.bistud...?t=39571&page=3
That while at the time it was about PAA and smoke/particles problems i mention too, the source of both kind of PAA annoyance is the way the alpha channels of those PAA are handled by the OFP engine.

And in the ofp editing board, you can find several threads about the same problem without a solution (as when i noticed this problem touching a few of my units, i looked around to see if someone got a working everytime solution other than making it a PAC) , as the problem is in those building PAA, not on the units/vehicle affected PAA

Edited by Sanctuary, 13 January 2010 - 16:55.


stgn
stgn

    Dances with AR-15

  • Members
  • 2358 posts

  • Joined: 18-October 2002

Posted 13 January 2010 - 17:17 #10

Have you tested that soldier with a .pac texture, did he show then? I think its the model somehow, I just tested my Black ops and they show through the windows and they are clad in .paa textures where as some of your ww4 men clad in .pac did not show. also the gun when held by some of your men did not show but if they drop it I can see it lying on the ground also the face is missing and thats a .pac if I remember. I also tested the muzzle flash and it penetrates some of you men but it does not penetrate my BO's with the exception of the soldier firing it. I could see your east guerrilla fine but the replacement Russians did not show.

Edited by STGN, 13 January 2010 - 17:43.


sanctuary
sanctuary

    First Lieutenant

  • Members
  • 5163 posts

  • Joined: 27-March 2003

Posted 13 January 2010 - 17:30 #11

Have you tested that soldier with a .pac texture, did he show then? I think its the model somehow I just tested my Black ops and they show through the windows and they are clad in .paa textures where as some of your ww4 men clad in .pac dose not show. also the gun when held by some of your men does not show but if they drop it I can see it lying on the ground also the face is missing and thats a .pac if I remember. I also tested the muzzle flash and it penetrates some of you men but it does not penetrate my BO's with the exception of the soldier firing it. I could see your east guerrilla fine but the replacement Russians did not show.


Yes, when i tested that soldier with a PAC it showed.
I tested the soviet replacement soldier and indeed i just noticed that as you say he does not show through a PAA window despite using a PAC texture, while the the soviet officer replacement that use exactly the same texture shows perfectly in the window.

That's really strange, because i can't see what i have done differently for both soldiers.
When i built them, it was a same model with a naked head, i merged it with a helmet model (and every of its already prepared lods) that was already prepared (that was using the same texture as the base model) on one and saved it after making sure selections were correct.
Then i took the model with the naked head and merged it with the already prepared beret model (that was using the same texture as the base model), and saved it.

Then binarized the both of them.
So in this process i did absolutely no extra step for any of them, so there is no reason the faces would have all gone in bottom (and when i tried to "face on top" another model that was going to the same window bug, it did not solved it anyways) for one model and not for the other.
Why the building window PAA transparency works for one, and does not work for the other is beyond me.

In the side the BIS small fence that can be seen around one of the house does not appear either if you look at that building from the window.
Posted Image
Posted Image
So is it really a problem on the models(fences, soldiers, vehicles), or on the building and window one ?

Edited by Sanctuary, 13 January 2010 - 17:38.


vektorboson
vektorboson

    Supreme OFP Nerd

  • Members
  • 1265 posts

  • Joined: 05-January 2002

Posted 13 January 2010 - 18:07 #12

So is it really a problem on the models(fences, soldiers, vehicles), or on the building and window one ?


First, thanks for the link you provided. As Suma stated in the post, if the average alpha value (weighted by face size) is below a threshold, then the object is considered to be 'transparent'. Now in the case of the building: The building has so many non-transparent parts that maybe the engine considers the building to be 'opaque'.
Now for your soldiers: They all have spectacles, which uses a transparent texture, perhaps, by sheer chance, those spectacles bring the average alpha value right under the threshold, and thus those soldiers are always drawn after the building.

Funny thing is: In my unfinished objects pack I released a bus station with glass, and I always wondered why the transparency on that station worked, but not a train depot building I've been working on...

Thread Starter
-Martin-
-Martin-

    Master Gunnery Sergeant

  • Members
  • 1145 posts

  • Joined: 10-April 2009

Posted 13 January 2010 - 18:09 #13

select all faces using the window texture in O2. Faces>Move top


Thanks’ that worked, now the floor of the building is visible.

But some buildings I made can be seen through the window except one that has about 8000 points; I think there might be something with the properties as STGN said. But I found a good solution to my problem, I hid the background of the windows with shelves, but I hope that I will find some kind of solution to this problem, it’s very annoying :(

Posted Image

Thanks for the help guys, if yo got any more ideas please post them :)

stgn
stgn

    Dances with AR-15

  • Members
  • 2358 posts

  • Joined: 18-October 2002

Posted 13 January 2010 - 18:11 #14

Well if the soldier showed with the .pac it might be a problem associated with both texture and model. I get the crazy idea that it might be a problem with o2 because I notice very different file sizes on 2 guns that are similar in poly size and texture amount my iron sight M4 is 1.9mb where as my M4 with reflex and SD is 0.86mb, should be the other way around by my logic, although they both show through the window. If its a O2 problem which would explain why the soldier might show one time with one texture and the next time with another it would not. Maybe copy pasting the model from old .p3d to a new one could result in a usable model or maybe its just shear random chance which works and which does not.
STGN

sanctuary
sanctuary

    First Lieutenant

  • Members
  • 5163 posts

  • Joined: 27-March 2003

Posted 13 January 2010 - 18:34 #15

That's very strange indeed.
Reminds me of the pain i had to get the PAA window seeing through the PAA turret in the gunner view of my released beta of the WW4 vehicles.
move TOP, move BOTTOM, nothing worked at all, the PAA gunner window was just not seeing through the PAA model that was behind it.

Then out of solutions, i went back to some old archived version of the vehicle, took the PAA textured gunner sight from there and pasted it in the place of the current one ... and it worked.
If only there was any kind of logic behind this things would be so much easier.

I will remove windows from all the BIS stock buildings and release the modified islands into the next WW4 upgrade, so at least PAA and PAC units/vehicles used with them in my mod will not be affected anymore.

Thread Starter
-Martin-
-Martin-

    Master Gunnery Sergeant

  • Members
  • 1145 posts

  • Joined: 10-April 2009

Posted 13 January 2010 - 18:42 #16

I opened the model in the Oxygen for OFP, because I use ArmA Oxygen with export old .p3d function (I can’t get textures to show up in the old oxygen) and I re did all the names properties and optimised the model and now all the buildings show except for the one with 8000 points.

I'm going to remove some points from the building and test it, then post my results here. There must be some kind of logic to this.

Don't you guys just love BIS games haha :tongue::cheers:

stgn
stgn

    Dances with AR-15

  • Members
  • 2358 posts

  • Joined: 18-October 2002

Posted 13 January 2010 - 20:02 #17

One reason I can think of for the different file size is that I have one model which is base and I make all the changes to it and then copy paste new parts to the models used in the folder. Perhaps O2 somehow stores some old information in the p3d which makes ingame engine calculate wrong?
One thing I would like to know is if its possible to have the NVG green rendering in front of iron sights on rifles its posible on tanks but somehow not on guns, I hate having a red, red dot when wearing NVGs.
STGN

Edited by STGN, 13 January 2010 - 22:28.


sanctuary
sanctuary

    First Lieutenant

  • Members
  • 5163 posts

  • Joined: 27-March 2003

Posted 13 January 2010 - 20:59 #18

I think it is possible that some informations from previous modification are accidentally saved or O2/binarize does not interpret them like it should, may explain why sometime the faces move top/move bottom do not do what it is supposed to do regarding their correct ordering after you save a modified model and binarize it.

Too bad in my test i could not find a pattern on how exactly this is happening, makes things a real pain.

I don't think there is much to do regarding the NVG, as it may be some kind of engine hardcoding going on there.

Edited by Sanctuary, 13 January 2010 - 21:01.


vektorboson
vektorboson

    Supreme OFP Nerd

  • Members
  • 1265 posts

  • Joined: 05-January 2002

Posted 13 January 2010 - 21:07 #19

One reason I can think of for the different file size is that I have one model which is base and I make all the changes to it and then copy paste new parts to the models used in the folder. Perhaps O2 somehow stores some old information in the pbo which makes ingame engine calculate wrong?


Do you use many named selections? Those take really lots of space; if you want to have slim P3Ds then delete all unnecessary named selections, which are basically all except 'zasleh' (if there is a muzzle flash) and the animated one (can't remember the name)

Thread Starter
-Martin-
-Martin-

    Master Gunnery Sergeant

  • Members
  • 1145 posts

  • Joined: 10-April 2009

Posted 13 January 2010 - 21:15 #20

I think this is going to be a surprise to everyone,

As I said I removed about 4000 points from the model making it 3149 points instead of 8000 points and also all the LOD's exept for the first one, and what do you know, the building shows up behind the window. I guess there is some kind of limitation on the polygon count in the model or the .p3d size or something was wrong with the other LOD's...



Looks like I will have to split the building up in to a few parts or something. Ahhhh complications complications keep slowing the project down :(

But at least we know the cause now.

Here are a few pictures to prove it:

Before:

Posted Image

After:

Posted Image