Monthly Archives: June 2008

vineGrowth

vineGrowth: a script that grows stuff.

It’s based on paint effects. The overall, main structure, rig and animation is not pfx dependent. Pfx is just to add auto detail on the curves created.

Draw a curve. Have 100 curves tag along. Animate parts. Animate growth. Finesse pfx (although I did nothing to the preset except colors).

Currently using rectangular uniform randomness. So curves are supposed to look like they grew from a squarish pot. Later I might add choices of radial/rectangular, uniform/gaussian/normal/beta distribution etc.

Yep, I finally reimplemented a major part of the old script.

IT’s kinda weird, but functions are in Python. UI are in MEL. It took awhile to get MEL to call and send dynamically generated values to functions in python, but it works…several convoluted evals and backticks “ and stringing thiz thatt.

What next? Im thinking more python learning, complete the UI, or add new cool features like somehow allowing sculpt deformer use. But right now sculpts move CV’s which are a ‘far cry’ from the actual curve. I might only be able to get some shape displacement by more CV’s, which is bad since controlling animating a curve should mean as few control points as possible. Note the more CVs the more EPs. Sure I can do multi layer like rebuild curve with history to simplify it, or increase CVs, but is there a simpler way that won’t make editing or redoing the vine stalk generation too difficult. I’m hoping sculpt can give a nice impression of displaced vines, static collision so to speak.

Right now the stalk can’t be redone, just need to start from scratch if you don’t like it. Adding flexibility may be asking more help from Python’s wonderful OOP, so I should go study more.


link to video

vineGrowth

learned more Python…there’s so much to learn from Python. Like other OOP languages, but also owns an origin of shell scripting (the syntax of which annoys me to no end). I don’t know why this choice, like mashing two opposites. Anyways, I first used Python for coding 3D stuff, in the previous century (yep, or say millennium?).  Nice it came into Maya finally.

I got 3 procedures so far. One plants stuff at random vertices of a poly plane’s border. Thanks a lot to some python random module. Second makes nice pointOnCurve locators to control a curve. Third generates a random, very thoughtless curve.

No idea what I’m aiming for. The company doesn’t have a storyboard, so we’re kinda imagining what vines need to do. There’s a separate giant tree, but I guess/hope the modeling someone else will happily do!

The vine disk distribution kinda works fine, but the point is getting the anim rig onto the stalk of vines. But the only part where this might help is if a director wants to manually steer a stalk instead of one vine.

Recently I’m thinking of particles bound in a volume or on a surface, and to what extent can they maneuver. Maybe thinking to far…my group talking….35!#$#%##%@#—…did i hear ice cliffs cracking, exploding into sea water and monsters in simulated liquid?????? What am I supposed to do? I can serve coffee!

I just remembered a walking script I have in both maxscript and mel versions, about time I organized everything.

Exercise

I’m considering two types. The second type is hard to allot time, since recently (6/26?) I got an intern for doing animation…more like coding but whatever suits real fun. Some human parts need a 24hr gap between exercises, and other parts 48hr. Whatever suits you, just make sure parts are maintained and not overstressed. It’s also common for the more serious to exercise once a morning, once an early night…dusk?

An exercise club a few days ago was nice, and free, but the intern conflicts in time. Maybe I have to go to paid ones to flex some schedule. But the student trainers in the club are excellent and helpful, besides one student sounding like the pig voice talent in Naruto–it’s SOOO fuNNYYY!! It’s like hearing a cartoon piglet while training….or having a voice talent perform live.

Besides all this, I hiked Yang Ming Shan with a group in one steamy afternoon. Some combination of exercises caused some issues with the calf area, hmm latent injuries are hard to prevent.

Work tired me out, but I should view exercise as an elevating, relaxing force, even tho it drains my energy so.

vineGrowth

EP curve WAS a pain (still is). But I got locators to align to tangents. One of the constraints kept crashing Maya w/o explanation, so I had to guess what’s wrong. Maybe after 20+ crashes (ya….call it debugging) i think I know the problem….something about point on curve moving away and adding another pointoncurve afterwards…but manually this didn’t crash it so im not too sure. Anyways, it’s working now (not CRASHING!!).

It sounds pathetic, but I was training on some other stuff today, didn’t touch my compy much~~oooow i miss ya~~

Progress:

Like Cluster Curve on CV. This script adds locators positioned and angled at each EP of a curve. Bonus is esoteric parameter ranges doesn’t matter. Curve can span a U value of (0,1), or (0,# spans), or (0, xx.xxxyz), it’ll still work. I personally prefer (0,# spans), which is the default when you plot or draw curves. Remember spans +1 = EP count.

Next:

Create the “disk” distribution of locators. It’s more design heavy, since all I need is duplicate -rr (or duplicate(rr=1) cuz Python rulzzz!). I’d need to consider what user parameters give maximal choices while keeping intuition.

radius (obviously??)

randomness (as opposed to nonrandom? what’s that?)

bias (favorite word in paintfx…)

manual (at some point allow picky users to manually move 100 locators ya)

Disk rotate, scale, translate are handled by the parent locator, just like in the Maxscript.

All this is conceptually simple, can’t wait to implement algorithmic patterns and L system….maybe later. But I’m simultaneously learning Python and facing these weird bugs Maya managed to port from mel to python.

vineGrowth

managed to get point on curve deformers onto each EP of a curve. Maybe I should have a toggle to place on EP or CV. EP properties are weird, can’t directly access things/attributes, sorta hard to use EP. But hopefully the locators are enough to adjust things.

Next: orient locators along tangent of curves.

Form disks.