User Tag List

Results 1 to 5 of 5

Thread: Alpha masks in animations

  1. #1
    No Products Registered

    Join Date
    Dec 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Alpha masks in animations

    Hey. Im prerendering 3d animations for my sprites and the 3d app auto creates a mask for transparency. I was wondering if an animation can use alpha channels for transparency as my animations will be around 40 frames, so going through each frame and editing the opacity would take a long time aswell as end up not being very accurate for the end result. So is it possible to use alpha channels for transparency in an animation for mmf2? Thanks in advance.

  2. #2
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Alpha masks in animations

    Yeah it is possible.
    MMF2 supports alpha channels (per-pixel transparency) for each image/frame/whatever you may want.
    If you have many frames you want to import at once, then name all files "SomeAnimation0001.png" or something like that and then import the first frame. I think MMF2 should ask you if you would like it to import the rest.

    Can your 3D renderer save as a PNG file with the alpha-mask saved as the alphachannel? That would make your process easier.

  3. #3
    No Products Registered

    Join Date
    Dec 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Alpha masks in animations

    yes it can save as png. after reading this i've realised the main cause of the problem. Even the alpha channels made from the render wouldnt work as it simply masks anything outside the outline of the actual image. The problem is that the outside of the image (im using a toon shader so the outside is a thick black outline)has grey pixels that blend from the solid black outline. Now this does make the image look smooth and less pixelated but as i said, once imported to mmf2 they stand out like a sore thumb on a background any other colour than white. The only option i can see from here is to go into every frame and edit out these grey parts pixel by pixel, frame by frame unless of course anyone here can throw some ideas my way. I've tried using the replace colour tool in photoshop, but as it makes the existing outline completeley black is also starts to slightly show some more pixels outside the outline. The other problem is im not sure if i can run the tool on all layers at the same time. Has anyone else here used the prerendering method for creating sprites for mmf? If so how did you get around these horrid white outlines? Thanks

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Tiles's Avatar
    Join Date
    Jun 2006
    Posts
    1,359
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Alpha masks in animations

    The almighty Halo problem. Even with Alpha Channel still there

    One trick is to choose a background colour that matches with the sprite. Or with the background in your game. When it's mainly grass then i would suggest green. It will still make trouble though. No matter what background colour you choose, the Halo is still there. Not this dramatic than with not using Alpha Channel, but visible enough. Besides the increased CPU Power needs because of the Alpha Channel one of the reasons why i have dropped Alpha Channel useage for now. You pay the better quality with the Halo Problem. I am back to simple Bitmaps.

    Well, some of the more advanced Rendersoftware has a feature to avoid the Halo by sharpen the outline. Better said, it grabs the sharp border from the not antialiased Rendering and replace the Antialiased (which makes the halo) Border by that. trueSpace for example has a so called Spriterender Plugin which gives the antialiased Sprite such a sharp border. Unfortunately a bit expensive. You have to buy a comlete Plugin Pack to own this plugin. Which was too much for me.

    That's why i made a little app in MMF for that a while ago, called AASpritesharpborder. Does nothing else than the Spriterender Plugin. Grabs the sharp border from the not antialiased renedering and puts it above the antialiased border of the antialias rendered picture. You need to render the sprite twice for that though. One rendering without Antialias, and one with Antialias. This method has also its limits and quirks. Espceially with fine structures and Bump Mapping. Then it can happen that you have another kind of halo around your sprite when the not antialiased picture looks too different from the one with Antialias. But shouldn't be a problem for you with your plain black border

    This method makes a stairs effect though. The border is from the picture without Antialias :P

    Well, you could try to use MMF Antialias to soften it then. Unfortunately current Antialias in MMF is just a Blur Effect. And even more resource eating than Alpha Channel ...

    Anyway, it may be worth a try for you.
    http://reinerstileset.4players.de/aa...arpborderE.htm

    AASpritesharpborder includes the *mfa file. Just in case that you want to modify it. It is Open Source.

  5. #5
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Alpha masks in animations

    Quote Originally Posted by Tinnysp1n
    yes it can save as png. after reading this i've realised the main cause of the problem. Even the alpha channels made from the render wouldnt work as it simply masks anything outside the outline of the actual image. The problem is that the outside of the image (im using a toon shader so the outside is a thick black outline)has grey pixels that blend from the solid black outline. Now this does make the image look smooth and less pixelated but as i said, once imported to mmf2 they stand out like a sore thumb on a background any other colour than white. The only option i can see from here is to go into every frame and edit out these grey parts pixel by pixel, frame by frame unless of course anyone here can throw some ideas my way. I've tried using the replace colour tool in photoshop, but as it makes the existing outline completeley black is also starts to slightly show some more pixels outside the outline. The other problem is im not sure if i can run the tool on all layers at the same time. Has anyone else here used the prerendering method for creating sprites for mmf? If so how did you get around these horrid white outlines? Thanks
    You're using Blender aren't you?

    If you are, and you are exporting with alpha channels, set the sky color to black 0,0,0. That works for me. I export to targa files though.

    EDIT: Just thought of something, you're not compressing the PNG files are you?

Similar Threads

  1. DateTime Difference & Masks
    By Blood_Wist in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 14th July 2010, 09:17 PM
  2. Collision Masks for every object?
    By Alves in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 17th January 2010, 10:53 AM
  3. Images And Masks?
    By Atom in forum Hardware Accelerated Runtime
    Replies: 6
    Last Post: 3rd September 2009, 02:06 PM
  4. Collision Masks?
    By Atherton in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 25th June 2009, 04:43 PM
  5. Alpha masks
    By uprize in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 11th February 2009, 10:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •