Clipping or masking an image
by Matt Veenstra · in Torque Game Builder · 01/25/2006 (8:04 am) · 4 replies
Hello,
I am not sure how to apply an irregular clipping region to an image, so then when the image is drawn to screen I only want what is in the region to draw. Not the entire rectangle.
Here is what I am trying to do. I have one nice alpha gradient gray image. I want to fill the center of the image with a nice colored image as the users score goes hight. (Very typical). But I want all of my beautiful alpha artwork to show through and be able to change the center fill as I go along. But it I can't have the fill draw outside of the irregular middle of my alpha channel that is layered over the fill color as I move it up.
Make sense?
I see from the search...
www.garagegames.com/mg/forums/result.thread.php?qt=17983
...has some information that might be useful...but I am only a 2D guy. If someone wants to paste that article I would appreciate it.
Thanks for some thoughts.
Matt Veenstra
I am not sure how to apply an irregular clipping region to an image, so then when the image is drawn to screen I only want what is in the region to draw. Not the entire rectangle.
Here is what I am trying to do. I have one nice alpha gradient gray image. I want to fill the center of the image with a nice colored image as the users score goes hight. (Very typical). But I want all of my beautiful alpha artwork to show through and be able to change the center fill as I go along. But it I can't have the fill draw outside of the irregular middle of my alpha channel that is layered over the fill color as I move it up.
Make sense?
I see from the search...
www.garagegames.com/mg/forums/result.thread.php?qt=17983
...has some information that might be useful...but I am only a 2D guy. If someone wants to paste that article I would appreciate it.
Thanks for some thoughts.
Matt Veenstra
#2
01/26/2006 (2:39 pm)
Good question, hope you get an answer, i'd love to hear also.
#3
www.garagegames.com/mg/forums/result.thread.php?qt=28481
Edit: maybe the above isn't exactly what you're looking for, but I hope it helps some.
01/27/2006 (1:21 am)
You'll find this thread interesting. :)www.garagegames.com/mg/forums/result.thread.php?qt=28481
Edit: maybe the above isn't exactly what you're looking for, but I hope it helps some.
#4
Btw, i was thinking about this, and I think i managed to achive some similar results with the blending modes. I havent played with it enough to figure out the exact stuff that can be done, but that might be an avenue of investigation.
01/27/2006 (11:56 pm)
Good thread Jason, thanks for the link.Btw, i was thinking about this, and I think i managed to achive some similar results with the blending modes. I havent played with it enough to figure out the exact stuff that can be done, but that might be an avenue of investigation.
Torque Owner Matt Veenstra
Thanks,
Matt Veenstra