Jump to content
mestela

Learning VEX via Animated Gifs - Bees & Bombs

Recommended Posts

Decided to look at this thread finally and it was a fantastic way to get more comfortable with animation techniques and just getting better with Vex.

Some of the older (1st page) ones were H15 so I went ahead and updated them to H16 nodes where it made sense. Cleaned up a couple bits and bobs and made some minor visual tweaks. Hopefully this will help someone else who is starting out with basic Wrangle wrangling.

Most of this is direct ports of Matt's work, with some contributions from iamhoy and some chitchat on the Discord forum.

-Robert

 

beesAndBombs_01_columns.hiplc

beesAndBombs_02_twistingBox.hiplc

beesAndBombs_03_waveGrid.hiplc

beesAndBombs_04_twistingCubes.hiplc

beesAndBombs_05_dancingOrbs.hiplc

beesAndBombs_06_bounce.hiplc

beesAndBombs_07_swirlBall.hiplc

beesAndBombs_08_circleWave.hiplc

Edited by RobertHodgin
added incorrect file...
  • Like 3
  • Thanks 2

Share this post


Link to post
Share on other sites

That's awesome, thanks for that! If I get time I'll go back and edit the earlier posts, replace those hips with yours (and make sure you're properly credited).

 

 

 

Share this post


Link to post
Share on other sites

My pleasure! I learned a great deal from this exercise. Ill continue on this path... at some point I might even try making one myself!

Share this post


Link to post
Share on other sites

Three more before the weekend starts.

For the Dot Inversion one, I opted to leave out the camera cheat trick (even though it was pretty damn clever) and just look at the Vex version.

And for Dancing Squares, @iamyog did a great pure-Vex solution but I made it a little less reliant on Vex. Definitely check out his solution too.

Let me know if I made any mistakes or if my crediting is incorrect.

beesAndBombs_09_twoWorms.hiplc

beesAndBombs_10_dancingSquares.hiplc

beesAndBombs_11_dotInversion.hiplc

  • Like 1

Share this post


Link to post
Share on other sites
On 03/07/2017 at 8:32 AM, henderthing said:

I've uploaded a simple way to make a perfect sphere this way. I made no attempt to match original proportions, etc. Just to demonstrate some principals. VEX is commented.

I broke the @P.y out into separate lines so that you can comment out the lines at the end to see what each step does.
As for simple flat color like this-- use the "old" Constant shader in SHOPs I've done that in this file, and assigned color via the prim wrangle sop.

Cheers
-matt

b_and_b_cubewave.hiplc

Thanks Henderthing! I still hadn't figured out how to get solid colours. No amount of googling was helping. I do predominantly motion graphics work, and this is going to be really helpful. 

Share this post


Link to post
Share on other sites

Here is one that I did quite a while ago, but didn't share because I couldn't figure out how to render solid colours. But, now that Henderthing cleared things up for me I thought I would put it on. 

Original here: 

https://dribbble.com/shots/2726044-Rainbow-Ring

My version:

Rainbow_Ring_01.gif.4a1e846375e35db093aca6e11b5091d4.gif

I'll admit that I once again did a bit of colour work to it. This time in Photoshop. You'll notice the original has more representation in the RGB colours and the HIP file version is heavy on magenta, yellow and cyan. This could probably be done in VEX by adding adding an easing function to the R, G and B channels seperately. But I haven't taken the time to do that yet. Could be a fun exercise, though. 

I've also included a version of the dancing orbs, as I came to a different solution to the original one on here. So, it could be useful for others to see a different implementation. 

RainbowRing_01.hipnc

DancingOrbs_01.hipnc

  • Like 2

Share this post


Link to post
Share on other sites

Hi Clif-

I took a look and thought I'd take a quick stab at this and make a couple comments.

No need to "declare" new attributes in a wrangle SOP. That's all handled automatically--you can just go and set your new @myattribute to a value.

While copy stamping is no problem for something this small-- I generally avoid it these days as it doesn't scale well. Most of the functionality can be handled much (much!) faster by the fully threaded wrangle SOPs.

I built it this way next to your network in the attached file...

Cheers

-m
 

RainbowRing_02.hipnc

Share this post


Link to post
Share on other sites

Thanks again, henderthing. It took me forever to notice that you used @primnum. For some reason I kept seeing it as @ptnum. Once I did notice it, I had no idea why there would even be primitives. I'll admit, I've used the 'ends' node before, but had never notice that it leaves behind an invisible primitive. In fact, the idea of having a primitive that exists as neither a surface nor an edge (line) threw me, too. I didn't know that was a thing. 

These exercises are actually the first I have ever used the modulo operator, so it also took me a bit to dissect how your 'cu' equation was working. This is much cleaner than my @k method, but certainly a lot more difficult for a beginner to grasp! 

After I figured those parts out, the rest fell into place and I was a little embarrassed that I had stared at it for so long, wondering what the hell was happening. LOL. 

What I learned: 

1. You can have primitives that exist as neither surfaces nor lines. 

2. There is a relationship between points and primitives. By which, I mean, a point seems to 'belong' to a primitive and you can use this to manipulate the points. Probably should have known this, but didn't.

3. More elegant usages of the modulo operator. 

4. Got to brush up on some pretty basic trigonometry. 

Question: 

Why can't I do: 

float divp = 1/@numprim;   [returns 0 instead of number expected]

and instead need to do: 

float divp = @numprim;
divp = 1/divp;

I also noticed your method opened up the possibility to very easily make the number of sides procedural, too. So, I've attached that here.

 

RainbowRing_03.hipnc

Share this post


Link to post
Share on other sites

Clif-

1. In my network, I create a circle and use the ends sop to get rid of the face (n-gon). The "unroll" option gives you a polyline with coincident points at the start/end. Then I copy it 4 times. This gives me 4 primitives, each of which is an open polyline. I use $PI/2 * primnum (90 degrees) to initialize the 4 corners of the square cross-section. All the way up to the skin SOP, there are 4 polylines--each one a primitive. They just look like a single curve because of the way I've rotated the points. You can see this by doing something like @Cd=random(@primnum)... So-- there are primitives here-- and they are actually polylines.

2. Yes--but you need to be careful. In the case of a quad poly surface (poly grid, for instance)--each quad will have a vertex at each corner, but each point will be a collection of 4 verts, each belonging to a different poly (primitive). So--in a pointwrangle, which primitive number will you get with @primnum? Guessing here, but probably the lowest one.

3. modulo is super-useful!

4. Trig, vectors, linear algebra, analytic geometry and calculus are all super-useful. And Houdini/vex makes it much easier to get a handle on these things.

The reason 1/@numprim doesn't work is that your numerator and denominator are both integers. I'm lazy--and rather than cast them with float(), I just type: 1.0/@numprim. The 1.0 is a float, and you will get a float. There may be a reason for not doing this, but I've never had problems with it.

 

Hope this helps
 

Cheers

 

-m
 

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

×