General Category > ASL Scripts

Old Magnet Tool

<< < (2/15) > >>

kreator:
Nice little script there Francesco, It works now,  might need another routine within the body to "repel" as its a bit hit and miss.


Francesco:
Thank you kreator, you gave me a good idea to further refine it, I'm on it and I'll post the result in a short while.

Francesco:
Here I am.

It came out quite a nice tool, please forgive me the autocelebration ;)

EDIT: I fixed the "all coords" part of the script and I have updated the zip file attached here. Details on the fix in this post.

WARNING: this script is experimental stuff and will make your cpu usage go up 100%, use this script at your own risk.

So then, here is the tutorial (well, sort of...):
http://francesco1978.altervista.org/magnet_tutorial.avi

and attached to this post there is a zip file containing the script, a project and four bitmaps.

I used the material of the magnet shape to switch between attraction and repulsion, and also to limit the coordinates influenced by the magnet. The bitmaps are used to clearly show the script mode used at each time.

The project contains all the materials used by the script and a flat face mesh to make some experiments if you like.

Sorry if it seems all a bit messy, in particular the video tutorial, but it was the first time I used wink to make one.

So then, take a look to the archive attached here below, opening the project file should automatically load the bitmaps too - assuming that you open the project file from its folder containing the bitmaps.

Some details in the scripts comments.

Happy anim8ing, feel free to ask if something isn't clear enough.

EDIT: Here are the instructions reported by the readme.txt file as well as by the script's comments:

Magnet Pseudo-Tool by Francesco

Requisites:
- work in object mode;
- there must be a mesh named "MAGNET";
- there must be a mesh named "mesh01";
- there must be one or more of the following materials:
    M_PULL, M_PULL_X, M_PULL_Y, M_PULL_Z
    M_PUSH, M_PUSH_X, M_PUSH_Y, M_PUSH_Z

Usage:
- apply one of these materials to the magnet (depending if you want it
    to attract or to repel the points of "mesh01", and depending on
    which coordinates you want to modify);
- start the script;
- move the magnet around your mesh to modify it;
- resize the magnet to change its range of action;
- change the material of the magnet (one of the above mentioned)
    to switch between attractive and repulsive magnet and to change
    the affected coordinates;

To stop the script (pick your choice, all of them work):
- change the magnet's material to a unused one (I use "M_NONE" for my ease);
- change one of the meshes' names;
- delete one of the meshes;

Hints:
- make your magnet a spherical one (a dodecahedron will be fine);
- make the M_ materials halfway transparent;
- work in flat shaded view;

IMPORTANT: DO NOT ROTATE THE MESH NAMED "mesh01", BECAUSE IT WILL
            MESS UP ALL THE SCRIPT'S EFFECT. You can translate it though,
            and you can freely rotate the magnet.

Kubajzz:
Great work Francesco!

Francesco:
Thanks Kubajzz, I wish I were good at using it too... maybe some modeller here can show its opportunities, although I admit it could be improved a lot...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version