Verty
|
document date: 05..10. 2007
|
The script deals with vertex positions and selections.
download Verty general info
installation vertex positions
transfer coordinates
multiCopy
vert iterate in group vert iterate
selection sets
insert new verts
uninstall
rollouts contact me version
history
general
info
I wrote this set of scripted tools in order to help me creating morph
targets.
I've made this public in the hope it is usefule for other max users
too. If you do use my script, all I ask is that you give me some feedback.
Please e-mail me and let me know what you used it for.
- I started writing it under max 3.1, but now it only works for
max 4.x or later
- basemesh must be mesh or poly. NURBS not supported. Does not work
correctly with patches at the moment.
installation
Maybe after downloading the filename is 'Verty.mzp.zip' instead
of 'Verty.mzp'. Just rename it correctly.
Start Max4 or a later version.
Select 'run maxscript' from MAXscript in your main menu bar. Choose
"Verty.mzp".
You can find the script in the category 'Vertex Tools'.
When executing "Verty.mzp" a install-script is executed
automatically, allowing you to setup a menu hosted in the main menu
bar - containing the script.
To do so:
type in the text field "scripts" and press the 'add' button.
Now close the floating window. Choose 'Verty' from the menu 'scripts'
from your main menu bar.
vertex
positions
This was the first function I wrote in january 2001. With it, you
can copy and paste position coordinates from vertices.
If you select more than one vertex, the positions are interpolated.
example: You want to move a vertex
to the center-point betwenn two other vertices. First, select the
two vertices then press the XYZ button under the GETTERS section.
Then, select the vertex to be moved and press the XYZ button under
the SETTERS section.
I recently discovered that blur has published a little script similar
to this one .. I think it's called 'vertexpositions'.
I tried it today (23.mai) and I think my version offers more functionality.
Choose the coordinate system you want to use from the rollout.
Be careful when using local coordinates as they may not behave as
expected, it always uses then the local coordinates from the object
that the vertices belong to.
NOTE: I've ecountered strange behaviours when using the undo feature.
It seems that I broke something there. You may have to undo every
single stept the script did. I'll have a look at this later.
transfer
coordinates
Just something fo ease of use. To save you from having to copy
the spinner fields values to the type-in transformation fields,
it pastes the values one gets from the vertices to objects or their
pivots.
example:
In order to get the pivot in the middle of the selected vertices
... Hit 'xyz' under 'getters' in the 'vertex positions' rollout.
Check 'affect pivot only' and hit the 'xyz'-Button in the 'pos2obj'
rollout.
 
it uses the coordinate system one chooses from the drop down of
the 'vertex positions' rollout.
multiCopy UPDATED
This is the latest addition to my tool set. It allows you to copy
and paste several vertex positions.
example:
what is this??

well a simple egg with arms and legs (on the left). On the right
I already 'pushed' the vertices near
to the body. I had 2 morph targets. Then I recognized that I wanted
first the legs came out of the egg and later the arms.... uff ...
no chance .. redoing it all?
Ok, let's copy the right egg. Select the left one. Vertex sub-mode
... select the upper 'body'.
  
Open the rollout 'selection sets'. Save this selection under ...
ehr ..let's take slot 1. Check 'lock sets' as
sometimes I get confused and I press the button in the wrong row
... overwriting my selection set.
Go to the multiCopy rollout and press copy. Ignore the sentence
I wrote thinking of a prince song.
 
Leave sub-edit mode. Select the copied egg. Go to the vertex level.
Load the first selection set by pressing '1' under load in the 'selection
sets' rollout of verty. Go to the multiCopy rollout and press 'paste'.
Don't worry if your mesh moves ... it will come back after (wait
a bit!). It is a quick solution and I used a dirty trick. But for
me it worked.
Et voila. The third morph target. Using the same method I was
able to make another morph target quickly which had only legs without
arms.
Ok now the UPDATED part. It does now
have two new options which allows you to repeat the copy action.
I needed this to create morph targets for a progressive morph of
extrusions. Let show you it with some made up example:

Lets assume you want, for what ever reason, animate the growing
of an tentacle coming out of a body.You take a face and extrude
it along a path.
We will start by the end. It's important that the number of vertices
that defines the shapealong the path is constant. This is also why
I did not weld the end. In this example every step is defined by
6 vertices - so same for the end.

Now copy the 6 vertex positions from the before-last step of the
extrusion and paste them to the end. This can be done with what
multiCopy did before - no need of extra options. Now, try to repeat
this.
It does not work, because you got 6 target positions and 12 vertices
to move. MultiCopy will only copy the amount of vertices equal to
th amount of stored positions. If you check 'Deselect translated
verts', you can repeat the action and iterate manually through the
rest. But when you got 6 target positions and 120 or more vertices
to move, you will feel like playing a shoot-up game! 'Repeat throught
whole sel.'(-ection) will do this for you - copy all selectedf vertices
onto the target positions.

He he ... look at that scary gif animation ... flee !!! ;)
HINT: do not modify the topology of the extrusion or you will get
messy results.
vert
iterate in group
Here you can define a group of vertices where you can afterwards
select a following or previous vertex of the group.
example: You broke a vert. Now you
only want to move one of them and then weld the rest. Often to get
the right one, one had to move all the others until the right one
was found and the move them back ... I mean with the 'vertex position'
rollout this is doable too as one can copy the position where the
vertices were. But you can also select all the vertices, press 'define
group'. Now press '+' and move the vertex. If it's the wrong one,
cancel the move with a right click. Select the next one with '+'
until you found the right one.
vert
iterate
This allows you going throw all the vertices of the mesh.
There's no special reason I implemented this. I did this just for
fun. If this will ever be useful for you, please E-Mail me, I'd
like to know for what you used it.
Go to vertx submode. Select one vertex and press 'Get Nr.'. Now
you can use the spinner buttons in order to go to the next or previous
vertex of the mesh.
selection
sets
This allows you to save [temporarily] a vertex selection. You can
even apply this selection pattern on another mesh. This may not
work with meshes where the targetmesh has less vertices than the
sourcemesh.
If you fear pressing the wrong button ... overwriting your selections
sets, you can disable the 'save' button by checking 'lock sets'.
example: see multiCopy
It does now copy and paste the Soft-Selection parameters.
insert
new verts
Sometimes on forums people appear and have the following situation:
they have a couple of morph targets but later they found out, that
the original mesh needs modifcations. But now - how to transfer
these modifications to the morph targets.
This implementation was my idea how to solve this problem. Unfortunately
when I made some test after implementation I found a basic error
in my thoughts - in the concept. But for some cases it may help.
It simply looks for new vertices and paste them to the target-meshes
and then rebuild the topology by copying the edge and face information
of the source mesh.
One can check 'interpolate pos' which will average the position
of the vertex in relation to the vertices to which it's connected
to.
Unfortunately I forgot to copy and paste the Material IDs - but
if someone needs that I can implement it - shouldn't be complicated
- at least I hope so ;-)
And another issue: because of some Maxscript problems I wasn't
able to copy and paste
the UVW coordinates. The functions I need are declared as 'broken
in 4.2' ...
And another one: don't delete vertices!!! it only works if you
ADD vertices .... it won't work if you delete some.
I finally think a better approach to this kind of problem would
be something like a 'simultaneous' modelling script. A script
which copy every thing you do on one mesh to the other mesh (relatively).
Well ... this is at least my newest idea for this problem ;-)
! --- Works with poly objects only, at the moment --- !
uninstallation
In the rollout 'uninstall' you find some aide for removing the 'verty'
entry from a menu and the menu itself too.
In order to completely uninstall this macroscript you have to go
to the ui\macroscripts and delete the verty.mcr file and restart
3ds max.
rollouts
Simply uncheck the rollouts you don't need in order to save some
space.
contact
me
If this script is useful for you, you have improvement ideas, found
bugs, know a better - smarter code or other feedback - don't hesitate
mailing me ... please use 'Verty' in your subject.
dominique {at} boutin {dot} de
hints
You don't need always to go to the vertex sub modus. Check it out
with: multicopy/-paste and Selection-Sets.
bref
version history
| 1.46 |
5.10.2007 - add additional minor support for patch meshes ( still ignores the tangends) |
| 1.45 |
two options added to multiCopy
if trying to open mulitple instances of the script,
it will clos the older one
try-catch mechnisms added to 'vertex positions' buttons
|
|
1.4
|
'vertext positions' now has the option for coord systems.
pos2obj has been renamed to 'transfer coordinates'. It also
uses the coord sys from 'vertex positions'
'rollouts' allows one to save some pixel space on the screen
by deleting the rollouts one does not need.
'insert new verts' is a new function.
'selection sets' now support the Softselection Settings. |
|
1.2
|
pos2obj added
uninstall aide is reactivated. I can't remember why I put it
out of function ... tell me if you have problems
with it. |
|
0.93
|
orientation of meshes are now considered.
poly and mesh objects are now supported in multiCopy
it should now work with objects with modifiers too !!! :) |
|
1.1
|
multiCopy was added |
|
1.0
|
selections sets added. install aide added. vert iterate in
group finished implementing. vertex position interpolation implemented.
|
|
<1.0
|
vertex positions added. vert iterate added. |

|