PDA

View Full Version : Do I need a script for this??? Wire Perameters Question


zandernice
06-10-2004, 09:21 PM
Hello,

I have a sphere, and I want the radius of the sphere to get bigger as the distance between two dummys becomes greater.

I tried linking a measuring tape ends to the two dummys, and then wire the radius of the sphere to the tape length, but that didnt work because the tape length doesn't update the wire perameters link in realtime I think. Any Ideas? Do I need a script to make the tape work correctly?


Thanx in advance

Ls3D
06-10-2004, 11:06 PM
Does it need to be realtime? With motion capture controller?
I tried this (key framed) and got a Wire Controller Exception,.. I'm not that wire param savy so perhaps if you provide a sample file LF-Shade will tweak it for you ; )

Here is mine (136k). (http://www.ls3d.com/FTP/wirespheretranzrad.max)

-Shea

:bowdown:

zandernice
06-10-2004, 11:52 PM
Hi LS3d,

Thanks for posting up the max file and spending time on this little querk thats driving me crazy!!!

Your max file is as good as mine could be and explains what I want perfectly. Basically, as the sphere moves away, I want the radius to increase due to the fact that the tape has gotten longer. I would like it to be real time also.


Is this possible?

yoni-cohen
06-11-2004, 12:18 AM
try this:

use a position constraint on the sphere to the two dummies to keep it centered (if needed not a must)

press RMB on the radius and show in trackview

assign a script float to it with the following sintax:
---
**interactive updating based on...
dependson $dummy01 $dummy02
**measure distance...
total = distance $dummy01 $dummy02
**you want only the radius so use..
radius = total/2

works very fast from my tests.
you could make some sort of a hirarchy and then call the dummies using the this.parent I think but I am too tiered to test now..
3:20 in the morning and I got to get some sleep

night

zandernice
06-11-2004, 12:35 AM
Thanks yoni-cohen, Im trying what you said but its not doing anything really. Maybe Im missing something.....

Ls3D
06-11-2004, 06:04 AM
Yoni, when you wake up please upload the file.. (I can host, pm me if)

Because wire (and script) syntax can be tricky.

-Shea

yoni-cohen
06-11-2004, 09:17 AM
listen email me your uploader details and I`ll put it there for you.

yoni_4cohen@hotmail.com

the method I used isn`t going thru the wire parameters its a simple float script.

yoni-cohen
06-11-2004, 09:33 AM
look in the picture its all about that little script controller no wire.
if you want to do it using wire you will have to put the distance measuring part in a custom atrribute and refer to it when wiring.

edit:
funny, the picture was too big but a zipped max file went under 20k so here you go!!

CGTalk Moderation
01-18-2006, 10:00 AM
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.