Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

mestela

Learning VEX via Animated Gifs - Bees & Bombs

75 posts in this topic

Easy one, most of the time is spent tweaking the settings to match his elegant timing and motion. I'd record the gif at 60fps if I could, but licecap runnign under wine running under linux can only do so much, and post-editing gifs with gimp makes me want to stab things...

 

http://beesandbombs.tumblr.com/post/131491937704/beesandbombs-wave-grid-from-the-archive

 

post-7292-0-95782200-1445325017_thumb.gi

 

wave_grid_v01.hip

Edited by mestela
1 person likes this

Share this post


Link to post
Share on other sites

Really cool. Great examples of simple yet powerful VEX. Thanks for posting.

Share this post


Link to post
Share on other sites

Yes thank you for posting and  attaching the files. Its a great resource to learn. 

Share this post


Link to post
Share on other sites

Dancing orbs:

 

http://beesandbombs.tumblr.com/post/131113717324/dancing-orbs

 

post-7292-0-06670900-1445551952_thumb.gi

 

dancing_orbs_v02.hipnc

 

 

Haven't quite nailed this one, can't get the colours to loop cleanly, nor could I work out how to get the overall rotation and keep it all seamless, not at this time of night anyway.

 

(edit)

 

Ah, fixed it! I had 3 different curves before that were merged in the wrong order. Making them in the right order, then rebuilding a single prim fixed the colour cycling.

 

The rotation was fixed by trial n error. :)

 

The jump in the gif is me being lazy, I can't be arsed to edit the gif after capturing with licecap to trim the excess frames. I assure you it loops cleanly in houdini!

Edited by mestela

Share this post


Link to post
Share on other sites

Pi constant in VEX

 

Constant PI defined in math.h. Include it at the beginning of the code. I don't see any benefit of it, however, and usually defining it myself or use it as magic constant since it is very recognizable, and I need it once in some trig function call. It's numerical value won't be changed in the near future.

 

By the way, why you're using underscores for every variable name? There won't be any collisions with code's environment. Snippet's body enclosed in it's function. You can even use P or N letters for variable names. Real position, normal and other global variables will be mangled with "_bound_" prefix in resulting code.

Edited by f1480187

Share this post


Link to post
Share on other sites

Constant PI defined in math.h. Include it at the beginning of the code. I don't see any benefit of it, however, and usually defining it myself...

 

There is a PI defined globally in Houdini. Look in Edit => Aliases and Variables => Variables tab.

Share this post


Link to post
Share on other sites

Note it is undefined in VEX, just a normal string expansion of input field on the node itself. All HScript still work there. Many H13's VOPs use backtick-expressions in code fields doing nice things.

Share this post


Link to post
Share on other sites

why you're using underscores for every variable name?

 

I don't have a real reason :)

That's something I picked up after viewing someone else doing similar thing. I think it was even here on odforce.

I guess that's more an habit to avoid collision in any sort of language, not only VEX.

Habits evolve with time, I'm having this one for the moment.

 

Thanks for the $PI, didn't know it was working inside VEX directly, I was usually defining it as a parameter then using a ch("pi").

 

------------------------------------------------------

 

Nice streak mestela :)

 

My try on this one: http://beesandbombs.tumblr.com/post/95558180379/circle-wave

 

post-10914-0-43269300-1447073353.gif

 

 

It took me a while to figure out how to give this travelling wave feeling. I forced it by simulating a zoetrope effect but problem is that I can't slow it down to match the reference.

If anyone has an idea...

 

circle_wave.hipnc

Edited by iamyog

Share this post


Link to post
Share on other sites

had a look, you've built a static wave, and then rotated it. the bees+bombs one has the wave animate in place, then the entire shape is rotated in the opposite direction by slightly less than the wave speed, giving that traveling effect.

 

I had a go, and split the wave traveling into the vex wrangle, and the overall circle rotation into its own transform sop, more controllable.

 

circle_wave.hip

Edited by mestela
2 people like this

Share this post


Link to post
Share on other sites

this is a fantastic thread matt ! thanks for sharing you'r magic ! :)

 

Cheers

 

E

Edited by sebkaine

Share this post


Link to post
Share on other sites

had a look, you've built a static wave, and then rotated it. the bees+bombs one has the wave animate in place, then the entire shape is rotated in the opposite direction by slightly less than the wave speed, giving that traveling effect.

 

I thought it was coming from some static position issue, so I made sure to have the travelling effect first in the "loop anim" wrangle but I couldn't get there.

Thanks for your explanations.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now