Friendlyskies AoI Forum

You are not logged in.

Announcement

#1 September 21, 2008, 12:38 pm

peteihis
42
From: Tampere, Finland
Registered: March 22, 2006,
Posts: 1231
Reputation :   11 
Website

Circular Array Tool

Here you go! smile

It works on a selection of objects that are all handled individually.
The outcome coinsists of live duplicates only.

A couple of notes:
1) It may be a bit slowish to fire up, due to the massive definition of the dialogbox.
2) It may not be "fool proof" to handle in situations where the local coordinates of the object to be copied are joined with the array axis... (In those cases it may add to the object-list, but not much is happening on the scene view. Should that happen, please let me know how to reproduce the error.)



Have fun! cool

EDIT: Some demoworks: http://www.friendlyskies.net/aoiforum/v … 266#p14266

About note 2): Anybody familiar with vector-maths?

Which operation was it that tells if two vectors are parallel? (Pointing to the exact opposite direction is also still parallel in this case.) All the vector tools are in the aoi.math and I can recognize them by name, but it's been sooo long since my last maths lesson ....

Last edited by peteihis (September 21, 2008, 5:02 pm)


...there's more to the picture than meets the eye...

Offline

 

#2 September 21, 2008, 4:02 pm

marcc
Count of Monte Carlo
From: Northern California
Registered: November 2, 2004,
Posts: 1996
Reputation :   
Website

Re: Circular Array Tool

Wow. Amazing, this script is very professional for your first(?) one. I can tell already that I'll be using it a lot. I got quick results without any guesswork. Part of the reason is that the script assumes a basic use case, then lets you get advanced only if you make it so.

Hopefully we can put together some documentation for this script, since it's a worthwhile thing for beginners to know about but probably needs explanation for more complicated use cases.

Thanks for giving your attention to this, Pete!

Offline

 

#3 September 22, 2008, 7:25 am

peteihis
42
From: Tampere, Finland
Registered: March 22, 2006,
Posts: 1231
Reputation :   11 
Website

Re: Circular Array Tool

Thanks. smile

It is my first in the sense that it's my first AoI tool-script, that I made from scratch. But that did not come without some prior experiences and some very valuable help. smile

By documentation, I suppose, you mean a kind of a "user's manual" that shows some typical ways of using each feature? That crossed my mind too -- like explaining the concept of segments and "add one to end". But there are also a couple of other things that could still require attention. For one thing I'm fairly sure that one of the combinations with the object origin set onto the rotation axis will some day turn out to be impossible to solve and  I *think* I have come up with a safer solution to handle that, than what script is using now.

There are also a couple of interesting features, I believe I should have a look at.
- The copied object could be keyframed to follow the base object. (Think about 120 turbineblades keyframed manually...)
- "Include children". This is probably more tricky, but Nik pointed me some directions where to look, so maybe I should have a look.
- Harald suggested that the arrayaxis could be defined by an object. That certainly would be handy, but I don't know how to do that without exploding the dialoxbox (pop up another box maybe?)

Though I'm not sure how much more "professionalism" can be stuffed into a script UI before it's getting too slow to load... wink

Another thing: I tried to pick words that would best describe each function there, based on, what I have seen used on technical contexts, but if there's something, that seems to be from the wrong dictionary, please let me know. With the vocabulary of a very special field there always is the "fine line" somewhere... big_smile

Anyway, I'll keep my hands off it a couple of days now and then see what is to happen..

laptop


...there's more to the picture than meets the eye...

Offline

 

#4 September 22, 2008, 10:59 pm

Nik777
Moderator
From: Sydney, Australia
Registered: December 5, 2004,
Posts: 1119
Reputation :   
Website

Re: Circular Array Tool

Which operation was it that tells if two vectors are parallel?

I believe it's the "dot" product of the two vectors. If two unit-length vectors are parallel, then their dot-product will be 1 or -1.
So to determine if your vectors are parallel, you need to call Vec3.normalize() on each, and then take their dot-product.

**Note: that Vec3.normalize() modifies the Vec3, so you may want to take copies of the originals, and then normalise and calculate the dot-product on those copies.

I'll dig up some code from VectorRenderer that does this, just in case I've missed something.

One last point Pete: is this script getting to the point that we should consider converting it into a plugin?

There are a number of benefits to that, such as being able to include help documentation in the plugin jar, including translation sets for the GUI (internationalisation) in the JAR, etc.

If you think it's worth looking into, and you would like some help with that, let me know. :-)

Cheers!
Nik


Honorable
I would not be a member of any club that would have me as a member
- Groucho Marx

Offline

 

#5 September 23, 2008, 1:36 am

peteihis
42
From: Tampere, Finland
Registered: March 22, 2006,
Posts: 1231
Reputation :   11 
Website

Re: Circular Array Tool

Thanks, I'll try that ... I managed to pick up an old book of mathematical formulas and found also another way of determining if vectors or lines are parallel. Though the dot product is probably easier as it's already programmed in there. The vectors are already normalized just for this very reason, so no damage done there.

One last point Pete: is this script getting to the point that we should consider converting it into a plugin?

Hehe... I was wondering that myself. It's not like the actual work that it does would be so heavy, it's more just the start-up-time because of the UI. But let's have a look at that project some time later... smile


...there's more to the picture than meets the eye...

Offline

 

#6 September 24, 2008, 6:04 am

TroY
Penguin?
Registered: October 29, 2007,
Posts: 182
Reputation :   

Re: Circular Array Tool

That looks handy! big_smile I prolly did not yet explore all possibilities but I think I'll use it a lot - thanks! smile

Some thoughts:

* Maybe add an option to toggle "Live duplicates". Currently you do create live duplicates which is quite nice actually but I can think of situations where "real" duplicates would be useful, too. Iirc, you can create such a duplicate by simply calling .duplicate() on the original object (each time you create a new ObjectInfo for the circular array in line 364).

* Maybe even more: Add an option to make all objects of one circular array live duplicates of each other - whilst being independent from the source object. That would be: .duplicate() the source object /once/ (would be line 246) and use that reference for every object in the array.

* Converting the script into a plugin should be worth it, imo. It takes 3-5 seconds on my machine until the GUI is ready ... cool Such a conversion is not that much work iirc - assuming you got a java compiler and ant ready for use. smile

Offline

 

#7 September 24, 2008, 9:47 am

peteihis
42
From: Tampere, Finland
Registered: March 22, 2006,
Posts: 1231
Reputation :   11 
Website

Re: Circular Array Tool

Thanks.

I left the "real copies" option out for one thing, because there is no obvious need for the script to make copies of the objects. Such a reson could be for example variation of size. Also the user can quite easily change the instances into copied objects and decide himself on wich ones to perform the operation. I may think of adding the option at some later point though. (If not else, at least to unify the tool with the linear arraytool)

Your second idea sounds like the way to go. Why didn't I think of that? wink

No doubt, I'll sooner or later, get myself acquainted with the wonderful world of plug-ins, but all in good time. I've got Eclipse on my PC (not much used yet, but I for example managed to perform a small soundprocessing task by Java)... If I'm not mistaken Eclipse should help..... smile

Last edited by peteihis (September 24, 2008, 9:48 am)


...there's more to the picture than meets the eye...

Offline

 

#8 September 24, 2008, 7:51 pm

Nik777
Moderator
From: Sydney, Australia
Registered: December 5, 2004,
Posts: 1119
Reputation :   
Website

Re: Circular Array Tool

If I'm not mistaken Eclipse should help

Yes, eclipse should help

Some day I really should post some eclipse (and IntelliJ) projects on AOISP. I have been working on the Plugin Starter Kit, to improve it and make it 2.5 compliant.

Cheers!
Nik


Honorable
I would not be a member of any club that would have me as a member
- Groucho Marx

Offline

 

#9 August 28, 2009, 4:52 am

Vidiot
2000 posts? Insane.
From: Hamburg
Registered: November 3, 2004,
Posts: 2019
Reputation :   

Re: Circular Array Tool

Wow - I totally overlooked this one.
Now that I´m in need of it I found it!

Thanks!!

Do you think it might be worth changing it from a tool script to a scripted object?
That way it would be parametric and maybe animatable.

Greetings
Harald

Edit: No I didn´t overlook that one - but anyway - good to see it´s still "findable".
How about putting it in the script repository?

Last edited by Vidiot (August 28, 2009, 8:10 am)


Don´t start chasing rainbows - get caught by them.
Deutsches Portal für Art of Illusion

Offline

 

#10 May 26, 2010, 4:50 pm

Vidiot
2000 posts? Insane.
From: Hamburg
Registered: November 3, 2004,
Posts: 2019
Reputation :   

Re: Circular Array Tool

BTW: This absolute useful and must have script is still not in the repo.
But it should be converted into a plugin - or object script.
big_smile

Anyway - can this be added to the repository!???

Greetings
Harald


Don´t start chasing rainbows - get caught by them.
Deutsches Portal für Art of Illusion

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson