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 12
136
ASL Scripts / Re: script request-copy along a spline
« on: July 08, 2008, 10:32:10 am »
Please see the response to your other similar post:

http://www.anim8or.com/smf/index.php?topic=951.msg6950#msg6950

137
There is already a script that can do that.  Carefully read this topic (especially the last post):
http://www.anim8or.com/smf/index.php?topic=906.0

Be sure to use the final version of the script:
http://www.anim8or.com/smf/index.php?action=dlattach;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.

138
General Anim8or Forum / Re: Quaternion->Euler Angle -> Quaternion?
« on: July 06, 2008, 08:25:58 pm »
Anim8or uses regular quaternions.  One can convert quaternions to Euler angles readily.  The formulas shown on the Wikipedia page at http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles 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.



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

http://www.anim8or.com/smf/index.php?action=dlattach;topic=879.0;attach=1027


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

Parameters:
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".

Enjoy!

I'd love to hear your feedback and suggestions.





141
ASL Scripts / ASL's Future?
« on: June 26, 2008, 10:57:43 am »
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?

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

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

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

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

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

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

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

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

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


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