Anim8or Community

General Category => ASL Scripts => Topic started by: Kubajzz on May 05, 2008, 09:50:26 am

Title: Cage parametric shape
Post by: Kubajzz on May 05, 2008, 09:50:26 am
I got this idea about a week ago... And finally I found some time to write the script.

This script can create a cage - the parameters are size (X, Y, Z), number of divisions (X, Y, Z) and thickness of the 'wire'; the image below explains it all.

Important note
: if you set the divisions to high values (maximum allowed is 16), the mesh will become very complex; A cage with 16x16x16 divisions consists of 5408 points and it can take several seconds to build the model, depending on your CPU speed. It shouldn't be too long and Anim8or shouldn't crash/freeze, but you never know... Also the non-uniform scale tool (which is normally used to change the X, Y or Z size of the cage) works very slowly when the number of divisions is too high. Be patient please...

However the script should work without any noticeable delay unless the number of divisions gets close to the maximum.

Image and script file attached below. Enjoy!
Title: Re: Cage parametric shape
Post by: csf on May 07, 2008, 10:10:06 pm
Cool idea, What about an option to just make one wall. That will allow for even more options such as fencing.
Title: Re: Cage parametric shape
Post by: RnDr FOX on May 07, 2008, 10:38:56 pm
Love your scrips Kubajzz and congratulations on Steve adding them to the script page. I hate to ask but I do like csf's fence script idea and would be a great script. (Like I said sorry for sounding like Im   making request) 
Title: Re: Cage parametric shape
Post by: Kubajzz on May 08, 2008, 05:23:37 am
Hey, that's a good idea!

It shouldn't be too difficult to edit the script, I'll try it...

Thanks for the feedback  ;)
Title: Re: Cage parametric shape
Post by: Kubajzz on May 08, 2008, 07:40:07 am
Ok, it's here! It took about 15 minutes...

Cage script version 2

Thanks for the idea csf and RnDr FOX!

Changes:
- New parameter "Flat" - default is 0 (normal cage), enter 1 to create only one wall.
- When "Flat" is 1, the "Y-divisions" and "Y-size" parameters have no effect.
- The maximum number of divisions for X and Z axis is now 24 in order to create large fences; it's recommended to use such high values only when the "Flat" parameter is 1; 3D cage with so many divisions will slow Anim8or down.
Title: Re: Cage parametric shape
Post by: spicy on May 08, 2008, 12:01:56 pm
Good scipt Kubajzz, i wish I could do that!