Author Topic: Transparency difficulties  (Read 550 times)

Legacy_Rubies

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +0/-0
Transparency difficulties
« on: March 08, 2011, 01:50:04 pm »


               I doubt there's a whole lot I can do about this, but I'd like to make sure before giving up entirely.

'Posted

The "health" bar is overlayed on top of the portrait, and is opaque, at the moment, due to the fact that if I make it transparent it simply punches through the portrait and looks highly unusual.

Is there a way I can render the portait opaque, and the HP bar transparent in order to see both?
               
               

               


                     Modifié par Rubies, 09 mars 2011 - 01:43 .
                     
                  


            

Legacy_Rubies

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +0/-0
Transparency difficulties
« Reply #1 on: March 09, 2011, 01:44:06 am »


               'Posted

And this is the annoying result of making the bar transparent.
               
               

               


                     Modifié par Rubies, 09 mars 2011 - 01:52 .
                     
                  


            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Transparency difficulties
« Reply #2 on: March 09, 2011, 02:49:25 pm »


               Rubies, I don't have an answer for you that isn't based on guesswork.  Is there any place I can download the models for that setup?  I'd be happy to look at it.  I'm not so sure I can make it work the way you want it to but I'm willing to give it a try.
               
               

               
            

Legacy_Rubies

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +0/-0
Transparency difficulties
« Reply #3 on: March 09, 2011, 03:50:50 pm »


               I'll post the files up later on! '<img'>

EDIT: http://dl.dropbox.co...530379/PTHP.rar
               
               

               


                     Modifié par Rubies, 09 mars 2011 - 04:10 .
                     
                  


            

Legacy_SHOVA

  • Hero Member
  • *****
  • Posts: 893
  • Karma: +0/-0
Transparency difficulties
« Reply #4 on: March 09, 2011, 04:08:55 pm »


               Just a guess, but it looks as if the mod, or perhaps your override folder is using some sort of alternate play screen icons/format. that is probably why its doing the health bar thing. Did you dl some new override? if not then are you using some hak for this mod? The only other thing it could be is, have you updated the game to 1.69?
               
               

               
            

Legacy_Khuzadrepa

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
Transparency difficulties
« Reply #5 on: March 09, 2011, 08:58:02 pm »


               I think Rubies is trying to create a new override to allow the health status to be displayed overlaying the portrait rather than to the side of it, but is hitting a snag trying to make the portrait show through the health color.  That's wasn't clear in the initial post. '<img'>
Anyway, I'm not sure if you can overlay images like that or not... that's a great idea, though!
               
               

               


                     Modifié par Khuzadrepa, 09 mars 2011 - 08:58 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Transparency difficulties
« Reply #6 on: March 09, 2011, 09:24:10 pm »


               I wonder if a thin health bar that doesn't cover the portrait would work. That way it would only obscure part of it.

Also... is this a damage bar? or a health bar?

It seems it would work best as a damage bar, meaning that as the character is more injured the bar covers more of the portrait. That way most of the time there is no issue about obscuring the portrait.
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Transparency difficulties
« Reply #7 on: March 09, 2011, 09:39:57 pm »


               Hrm, nothing I've tried has worked yet, from fooling around with the material alpha on the objects themselves (with and without a trimesh modifier) to the alpha for the red health bar in gui_boxes_ingame.tga

'Posted

Pictures above is the closest I've come so far, which involves modifying the alpha under the red bar in gui_boxes_ingame.tga, which is fairly easy to spot.  However, when you see that red line you're only looking at 2 pixels of a 4 pixel-wide image.  At least when you're looking at the alpha channel, you see a two pixel wide column, but one column on either side also "counts"  So you only see pixels 2 & 3, but when you modify the alpha it seems to take the cue from pixel 1's column.  So if you want the rest of it to be transparent, the first column will definitely have to black, I believe.  Problem is, even if you make the bar transparent...there portrait isn't displayed behind it.  To be clear, what you see in the picture above (alhpa channel-wise) is the first three columns/pixels filled in with black and the last something else like gray or white).

I'm going to be busy this evening but one thing I might try is flat-out assigning a red texture to that specific plane, because I doubt that trying to assign a TXI to gui_boxes_ingame.tga is going to result in anything but problems.  However...that could make a big problem with poison and disease coloring.

Which I just noticed seems to have a problem with the models you sent.  Can you confirm poison and disease are not displaying properly?  It looks like the method you're using is not just an enlarging of the health bar but an attempt to duplicate the effect without using the animesh that the bar normally uses?

Those questions aside for a moment, one other thing I might try is to see if I can duplicate another portrait mesh, make it transparent and move it up some amount so that while the health bar might still be opaque, a transparent portrait above that (which, in turn, is above an opaque portrait) might be a way to fake the desired effect with layers.  But for all I know, making a duplicate portrait models and getting the game to slap another copy of the portrait on it AND display it transparently is probably a longshot.  I toss those out in case you want to experiment with them before I have a chance to play with this more.
               
               

               


                     Modifié par OldTimeRadio, 09 mars 2011 - 09:57 .
                     
                  


            

Legacy_Rubies

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +0/-0
Transparency difficulties
« Reply #8 on: March 09, 2011, 10:16:52 pm »


               

Pictures above is the closest I've come so far, which involves modifying the alpha under the red bar in gui_boxes_ingame.tga, which is fairly easy to spot.  However, when you see that red line you're only looking at 2 pixels of a 4 pixel-wide image.  At least when you're looking at the alpha channel, you see a two pixel wide column, but one column on either side also "counts"  So you only see pixels 2 & 3, but when you modify the alpha it seems to take the cue from pixel 1's column.  So if you want the rest of it to be transparent, the first column will definitely have to black, I believe.  Problem is, even if you make the bar transparent...there portrait isn't displayed behind it.


Yeah, I've been testing almost the same thing, but I didn't know about the 1-pixel border on each side - that's really interesting!

The poison and disease use a completely different 3D model overlayed on top of the portrait, so the colour changing doesn't affect the bar, no. I'm afraid I cut those out of the model I sent because I didn't want to have to attach external files (I figured you could test it simply with the 2 mdls, rather than having to use these other textures! '<img'>)

I haven't tried the TXI editing and it's something I should really give an attempt to, whenever I get a tiny bit of time. '<img'>

I gave an attempt at trying to find out how NWN collects its portraits, but it uses a temporary texture file (replace01, or something?), so I'm not completely sure how workable it is.

Thanks a lot for taking a look, though. Much appreciated!

It seems it would work best as a damage bar, meaning that as the
character is more injured the bar covers more of the portrait. That way
most of the time there is no issue about obscuring the portrait.


You're right, the bar gradually fills up as you take damage, rather than being a red health bar to begin with. '<img'>

I think Rubies is trying to create a new override to allow the health
status to be displayed overlaying the portrait rather than to the side
of it, but is hitting a snag trying to make the portrait show through
the health color.  That's wasn't clear in the initial post. '<img'>


Absolutely right, thanks for the clarification! It's a complete GUI re-do and this is the last snag I've encountered when everything else is done! :<

EDIT: Quick video to help explain how it works!
http://www.xfire.com/video/42a1a8/
               
               

               


                     Modifié par Rubies, 09 mars 2011 - 10:48 .
                     
                  


            

Legacy_Calvinthesneak

  • Hero Member
  • *****
  • Posts: 1159
  • Karma: +0/-0
Transparency difficulties
« Reply #9 on: March 10, 2011, 05:48:13 am »


               Maybe talk to Amethyst Dragon, his gui override is pretty nice, a lot of transparency, it just might not do what you have in mind.
               
               

               
            

Legacy_Rubies

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +0/-0
Transparency difficulties
« Reply #10 on: March 12, 2011, 12:25:09 am »


               I definitely haven't explored anything more than a basic TXI edit so far (tried a few "blending" attempts), so it's something I should probably take a look at once I've finished the rest of the GUI textures.

Thanks for the suggestions from everyone so far, though. '<img'>
               
               

               
            

Legacy_Xenovant

  • Full Member
  • ***
  • Posts: 182
  • Karma: +0/-0
Transparency difficulties
« Reply #11 on: March 12, 2011, 03:45:30 am »


               

Rubies wrote...
I haven't tried the TXI editing and it's something I should really give an attempt to, whenever I get a tiny bit of time. '<img'>

I gave an attempt at trying to find out how NWN collects its portraits, but it uses a temporary texture file (replace01, or something?), so I'm not completely sure how workable it is.


 Yep, The model of the character portrait, life bar, etc. uses a temporary texture for the portrait but, in game, the object in the model that shows the portrait, uses the portrait of the character as its texture. In the conversation's window the portrait is replaced the same way.
               
               

               


                     Modifié par Xenovant, 12 mars 2011 - 01:29 .