Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  


An update to Anim8or, v1.00b, is available with a few bug fixes. Get your copy HERE. See the "ReadMe" file for details.

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 ... 7 8 [9] 10 11
Just thinking about it...You could just use the position script and not use the orientation script.  That way you can use the normal animation keyframing methods for controlling orientation.  Unless there is some repetitive rule for the orientation behavior you are wanting, scripting is no better than manual.

Or perhaps, I am still not exactly grasping what it is you are wanting to do.

Yes, I guessed that was what kreator meant by roll, but I guess I didn't explain myself very well either.  Do you want to be able to specify a static roll (z-axis rotation) that stays the same throughout the traverse of the path, or do you want to be able to set a continuous rolling "tumble" at some rate relative to the traverse of the path, or both, or something else entirely?

BTW, this is fun, conferring about script functionality.

I am not sure what you mean by roll.  Currently the script generates two controller scripts - one for position and the other for orientation.  The orientation is generated by reading the orientation of the spline.  Since the z-direction is along the spline, you effectively only get rotations about the x and y axes from the spline.  I could easily add a provision to generate rotations about the axes if I had a clearer idea of what you have in mind.
Do you want:
1) a static tilt relative to the spline?
2) a continuous rotation as it traverses the spline?
3) all the above, plus other stuff too?

If you can give me a vision of what you are looking for, I will sure attempt it.

Oh, and of course, you are very welcome!  I am glad to contribute to the greater glory of Anim8or!

ASL Scripts / Object Script that Generates Scene Controller Scripts
« on: July 10, 2008, 08:39:11 pm »
In response to a request from Kreator:

This script outputs to the console two controller scripts - one for position and the other for orientation - generated from reading the position and orientation components of a path.
This script requires Anim8or 0.97b or later.
The generated controller scripts must be cut and pasted from the console window (debug window) into the "Expression" areas of the controller of the scene element you wish to control.  NOTE:  this is necessary because Anim8or 0.97b broke the file export abilities.  Normally one would export these generated scripts to a text file, but the console is the only output currently available.  It is recommended that the properties of the console window be altered to allow more lines to be buffered.  Do do this:
1) Right-click on the title bar of the "Anim8or Debug Output" window, select "Properties"
2) On the "Layout" tab, increase the "Screen Buffer Size" to some large value (like 1000)
The number of frames that it should take to traverse the path must be placed into an integer attribute called "framesperpath" created in the object that contains the path.  If you want the path repeated continuously during the entire length of the the scene, an integer attribute called "repeat" must be created and set to 1 (set to 0 for no repeating).
Detailed instructions on usage:
1) Draw the path in a new object that you want followed
2) Go to Object->Attributes...
3) Select "New"
4) Type the name "framesperpath"
5) Select "Int" type
6) Type the number of frames for the path traversal
7) Select "New" again
8) Type the name "repeat"
9) Select "Int" type
10) Type either "1" for repeat or "0" for no repeat
11) Be sure the path is selected
12) Scripts->Run Scripts->path_to_controller.txt

The two scripts will be shown in the console window ready to be cut-and-pasted into the controller expression areas of the element you wish to follow the path.

Please let me know your feedback.

ASL Scripts / Re: script request-copy along a spline
« on: July 08, 2008, 02:32:10 pm »
Please see the response to your other similar post:

There is already a script that can do that.  Carefully read this topic (especially the last post):

Be sure to use the final version of the script:;topic=906.0;attach=1080

The previous versions posted in that topic do not do what you want.  The final version is not a parametric script, but is very flexible.  You can choose whether shapes are copied to just the points, just the faces, or both.

General Anim8or Forum / Re: Quaternion->Euler Angle -> Quaternion?
« on: July 07, 2008, 12:25:58 am »
Anim8or uses regular quaternions.  One can convert quaternions to Euler angles readily.  The formulas shown on the Wikipedia page at work.  In the nomenclature of the Wikipedia, the q0 is the same as w, q1 is x, etc.

If you need help writing a script to do the conversion, let me know.

ASL Scripts / Re: script request-copy along a spline
« on: July 05, 2008, 06:10:02 pm »
The file is available for download further up in this thread:;topic=879.0;attach=1027

ASL Scripts / Re: Script: Copy "Source" mesh to "Target" mesh
« on: June 27, 2008, 02:03:41 am »
Attached is an updated and expanded version of the script.  Following Steve's wishes, there is only a command version of the script.  To use the script, you must edit it with a text editor to change the parameters.  First, create a mesh named "target" to be the template where the "source" will be copied.  Create a mesh called "source" to be copied onto the "target" mesh.  The script is very highly documented, so you can always look at it in a text editor to see how it is constructed as well as the parameter explanations below.

1) Fixed rotations of the copies around the x, y, and z axes [xabsrot,yabsrot,zabsrot]
2) Variable rotations of the copies around the x, y, and z axes.  The variable rotations are random up to half the amount entered plus or minus the Fixed rotations in (1) above.[xrot,yrot,zrot]
3) Fraction of available copy positions to be used.  If you enter 1.0, all available copy positions are populated.  If you enter less than 1.0, that fraction of the points will be randomly distributed. [meshptfraction]
4) Number of copies per available copy position.  This can be a random number between a minimum and the maximum per copy position or it can always be the maximum number. [minusemesh,maxusemesh,usemeshrand]
5) Scale of each copy.  This can be fixed at some value or random between a minimum and maximum.[minscale,maxscale,scalerand]
6) An offset to allow you to "sink" the copy into the surface of the target.  It is entered as a fraction of the total y-axis length of the "source".[yoffsetfraction]
7) Set the original orientation of the copies to be either straight up and down along the y-axis or normal to the surface of the mesh at the copy position.[usenormals]
8) Set whether to use the unrotate "source" y minimum point as the attachment point to the "target" mesh or to use the new calculated y minimum point after all the rotations.[useorigmin]
9) Set the copy positions to be the vertices (mesh points) of the "target" mesh.[useverts]
10) Set the copy positions to be on the faces of the "target" mesh.  If this is set, there will the number of sides of the face of the "target" mesh plus one: one in the center, and one each between the center and the vertices of the face.[usefaces]
11) A random seed to alter the random elements above.  If you leave this the same, each time you run script you will get the same distribution of random numbers.[the integer in parenthesis of randseed]

To achieve the highest density for fur, hair, or grass, set the variable rotation, a relatively high number for maxusemesh, use the vertices and the faces.  If you have a curved surface for the "target", use normals to have the copies point directly away from the faces and vertices instead of straight "up".


I'd love to hear your feedback and suggestions.

ASL Scripts / ASL's Future?
« on: June 26, 2008, 02:57:43 pm »
Steve and us other grateful Anim8or users:

In my opinion, ASL promises to be the next great leap forward in functionality and usability for Anim8or.  I know I am (and I assume everyone else is) eager for the next updates in ASL.

I know I have been abusing the parametric scripting abilities by referencing other shapes within an object.  I did this in full knowledge that this was bad practice (and why I always do the command script version first).  Parametric versions of these scripts are desirable for one main reason: the ability to use the GUI to enter parameters and immediately see the results.  To me, this highlights the need for GUI interaction like dialog and message boxes with non-parametric scripts.

I was thinking this topic might be good place for everyone to post their wish list for ASL.  I am going to list my wish list in order of preference:

1) Object editor:  Dialog boxes for input
2) Object editor:  Ability to create and/or access other objects (including morph targets).  This would give the ability to simulate physics (cloth movement, fluid dynamics, endless other math based morphing) by creating a series of morph targets.
3) User defined functions and calling other scripts from current scripts passing variables
4) Object editor:  Message boxes (although being able to write to console in version 0.97b is awesome!)
5) ASL for scene mode, then sequence mode, then figure mode.

If you would be so kind, Steve, could you please give an update on the status of ASL?

ASL Scripts / Re: Script: Copy "Source" mesh to "Target" mesh
« on: June 26, 2008, 01:13:35 pm »
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.

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

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.

ASL Scripts / Re: Script: Copy "Source" mesh to "Target" mesh
« on: June 25, 2008, 06: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.

ASL Scripts / Script: Copy "Source" mesh to "Target" mesh
« on: June 25, 2008, 05: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.

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

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. ***

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