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"

Pages: 1 ... 3 4 [5]

Author Topic: Old Magnet Tool  (Read 76142 times)

Francesco

  • Full Member
  • ***
  • Posts: 182
    • View Profile
Re: Magnet Tool
« Reply #60 on: November 15, 2008, 02:37:39 pm »

I wish somebody suggested me to use vectors and stuff like the cross product and the dot product... I'm rewriting everything.

I've found a way to switch all the various modes without using materials (as I did in the first versions), without using that panel (which can be funny but not truly more than funny), and without using attributes.

Have a nice weekend.
Logged

hihosilver

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1294
    • View Profile
Re: Magnet Tool
« Reply #61 on: November 15, 2008, 04:40:33 pm »

Sweet!  I'm just now learning dot product and all that in pre-calc :p
It's good to know progress is being made on making this easier, and I'm sure it's a great learning opportunity for you as well!
Logged

Francesco

  • Full Member
  • ***
  • Posts: 182
    • View Profile
Re: Magnet Tool
« Reply #62 on: November 15, 2008, 05:19:14 pm »

You can bet on it, I'm learning a lot of new things.
Have good study hihosilver
Logged

Francesco

  • Full Member
  • ***
  • Posts: 182
    • View Profile
Re: Magnet Tool
« Reply #63 on: November 16, 2008, 07:56:33 pm »

So sweet... I am no modeller but I fell in love with the newborn script attached below...

The polimagnet 3 script of some posts above has been downloaded 9 times. I downloaded it once, so at least eight people had a try at it - assuming that nobody downloaded it twice (me, eventually :P). So let's speak frankly, there must be a good modeller capable to make something cool with these scripts, among those who keep an eye here.

The new one that I am attaching below is a simple spherical magnet just like the very frist script of this thread, but it has some interesting features added:

- all triangle faces of mesh01 get automatically subdivided as you enlarge them with the magnet
- all modes are switched by changing the magnet's name (simple and effective, you doubleclick on the magnet, you change its name and you have switched the mode while the script is running).
- it can cause Anim8or to crash (yes, this is a feature, not a bug ;))

no, seriously, I don't know why but it crashes if you try to move too much points at once.

Believe me it's fun, have a try, you will not crash anim8or if you move few points at once - but save your work and don't leave any important project open in anim8or.

I don't want to force you to open the script and read the comments, hence I'm reporting them here.

/* 
To use this script you need a mesh named "mesh01", as usual.
the script subdivides only triangular facets, you do the math,
I suggest you to try with a division 3 geodesic (and remember to
do "build->convert to mesh").

As for the magnet, you need a sphere named in one of the following ways:
(use lowercases exactly as reported into the double quotes)

"mag"    --> push mode, change all coordinates
"mag x"  --> push mode, change x coords
"mag y"  --> push mode, change y coords
"mag z"  --> push mode, change z coords
"mag xy" --> push mode, change xy coords
"mag yz" --> push mode, change yz coords
"mag xz" --> push mode, change xz coords

Add a minus sign for switching to pull mode (useful for
rushing points together, eheheeh, no, seriously, if you
use a really small magnet you can use pull-mode for
fine-point-tuning without using point-edit mode)

"mag-"   --> pull mode, change all coordinates
"mag-x"  --> pull mode, change x coords
"mag-y"  --> pull mode, change y coords
"mag-z"  --> pull mode, change z coords
"mag-xy" --> pull mode, change xy coords
"mag-yz" --> pull mode, change yz coords
"mag-xz" --> pull mode, change xz coords

Exceeding characters will be ignored, as well as
non-exact entries, hence, for example:

"magnet" --> "mag" (push mode, all dirs)
"mag-xyy" --> "mag-" (pull mode, all dirs)

Careful with doubled spaces:
.1234567. << chars 4 and 5, doubled space
"mag  xy" --> "mag" (push mode, all dirs)

To strop the script (pick one):
- delete the magnet
- change magnet's name to an invalid one
(remember that all names starting with "mag" are valid names)
- delete "mesh01"
- rename "mesh01"

Don't worry if you start seeing holes in your models, they're not holes.
For some reason, some faces are there but aren't visible. If you save the
project and reopen it, you get a couple of errors about missing materials
and everything will be fine, your model will be a fully faceted arlequin.
*/



Sorry for posting just a silly example, but I want you to post some interesting one. You can use this tool far better than me, I'm sure. I'm also sure that when you're done with the volume you could build a really cool low-poly model out of the tri-models that this tool allows you to make.

I believe in Anim8ors.
Logged

Francesco

  • Full Member
  • ***
  • Posts: 182
    • View Profile
Re: Magnet Tool
« Reply #64 on: November 17, 2008, 08:17:18 am »

Stuff you can do with the magnet and the morph targets... see the animated gif below.
Logged

Francesco

  • Full Member
  • ***
  • Posts: 182
    • View Profile
Re: Magnet Tool
« Reply #65 on: November 17, 2008, 01:00:04 pm »

Other stuff you can do, this time with the polimagnet and again with the morph targets: icosahedron to dodecahedron, see attached gif.
Logged

Francesco

  • Full Member
  • ***
  • Posts: 182
    • View Profile
Re: Magnet Tool
« Reply #66 on: November 17, 2008, 02:06:36 pm »

And once again with the automagnet, a very quick draft: The Clay Brothers.
Logged

hihosilver

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1294
    • View Profile
Re: Magnet Tool
« Reply #67 on: November 17, 2008, 06:22:39 pm »

Nicely Done!  I hope to experiment a bit with this tool when my thanksgiving break starts in a few days.
Logged

bamman62

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Magnet Tool
« Reply #68 on: November 17, 2008, 07:10:30 pm »

Looks fun :D.

Kinda like a sculpting tool.
Logged

Francesco

  • Full Member
  • ***
  • Posts: 182
    • View Profile
Re: Magnet Tool
« Reply #69 on: November 18, 2008, 06:26:11 am »

Thank you guys for your appreciation.

In effect it is all about making some sculpting tool for bad modellers like me :P.

Now the idea would be to build a well edge-looped low-poly model on top of an all-triangle model like the ones I posted above, and then to use the polimagnet script to stick the low-poly model on the tri-model volume.

The problem on my side is that I have no grip on good edge-looping, but I'm studying.

As for the scripts themselves, I'm going to rewrite the polimagnet script. I will make it use vectors and the same naming convention of the automagnet, to improve speed and ease of use.

The automagnet has a problem though. When the script starts, it reads all mesh01 faces' areas to get the largest, and from there on it uses this area as reference for subdividing the others as you enlarge them.

When I was making the puppet I posted above, I subdivided the faces that compose its head and I realised that those newly-created small facets were no longer subdivided automatically. The reason is clear: they're not large enough, because the script checks for the largest face on mesh01 to be used as reference.

I think I will change it to get the average of all faces' areas to be used as reference, and if some mesh01 face is selected when the script starts, then the area of that face will be used as reference. Sort of telling it: "this is the largest face I want from here on".

Thanks again for your attention, don't forget to share your experiments and to tell me your advice about improving these scripts, your comments and critics are welcome.

« Last Edit: November 19, 2008, 05:49:34 am by Francesco »
Logged

Francesco

  • Full Member
  • ***
  • Posts: 182
    • View Profile
Re: Magnet Tool
« Reply #70 on: November 19, 2008, 09:05:27 pm »

I've rewritten all the scripts and I've released them in another topic:
Magnet Tools Package

Please refer to that topic for further discussion, thank you.

Consider this thread as locked.
« Last Edit: November 19, 2008, 09:08:58 pm by Francesco »
Logged
Pages: 1 ... 3 4 [5]