PDA

View Full Version : Locking Vertex Translation


tropistic
03-12-2003, 08:20 PM
Symetrical modeling via an instance is a pain when those verts along the middle get off center. A simple script to select them and move em back is no problem, but any way to just lock off their translation on the x axis?

Jay

Octagon
03-12-2003, 09:18 PM
just some ideas that might work.

- key the points (model history need to be frozen)
channel box -> show cvs, key selected ...

- use expressions on the points. you need to write a little scipt that stores the correct values of the points and reapplies them each and every frame

- use a script job to execute your expression when selection changes etc. helps to get around the scene refresh for expression evaluation

- apply blendshape to the points in local or even global mode to lock them down.


edit: i tried to key individual points as typed above. wouldn't lock the points down for some reason. anyone know why? seems like there's no really quick solution for your (good) idea, is there?

matthias

wrend
03-13-2003, 06:07 AM
yuh, i know where you're comming from.
wish you could simply lock the attributes, like you can others.
expression is going to be the best static soln. :(

Octagon
03-16-2003, 04:42 PM
Originally posted by wrend
yuh, i know where you're comming from.
wish you could simply lock the attributes, like you can others.
expression is going to be the best static soln. :(

you could write a script that sets up expressions and a scriptJob to make that "static" solution work for all occasions where you would want to lock down specific points (much like Lockdown in soft3d).

You should try to write that script. It's not complicated, it's useful and you've got lots of people you can ask in writing that script here :)

If you don't write the script I'll do it and grab your idea ;)

matthias

wrend
03-18-2003, 04:47 AM
hey, ive written expressions for this before, but there are a couple of problems i have:

1. the 0 index vertex in polys seems to not like being controlled, try it! i mean to ask a|w about this sometime.

2. can do it w/o need to use scriptjob, but i want to find a method to localise expression calls to events concerning only the movement of the verts your freezing (a bbox for a pnt group, any ideas? hmm, perhaps just pipe those freezing pnts into a particle shape, then monitor movement of its centroid, that'll do it! for that matter, could probably do the same for a selectn of pnts and a polyMoveComp node). so bak to number 1 problem. just have to deal w a time update for this fella?

would love to hear more about your approach!

cheers.

dwalden74
03-18-2003, 09:33 AM
Just use CPS tool and there´s a button that does that for you in the UI.

:beer:
David

Octagon
03-18-2003, 09:25 PM
Originally posted by wrend
hey, ive written expressions for this before, but there are a couple of problems i have:

1. the 0 index vertex in polys seems to not like being controlled, try it! i mean to ask a|w about this sometime.

That's odd ...

2. can do it w/o need to use scriptjob, but i want to find a method to localise expression calls to events concerning only the movement of the verts your freezing (a bbox for a pnt group, any [...]

... maybe you should look at the CPS script and see how it's done there.
But I don't understand why you need to localize your expression (whatever that's supposed to mean ;) ). I mean, by building the expression in a script the expression would only effect points that are selected anyways. No need for localization :) But again, see how it's done in CPS. No need to reinvent the wheel.

Btw, thanx David for the hint! Didn't know about that function in CPS or have an outdated version perhaps?

cheers,
matthias
cheers. [/QUOTE]

Octagon
03-18-2003, 09:30 PM
rofl .... i'd love to see a preview post option. that prevent silly people like myself from quoting my own words ...

i hate html VB tags :cry:

wrend
03-19-2003, 12:12 AM
havent looked at dirk's method. but is that not just a snapper action, rather than a continuous freezer that prevent tweaks? not at my workstatn. all i ment by localise is to have the expression only evaluate in response to tweaks on just the froozen points, rather than a tweak anywhere. just for speed's sake. for your approach, you got a scriptJob watching for selction changes and testing whether your 'freezed points' are in it, and if so piping them into your freezer expression? im simply watching the shape's bbox in an expression, pulls evaluatn on change, writting the CPs to whatever value they were when running the script. but thats for changes anywhere on the shape, better if it only evaled for the specific points.

tropistic
03-19-2003, 12:34 AM
I don't think this function is 'native' to CPS, but there's an add on script here:

http://www.macvizion.com/Claydough/Docs/ConnectPolyShapeGeoNotes/CPSgeoNotes.html

(though I can't get through at the moment - the internet's slow today)

But yup, this is just a 'snapper' function, and I was definately meaning that 'continuous freeze' wrend's talking about. Way beyond my expertise to put together, but I'll happily test out anything anyone comes up with :)

Jay

tropistic
03-19-2003, 03:57 AM
Oops - took another look, and there is indeed a Snap function in CPS. But then it's still just a snap, not a freeze.

Just tried it out, and the Wings 3d Virtual Mirror has such a freeze...

Jay

wrend
03-19-2003, 04:00 PM
hey tropistic (likes to move?)
simple expression:

$sump = objectShape.bbxx;
objectShape[index].pnt.pntX = 0 // or existing position when applying freeze
// Y/Z for more frozen axes

nothing more!

but this evaluates every time any tweak, any where, occurs, and will slows your tweaking interactability for heavier models.

tropistic
03-19-2003, 07:22 PM
Thanks wrend. But, dumbing out here - what should the expression be hooked up to?

Jay

(when I chose the nic, I was thinking more of "2) an innate tendency to react in a definite manner to stimuli")

wrend
03-20-2003, 07:18 AM
objectShape is the shape of name of the shape who owns the points you want to freeze. the bbxx attribute is just the maximum x value of its bounding box. and umm,

objectShape[index].pnt.pntX = 0
is wrong, heh, should be:
objectShape.pnts[index].pntX = 0
...where index is the index of the vertex/point that you want to freeze on that shape.
have a bit more of an experiment, see how you go, be happy to help you out more if you still having troubles.

this is the grunt approach tho, ill play a bit more some point to see if i can narrow the evaluations down.

CGTalk Moderation
01-14-2006, 03:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.