newbie scripting


#1

Allright,

But my boss did something on a parameter that was too fast for me to see. And he left in a hurry so i didn’t get the chance to ask…

Basically i have a 10 primitives of the same size and shape, that I want constrained to a curve. Now i want all 10 of them to be distrubuted with equal distances on the path. I saw him type something very quickly on the path % parameter and vioala! equal spacing.

it looked like a… 1(0,10) something… but he was in a hurry and…i didnt get to see it.

I know this sounds simple, the only thing i know about scripting is copying and pasting for the script editor to a custom toolbar. It’s not something Im proud of. :blush:

But how can i even think of touching ICE if i cant understand something like this? Hope you guys can help me out…

Many thanks…

J


#2

sounds like he selected them all and typed in l(0,10) which spaces the selected objects parameter linearly from 0 to 10. It isn’t scripting, it’s just a handy way of putting in values.

You can also do a similar thing with r(0,10) where it will chose a random value between 1 and 10.


#3

Tuna, muchas gracias!

Yeah that was it… so basicaly… (trying to understand :curious: ) the L - sorta stands for “linear value?” and the (#,#) is basically the two numeric values wherin i want the objects placed?


#4

yes…

you can use the L(#,#) and R(#,#) in most boxes in XSI.
L will distribute the objects linearly , by their selection order, R will pick a random number between the two values specified, and apply it in the order of object selection.

In addition to this, there’s also the #± , if for instance you have a few spots with different intensities, and you wish to up or down the value by a notch, you can select them all,
and in the intensity box, where it is now empty (because of multi selection, and different value on each object), enter for instance 0.2+ to up all intensities by 0.2 or 0.2- to down.

this also works in most XSI boxes (like selecting a few keys in the AE, and upping/downing their values)


#5

It’s not just + and -, you can also use * and /. For example, 2* will double all values and 2/ will halve them.

And there’s also the little-known but very useful g(mean, variance) for a Gaussian distribution.


#6

g(mean,variance) Thanks for that tip! That’s pretty useful.


#7

hi everyone - instead of making a new thread - i think it would be a good idea to continue from this one since my inqury is somewhat realted to the topic.

before you guys clarified it, I always thought that scripting was basically anthying you did in an app that involved typing and putting down formulas… Its embarrasing I know :blush: I feel like a real HEEL.

Before my current job i was nothing more than a workhorse. Move points here, animate this unwrap this and that without truly comprehending the full capabilites of XSI (and other apps for that matter).

Now, I’ve been dedicating a lot of my time for studying while I work… and recently - I stumbled upon the need to understand trigonometric functions again.

Im terrible at math…always have been. So I was wondering… the l(#,#) as stated in previous pots - what do we call these? - just functions? mathemathical functions? tigonometric functions?

Obviously these functions and formulas play an important part in cg work - especially in animation. I’d like to understand the math a bit more but I don’t know where to start. I fear I might be blindling going back an for thru algrebra and trigonometry in vain…

hope you guys can point me in the right direction… Many many thanks!

Best,

J


#8

Trigonometry is an important foundation, but it doesn’t rule as much of the field as linear algebra or calculus do.
Maths wise a path I always found to work well for people, reading wise is:
Trigonometry for dummies -> mathematics for computer graphics by John Vince (used to be essential mathematics for computer graphics - fast in the previous edition) -> precalc for dummies.

Of the three I would actually start with Vince’s book, and only fall back to a trig or geometry for dummies publication if you find yourself unable to follow.
Since ICE is now available to all, I think you’ll find linear algebra from that book very easy to experiment with, which makes the experience largely more rewarding, and more quickly so, than it was before.

Don’t be fooled by the name of the for dummies serie, they often have authors that are more unassuming and less stuck up than renowned publishers who feature writers that are entirely too academic and stuck too far up their arse. I’ve had very good results when tutoring people in using those, don’t underestimate the value of a layout and structure that make you feel like you’re ahead of your book. The opposite, often common in more scholarly publications, if often reason #1 for early quitters, nobody likes to feel like an idiot, even if sometimes it’s the writer and not the reader at fault.

As for the terminology, it’s something that comes with either formal training, or if you start later in life once you practiced enough and puzzle enough piece together.
It’s a lot easier to understand words like function or polynomial when you’ve already seem them working a few times and you know how to associate, than it is to read their formal definition.


#9

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.