Jump to content
The Dark Mod Forums

Wtf? Grey Border Around Transparencies


Springheel

Recommended Posts

I've spent an hour trying to do something that has been absolutely effortless in the past. I was trying to separate the parchment on the objectives.gui into a separate image, so I could apply the swirling background texture to it. For some reason, however, I can't seem to apply any graphic to the gui without a pale grey border appearing around it. :angry:

 

I've had no trouble adding graphics with transparencies before while working on the failure and success screens, so I can't figure out what's going on. Even a simple black box gives me a grey border.

post-9-1165175134_thumb.jpg

Link to comment
Share on other sites

It's just a .tga with a black square on a transparent background. It has the grey border if I point directly to it, or if I use the following material:

 

guis/assets/objectives/parchment

{

translucent

{

blend blend

map guis/assets/objectives/parchment

}

}

 

After some more experimenting, I found that it only seems to put the grey border around it if it is a very dark colour. When I tried a blue square, the border wasn't there. I don't understand why that would be, but I've been able to get what I needed working.

Link to comment
Share on other sites

  • 4 weeks later...

Ok, this is back to being a major pain in the ass again.

 

I'm trying to get our healthbar working, but I keep getting a 1px grey border around the graphics again.

 

All I'm doing is trying to add a graphic:

 

windowDef HealthBar

{

rect 286,469,107,15

matcolor 1, 1, 1, 1

background "guis/assets/hud/healthbar_metal2"

}

 

Nothing fancy, but for some reason I'm getting that stupid border again and I can't get rid of it. Making the image light coloured isn't an option this time.

 

The bar above the lightgem is what the PS image looks like, and the bar below is what it looks like in game. It's small, so you have to look closely, but there's clearly a grey line around the bars and it looks like crap.

post-9-1167611106_thumb.jpg

Link to comment
Share on other sites

If I had to make an uninformed guess I'd say that OpenGL is blending in pixels from "off the edge" of the image, which for some reason happens to be grey (or maybe white). This can be a tricky problem.

 

Is it possible to tell the GUI to only use part of a texture? If so, you could try adding a border of transparent pixels to the image, and then tell the GUI to only use the non-border part of the image (if that makes any sense).

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

What's strange is that I use exactly the same procedure to make all my images, and this happens to some of them and not others.

 

Why doesn't the lightgem have such a border around it? The two images seem exactly the same when loaded in PS. Frustrating.... :angry:

 

I've got a few ideas to try, but don't have time tonight, unfortunately.

Link to comment
Share on other sites

Good call SZ. The lightgem texture has power-of-two sizes, while the health bar textures don't. There's your problem Spring. :)

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

:huh: No, that's not it.

 

Oh, are you talking about the images on CVS? They're very old, and aren't the ones we're actually using. The images I'm working with are all done in powers of 2. If you don't use powers of 2 you'll get a blurry image, but I've never heard of getting a grey border.

Link to comment
Share on other sites

Oh, are you talking about the images on CVS? They're very old, and aren't the ones we're actually using.

Ah. I thought they looked different. :) Nevermind then.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

I've posted on D3W about this, because I've tried everything I can think of and nothing fixes it. :angry:

Link to comment
Share on other sites

  • 5 months later...

Well, that will teach me. I found a bit of a solution to the problem back then, but only posted the solution on the Recall to Hell forum, in an attempt to share. Now I have the same problem with the parchment guis and can't remember what the hell I did, and the RtH 'sharing' forum is gone. <_<

Link to comment
Share on other sites

Yep. I've become a total wiki convert recently. :)

 

In the meantime, I have to figure out how to solve this problem, yet again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...