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 CLOSED
 
Thread Tools Search this Thread Display Modes
Old 10 October 2013   #1
Maya Scale Field? Possible?

Hey,

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
 
Old 10 October 2013   #2
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.
 
Old 10 October 2013   #3
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 http://www.cultofrig.com - Rigging from First Principles
 
Old 10 October 2013   #4
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);
   }
   
   
 
Old 10 October 2013   #5
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?
 
Old 10 October 2013   #6
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++)

http://www.soup-dev.com/
http://mash.mainframe.co.uk/
 
Old 10 October 2013   #7
my post didn't appear, but i mentioned you should check out mash nodes or the soup nodes

http://mash.mainframe.co.uk/
www.soup-dev.com/
 
Old 10 October 2013   #8
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
 
Old 10 October 2013   #9
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?
 
Old 10 October 2013   #10
No its only for intereaction, you have to select and key all cubes
 
Old 10 October 2013   #11
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.
 
Old 11 November 2013   #12
Originally Posted by thrivingartist: set the script to evaluate run each frame and key the objects.

Is there a simple way to do this?
 
Old 11 November 2013   #13
http://forums.cgsociety.org/showthr...p?f=7&t=1075833

Are the ideas posted here any help?
 
Old 11 November 2013   #14
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.
 
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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 08:57 PM.


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