So Brent, Rob,
With respect to a filter like scatter, is this as designed, to be implemented, a bug, or something I need to fix on my end?
Thanks!
Gullie
So Brent, Rob,
With respect to a filter like scatter, is this as designed, to be implemented, a bug, or something I need to fix on my end?
Thanks!
Gullie
There is one of two possible conditions. 1. Filters/Shaders are supposed to support Alpha channels and if it’s not, its a bug. 2. They don’t support alpha channels, in which chase this needs to be a feature request. Now this is a pair of conditions that could happen on any given filter. I’ve asked engineering to clarify their intent.
If its #1, then I’ll need you to file a bug report. If it’s #2, then there will need to be a feature request added to the feedback site. Once I hear back from Engineering, I’ll update this thread on how to proceed. Now if it’s a case that some are and dont, and some are not supposed to, I’ll work with the team to get the docs updated to clearly state which ones support alpha channels and which ones don’t.
And while we try to monitor the forums on the weekends, the engineer’s are on a more of a Monday-Friday work scheduled.
Rob
I appreciate your attention! Let me know…
Also and while I’m at it, is .alpha or transitionTo supposed to be supported? transitionTo and .aphla don’t seem to be working with some of the filters.
See my code:
THANKS!
--Function kills the current monster local function killMonster( transitionTime ) local tmr local counter = 0 local timeInc local intensityInc local function scatterObject( object ) if timeInc \* counter \< transitionTime then counter = counter + 1 object.fill.effect = "filter.scatter" object.fill.effect.intensity = intensityInc \* counter print( "Time, Intensity = " .. timeInc \* counter .. ", " .. intensityInc \* counter ) else Runtime:removeEventListener( tmr ) end end timeInc = ( transitionTime / 30 ) intensityInc = .5 / ( transitionTime / 30 ) hideMonsterHealth() transition.to( monsterObject, { time = transitionTime, alpha = 0 } ) ---CODE REMOVED AND REPLACED WITH ENTER FRAME LISTENER --monsterObject.fill.effect = "filter.scatter" --transition.to( monsterObject.fill.effect, { time = transitionTime, intensity = .5 } ) --Transition out monster tmr = Runtime:addEventListener( "enterFrame", function() return scatterObject( monsterObject ) end ) end
Hi @gullie667,
The “alpha” parameter in regards to a filter (not the alpha of the actual object) is only supported if the filter has that as one of its internal parameters. Only then can you point to that property and adjust it or transition it. A complete list of the filters and supported parameters is available here:
http://docs.coronalabs.com/guide/graphics/effects.html
Best regards,
Brent
Brent / Rob,
Just to be clear, in this specific case, I am trying to fade out (remove a monster that has been killed) a display object. A display object created with newImageRect, using an imageSheet, and being made from a .png with an embedded transparency.
The goal is to simultaneously:
A)fade out the monster by using a transitionTo and adjusting the alpha = 1 to 0 over 1 sec.
B)apply a filter.scatter and gradually increase the “intensity” parameter from 0 to .5 over 1 sec.
The “transitionTo / alpha” works fine alone.
When the filter.scatter effect is applied alone the object’s embedded transparency goes to a visible black. When the filter.scatter effect is applied in conjunction with the “transitionTo / alpha” the display object’s embedded transparency goes to a visible black and the “transitionTo / alpha” no longer functions.
The filter.scatter documentation mentions nothing of an alpha parameter.
So, the question: If the filter.scatter effect where to maintain the embedded .png’s transparaency the “transitonTo / alpha” effect would still be unsupported? That’s what you are saying right?
Thanks!
Hi @gullie667,
I asked the engineers if core alpha could be supported in the “scatter” filter or not.
In the meantime, would you be able to achieve a similar effect using the “dissolve” filter? This one respects core alpha in my testing.
Brent
I fixed the “scatter” filter transparency problem in the next daily build. Thanks for reporting this issue!
Thanks Guys
Thanks Guys