Page 1 of 1

Script idea for magnet mod: relax

Posted: Fri Aug 19, 2016 5:08 am
by funksmaname
Hey, just messing with mesh warp and thought it would be cool if there was a way to 'relax' magnet edits towards points position at a different frame (initially, frame 0 position, but maybe could be set by one of the timline markers or something?)

Similar to when you use the liquify tool in photoshop, you can 'relax' your edits so they aren't so extreme - strength could be pen pressure controlled too?

Just a passing thought, could be great for working with meshes... don't know how difficult it would be...?

Re: Script idea for magnet mod: relax

Posted: Tue Aug 23, 2016 2:21 pm
by chucky
Many uv editors for 3d use tools like relax to ease out overlaps and bunching. It would be a perfect magnet type addition to the moho toolset.

Re: Script idea for magnet mod: relax

Posted: Wed Aug 24, 2016 3:28 pm
by Breinmeester
I've modifications to the magnet tool on my to-do list. I don't fully grasp the idea yet. Can you explain a little further?

Re: Script idea for magnet mod: relax

Posted: Thu Aug 25, 2016 2:26 am
by funksmaname
w00t!

Well, say you smoosh some points about with the magnet tool, the only ways to unsmoosh them is either to continue using the magnet tool and pulling things back (often creating more of a smoosh than before), or copying their previous position from a key. What you might want to do is just 'relax' your smooshing - so by 'rubbing' an area with the magnet tool and a mod key the points slowly ease back to the position they had at the previous keyframe, you could then 'ease' different parts of your smoosh to get the effect you want with more control as you can target a small or big area to relax the movement...

hope this made more sense - please let me know if still confused and I'll try to simplify my explanation further (or record a video explanation)

Re: Script idea for magnet mod: relax

Posted: Thu Aug 25, 2016 2:36 am
by synthsin75
Personally, I think what we need is a value to control the magnet influence drop-off. We could then get sharper or more relaxed drop-off. Maybe that would help not get bunched points in the first place?

Re: Script idea for magnet mod: relax

Posted: Thu Aug 25, 2016 3:02 am
by chucky
Sure Wes, agreed but it's still nice to get out of problems when they occur. I thought I'd actually requested the relax feature months ago, or at least suggested somewhere in Lenny's or Mantis.
Aah here it was
viewtopic.php?f=18&t=29378&p=166216&hilit=mesh#p166216

Re: Script idea for magnet mod: relax

Posted: Fri Feb 10, 2017 4:33 pm
by dkwroot
This sounds like it would be really useful for warp cages. I have a rough idea about how to do this.

I think you would have to find the vector positions of every point on the previous keyframe. You would then subtract the current vector position of a point by it's previous vector position to get the position change (Vec_change).

When the user brushes over a point, the pen pressure should gradually add to a value 'D'. The value D will be clamped to a range of 0 to 1.

When the user lifts the pen, the program would calculate each vector position like this:
VecPos = VecPos - Vec_change * D

where VecPos = Current Position of a Vector, Vec_Change = the difference between the vectors current position and the previous keyframe position, D = pen strength

EDIT:
I created a relax points tool. It's not the magnet tool improvement you wanted, but it gets the job done. viewtopic.php?f=12&t=30542