New Image Unit, new filters and mouse position…

Jean-Jacques Boutaud
Member
Posts: 1640
Joined: July 10th, 2006, 2:29 pm
Location: France
Contact:

Postby Jean-Jacques Boutaud » December 27th, 2011, 8:17 am

Hi Nick
I'm working on a new set of filters/effects for Image Tricks (and to tell the truth, for any application compatible with Image Units).
A big difference with already existing filters from BeLight Community is that all these new filters are wrapped in one Image Unit (like Noise Industries filters), so this makes updating, downloading, installing […] easier.
All these filters are ready to be released (I have to write short descriptions, yet) but I have a "small" problem with one of them:
- I wrote a "Gradient Overlay" filter that uses Apple built-in CILinearGradient filter.
I've added a way to select one blend mode and another way to adjust gradient intensity:
Image

Unlike the Image Tricks Linear Gradient from Lumine category:
Image
that provides a way to adjust the two points position with mouse cursor (as indicated by a custom icon at the right of its name), I can't find the way to get the same feature for my own Gradient Overlay filter.
Image

Note that the whole filter works perfectly as I can adjust points position with text fields.

An excerpt from Apple Core Image Reference Collection:
CILinearGradient
Generates a gradient that varies along a linear axis between two defined endpoints.
Parameters
inputPoint0
A CIVector class whose attribute type is CIAttributeTypePosition and whose display name is Point 1.
Default value: [0 0] Identity: (null)
inputPoint1
A CIVector class whose attribute type is CIAttributeTypePosition and whose display name is Point 2.
Default value: [200 200] Identity: (null)
inputColor0
A CIColor class whose display name is Color 1.
inputColor1
A CIColor class whose display name is Color 2.
(end of excerpt)

I've defined these two points this way:

Code: Select all

[NSDictionary dictionaryWithObjectsAndKeys:
             [CIVector vectorWithX:10.0 Y:10.0], kCIAttributeDefault,
             kCIAttributeTypePosition, kCIAttributeType,
             nil], @"inputPoint0",
           
            [NSDictionary dictionaryWithObjectsAndKeys:
             [CIVector vectorWithX:800.0 Y:10.0], kCIAttributeDefault,
             kCIAttributeTypePosition, kCIAttributeType,
             nil], @"inputPoint1",

Note that this works perfectly in other compatible applications (Fun House, Acorn, Pixelmator […]).
Each of these applications provides a way to adjust points position with mouse cursor.
Here's a screenshot from Pixelmator:
Image
(this is not easy to see, but at the top right corner of the panel, you can see the two starting points of the "ropes" that you can move with mouse)
So, where does this problem come?
Is it because this is a custom (external) filter?
I've noticed that one filter from Noise Industries (NI Perspective Tile) has the same problem:
- no way to adjust points position using mouse from IT
- works perfectly from Acorn/Pixelmator
Any idea?
JJBee, Président (à vie) du G.R.O.I.N.
Secrétaire général : iMac C2D 2.16GHz
Secrétaire adjoint : MacBook Pro 17" Unibody 3.06GHz
http://belightcommunity.free.fr/BeLight Community website
Nick
Member
Posts: 7241
Joined: July 6th, 2006, 3:13 am
Location: Odessa, Ukraine
Contact:

Postby Nick » December 27th, 2011, 10:13 am

Hi Jean-Jacques,

Can you send me please your new image unit?

The developers say that you just need to name the property responsible for coordinate as "inputPoint0".

I couldn't find "NI Perspective Tile" to test IT with it. The standard Perspective Tile with four points works normally on my computer.

Nick
Jean-Jacques Boutaud
Member
Posts: 1640
Joined: July 10th, 2006, 2:29 pm
Location: France
Contact:

Postby Jean-Jacques Boutaud » December 27th, 2011, 12:19 pm

Nick wrote:Hi Jean-Jacques,

Can you send me please your new image unit?

Done!
The developers say that you just need to name the property responsible for coordinate as "inputPoint0".

I have done that and this works perfectly with other applications compatible with image units.
I couldn't find "NI Perspective Tile" to test IT with it. The standard Perspective Tile with four points works normally on my computer.
Nick

All Noise Industries filters are installed with FxFactory.

All filters available by default in IT (built-in core image filters and BeLight ones) work differently than custom third party filter. These custom filters aren't arranged by categories (Stylize, Color Effect […]) but are all present in a new generic "OTHER FILTERS" category so, maybe, their interface isn't created the same way than built-in filters and some features aren't used (control points of type position).
Another example of this kind of filter is the NI Glass Lozenge filter that doesn't provided (in IT) a way to move points with the mouse unlike the built-in Glass Lozenge (Distortion category).
One more time, when used from Pixelmator/Acorn, one can move points with the mouse for these filters (NI Glass Lozenge, NI Perspective Tile, BC Gradient Overlay […].
JJBee, Président (à vie) du G.R.O.I.N.
Secrétaire général : iMac C2D 2.16GHz
Secrétaire adjoint : MacBook Pro 17" Unibody 3.06GHz
http://belightcommunity.free.fr/BeLight Community website
Nick
Member
Posts: 7241
Joined: July 6th, 2006, 3:13 am
Location: Odessa, Ukraine
Contact:

Postby Nick » December 28th, 2011, 4:58 am

Hi Jean-Jacques,

Thanks for sending me your image unit and technical details. On our computers, the handles responsible for coordinates don't work too in "3rd Party" filters. We'll try to fix this problem before the next update.

Nick
Jean-Jacques Boutaud
Member
Posts: 1640
Joined: July 10th, 2006, 2:29 pm
Location: France
Contact:

Postby Jean-Jacques Boutaud » December 29th, 2011, 7:03 am

Hi Nick
I should like to add two more "annoying" behaviors that could be fixed for a more user-friendly Image Tricks:

#1. There's no way to adjust color opacity from Apple Color panel in IT.
Same filters used from another applications have this feature (in fact, it is provided by applications not by filters).
Even if a color is not defined as kCIAttributeTypeOpaqueColor
(excerpt from BC DuoTone filter)

Code: Select all

[NSDictionary dictionaryWithObjectsAndKeys:
             [NSString stringWithFormat:@"High Color"], kCIAttributeDisplayName,
             kCIAttributeTypeOpaqueColor,       kCIAttributeType,
             [CIColor colorWithRed:1.00 green:1.00 blue:0.55], kCIAttributeDefault,
             nil], @"inputColor1",

like this is the case in BC Colorize filter

Code: Select all

[NSDictionary dictionaryWithObjectsAndKeys:
            [CIColor colorWithRed:0.682 green:0.354 blue:0.00 alpha:1.00], kCIAttributeDefault,
            nil],          @"inputColor",

there's no opacity slider in the Apple Color panel.
Being able to adjust opacity for colors is very important with some filters. As a simple example, this would provide a way to define gradient from (semi-)transparent color to full plain color: a really useful addition when used with BC Gradient Overlay filter.

#2. I think that you should "respect" order of controls in Image Units user interface.
You have decided to group controls by type (sliders then checkboxes then color wells then image wells…). From my point of view, this makes user interfaces more confused.

Example with BC Black And White filter (a custom core image filter that provides a way to make black and white image by mixing RGB channels then adding noise/grain then adjusting brightness/contrast then colorizing this BW image). This is the order of the different steps of this filter and the way these controls have been defined reflects this order:

- in Fun House:
Image
(some labels are cut but it is easy to see that RGB checkboxes are related to RGB sliders and it is easy to understand the different steps of this particular filter: mixing RGB channels, adjusting Gamma, adjusting Sharpness, adding and adjusting noise, adjusting overall brightness/contrast then, at last, optionally colorizing with custom defined color and intensity. Related controls (sliders/checkboxes) are grouped and so easier to use.

Here's the same filter from another application:
Image
(there're minor differences but the whole user interface is the same: same logical order)

Here's this filter in IT:
Image
See how checkboxes are pushed after sliders!

Don't forget that the wished order for these controls (from the developer point of view) is defined in the code of the filter (in the interface definition file '*censored*.h').

Saying that, I can understand that you have to rewrite the way you analyze and draw filters controls in IT and this will be a hard work.
JJBee, Président (à vie) du G.R.O.I.N.
Secrétaire général : iMac C2D 2.16GHz
Secrétaire adjoint : MacBook Pro 17" Unibody 3.06GHz
http://belightcommunity.free.fr/BeLight Community website
Nick
Member
Posts: 7241
Joined: July 6th, 2006, 3:13 am
Location: Odessa, Ukraine
Contact:

Postby Nick » December 30th, 2011, 7:20 am

Hi Jean-Jacques,

I've passed the two issues from your last posts to the developers. I hope that the first will be fixed quickly enough.

There is a workaround for the opacity control in the Colors pane. You need to open this pane for a filter or generator that supports opacity (for instance, Filters > Color > Bi-Color, or Generators > Gathering). Then select "BC DuoTone" and click on the color well control you wish to set up.

Nick
Jean-Jacques Boutaud
Member
Posts: 1640
Joined: July 10th, 2006, 2:29 pm
Location: France
Contact:

Postby Jean-Jacques Boutaud » December 30th, 2011, 4:19 pm

Thanks Nick
The workaround works perfectly. :^)
JJBee, Président (à vie) du G.R.O.I.N.
Secrétaire général : iMac C2D 2.16GHz
Secrétaire adjoint : MacBook Pro 17" Unibody 3.06GHz
http://belightcommunity.free.fr/BeLight Community website

Return to “Image Tricks”

Who is online

Users browsing this forum: No registered users and 4 guests