BVE: Transparency Help!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • twmetro
    New Member
    • Jul 2003
    • 12
    • Sunderland, Tyne and Wear, UK.

    #1

    BVE: Transparency Help!

    OK I've been trying to do some coding today but not getting far because of problems getting colours to go transparent. I've been trying to get the background colour of a sign to vanish leaving only the text and logo. I created to sign in Paint and originally used black as the background and put in the code for the object that the 'SetDecalTransparentColor' to '0, 0, 0'. This didn't work so I mixed a new background colour of Red 0, Green 0, and Blue 200. And changed the code and still no luck even after trying lots more colours and looking through other peoples folders to see how they did it. I assmume it's something very simple i'm not doing, but it is driving me to a point of insanity and I think PC parts will soon be flying out of my window!!! Any help would be greatly appreciated and I've compiled a screenshot of what I've done so you can see for yourselves where i've gone wrong.

    Thanks in advance

    Darren


  • Stooopid_person
    1500 Post Veteran
    • Nov 1999
    • 1592
    • Planet Stooopid.

    #2
    RE: Transparency Help!

    Is the texture size in squares of 2, e.g. the pizel size is 512x256, 128,64, 32x32, etc?

    And you'll have to make sure there is NO Anti-aliasing on the words first. But that does not affect whether the background becomes transparent or not so that's another problem.

    Comment

    • Mr Gizmo
      Member
      • May 2003
      • 97
      • .

      #3
      RE: Transparency Help!

      Stoopid

      Im surprised at you... the reason why its transparent is plainly obvious....

      Transparent colour should be..
      Blue 255
      Red 0
      Green 0

      Not 200 as you have set it!

      Set the colour to 255 and then it should become transparent.

      Comment

      • twmetro
        New Member
        • Jul 2003
        • 12
        • Sunderland, Tyne and Wear, UK.

        #4
        RE: Transparency Help!

        the size is 160x32 pixels is that what you mean?

        also what's this about 'Anti-aliasing'?

        Comment

        • twmetro
          New Member
          • Jul 2003
          • 12
          • Sunderland, Tyne and Wear, UK.

          #5
          RE: Transparency Help!

          OK forget my above post, i hadn't seen Mr Gizmo's reply then.
          Do you mean I just change the Transparency setting in the document to 255 or change the background colour to 255 too?

          Comment

          • Stooopid_person
            1500 Post Veteran
            • Nov 1999
            • 1592
            • Planet Stooopid.

            #6
            RE: Transparency Help!

            >the size is 160x32 pixels is that what you mean?

            Change 160 to 256 and you should have no problems. Or alternatively, you could shrink the size to 128.
            So make it 256x32 and make the extra 96x32 pixels transparent as well.
            But if you're making it to 128, maybe you can cut the top extra blue parts off.


            >Transparent colour should be..
            >Blue 255
            >Red 0
            >Green 0


            Not neccessary, I have an object which is 174,156,131 as transparent colour. The size is the problem, it ahs to be in squares of 2 which is not in his case as he has it has 160x32 which

            It's no use making it to 0,0,255 since in the objects file, you had specified it to be 0,0,200.

            Comment

            • twmetro
              New Member
              • Jul 2003
              • 12
              • Sunderland, Tyne and Wear, UK.

              #7
              RE: Transparency Help!

              changed it from 160 to 128 and hey presto problem solved, cheers Stooopid

              Comment

              • tof63
                Senior Member
                • Apr 2003
                • 392
                • Turin, Italy.

                #8
                RE: Transparency Help!

                >
                >Not neccessary, I have an object which is 174,156,131 as
                >transparent colour.
                >
                This unfortunately does not work with every gfx cards.

                I've experienced this with an object being in the FGC line: I darkened the texture for a tree and also the trasparent (0,0,255) whent darker (something like 44,11,200). To avoid modifying the texture again (it's much time consuming to pixelate aroud the leaves and I'had not still discovered that Paintshop allows to make this in an easier way), I set the properly new transparent color in the object's code and it worked perfectly on my computer, but a betatester found that the tree had the blue square around it.

                I'm not sure, but I think that for a full compatibility its better to choice for transparence only colors in which each code (for red green and blue) is only 0 - 64 - 128 - 255.

                Luigi Cartello


                Luigi Cartello

                http://bve.altervista.org

                Comment

                • ferrovipathe
                  Senior Member
                  • Apr 2003
                  • 169
                  • Paris, France.

                  #9
                  RE: Transparency Help!

                  >I'm not sure, but I think that for a full compatibility its
                  >better to choice for transparence only colors in which each
                  >code (for red green and blue) is only 0 - 64 - 128 - 255.
                  >
                  Do you mean 0 - 63 - 127 - 255 ? ($00-$3F-$7F-$FF)
                  In that case, I think that transparence full compatibility colors are:
                  $000000 : Black
                  $0000FF : Blue
                  $00FF00 : Green
                  $FF0000 : Red
                  $FFFF00 : Yellow
                  $FF00FF : Pink
                  $00FFFF : Cyan
                  $FFFFFF : White.

                  All the best.

                  Comment

                  • tof63
                    Senior Member
                    • Apr 2003
                    • 392
                    • Turin, Italy.

                    #10
                    RE: Transparency Help!

                    >Do you mean 0 - 63 - 127 - 255 ? ($00-$3F-$7F-$FF)
                    >In that case, I think that transparence full compatibility
                    >colors are:
                    >$000000 : Black
                    >$0000FF : Blue
                    >$00FF00 : Green
                    >$FF0000 : Red
                    >$FFFF00 : Yellow
                    >$FF00FF : Pink
                    >$00FFFF : Cyan
                    >$FFFFFF : White.
                    >
                    These work by sure, but either do work as well: (132,132,132), (150,150,150) and (220,220,220) used in some Anthony Bowden's objects.

                    By sure those authors used to make more versions of the same route (day/night-summer/winther) have experienced more then me.

                    However, in my knowledge, an exact rule is still to be found.

                    Cheers,
                    Luigi Cartello


                    Luigi Cartello

                    http://bve.altervista.org

                    Comment

                    Working...