Announcement

Collapse
No announcement yet.

Programmer in Trouble with Decals

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Programmer in Trouble with Decals

    Alright, right off the bat, I am COMPLETELY NOOB with graphics whatsoever. This is my first time even in this sub-section, so please excuse my noobiness, (and yes I did see the stupid 3dbuzz videos, they weren't much of a help with my issue) . I am pretty much a one man team right now, working on a survival game of mine, I got the scripts down (I am a programmer) and I like the way it is. I focus on my game mechanics first, but today I decided, well, let's add some polish to the game . So I am trying to make some cool decals materials to show off with my custom AI, kind of like ghost recon, when you tell your squad to move or fire, it puts a "decal" on the ground where they are going to go, that I what I am going for here So I have VERY minimal skills in graphics , etc. , so I made my 512x512 image for a player decal (that will be displayed underneath the player) in photoshop. The image is VERY simple, its a biohazard seen with a filter effect. It is ONE layer, with anything NOT the biohazard sign itself transparent. I saved this as a TARGA, same 512x512 image size. I went into the content browser, and I imported this texture, and it came up with a WHITE background in UDK, while the background in Photoshop is really that transparent checkerboard thing. So I know how to make simple materials, I right clicked, ,made a new decal material, selected my texture and made a texture sample. Sorry for the long story, but here is my problem...:

    I cannot get the white background to be transparent.

    I REALLY need just the green biohzard symbol to be opaque, just like in Photoshop, I need everything else to be transparent. I am 100% clueless how to do this, I just randomly tried wiring things everything in the Material Editor, and yes I did take the (white) ***, which I believe is the alpha and I put that into the opacity knob on the main node thingy. The material sphere thingy still is white behind the biohazard symbol. I would REALLY appreciate someone telling me the entire procedure of setting this up properly (hopefully using DIFFUSE instead of Emmission (I saw some people using emission) ). If you could possibly add me at pranavwowserver@hotmail.com on MSN, or just reply here , PM w/e, I really want to add some polish today to make it look good for a demo video . Thank You!

    -DONT MIND THE SIGNATURE - ROFL

    #2
    hm, stupid question: did you change the Blend Mode inside your decal material? To something different from BLEND_Opaque.
    For example BLEND_Translucent

    Comment


      #3
      Lol, its not a stupid question , its still a reply man, Cant be anything stupider than what i would ask in the field of graphics, but answering your question, I tried everything, I changed all the blend modes, the Phong or w/e, different wiring, nothing seems to work, I just dont get it I might need help on MSN

      Comment


        #4
        I don't have msn, but a picture could be helpful for this problem...

        Comment


          #5
          You will need to export the texture as Targa 32 bit to retain the alpha channel information. When you import it into the editor and look at it's properties, it should say "Format : DXT5". If it says DXT1, you've exported it as 24 bit.

          Create your DecalMaterial, plug the RGB (black) of your texture into the diffuse or emissive, and the alpha channel (white) into the Opacity Mask. Set your blend mode to BLEND_Masked.

          Comment


            #6
            I did everything like you said, I made sure I exported 32 bit, but it says DXT1. And I did the other steps, no change in results, thanks for the reply but it still didnt work. Do you know why it says DXT1 i KNOW for fact I exported 32 bit

            EDIT: It would take me some time to post images, plus the problem is pretty straight forward but if it gets to that point, the nI guess I have to. Thanks for the reply still, but I sitll need some help ;

            Comment


              #7
              OK, Try saving the file as a PSD and importing that, I think Targa's require you to make a separate Alpha Channel, rather than relying on photoshops transparency. If that fails try doing this :

              In photoshop, select the area you want to be transparent, go to the Channels Tab (next to layers) and click on the little arrow top right, choose "New Channel", a window will pop open, Name it Alpha 1, and choose "Selected Areas". Color should be Black and 100%. Click OK. Fill the area you want to be transparent with black and the area you want to be opaque to white. Reselect RGB in the Channels, turn off the alpha, and go back to the layers Tab. Save your file as Targa 32 bit and re-import.

              Comment


                #8
                The first option didnt work, I am now about to try the second: I will edit this post as soon as I do

                *EDIT* - I did EXACTLY like you said, I make the new Alpha 1 channel, I made the transparent areas black, I made the showable areas plain white in the alpha, I rexorted 3d bit, this time in the properties of the Texture2D it sais DXT5, I thought it would work. I plugged the RGB into diffuse, the Alpha (white) into the Opacity, set the Blend mode to BLEND_Masked and it STILL didnt work. Please help

                *EDIT* - NVM IT WORKED MAN THANK YOU SO MUCH!!!!! Only thing wrong was that instead of BLEND_Masked it shouldv'e been BLEND_Transluscent, I tested it ingame, and that white **** is all gone, THANK YOU SOO MUCH HAHAH

                Comment


                  #9
                  If you plug the alpha into the Diffuse/Emissive, do you see your black and white mask?

                  Btw, you should be plugging the Alpha into the OpacityMask.

                  Comment


                    #10
                    Answering your above question -

                    YES If the Blend mode is not transluscent
                    NO if the Blend mode IS transluscent , look at my above edit

                    Comment


                      #11
                      OK, good!

                      Yeah slight mix up there, I would normally use an Opacity Mask in that situation. : )

                      Comment


                        #12
                        Haha (wish I knew what that meant) thanks for the help in english though hehe, my graphics skills are horrible like I stated, my experience is all in programming

                        Comment

                        Working...
                        X