Home Technical Talk

Alpha weirdness in Max 2010

polycounter lvl 19
Offline / Send Message
TorQue[MoD] polycounter lvl 19
(This problem was solved by Eric Chadwick and frubes in two different ways so I renamed the posting title so other people who run into this issue can find the solution. Basically you need to make sure the DIFFUSE map's "alpha source" is set to "none" or separate the opacity and diffisue maps into two different textures)

Hey all. Just upgraded to Max 2010 and I'm experiencing some weird rendering issues with alpha transparency for materials (tga) that I never experienced in 2009.

I've opened my project that I was working on in 2009 and now for some reason my transparencies all have this weird outline around them that wasn't there before. I added a copy of the alpha channel from Photoshop to the top of the render to show what it should look like. The grass plane should blend perfectly with the background but instead its got a lighter outline around the entire plane.

alpha_outline.jpg

They also don't look like the textures are rendering with as high quality as they used to. Anyone know what might be causing this?

Thanks!

Replies

  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    What colour is the background on your grass strip image? If it's white, then it's just mipmapping causing that effect (and you should fix it by changing the background colour of the grass strip).

    You can change the texture resolution in Customize -> Preferences -> Display Driver Settings menu. Change the "download texture size" and "background texture size" to the max, and also make sure "match bitmap size as closely as possible" is checked for each.
  • TorQue[MoD]
    Offline / Send Message
    TorQue[MoD] polycounter lvl 19
    The grass plane uses the exact same grass texture as in the background image. Even without a background (if I just use plain color) there's still a halo around the plane once its rendered. Its weird because it was seamless in Max 2009 and now all of a sudden in 2010 there's a halo.

    I tried changing the texture sizes in the graphics settings and it didn't make a difference. Any other ideas? I'm rendering with D3D 9.0
  • TorQue[MoD]
    Offline / Send Message
    TorQue[MoD] polycounter lvl 19
    No one else has any idea what might be causing this?
  • DarthNater
    Offline / Send Message
    DarthNater polycounter lvl 10
    Are you using an fx shader? Maybe there is some kind of rim light set on it? MoP pretty much said what I was thinking so that's the only other option I could see causing it...

    Graphics card drivers up to date?
  • Eric Chadwick
    You mentioned rendering... are you seeing this problem when you press the Render "teapot" icon, or do you only see it in the viewport?

    If you're rendering, it could be that the Diffuse bitmap has its Alpha Source set to Image Alpha, so it's pulling in some of the plain diffuse color from the material... setting it to None should solve this.
  • TorQue[MoD]
    Offline / Send Message
    TorQue[MoD] polycounter lvl 19
    Thanks for the replies everyone. This is when I render the image, not just in the viewport. In fact, in the viewport it looks fine. Its only when I render the scene that the outline appears. Its as if there's a new blur effect added by default when you render a scene in Max 2010 cause I've noticed that all of the textures look a lot less sharp than they did in 2009. In the render settings however, everything looks like it always does.

    There are no scene effects or anything else. I'm using the default 2010 settings with the default scan-line renderer.

    I did some more tests, with a completely new scene and found that regardless of having a scene background or not and regardless of whether the alpha map in the texture (photoshop) is a soft fade (feather) or a solid outline (single pixel) it still has a glow around the outside of the image when rendered.

    This alpha channel in Photoshop...
    alpha_sample01.jpg

    Gets these results in Max 2010:
    alpha_sample02.jpg

    Even with a solid outline for the alpha there's still a glow:
    alpha_sample03.jpg

    I also tried changing the Alpha Source to None and that only changed the way it displayed in the viewport.

    My current settings for the Opacity are as follows:
    alpha_settings.jpg

    This is really confusing.

    I just updated my graphics card drivers and this made no difference. I tried switching to OpenGL from Direct 3D and this also did not make a difference. This leads me to believe that its definitely a setting in max 2010 or maybe a change in the default scan-line renderer?
  • frubes
    it looks like your using the same texture for both the diffuse and opacity, ie the opacity is in the alpha of the diffuse texture?

    If thats the case try and save the alpha and the diffuse as two seperate textures. So you have a diffuse with no alpha, and the opacity map as a texture in its own right and load that into the opacity slot.

    If that doesn't work trying saving as something other than a tga. I believe there is a bug with .tga files and alphas but i dont know if it still applies to 2010.
  • TorQue[MoD]
    Offline / Send Message
    TorQue[MoD] polycounter lvl 19
    frubes you are my hero! I separated the diffuse and opacity channels to two jpeg files respectively and this fixed the problem! Wonder what happened to the tga support in Max 2010?

    Thanks to everyone for your help!

    (I'm changing the name of the post title so anyone else who has this issue can find it better in search results)
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    I think the problem was that you had your diffuse slot's Bitmap settings set to include the Alpha channel (Alpha Source should be set to "None" in the Diffuse slot's Bitmap).

    You only showed your settings for the Opacity Bitmap, which I think won't actually fix the problem you were seeing. Of course splitting them into two textures will work, but it should be possible to fix just by choosing the correct Alpha and RGB output settings for both the Diffuse and Opacity Bitmaps in the material editor.

    EricChadwick correctly diagnosed this, although I think you misinterpreted because you gave a screenshot of the Opacity map, not the Diffuse map, so I think you were looking at the wrong Bitmap settings.

    Should be useful info if you need to get this working in future (maybe try it again now just to make sure it works).
  • Piflik
    Offline / Send Message
    Piflik polycounter lvl 12
    Try changing the Alpha Source for the Map in the Diffuse Channel to 'None (Opaque)'. Or even better...don't use a Map with an Alpha Channel there :poly121:. The halo you're seeng is the Default Grey of the Material (if you change it to green it might be less noticable, nut it's still there) and Max behaved like that for ages...

    (Max handles the different Channels of a Material sequentially...the first thing to be computed is the Diffuse Channel, so with an Alpha Channel you'll get a Halo with the default color around your circle. Then the Opacity willl be added, and you have a semitransparent Halo, since the Opacity Map Cannot eliminate the default color of the Material. In case of your second circle, the one without any gradient, you might get away with deactivating the Texture Filtering, though I haven't tried it...)

    Edit: MoP...Great Minds think alike :poly142:
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Yeah, it's set up like that so you can use textures with alpha as "decals" - ie. use the cropping/placement/tiling values to just place a bitmap on a material, and show the base material underneath (eg. a textured TGA with alpha for a sticker applied on a procedural wooden base material).
    Means you can use the same UV coordinates for both without having to do a 2nd channel for the placement of the sticker - just place it through the Bitmap settings.
  • TorQue[MoD]
    Offline / Send Message
    TorQue[MoD] polycounter lvl 19
    MoP wrote: »
    I think the problem was that you had your diffuse slot's Bitmap settings set to include the Alpha channel (Alpha Source should be set to "None" in the Diffuse slot's Bitmap).

    EricChadwick correctly diagnosed this, although I think you misinterpreted because you gave a screenshot of the Opacity map, not the Diffuse map, so I think you were looking at the wrong Bitmap settings.

    You're absolutely right MoP, I DID misread Eric's post and changing the diffuse alpha to "none" did fix the problem. Its weird cause I've been using this method in max for years and its never been an issue until 2010. I guess its probably due to an improvement in the renderer because technically I should have run into this issue years ago :)

    Thank you guys so much for figuring this out.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Well, either you didn't notice it before, or you were doing something else differently, because as Piflik said, Max has done this for a long time, at least as long as I've been using it (since Max 2.5... which is quite a long time ago).

    Anyway, good that it's sorted out :)
  • Piflik
    Offline / Send Message
    Piflik polycounter lvl 12
    I just tested it with a no-gradient-Alpha, and I didn't get a Halo (Max2008 ) so maybe 2010 added some default texture blurring...would fit AD's marketing scheme...add stupid extras that make prettier Renders for people who don't know what they are doing...and hide any options to disable it... :poly142:
  • Eric Chadwick
    Cool, glad you/we worked it out. :)
Sign In or Register to comment.