# Maya Scale Field? Possible?

 10 October 2013 joshjunk20 New Member portfolio j o 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 share quote
 10 October 2013 thrivingartist Frequenter portfolio Jon Varner Lead 3d Artist The Texture Mill Mountain View, USA 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. share quote
 10 October 2013 ThE_JacO Cultist   portfolio CGConnect Member Raffaele Fragapane Performance Technology Supervisor Animal Logic Sydney, Australia 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 share quote
 10 October 2013 thrivingartist Frequenter portfolio Jon Varner Lead 3d Artist The Texture Mill Mountain View, USA 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); } share quote
 10 October 2013 joshjunk20 New Member portfolio j o 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? share quote
 10 October 2013 DeanFinnigan New Member Dean Finnigan Sydney, AU 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/ share quote
 10 October 2013 DeanFinnigan New Member Dean Finnigan Sydney, AU 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/ share quote
 10 October 2013 antweiler Expert   Robert Kopf Senior 3D-Artist MBL Development Hamburg, Germany 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 share quote
 10 October 2013 joshjunk20 New Member portfolio j o 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? share quote
 10 October 2013 antweiler Expert   Robert Kopf Senior 3D-Artist MBL Development Hamburg, Germany No its only for intereaction, you have to select and key all cubes share quote
 10 October 2013 thrivingartist Frequenter portfolio Jon Varner Lead 3d Artist The Texture Mill Mountain View, USA 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. share quote
 11 November 2013 joshjunk20 New Member portfolio j o Originally Posted by thrivingartist: set the script to evaluate run each frame and key the objects. Is there a simple way to do this? share quote
 11 November 2013 Faux Expert portfolio Dee Mae Salis, GB http://forums.cgsociety.org/showthr...p?f=7&t=1075833 Are the ideas posted here any help? share quote
 11 November 2013 CGTalk Moderation Expert 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. share quote

 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 vBulletinCopyright ©2000 - 2006, Jelsoft Enterprises Ltd.