Drawing masked textures... not working!

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Blödsinn machen

cannon fodder
Dec 4, 2001
68
0
0
Switzerland
dwmade.stormpages.com
I've imported several textures into ucc compiled packages with the FLAGS=2 #exec option... then drawing the textures with Canvas class and the style STY_Masked set, but the textures don't seem to be masked. I've saved them in Photoshop with the proper 0-indexed color to be masked but it doesn't seem to make a difference. Can anybody help out with some advice ?
 

Grey Harverton

New Member
Dec 5, 2001
10
0
0
Australia
Photoshop sometimes buggerizes around the order of its colour tables. You might want to try having your masked colour at the end of the colour table instead of the beginning.
 
From what i can tell in Photoshop the last color in the palette is color zero, with no mechanism to move it, very annoying. I guess a lot of people use PaintshopPro to organize their indexed colors, but i couldn't move my masking color to zero from 255 in my old version of PSP, so i'm doing the annoying way in Photoshop for now:

My masking color is all on one layer, so i hide that layer and convert the image to indexed, then specify a palette of 255 colors, then custom, then edit the last color square to be my masking color. It will add a bunch of colors to fill in through 256 if you have less than 256 colors but it won't add to the file size since their not in your image. Now that you have your color table the way you want it, save it to disk and go back in History to right before the Indexed color, unhide the layer(s) with your masking color, convert to indexed and saveAs to create your image.
 

Captain Kewl

I know kewl.
Feb 13, 2001
794
0
0
IN YOUR HOUSE
Visit site
Or you can save it as a tga and then use Bright (it's somewhere at Polycount) to convert to pcx. It automatically indexes black as the masking color by default and generally does a better job of arranging an appropriate color pallete.
 

Blödsinn machen

cannon fodder
Dec 4, 2001
68
0
0
Switzerland
dwmade.stormpages.com
hey, thanks navboy.
your method sounds pretty failsafe, but with my luck, Photoshop will probably go postal on me and force a blackbody palette or something like that...

maybe I'll do the TGA way instead...
damn, why does everything have to be so complicated
 
grin, i haven't found anything yet about all this that *isn't* needlessly complicated ... Isn't that why we do it?

anyway, yeah, the Bright option sounds pretty good. The only thing i don't know about in my case would be that when possible i try to use the same color palette for related textures and i don't know if Bright will let you save and re-use palettes in that way or not. I also dont' know if forcing same palettes gets you any performance gain when it comes to models, it certainly does when you're talking about making textures for use on brushes in Unreal Tournament.

Maybe someone more knowledgeable can shed light on that?
 

Captain Kewl

I know kewl.
Feb 13, 2001
794
0
0
IN YOUR HOUSE
Visit site
If you wildcard a group of files for batch processing, Bright will force all files to use the same palette as the first file processed. I'm guessing the performance increase would apply for models as well... though it's a lot easier to not see an actor than it is to not see a wall, so it might be pretty negligible.

(DOES forcing palette for level textures really improve performance? I've never actually tried it and compared.)
 
It seems to help some ... My last map had a huge room with several interconnected pods hanging in it, so lots of surfaces in view at once, and initially i was using lots of very different textures. As i narrowed my texture choices and was able to use textures that in some cases used the same palettes i noticed about a 3-4 fps difference. Since i was already really pushing framerates in some places i considered this significant, not sure it it would be in many maps though.