Here's a menu/button script to track stroke exposure.
https://sites.google.com/site/synthsin/ ... ects=0&d=1
1. Create any shape with stroke exposure End Percentage animation.
2. Run the script.
It will create all the needed groups, reference, and animate follow path to track stroke exposure End Percentage. The "faux_camera" group can be used to animate the whole setup instead of using the camera.
If you change the stroke exposure animation, you can run the script again to update the tracking. Make changes to the original layer, which is set to hide in editing and not render.
*NEW* Track Stroke Exposure
Moderators: Víctor Paredes, Belgarath, slowtiger
- synthsin75
- Posts: 9968
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
*NEW* Track Stroke Exposure
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: *NEW* Track Stroke Exposure
Nice script, Wes, thank you for sharing!
I should mention that there is a nasty little bug in Moho that stroke exposure percentage is calculated differently then follow path percentage. This creates discrepancies, especially when the curve contains straight lines and sharp corners.
I once tried to make a layer script that would move a pencil along the stroke exposure, and the result was not really good because of that bug.
This is an illustration of the issue - see, it works perfectly for circles but totally fails on squares:
And this is an example made with your script:
I should mention that there is a nasty little bug in Moho that stroke exposure percentage is calculated differently then follow path percentage. This creates discrepancies, especially when the curve contains straight lines and sharp corners.
I once tried to make a layer script that would move a pencil along the stroke exposure, and the result was not really good because of that bug.
This is an illustration of the issue - see, it works perfectly for circles but totally fails on squares:
And this is an example made with your script:
________________________________________________________________________
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
- synthsin75
- Posts: 9968
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: *NEW* Track Stroke Exposure
Oh, yeah that is a pretty bad bug. Stroke exposure seems to interpolate between points according to curvature. That's strange. Exposure doesn't have any bezier keyframe handles either.
EDIT: M_Curve:GetPercentLocation(percent) doesn't even match the stroke's visual location, so this script might be as good as it's going to get for now.
EDIT: M_Curve:GetPercentLocation(percent) doesn't even match the stroke's visual location, so this script might be as good as it's going to get for now.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: *NEW* Track Stroke Exposure
Yeah, and this is a good example of a bug that needs to be fixed on the core application level and not on the interface level.synthsin75 wrote:EDIT: M_Curve:GetPercentLocation(percent) doesn't even match the stroke's visual location, so this script might be as good as it's going to get for now.
________________________________________________________________________
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
- synthsin75
- Posts: 9968
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: *NEW* Track Stroke Exposure
I've reported the problem.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
- synthsin75
- Posts: 9968
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: *NEW* Track Stroke Exposure
In the meantime, one thing that helps is to have less space between points on the curve. So using, Scripts>Draw>Split Curve can help the end result.
The discrepancy increases as the stroke has more ground to cover between points. It almost looks like there's a smooth interpolation from point to point, but a smaller distance is covered too quick for this to be apparent...like keyframes on the timeline.
The discrepancy increases as the stroke has more ground to cover between points. It almost looks like there's a smooth interpolation from point to point, but a smaller distance is covered too quick for this to be apparent...like keyframes on the timeline.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
- Víctor Paredes
- Site Admin
- Posts: 5658
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
Re: *NEW* Track Stroke Exposure
This is very interesting. Thanks, Wes!
Did you create it with a specific idea in mind? I'm trying to think where I could use it
Did you create it with a specific idea in mind? I'm trying to think where I could use it
Moho Product Manager
www.mohoanimation.com
Rigged animation supervisor in My father's dragon - Lead Moho artist in Wolfwalkers - Cartoon Saloon - My personal Youtube Channel
Re: *NEW* Track Stroke Exposure
To me, it looks like a perfect way of depicting birdseye view character`s tracking/following over some map or some closeup (tailoring or cutting some fabrics). Either way, some sort of extreme POV.
- synthsin75
- Posts: 9968
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: *NEW* Track Stroke Exposure
This: viewtopic.php?f=13&t=32559Víctor Paredes wrote:This is very interesting. Thanks, Wes!
Did you create it with a specific idea in mind? I'm trying to think where I could use it
But it could also be used to animate following a pen as it writes.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/