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

    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
    • nbohr1more

      Trying to be productive on my down-time before Capcom releases Akuma and my son is constantly on my PC playing Street Fighter...
      · 1 reply
    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 4 replies
    • 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
×
×
  • Create New...