Jump to: Board index » General » Fusion

Cant Move Pivot point

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

Marco Quaglia Faccio

  • Posts: 44
  • Joined: Sat Feb 18, 2017 6:49 am

Cant Move Pivot point

PostSat Mar 21, 2020 5:22 am

Hello,

After i imported a SVG file i notice that the pivot point of the Circle are all in the center of the composition.
I will like to move the pivot point of each circle (Polygon) at the center of the circle, but i cant find out how to do it.
In the forum somebody suggest to press M when drag the pivot but is not working.
Some Suggestion
move_pivit.jpg
move_pivit.jpg (28.61 KiB) Viewed 262 times



thanks
Marco
marco quaglia faccio
Offline

maarten

  • Posts: 9
  • Joined: Sat Dec 14, 2019 6:05 pm
  • Real Name: Maarten de Haas

Re: Cant Move Pivot point

PostSat Mar 21, 2020 10:25 am

+1
Having the same question. It doesn't seem to be possible the way the importer is build now. I've tried to add a transform on a part inside the svg group in Fusion, but that destroys the masking.
Offline
User avatar

Bryan Ray

  • Posts: 1345
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Cant Move Pivot point

PostSat Mar 21, 2020 2:58 pm

Unfortunately, the Polygon node doesn't have a Pivot control, so you'll have to use a Transform. The reason it destroys the masking is because only a single-channel Mask tool can plug into another Mask tool. When you add the Transform, it promotes the image to four-channel RGBA. The trick is to put a Bitmap node behind the Transform, which will strip away the RGB channels, allowing you to plug into the next node as before.

So you'll have your original Polygon from the SVG import -> Transform -> Bitmap -> Next tool

You can then move the Pivot of the Transform to wherever you need it to go.

Moving the Center of a Polygon without moving the spline itself is an interesting problem, though. I think it can be scripted; I'll see if I can't bash something together.
Bryan Ray
http://www.bryanray.name
http://www.musevfx.com
Offline

Sander de Regt

  • Posts: 1582
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Cant Move Pivot point

PostSat Mar 21, 2020 3:26 pm

Bryan Ray wrote:Moving the Center of a Polygon without moving the spline itself is an interesting problem, though. I think it can be scripted; I'll see if I can't bash something together.

I thought there was a right-click and/or shortcut and/or script for that already somewhere.
I'll see if I can find it.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline
User avatar

Bryan Ray

  • Posts: 1345
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Cant Move Pivot point

PostSat Mar 21, 2020 3:36 pm

If you can, that would save me a few hours! :D
Bryan Ray
http://www.bryanray.name
http://www.musevfx.com
Offline

Sander de Regt

  • Posts: 1582
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Cant Move Pivot point

PostSat Mar 21, 2020 3:37 pm

Hold down 'm' while dragging the center will do this. It has been this way since at least 2013, because that's where I found it in my old Fusionlist archive. ;-)

You can relax now, Bryan.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline
User avatar

Bryan Ray

  • Posts: 1345
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Can't Move Pivot point

PostSat Mar 21, 2020 6:34 pm

Brilliant!

But if anyone should want to get the average of a polyline's points:

Code: Select all
points = tool:GetBezierPolyline(comp.CurrentTime).Value.Points
x = 0
y = 0

for i, pt in ipairs(points) do
    x = x + pt.X
    y = y + pt.Y
end

x = x + 0.5
y = y + 0.5
x = x/table.getn(points)
y = y/table.getn(points)
Last edited by Bryan Ray on Mon Mar 23, 2020 6:27 pm, edited 1 time in total.
Bryan Ray
http://www.bryanray.name
http://www.musevfx.com
Offline

Marco Quaglia Faccio

  • Posts: 44
  • Joined: Sat Feb 18, 2017 6:49 am

Re: Cant Move Pivot point

PostSun Mar 22, 2020 10:26 am

Sander de Regt wrote:Hold down 'm' while dragging the center will do this. It has been this way since at least 2013, because that's where I found it in my old Fusionlist archive. ;-)

You can relax now, Bryan.


Before i started this post I tried and tried again to press [m] while dragging but was not working.
Now yes is working, why i dont know.

thanks
marco
marco quaglia faccio
Offline

Marco Quaglia Faccio

  • Posts: 44
  • Joined: Sat Feb 18, 2017 6:49 am

Re: Can't Move Pivot point

PostMon Mar 23, 2020 5:44 am

Hi Bryan, how i can execute the below code.

Bryan Ray wrote:
Code: Select all
points = tool:GetBezierPolyline[comp.CurrentTime].Value.Points
x = 0
y = 0

for i, pt in ipairs(points) do
    x = x + pt.X
    y = y + pt.Y
end

x = x + 0.5
y = y + 0.5
x = x/table.getn(points)
y = y/table.getn(points)
marco quaglia faccio
Offline
User avatar

Bryan Ray

  • Posts: 1345
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Cant Move Pivot point

PostMon Mar 23, 2020 6:31 pm

Well, first you'd need to fix my syntax error. In the first line, I used square brackets where I needed parentheses. This is correct:

Code: Select all
points = tool:GetBezierPolyline(comp.CurrentTime).Value.Points
x = 0
y = 0

for i, pt in ipairs(points) do
    x = x + pt.X
    y = y + pt.Y
end

x = x + 0.5
y = y + 0.5
x = x/table.getn(points)
y = y/table.getn(points)


Assuming you have a Polygon tool in your comp called 'tool', you could just paste it into the Console. The variables x and y would then hold the coordinates for the geometric center of the polyline. But in this form, the code isn't very useful. It's just a fragment in case somebody else came along and wanted to use it as a starting point.
Bryan Ray
http://www.bryanray.name
http://www.musevfx.com

Return to Fusion

Who is online

Users browsing this forum: No registered users and 4 guests