3D Studio Max AA Edge to White problem

Discussion in 'Game Development (Technical)' started by Grey Alien, Dec 3, 2006.

  1. Grey Alien

    Indie Author

    Joined:
    Nov 29, 2005
    Messages:
    2,797
    Likes Received:
    0
    Hi, it seems that when 3D studio Max anti-aliases the edges of a render on a transparent background, it don't anti-alias to "pure" transparent, it renders to transparent white. This is noticeable as a faint transparent white outline on the final output when saved as png. esp when viewed over a grey background.

    http://www.greyaliengames.com/hb/coin.png

    Here is a png with the problem (don't view it in IE, download it and view in photoshop or gimp and dropper the transparent bit, notice how the colour values are whiter than the edge of the coin which is gold.

    I tried defringe.exe on the images but it doesn't work.

    Any ideas please. I'm DESPERATE! Thanks
     
  2. oNyx

    Original Member

    Joined:
    Jul 26, 2004
    Messages:
    1,212
    Likes Received:
    0
    That topic popped up a while ago, but I cant find it via search.

    Check the rendering settings... there should be some pre multiply checkbox somewhere iirc... turn that off.
     
  3. svero

    Moderator Original Member Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    3,392
    Likes Received:
    6
    It's definitely called alpha pre-multiply in softimage. Not sure what the deal is in max.
     
  4. mpillit

    Original Member

    Joined:
    Sep 20, 2005
    Messages:
    24
    Likes Received:
    1
    Save the image as a Targa and uncheck Compress and Pre Multiplied Alpha. If you need to save as a .png then make your background color as close to the color of the object as possible. This way it will antialias over the color of the object instead of white and your halo will be much less noticeable.
     
    #4 mpillit, Dec 3, 2006
    Last edited: Dec 3, 2006
  5. Grey Alien

    Indie Author

    Joined:
    Nov 29, 2005
    Messages:
    2,797
    Likes Received:
    0
    OK good tips thanks, I'll pass these on to the artist. Any more tips?
     
  6. LilGames

    LilGames New Member

    Joined:
    Jul 5, 2006
    Messages:
    421
    Likes Received:
    0
    Follow Millpit's advice and then do a Batch-conversion in Photoshop
     
  7. MrQ

    MrQ New Member

    Joined:
    Oct 4, 2006
    Messages:
    198
    Likes Received:
    0
    It also helps to render out at twice the intended resolution and size and it back down in photoshop. I use Catmull rom render filter in 3dsmax which is sharper than area filter. (in your render options rollout)
     
  8. oNyx

    Original Member

    Joined:
    Jul 26, 2004
    Messages:
    1,212
    Likes Received:
    0
    Its nicer with ImageMagick:
    mogrify -format png *.tga
    (converts all tga files to png)

    Or pngout:
    for %i in (*.tga) do pngout "%i"
    (converts all tga files to png - very slow but good compression)

    [Irfanview is another option, but it doesn't handle alpha correctly.]

    However, I would keep em as TGAs, because loading em is faster and the installer would be smaller (LZMA is way better than deflate).
     
  9. Grey Alien

    Indie Author

    Joined:
    Nov 29, 2005
    Messages:
    2,797
    Likes Received:
    0
    OK more good advice, I'll look into it...why doesn't it have a built in option to export PNG anti-aliased to transparent instead of transparent white or black or am I being dumb here? i.e. is it only possible to anti-alias to a colour instead of nothing (pure transparent)?
     
  10. LilGames

    LilGames New Member

    Joined:
    Jul 5, 2006
    Messages:
    421
    Likes Received:
    0
    Yes, check your file format options in the 3DS Max File Save panel. There's an option to exclude alpha channel.
     
  11. Grey Alien

    Indie Author

    Joined:
    Nov 29, 2005
    Messages:
    2,797
    Likes Received:
    0
    the alpha channel is required just not the anti-alias to a colour (black or white) I wanted to anti-alias to pure transparent but maybe there is no such thing...in the end we used a similar colour background to the object colour.
     
  12. soniCron

    Indie Author

    Joined:
    May 4, 2005
    Messages:
    3,664
    Likes Received:
    0
    :confused: They already gave you instructions to render to full transparency. In fact, it always renders in full transparency. The discrepancy is when you save the file. You must save a TGA with "Pre-multiplied Alpha" turned off. Pre-multiplied alpha is the process in which they blend the background color and object colors giving you the artifacts you don't want. By turning it off, it saves the object in its full color in addition to an alpha mask.

    This is per the instructions above, and I don't see where the confusion lies. Could you please explain your problem a little more thoroughly, if this isn't helping?
     
  13. LilGames

    LilGames New Member

    Joined:
    Jul 5, 2006
    Messages:
    421
    Likes Received:
    0
    I understand his problem, but I don't understand why it's happening.
    I just check "Alpha" on, and it renders fine with no fringe coloration...
    :confused:
     
  14. mpillit

    Original Member

    Joined:
    Sep 20, 2005
    Messages:
    24
    Likes Received:
    1
    Actually thats not quite true.

    Try rendering a 50% opacity sphere with a checkered background. No matter what format you save as, the checker background will still show through the sphere. It wont render over true transparency (Max 7 anyway). I had a long discussion about this today with a guy I know and we were unable to get it to render anything over true transparency.

    If you know a way though, Im all ears!
     
  15. soniCron

    Indie Author

    Joined:
    May 4, 2005
    Messages:
    3,664
    Likes Received:
    0
    Appologies. I meant full edge transparencies.
     
  16. Grey Alien

    Indie Author

    Joined:
    Nov 29, 2005
    Messages:
    2,797
    Likes Received:
    0
    well this thread'll have to be saved for the future as we've done the final graphics now using the "pic a similar background" method.
     
  17. piXelicidio

    piXelicidio New Member

    Joined:
    Nov 19, 2008
    Messages:
    11
    Likes Received:
    0
    Hi there (10 years later)!

    This have been the fight of my life with 3ds Max and *.PNG until now using 2014, over this years I have found many solutions and recently wrote a post on my blog about it.

    The most simple solution for single image using Photoshop is:
    Go to Layer > Matting > Remove White|Black Matte (and you can make batch or process images script with it)

    Read more here: http://www.denysalmaral.com/2016/05/3ds-max-png-alpha-transparency-problem.html
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer