Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Using a Transparent Texture in Blender?

Discussion in 'Formats & External Tools' started by jtman562, Jul 22, 2011.

  1. jtman562

    jtman562

    Joined:
    Dec 11, 2010
    Posts:
    368
    So I'm trying to put a cloth texture on a plane in Blender. The cloth has holes and tears ad such that are transparent when you view the png file. But when I put it on the plane, the transparent parts are just the default grey material. I asked on the Blender forums but got no help.

    Any ideas?

    P.S.- I made the texture so I know it's a .png and everything.
     
  2. Redbeer

    Redbeer

    Joined:
    Nov 1, 2009
    Posts:
    402
    In the panel for Materials, it's the button that looks like a "red ball" next to the texture button that looks like a "checkered square", on the Properties window (the panel on the right in the default window setup), you need to check the box under Options that says "Face Textures Alpha". You also, as should be obvious, need to have your object selected for this to show up in the Properties window, since it's context sensitive.
    That should work, assuming you are using the 2.5+ versions (2.49 is in a different arrangement of the same basic panel), and it's not a bug, as I haven't tried doing texturing since the last update.
     
  3. jtman562

    jtman562

    Joined:
    Dec 11, 2010
    Posts:
    368
    That does nothing.
     
  4. Redbeer

    Redbeer

    Joined:
    Nov 1, 2009
    Posts:
    402
    So, I'm assuming you have it UV mapped and you can "physically" see the texture in the viewport on the object?
    If not that's many steps back and it's too late for a tutorial atm. :D

    However, if you do see that, then the other place where there is a transparency box is on the "object" properties.
    So, same properties panel, the button that looks like an orange cube, the section that says Display, check on Transparency, while at the same time keeping that transparency from Alpha checkbox from before.

    If that doesn't work, I'd guess it's not mapped right, something is missing in your alpha channel, or it's a bug.
    You could also try running it through the material nodes as well. I generally try to bypass using the properties panel once I have UV's setup and just use that.
     
  5. jtman562

    jtman562

    Joined:
    Dec 11, 2010
    Posts:
    368
    Well now I'm getting somewhere. Now instead of the grey default material the transparent part is just black. Any ideas?
     
  6. Redbeer

    Redbeer

    Joined:
    Nov 1, 2009
    Posts:
    402
    Well the black probably indicates that you're definitely in "texture" view, but to be sure, you have to have the Shading: in the menu that pops up when you press "n", the object must be set to GLSL or Texture Face, and the Textured Solid box needs to be checked.
    In the "texture" window under that same properties panel (red checkered square button), under Influence, you may have to turn on Alpha by checking that box.
    Also, in the Object Data, triangle that looks like edges button, again the properties panel, under Texture Face, make sure that the Transparency list box is set to alpha and that the box Tex is checked.
    That's all I have.
    It works here for me with those settings.
     
  7. jtman562

    jtman562

    Joined:
    Dec 11, 2010
    Posts:
    368

    Well nothing seems to work. But thanks for trying.
     
  8. Redbeer

    Redbeer

    Joined:
    Nov 1, 2009
    Posts:
    402
    Ok, one more.
    Under the Texture area of the Properties panel, the section that says Influence, try setting the list box that says Blend: to Multiply.

    Other than that, all I can figure is that you don't have a real alpha channel in the image, or don't have it UV mapped correctly.

    There's also the fact that the image will only display transparency in OBJECT mode, not in EDIT mode. In EDIT mode every face has a certain amount of shading.

    Here's a screenshot of the settings with a view of the 3D window that shows the alpha is working:



    Unfortunately I couldn't fit the Blend: listbox I set to Multiply in the screenshot, but it's just below in that Influence panel in the lower right corner of my screenshot.

    Here's the particular image I used to test (I nixed it from the web in a tutorial somewhere because I didn't have an PNG's with alpha that I can post).

     
  9. jtman562

    jtman562

    Joined:
    Dec 11, 2010
    Posts:
    368
    Still nothing. Thanks anyway.
     
  10. kerters

    kerters

    Joined:
    May 13, 2011
    Posts:
    164
    Last edited: Jul 22, 2011
  11. Redbeer

    Redbeer

    Joined:
    Nov 1, 2009
    Posts:
    402
    So my last guess is you're missing a box, the texture you have doesn't "really" have an alpha channel, or your video card doesn't support that display.

    Here's maybe a bit more help though: http://www.arsingenium.com/alphaexample.blend

    Since .blend files save all the settings and information in every file, you should be able to load up the blend file in blender, load your image into the texture panel and replace my texture with yours and assign it to the UV's for my plane in the UV window. If it still doesn't show up, that means your problem is either:
    a) Your video card doesn't support opengl transparency.
    b) Your texture doesn't have a real alpha channel in it.

    P.S.
    Actually, I forgot to pack the assets in my blend file, so "my" texture isn't there, but the settings and a placeholder for it still should be.
     
  12. osirisgothra

    osirisgothra

    Joined:
    Jun 10, 2014
    Posts:
    1
    Lets see, it finally worked for me after: setting influce to alpha 1.0 and mix to 'subtract' (texture) setting transparency checkbox (duh) and selecting 'Z transparency' (material editor). I didnt need to do anything else to get it other than edit my texture but it sounds like thats not the part you are having trouble with, are you just not getting transparent in the viewport or does this affect everything (viewport, render, material previews)? If it looks ok in render and not in material previews I would say you got to update the video hardware you have. It can be the most expensive, 5-fan, dual PCI-express, 16 lane HD video card in the world, but as soon as they release new specs for stuff like openGL, they become more useless than a cheap new 25$ card that can -- its the sad state of the world we live in, and i know that one well. Just dont buy a great card just before they update to OpenGL 4 hehe.
     
unityunity