driving scale with point distance

   5868   5   2
User Avatar
Member
6 posts
Joined: 4月 2012
Offline
Hi all

I'm trying to drive the scale of copied boxes by the proximity of a circle. I've been at it for a few days and its driving me nuts.

I have gotten as far as having the translation of the inner circle to drive all of the boxes' scale in x & z, but I want the scale to be driven mutually exclusively by the circles proximity to each of them,

Here is an attached file with where i'm going wrong

any help?

Landin

Attachments:
circles closer.hipnc (67.7 KB)

User Avatar
Member
121 posts
Joined: 7月 2008
Offline
You can use the distance() expression to figure out the distance between two points. In the copy node I added a new variable called prox and added the following expression below. The expression calculates the distance between the centerpoint of the small circle to the corresponding point.

You were close.

Cheers

distance(
centroid(“../xform2”, D_X),
centroid(“../xform2”, D_Y),
centroid(“../xform2”, D_Z),
point(“../point1”, $PT, “P”, 0),
point(“../point1”, $PT, “P”, 1),
point(“../point1”, $PT, “P”, 2)
)

Attachments:
circles_closer_484_v2.hipnc (80.7 KB)

Available for new projects
User Avatar
Member
6 posts
Joined: 4月 2012
Offline
Hi,

I just wanted to say thank you for helping me. Here is what I ended up doing with the file.

Landin

Attachments:
circles_closer_484_v2_104.hipnc (114.8 KB)

User Avatar
Member
121 posts
Joined: 7月 2008
Offline
Your example reminds me of the pong game.
You can see the endless possibilities here right. You can copy objects to a point cloud and let that object react on an object flying trough that point cloud.

Well glad I could help.
Cheers Landin
Available for new projects
User Avatar
Member
6 posts
Joined: 4月 2012
Offline
Aye, it does remind me of pong, now that you mention it. It was to demonstrate a control solution for a touch pad screen.

I am very new to houdini. I have been learning as much as I can over the past 2.5 months. How long have you been using it?
User Avatar
Member
121 posts
Joined: 7月 2008
Offline
I use it on/off for 3 years now and keep learning new things everyday.
I really like working in Houdini, it's so flexible, but here in Belgium it's hell to find a job as a Houdini artist. Pity!

Good luck with the touch pad project.
Available for new projects
  • Quick Links