"This effect is primarily used along with its default black color for purposes of combining it with the original to create a shadow. It can also be used with a light color and combined with an original to create a glow effect."
... indicating that I can somehow combine/blend the result of the effect with the input. If that's the case, is there an example somewhere how I can do that?
But that's not very performant and doesn't work well with animations, so I'm looking for a better way to do it. I was hoping to reuse the strategy used to create DropShadow. If someone has a hint how that can be done, let me know...
Look at my article here: http://thierrywasyl.wordpress.com/2012/05/02/tweetwallfx-part-1/
I used the inputProperty for an effect to "chain effects" especially the DropShadow with the Reflection.
More info here: http://docs.oracle.com/javafx/2/visual_effects/jfxpub-visual_effects.htm
You refer to chaining of effects. That's not what I want. With a chain, the next effect will be applied to the result of the previous. The original is "lost".
For example if you apply the JavaFX Shadow Effect on a red Circle, you'll get a black Circular Shadow Shape as a result.
The JavaDoc seems to indicate that DropShadow does that internally and renders this resulting black circular shape. But it also knows how to render the original graphics, and it renders the red circle (the original graphic) on top of it. So the result is a red circle with a Shadow.
I don't see how I could do that with chaining...
I can mimic this Behaviour by storing a snapshot, then apply the effect and render the stored snapshot on top of it. But I guess that's far from optimal.
thanks for your reply. What I'm looking for is an explanation of what the JavaDoc of javafx.scene.effect.Shadow states:
"This effect is primarily used along with its default black color for purposes of *combining it with the original to create a shadow*. It can also be used with a light color and combined with an original to create a glow effect. The DropShadow effect is a utility effect which automatically combines this Shadow effect with an original graphic for ease of adding a shadow to an existing scene graph Node with a single effect."
Basically I want to know if "is primarily used" means that you -the JavaFX team- use it like that, or that we -the users of the API- can also use it like that. In case everyone can use it like that, an example of how I can do that (combine the effect with an original like DropShadow does it) would be helpful. As described above I found a way to do it (make a snapshot of the node and render that after applying the effect), but I hope that this JavaDoc indicates there's a better way.
What I finally would like to achieve is create a pseudo 3-D Shadow for a 2-D orthogonal TileEngine. Here's a link how it would look like with a DropShadow:
Obviously that is not what I want. So after reading the JavaDoc I assumed there might be a way to create my own Pseudo3DShadow using a similar approach to DropShadow. That's why I asked for clarification and an example.
I hope my question is easier to understand with this explanation. If not, please let me know, and I'll try to clarify.