Jump to content


Photo

Tape Measure For Fusion

Macros Analysis Gringo

  • Please log in to reply
15 replies to this topic

Poll: Tape Measure For Fusion (5 member(s) have cast votes)

What do you think about this tool?

  1. I find it totally useless (0 votes [0.00%])

    Percentage of vote: 0.00%

  2. It's useful because it shows vertical dimentions in the same scale as horizontal (2 votes [15.38%] - View)

    Percentage of vote: 15.38%

  3. It's useful because it displays the distance in pixels (4 votes [30.77%] - View)

    Percentage of vote: 30.77%

  4. I'd like additional Vertical Difference and Horizontal Difference fields (3 votes [23.08%] - View)

    Percentage of vote: 23.08%

  5. Add the possibility to measure angle between the line and X axis (4 votes [30.77%] - View)

    Percentage of vote: 30.77%

  6. I'd like to adjust Line Color seperately (0 votes [0.00%])

    Percentage of vote: 0.00%

  7. I'd like to have the units converter here (0 votes [0.00%])

    Percentage of vote: 0.00%

Vote Guests cannot vote

#1 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 28 September 2009 - 08:24 AM

Hello everyone!

This feature was requested in the Wishlist.
I thought to myself it would be nice to have and created a macro:
Attached File  TapeMeasure_v03-1.setting   9.97KB   45 downloads

To measure the distance, feed your image to this node's Input, then drag'n'drop TapeMeasure to a Display View.

The macro outputs two numbers: distance in Fusion units and distance in pixels.
1 Fusion Unit = Image Width.

To make it work faster, uncheck the Display Line checkbox.

Suggestions, bug reports and praise are appreciated Posted Image

#2 ChadCapeland

ChadCapeland

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,975 posts

Posted 28 September 2009 - 12:04 PM

Seems to assume a 1:1 pixel aspect ratio.

- Chad

#3 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 28 September 2009 - 12:18 PM

For Fusion generic units it considers pixel aspect, but for pixels, it measures actual pixels. For PAL 720x576 1.06(6):1 it'll display image width 720, not 768.

#4 ChadCapeland

ChadCapeland

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,975 posts

Posted 28 September 2009 - 12:46 PM

Ah, I see. Must have had something wrong in my first test.

But I don't see why Point Expression X can't just be dist(p1x,p1y,p2x,p2y).

- Chad

#5 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 28 September 2009 - 01:29 PM

For example, we have in HD 1920x1080 image.
If the distance was measured as dist(p1x,p1y,p2x,p2y), the horizontal size of the image would be 1 and the vertical one would be... 1.
It's handy in some ways, but it doesn't look correct in this case. That's why I divide height by image aspect.

Another example: we have anamorphic 2K (2048x3112, pixel aspect 1:0.5)...
The image will be displayed as a generic 1.316:1.
While its height in pixels will be 3112, its height relative to width will be 0.7598.
That's why I multiply height and width by pixel aspect.

Do you think I should add separate vertical and horizontal distance? It could be useful.
What about angle?

#6 ChadCapeland

ChadCapeland

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,975 posts

Posted 28 September 2009 - 02:08 PM

For example, we have in HD 1920x1080 image.
If the distance was measured as dist(p1x,p1y,p2x,p2y), the horizontal size of the image would be 1 and the vertical one would be... 1.
It's handy in some ways, but it doesn't look correct in this case. That's why I divide height by image aspect.

Another example: we have anamorphic 2K (2048x3112, pixel aspect 1:0.5)...
The image will be displayed as a generic 1.316:1.
While its height in pixels will be 3112, its height relative to width will be 0.7598.
That's why I multiply height and width by pixel aspect.

Do you think I should add separate vertical and horizontal distance? It could be useful.
What about angle?


Ah, I see. Makes sense...

I think the macro should expose the two distances as scalar values in the UI, so someone could use that in another tool, like a blur radius or something. So rather than reference "DistanceExp_1.PointResult.X" you would reference "TapeMeasure_1.Units" or "TapeMeasure_1.Pixels"

- Chad

#7 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 29 September 2009 - 12:54 AM

Good idea!
Worth implementing.

Does anybody know, is it possible to prevent a simple expression connected to a parameter from being displayed in a macro controls?

#8 ChadCapeland

ChadCapeland

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,975 posts

Posted 29 September 2009 - 09:19 AM

Good idea!
Worth implementing.

Does anybody know, is it possible to prevent a simple expression connected to a parameter from being displayed in a macro controls?


Intool scripts (which is what SimpleExpressions are) might not show up. I forget.

#9 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 06 August 2011 - 11:18 AM

So, here is a new version!
http://vfxpedia.com/...ure_v05.setting

As Chad suggested, now all the measured data are displayed in the controls as separate parameters which can be published or accessed from expressions of other tools.
Now you can also see the distances in X and Y directions separately and get the angle between the measuring line and the X axis.
The interface is now more ordered.

Posted Image


Posted Image

Does anyone agree that it would be nice to add a pixels > Fusion units converter to this tool?
Could be useful, for example, if you want to create a line two pixels wide.
Then you enter "2" to the text field and in another field get the value for Border Width of your Polygon mask.

#10 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 06 August 2011 - 02:54 PM


Good idea!
Worth implementing.

Does anybody know, is it possible to prevent a simple expression connected to a parameter from being displayed in a macro controls?


Intool scripts (which is what SimpleExpressions are) might not show up. I forget.

The difference is that Frame Render Script, for example, runs only on the image refresh, whilst the Simple Expressions work interactively all the time.
Here is a new version with the pixels to Fu units converter:
http://vfxpedia.com/...ure_v06.setting

Posted Image

You can see that the expression at the bottom doesn't really look nice. But on the other hand, it works much better in this case.

#11 Tilt

Tilt

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 2,137 posts

Posted 07 August 2011 - 04:14 AM

Hi Gringo, the tool works but I get this error message in the console:

[string "StyledText=math.floor(DistanceExp.PointResu..."]:1: attempt to index field 'PointResult' (a nil value)



#12 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 07 August 2011 - 08:05 AM

Hi!
It doesn't display any errors in my Fu 6.14 64x.
The error you encounter comes from a string in the Frame Render Script which uses an expression modifier's point result.

By the way, this new version also displays the input image aspect:
http://www.vfxpedia....ure_v07.setting

Posted Image

#13 JUNE

JUNE

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 124 posts

Posted 03 January 2012 - 09:20 AM

address error

#14 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 04 January 2012 - 12:23 PM

Re-uploaded, thanks!

#15 JUNE

JUNE

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 124 posts

Posted 05 January 2012 - 04:20 AM

thanks





Also tagged with one or more of these keywords: Macros, Analysis, Gringo

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users