Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - NickE

Pages: 1 ... 8 9 [10] 11
136
ASL Scripts / Re: Script: Copy "Source" mesh to "Target" mesh
« on: June 26, 2008, 09:13:35 am »
Steve and everyone,
I will always write a command version and a parametric version, knowing that the parametric version will probably stop working at some point. With only ten parameters to work with, and larding all the points into a single shape, you are limited in what you can do in a parametric script.

137
ASL Scripts / Re: script request-copy along a spline
« on: June 25, 2008, 07:14:46 pm »
lynn22,

In those early scripts, I forgot to put error checking to insure that you actually have a mesh called "copytarget" and a spline (path) called "copypath".  In the case of the error you posted, it is caused by NOT having a mesh called "copytarget" present.  If I get time, I will post an updated version of that script with error checking.

138
ASL Scripts / Re: Script: Copy "Source" mesh to "Target" mesh
« on: June 25, 2008, 02:04:51 pm »
I have already started trying to figure out how to orient the copies along the normals of the mesh point.  Hopefully, I will have that figured out soon.  It should be fairly straightforward to scatter objects across the faces.  I'll look into it.

139
ASL Scripts / Script: Copy "Source" mesh to "Target" mesh
« on: June 25, 2008, 01:35:42 pm »
Attached below are parametric and non-parametric versions of a script that maps copies a "source" mesh to a "target" mesh's points.  It is similar in capability to the Mongoose's awesome GrassGen application.

The parametric and command versions of the script are different in the following ways:
1)  The command version creates a separate mesh for each copy, while the parametric version is all one shape.
2)  The command version has one more parameter because parametric scripts are apparently limited to 10 parameters.

To use, you must have an object that contains a mesh named "source" and another mesh named "target".  If you are using the command (non-parametric) version, you must edit the script to adjust the parameters, then Scripts->Run Script File.  If you are using the parametric version, just click on the "Mesh Source to Target" icon, then click (or click-drag).

The parameters that can be changed are:

1) The fraction of target mesh points to use: 0 to 1
   Anything less than 1 uses a random distribution of points
2) Min and Max Copies per mesh point: 0 to 100
   In the parametric version, there is only the max parameter.  If max is greater than 1, it will produce a random number from 1 to max for each target mesh point.  In the command version, you can set the minimum.
3) Min and Max Scale: 0 to 100.
   If the min and max are not equal, it will produce a random distribution of scales between min and max.
4) Fixed rotation x,y,z:
   Rotates the copies a fixed amount
5) Variable rotation x,y,z
   This will produce a random rotation plus or minus half the amount entered added to the fixed rotation amount in (4).

The lowest y-point on the copy of "source" will correspond to the "target" mesh point.

Open up the scripts in a text editor to see further documentation.

If you are creating many copies, it may appear to be locked up.  The Debug Output console shows some stats during execution as well as dots showing progress.  You can look here to see if it is locked up or just bogged down with zillions of points and faces.

*** Remember to convert the parametric shape to a mesh before using it in any other objects, in figures, or scenes.  It is totally dependent on the original "source" and "target" objects while it remains a parametric shape.  As Steve stated: parametric scripts were never intended to work this way. ***

Attached are examples of the script in use.

Please let me know your feedback.

140
ASL Scripts / Re: Script Request: Chain Link Maker
« on: June 20, 2008, 01:26:18 pm »
csf,

Attached is the requested script.  I have simply converted Steve's spline.txt script to a parametric script.  It creates a tube along a spline that must be named "tubepath".  You can adjust the number of sides, the diameter, and the number of divisions.

*** Remember to convert the parametric shape to a mesh before using it
      in any other objects, in figures, or scenes.  It is totally dependent
      on the original "tubepath" spline while it remains
      a parametric shape.  As Steve stated: parametric scripts were never
      intended to work this way. ***

141
ASL Scripts / Re: script request-copy along a spline
« on: June 19, 2008, 11:15:29 pm »
Kreator,
I do not understand what you meant about objects following a path/Spline in scene mode.  Are you referring to their motion?

Could you be referring to the ability to draw a spline in object mode and then be able to use that as a controller in scene mode?  I think I could write a script that could write a controller script from a spline drawn in object mode that you could cut and paste into scene mode.  Very interesting idea. 

142
ASL Scripts / Re: Script Request: Chain Link Maker
« on: June 19, 2008, 11:10:29 pm »
Any script I post here is in the public domain.  It is not copyrighted or restricted in any way.  I do it because I love it and appreciate the opportunities and community that Steve has created with his very hard work.

If you have other script requests or ideas, I am happy to give it a try.

Steve, if you ever want help in developing the ASL (or any other part of Anim8or), I would love to help.

143
ASL Scripts / Re: Script Request: Chain Link Maker
« on: June 19, 2008, 12:26:31 am »
Siragin,
If you look at the topic about copy along a spline, there is a script that copies a generic mesh along a spline.  That would work for the hair application you are talking about.  My next script will probably be to simulate the functionality of the grassgen program that copies a generic mesh at the points of a second mesh with parameters for the number of copies per point, their scaling, and orientation.

144
ASL Scripts / Re: script request-copy along a spline
« on: June 18, 2008, 02:49:43 am »
Attached is the requested script.  It copies a mesh along a spline.  To use it, you must have a mesh called "copytarget" that will be copied.  You must also have a spline called "copypath".  After selecting the icon, click in the editor window to make the parametric shape of the copytarget copied along the copypath appear.  If you double-click on the parametric shape, the parameters will show:

Center parameter: 1=mesh's centroid follows spline and is the origin of rotation, 0=mesh's own coordinate system's origin follows the spline and is the origin of rotation.

X-Rotate, Y-Rotate, Z-Rotate: degrees of rotation to apply to the mesh before it follows the spline (0 to 360 degrees).

Spacing %:  Amount of spacing between copies of the mesh expressed as a multiple of the z-width of the mesh after rotation (0.001 to 10)

Note that the coordinate system of the spline has the z-axis along the spline so the mesh copies are spaced according to the z-width of the mesh after rotations are applied.

Also note that the mesh has its own coordinate system based on the values of its points regardless of how it is displayed in the editor window.  Even if you change the orientation and origin of the mesh, it retains its original point values.

*** Remember to convert the parametric shape to a mesh before using it in any other objects, in figures, or scenes.  It is totally dependent on the original "copytarget" mesh and "copypath" spline while it remains a parametric shape.  As Steve stated:  parametric scripts were never intended to work this way.  ***

One final note:  this script only works with Anim8or 0.97b (or later, when they arrive).

Please try it out and please let me know your feedback.


145
ASL Scripts / Re: Script to Generate Snail Shells
« on: June 18, 2008, 02:37:31 am »
Steve,
The initial post of this thread has two screen shots of the parameters used to create the shells shown in the render.  Did you want something different for the preset?

146
ASL Scripts / Re: script request-copy along a spline
« on: June 15, 2008, 10:36:05 pm »
This seems pretty straightforward, since it is only a variation on the chain_maker.  I don't think I understand everything you are saying, though.

"copypath" is the name of the spline you want to follow.
"copytarget" is what you want to copy along the spline.

What is the 10 and 1 for?  The 10 is replaced by what - a count of how many times it is copied?

How would you handle the orientation of copytarget?  What would copytarget's origin be in relation to copypath?  What is the distance between copies of copytarget?  These questions are important because you must calculate the size (length) of copytarget to space it along copypath.

Once these questions are answered, I can turn out the script pretty fast.

147
ASL Scripts / Re: ASL Parametric Script Questions
« on: June 14, 2008, 05:52:31 pm »
Steve,

Not entirely unpredictable...one must just be careful on how the script is used.

On another note, is there (or will there be) a function that will let one access the information in multiple objects in the project in the same manner as one can access the multiple shapes in an object?

148
ASL Scripts / Re: Script Request: Chain Link Maker
« on: June 13, 2008, 06:44:30 pm »
Attached are the new versions of the scripts.  The only change is the provision to have alternating links of different sizes.

There is a the parametric version and a command version.  They work the same as described earlier in this thread.

Enjoy!

149
ASL Scripts / Re: ASL Parametric Script Questions
« on: June 13, 2008, 11:54:48 am »
Steve,

I'm not sure I understand your last post.  It is entirely possible to access the other shapes in an object from a parametric script.  I do it in the parametric version of the chain_maker script.  It follows the splines that are renamed to "chainpathXX".  The only limitation was the inability to see what had been previously selected or access the coordinates of the mouse click that activated the script.

150
ASL Scripts / Re: Script to Generate Snail Shells
« on: June 13, 2008, 11:33:16 am »
I would be honored, but the honor is really yours, Steve, since all I did was slightly modify your spring script.

Pages: 1 ... 8 9 [10] 11