The Daily Click ::. Forums ::. Klik Coding Help ::. Masks
 

Post Reply  Post Oekaki 
 

Posted By Message

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
23rd August, 2014 at 23/08/2014 15:08:00 -

Can MMF2 fade out an object gradually to transparent like a mask? Here's an example, see how the art fades at the bottom:

Image

It's not necessary, but it would really help if I could move the character art up and down inside MMF, to see how it fits best, without having to export each one with alpha channels each time.

Are masks possible?

Edited by -Liam-

 
Image

Tell 'em Babs is 'ere...

nim



Registered
  17/05/2002
Points
  7233
24th August, 2014 at 24/08/2014 08:17:17 -

I have very little experience with pixel shaders but there's one in MMF called "Hole" that does, technically, what you're looking for. The only problem is that it creates a circular hole rather than a horizontal gradient transparency, but I'm sure it would be possible to achieve that effect within MMF.

 
//

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
24th August, 2014 at 24/08/2014 23:35:09 -

Thanks nim. I've never, ever looked at pixel shaders - it's probably something I should experiment with. After all these years, there's still so much I don't know about MMF!

 
Image

Tell 'em Babs is 'ere...

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49566

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
25th August, 2014 at 25/08/2014 17:22:42 -

You don't need shaders for this. Use alpha channels.
If you export the image from your graphics program as a PNG you should be able to import it into mmf, alpha channels and all.

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
26th August, 2014 at 26/08/2014 16:35:16 -

It's really very, very easy to write shaders for this kind of thing - you should look into them a bit more...

eg. http://1drv.ms/1zyOydw
There are two parameters you can use to change the start and finish points of the gradient.

Edited by Sketchy

 
n/a

Pan-tosser



Registered
  24/10/2008
Points
  520

Has Donated, Thank You!
26th August, 2014 at 26/08/2014 16:55:49 -

You could also use a surface object and do a blit to it that changes the semi transparency.

 
https://www.facebook.com/nathon.brown.7
   

Post Reply



 



Advertisement

Worth A Click