The Source for Java Technology Collaboration

Home » java.net Forums » OpenJFX » Scene Graph

Thread: Using Blur Effect

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 3 - Last Post: Jan 14, 2008 12:48 PM by: campbell Threads: [ Previous | Next ]
ildella

Posts: 55
Using Blur Effect
Posted: Jan 10, 2008 11:39 AM
  Click to reply to this thread Reply

Hi.

I am essentially using scenegraph to recreate this: http://www.curious-creature.org/2007/08/01/blurred-background-for-dialogs-extreme-gui-makeover-2007/

I cannot find any doc/help on how to use the GaussianBlurEffect class.
The fact that accept a Effect in the constructur makes me confused...

Any tip? Thanks!

Toula Michael
Re: Using Blur Effect
Posted: Jan 11, 2008 8:35 AM   in response to: ildella
  Click to reply to this thread Reply

ildella,

I think Chris Campbell has an article in the works on scene graph
image effects.
The article should be posted on his blog : http://weblogs.java.net/
blog/campbell/. Stay tuned.
Chris, looking forward to read you again.

Mike

On 10 janv. 08, at 20:39, scenario@javadesktop.org wrote:

> Hi.
>
> I am essentially using scenegraph to recreate this: http://
> www.curious-creature.org/2007/08/01/blurred-background-for-dialogs-
> extreme-gui-makeover-2007/
>
> I cannot find any doc/help on how to use the GaussianBlurEffect class.
> The fact that accept a Effect in the constructur makes me confused...
>
> Any tip? Thanks!
> [Message sent by forum member 'ildella' (ildella)]
>
> http://forums.java.net/jive/thread.jspa?messageID=253261
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@scenegraph.dev.java.net
> For additional commands, e-mail: dev-help@scenegraph.dev.java.net
>

[att1.html]


campbell

Posts: 63
Re: Using Blur Effect
Posted: Jan 14, 2008 12:48 PM   in response to: Toula Michael
  Click to reply to this thread Reply

[Cross-posting between the dev list and the forum seems to be slow or down, so I'll cross-post my response from the dev list here...]

Wow, I didn't realize I could build up such suspense just by ignoring my blogging duties for so long. This next one had better be Pulitzer caliber or else my career is ruined...

Getting back to the original question (but first ignoring it slightly to explain the seemingly dismal state of, and lack of documentation for, the filter effects API in Scenario)... Part of the problem is that we have a fairly extensive set of small demos/sample apps that demonstrate various parts of the Scene Graph API, but sadly these weren't opened up at the time that Project Scene Graph was opened up. Fortunately, those will be released very very soon, and should be a help to folks looking for sample code.

Closer to the point, the "effect" package in the current API is just a minimal stub for a more sophisticated and powerful filter effects framework that has been under development for the past few months. In the meantime, that minimal stub hasn't seen any love (i.e., documentation or example code) because the new stuff is on the way. The new framework should be opened up in the coming days (docs and examples included), at which point I can unleash my overhyped tome.

Finally, to answer your question, if you do want to try the current GaussianBlur effect, you could do something like this:

SourceEffect source = new SourceEffect(true);
GaussianBlurEffect blur = new GaussianBlurEffect(10f, source);
SGEffect e = new SGEffect();
e.setEffect(blur);
SGShape foo = new SGShape();
...
e.setChild(foo);
...

The whole SourceEffect business is one of those non-obvious things to which Chet alludes that will be going away in the new API. Stay tuned.

Thanks,
Chris




On Jan 11, 2008, at 8:41 AM, Chet Haase wrote:
> Chris's blog should certainly help. Also, there's rumblings
> about trying to simplify some of the effects API. Much of the
> current scene graph API was written to get the basic functionality
> needed working (that is, to support the functionality needed
> by FX Script). Now that that is basically done and working,
> and now that we've had a chance to play with the APIs at the
> pure Java level, we're thinking about how to simplify some of
> the APIs.
>
> The FXNode classes are one attempt to simplify the
> APIs of the basic node elements, although more could be done
> at that level. The effects classes could also use a
> simplification pass.
>
> In any event, Chris has been doing significant work in this
> area and I'll leave it to him to talk about where it's at
> and where it's going in his highly-anticipated blog...
>
> Chet.

juyehara

Posts: 1
Re: Using Blur Effect
Posted: Jan 14, 2008 12:10 PM   in response to: ildella
  Click to reply to this thread Reply

I'm not particularly familiar with scene graphs in general, and I've just begun to look at scenario, so I don't know exactly why they designed the API this way....

You can create a working GaussianBlurEffect by doing the following:

new GaussianBlurEffect(blurRadius, new SourceEffect(true));




 XML java.net RSS