Masking effect ?
by Arsen Gnatkivskyi · in Torque Game Builder · 07/31/2007 (6:41 am) · 6 replies
Is that possible to create this masking effect with tgb (bottom of the page) ?
http://www.ipowerweb.com/iboost/build/software/flash/masking/10021b.htm
Thanks
http://www.ipowerweb.com/iboost/build/software/flash/masking/10021b.htm
Thanks
#2
www.garagegames.com/mg/forums/result.thread.php?qt=63913
This is a good reference for blending in case you want to investigate.
www.garagegames.com/mg/forums/result.thread.php?qt=28444
08/03/2007 (9:15 am)
I can't open the file on that webpage, but from its description, it may be tricky to do in TGB. What version are you using? There is an example level called blending.t2d in version 1.1 that may be useful. Otherwise, there was a discussion on the private forums recently that concluded that certain types of masking might require you to work with the source code. If you own a copy of TGB, you can access that conversation here:www.garagegames.com/mg/forums/result.thread.php?qt=63913
This is a good reference for blending in case you want to investigate.
www.garagegames.com/mg/forums/result.thread.php?qt=28444
#3
I am owning of 1.5.1 pro.
blending.t2d is not what I need because the background is black, and I need other picture on background.

This is exactly what I need.
I saw in first link next:
is this really possible to don masking using stacked scenewindows ?
08/05/2007 (9:13 am)
Thanx for answer!I am owning of 1.5.1 pro.
blending.t2d is not what I need because the background is black, and I need other picture on background.

This is exactly what I need.I saw in first link next:
Quote: As far as I can tell, this would not be possible just using blend modes, although it might work to an extent by using stacked scenewindows.
is this really possible to don masking using stacked scenewindows ?
#4
Fake edit: I've been fiddling with blending and it might be possible to do something with scene windows, not sure, you'd have to just try it. You'd probably have three scenewindows/layers/etc. 1) The "spotlight" 2) what the spotlight sees 3) the area you want to show outside of the spotlight, the wood panel in your example.
First, you'd have an object like this:
[img]http://img.waffleimages.com/18e176a0d0debd3ffe1657761a0dd1a6f0bc8208/circleee.jpg[/img]
Then, you'd set the blending source/destination factors of the various layers or objects to see if you could...
1) have the black part of the spotlight block out the 2nd layer, but the white part be transparent (there are a few combinations, including source factor = DST_COLOR, destination factor = ONE_MINUS_DST_ALPHA.
2) have the white part of the spotlight block out the 3rd layer, but the black part of the object be transparent, be able to show this part
Hmm you might be able to have a couple of "spotlights," one that blocks out the proper stuff on the 2nd scene window and one that blocks out the proper stuff on the 3rd layer.
Anyway, just some ideas if you don't want to dig into the source code.
08/06/2007 (4:21 pm)
I doubt this is possible, although you could ask those in that thread who were working on coding a solution for some advice, or if they're going to release a resource.Fake edit: I've been fiddling with blending and it might be possible to do something with scene windows, not sure, you'd have to just try it. You'd probably have three scenewindows/layers/etc. 1) The "spotlight" 2) what the spotlight sees 3) the area you want to show outside of the spotlight, the wood panel in your example.
First, you'd have an object like this:
[img]http://img.waffleimages.com/18e176a0d0debd3ffe1657761a0dd1a6f0bc8208/circleee.jpg[/img]
Then, you'd set the blending source/destination factors of the various layers or objects to see if you could...
1) have the black part of the spotlight block out the 2nd layer, but the white part be transparent (there are a few combinations, including source factor = DST_COLOR, destination factor = ONE_MINUS_DST_ALPHA.
2) have the white part of the spotlight block out the 3rd layer, but the black part of the object be transparent, be able to show this part
Hmm you might be able to have a couple of "spotlights," one that blocks out the proper stuff on the 2nd scene window and one that blocks out the proper stuff on the 3rd layer.
Anyway, just some ideas if you don't want to dig into the source code.
#5
08/07/2007 (5:16 am)
Thanks! I will try.
#6
I wrote this up a while ago. I am not positive how to achieve that effect. It would take some thinking. I would, however, look at the blend equations/parameters, and see what input is required to generate the output you desire, if possible.
If all else fails, you could probably do some register combiner magic. I've never done that, though. It is one of those things that looks scarier than it is, though. (Not by much in the case of register combiners)
08/07/2007 (10:16 am)
tdn.garagegames.com/wiki/BlendingTutorialI wrote this up a while ago. I am not positive how to achieve that effect. It would take some thinking. I would, however, look at the blend equations/parameters, and see what input is required to generate the output you desire, if possible.
If all else fails, you could probably do some register combiner magic. I've never done that, though. It is one of those things that looks scarier than it is, though. (Not by much in the case of register combiners)
Torque Owner Arsen Gnatkivskyi