Maya Scale Field? Possible?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  10 October 2013
Maya Scale Field? Possible?


So let me try to describe what i am trying to achieve here. If you imagine a grid of cubes, i want to be able to scale them from a single point with a fall off. So in the centre of the say spherical 'field' the cubes would be very small, and the as the 'field' falls off, the cubes would scale up to their original size with a gradient.

If that makes any sense at all.

Any Ideas
  10 October 2013
I am not aware of a tool that will do this in maya. But should be easy enough to script. You could use the script to compare the location of each object to a central location. From there you could could then take that information to determine how large the object should be. If I have time later I will try and put together an example for you.
  10 October 2013
Please do not use General Discussion for app or technique specific questions, use the pertinent forums instead.
Moving this to the maya forums for you.
Come, Join the Cult - Rigging from First Principles
  10 October 2013
Ok so here is a short script that will scale your objects depending on their distance from a locator. To use it simply create a locator and call it "Center_Position" then select the objects that you want to scale and run the script. To set how quickly things scale out from the center you just need to adjust the "rampValue".

  string $selectObjects[] = `ls -sl`;
   float $rampValue = .03;
   for ($eachObject in $selectObjects){
   float $difference[];
   float $locatorsPosition[] = `pointPosition Center_Position`;
   float $objectsPosition[] = `objectCenter $eachObject`;
   float $calculateDistance[];
   $calculateDistance[0] = $locatorsPosition[0] - $objectsPosition[0];
   $calculateDistance[1] = $locatorsPosition[1] - $objectsPosition[1];
   $calculateDistance[2] = $locatorsPosition[2] - $objectsPosition[2];
   float $distance = `mag <<$calculateDistance[0], $calculateDistance[1], $calculateDistance[2]>>`;
   setAttr ($eachObject + ".scale") ($distance * $rampValue) ($distance * $rampValue) ($distance * $rampValue);
  10 October 2013
Sorry Moderator. Thanks for that

Thanks for the reply thrivingartist that is an awesome script. Might have to work on a UI for that one that is more or less what i am after. However, that script would be amazing if there is a way to animate the central locator, moving its translation to create some pretty unique animations. Any idea on that?
  10 October 2013
soup can do that and also the new mash node toolkit
soup is free and there is a free version of mash but it's not as fast as the paid version (python vs c++)
  10 October 2013
my post didn't appear, but i mentioned you should check out mash nodes or the soup nodes
  10 October 2013
You can interactively scale your cubes by distance by using soft selection. Select your cube in the center, enable softselection, set falloff mode to "object" in the Tool Settings and do your scaling
  10 October 2013
Ok that is very cool i did not know you could do that

But is there a way to animate the centre so that as you move it around the corresponding objects will scale appropriately?
  10 October 2013
No its only for intereaction, you have to select and key all cubes
  10 October 2013
That was cool about the soft selection I did not know that you could do that either. But to your question about keying I figured this would be the case which is why I set it up to use the locator. Once you have animated the locator, set the script to evaluate run each frame and key the objects.

Last edited by thrivingartist : 10 October 2013 at 04:26 PM.
  11 November 2013
Originally Posted by thrivingartist: set the script to evaluate run each frame and key the objects.

Is there a simple way to do this?
  11 November 2013
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 07:07 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.