|
| deformation maps form mesh-warp tool |
 |
Tue, 08 Apr 2008 15:41:53 -040 |
(PSP8 + XP +SP2)
Is there a way to create a deformation map for the mesh warp tool
by writing / scripting / programming it?
as opposed to bringing up the mesh warp tool
and trying to jiggle all the lines one by one,
hoping they come out straight and in the intended proportions?
(This may or may not be a scripting question;
if not please direct me to the appropriate forum.)
|
| Post Reply
|
| Re: deformation maps form mesh-warp tool |
 |
Tue, 08 Apr 2008 16:58:25 -050 |
JustMe wrote:
>
> (PSP8 + XP +SP2)
>
> Is there a way to create a deformation map for the mesh warp tool
> by writing / scripting / programming it?
Are you asking how to create a script that writes a binary
deformation map? Why do you want to do this (if that's what
you want to do)?
> as opposed to bringing up the mesh warp tool
Why not just script the movement of the Mesh Warp tool? Use
File > Script > Start Recording, do a few node movements and
then apply the tool. Save the script and open it in Notepad
to see how it works. You can build your own script with its
own coordinates by editing that one or by analogy.
Scripting the Mesh Warp tool is much easier than trying to
reverse-engineer the format of the deformation map. I have a
strong suspicion that deformation maps work backwards to the
way most people expect in that a given pixel location contains
information not about the pixel at that point in the image but
about the pixel that was moved to the current pixel's location.
It's also quite possible that deformation maps don't have an
exact correspondence to image pixels, possibly because of the
use of subsampling. You also have to discover whether the map
has a floating point or integer format.
> and trying to jiggle all the lines one by one,
> hoping they come out straight and in the intended proportions?
There are a couple of modifiers you can use in Mesh Warp.
Pressing and holding Shift before dragging a node moves all the
nodes in the row or column as a straight line. (Whether it is
the row or column that moves is determined by the drag direction.)
Pressing and holding Ctrl causes all the nodes in a row or column
to move such that they lie on a smooth curve.
> (This may or may not be a scripting question;
> if not please direct me to the appropriate forum.)
Before you get into whether it is a scripting question or not
and if so, of what kind, think about where the mesh coordinates
are going to come from. Initially they are in your head - at
least as some kind of vague concept, if not as numbers. How do
you plan to get them out of your head and into something PSP
can use, say a file of numbers? This is the part where the work
will need to be done, I think, and the more specifically this
|
| Post Reply
|
| Re: deformation maps form mesh-warp tool |
 |
Tue, 08 Apr 2008 19:12:09 -040 |
Trev wrote:
> If you want them straight, Holding the shift key as you grab a node will
> move a entire line Vertically or horizontally together. The ctrl will move
> them as a curve. Hope that is of some help.
Well, yes, that is an improvement.
Almost seems like the sort of thing I ought to have been able to *guess*,
but I didn't.
Now I just need to figure out how to hold the spacing
among all the lines (all horizontal and/or all vertical)
to a mathematically-precise curve.
(Not sure yet if that will be linear or expnonential,
but something like that.)
|
| Post Reply
|
| Re: deformation maps form mesh-warp tool |
 |
Tue, 8 Apr 2008 21:01:35 +0100 |
JustMe wrote:
> (PSP8 + XP +SP2)
>
> Is there a way to create a deformation map for the mesh warp tool
> by writing / scripting / programming it?
>
> as opposed to bringing up the mesh warp tool
> and trying to jiggle all the lines one by one,
> hoping they come out straight and in the intended proportions?
>
> (This may or may not be a scripting question;
> if not please direct me to the appropriate forum.)
>
> Thanks.
If you want them straight, Holding the shift key as you grab a node will
move a entire line Vertically or horizontally together. The ctrl will move
them as a curve. Hope that is of some help
--
Trev
You can always tell a Yorkshire man,
But you can't tell him much.
|
| Post Reply
|
|
|
|
|
|
|
|
|
|