Best way to learn VEX ?

   23075   12   6
User Avatar
Member
4 posts
Joined: Feb. 2017
Offline
Hey,

I was told that, that I have to use VEX to use Houdini efficiently, so as I have no expierence at coding at all and I dont know where to start with it, I want to ask you guys if you have any good resources or learning paths.

Thanks

Nick
User Avatar
Member
85 posts
Joined: May 2011
Offline
http://www.tokeru.com/cgwiki/index.php?title=HoudiniVex [tokeru.com]
https://vimeo.com/173658697+ [vimeo.com]

more important : pratice pratice and practice , you can also post question on this forum and on odforce
and don't hesitate to consult the docs
— dedeks 3000 —
User Avatar
Member
65 posts
Joined: Feb. 2017
Offline
I would say learn to code first. Perhaps in Python, outside of Houdini. When you feel comfortable, you can apply those Python skills inside Houdini. Once you learn one language, you can easily pick up another as most of the differences are largely syntax. What you need to do is learn the semantics of programming first. Then VEX is trivial. It only takes practice to become familiar with the long list of functions available.
User Avatar
Member
806 posts
Joined: Oct. 2016
Offline
Moin, Nick,

I do agree with “aoakenfoAchiact”: I think it is a good idea to get some practical programming experience first. Yet, I would not recommend Python, as this language is very “special” in some of its “grammatical” approaches (yes, you can use Python in Houdini, but VEX is the “natural” way and you get threading with it).
If you are specifically interested in VEX but don't want to learn it hands-on by following some tutorials and trial and error (which is how I learned programming in the 1970s/80s, though neither with VEX nor with Python), you could have a go at “classic” Javascript, which is very, very similar to VEX. And there are many resources and options to learn JS, including your very own webbrowser (which, very likely, has a JS console and code completion).

On the other hand, “learning how to program” depends on what your personal background is. I know some “artists” who would frankly refuse to eben think about writing lines of instructions to “generate art” (instead of creating it with their own hands), if that resembles in any way your feelings about “coding”, I would, instead, use Houdini's network view based VOP editor and, over and over again, glimpse at the code it creates.

Marc
---
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
another way of learning VEX would be to get familiar with Processing https://processing.org/ [processing.org]
https://www.youtube.com/user/shiffman/playlists?shelf_id=2&view=50&sort=dd [youtube.com]
it's built on Java and lots of people are using it to generate imagery, so a nice complement to Houdini/VEX
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Following from Marc who I agree with (learning by hacking and slashing at vex is a fabulous way to learn it)…

When we are taking about using vex in the scope of using Houdini efficiently, we mean using vex functions for almost all the work we do to take advantage of the free threading from VEX evaluation inside Houdini.

We are not talking about writing functions, code design such as OOP, large or small application development, etc. The things you learn when undertaking the daunting task of learning to write code.

We are talking about using functions. Scripting skills are in order here.

To say “learn programming” to learn vex is way way WAY overkill for most of what we do.

If you want to learn vex, learn vex. Do stuff with it. I would also learn hscript as well. Many hscript functions have been ported to vex making for a somewhat seamless cross-over.

Actually learn VOPs first as Marc recommended. VOPs create vex code behind the scenes in a way that you rarely can create code that doesn't compile. It offers everything you can do in wranglers but in a node network. Once comfortable with VOPs, start inspecting the vex code generated to learn how the code is constructed. Then wrangle VEX code is a logical progression. Just so you know a Snippet VOP is how wranglers are exposed at the top so there you go!

Wrangling was added to offer TD's a convenient way to wrangle attributes on geometry. It has turned out to be so handy that every TD uses wranglers, even if there is a SOP to do that work. Your friend's advice was correct in that you ultimately need to learn to write vex wranglers but it isn't absolutely mandatory, at first.

My tip is to start learning Houdini full stop. Run through some tutorials. When you hit a spot where wrangling is used, follow along and carefully inspect the results through the operator info and more importantly the spreadsheet to see what attributes were added and what values in general were assigned to those attributes. Then hack away at that example, make it fail, fix it, debug it. You're there! That is 90% of what wranglers are doing anyway.

VEX wrangling is all quite logical once you get the syntax out of the way and learn a few common VEX functions like:
set()
relbbox()
chs(), chf(), chv(), chramp()
length(), luminance()
if() for()and other looping blocks
and more.

If learning vex, focus on point attributes at first as this is the sweet spot when learning. After you have command of point wrangling, expand to include primitive, vertex and detail wrangling of attributes. Mixing geometry types and attributes is the next step. Then create geometry after that.

I find the help to be excellent at finding a vex function for a given specific task.
There's at least one school like the old school!
User Avatar
Member
65 posts
Joined: Feb. 2017
Offline
To say “learn programming” to learn vex is way way WAY overkill for most of what we do.

And in the same breath will throw around terms like threading, compiling, and functions. We, as developers, forget how bewildering the basics can be the first time around. Variables? Conditional expressions? Logical operators? Looping constructs? Primitive data types? Truncation? Concatenation? Function overloading? The list goes on and it all sounds very intimidating. But, if you take the time to read a book on the fundamentals you'll find the underlying concepts are very simple.

I do agree with diving right in. As with all crafts, you learn by doing.

Finally, programming is all about problem solving. The computer is unforgiving and forces you to think in a logical manner. I've found those skills carry over into many other domains.
User Avatar
Member
1 posts
Joined: Aug. 2018
Offline
I think you most learn you’r first skill coding at VEX and then you just most experiance at learn VEX.
User Avatar
Member
897 posts
Joined: July 2018
Offline
High level languages like Python would only hide the explicit programing you need in vex. If any background knowledge would be recommended I'd go for vector algebra as that's typically the domain of a Houdini problem and helps one describe the problem.
B.Henriksson, DICE
User Avatar
Member
60 posts
Joined: Nov. 2019
Offline
Bumping this bad boy up in 2019.

I'm just starting to learn VEX.

I'd have to disagree with some above who say you don't need to learn programming.

I've been scouring the interwebs for the last few days for beginner's VEX tutorials and courses.

And i didn't find any that didn't presuppose some basic knowledge of programming. Even though these guys (the authors) think they're starting from the very basics, they still take it for granted that everyone knows what an “array” or a “for loop” is or whatever.

Sooooooo……… i've decided to supplement my Houdini study with a basic programming course.

Python? Javascript? C++? Something else?
Edited by Dazzer123 - Dec. 2, 2019 18:58:07
User Avatar
Member
201 posts
Joined: July 2015
Offline
Try Python or processing.

Also if you are not confident with vex, you can just go with VOPs instead. No shame in that.
You'll find that over time you'll start writing one liners in VEX, then couple of lines with functions and eventually you'll grow out of VOPs entirely.

That's how I know a lot of people started. That's how Matt Estela described his process, too. See here [www.youtube.com].
Manuel Köster - Senior Technical Artist @Remedy Entertainment

https://www.remedygames.com/ [www.remedygames.com]
http://shadesoforange.de/ [shadesoforange.de]
https://twitter.com/ShadesOfOrange_ [twitter.com]
User Avatar
Member
1737 posts
Joined: May 2006
Online
Oh hai,

The thing is most generic coding tuts are very dry, theory heavy, and focus on stuff that isn't as relevant to the way vex runs. Eventually sure, you need to know arrays, loops, all that, but to start with its more useful to understand how to get and set attributes on geometry, how to get and set normals, that sorta thing.

This tut series I wrote is designed with that in mind:

http://www.tokeru.com/cgwiki/index.php?title=JoyOfVex [www.tokeru.com]

I'd say if you're still getting familiar with the rest of houdini (especially sops), keep doing that. Don't get into vex too early, it'll just slow your general progress.
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
15 posts
Joined: March 2016
Offline
Great insight in this thread.

I just want to add that there exists a really great tutorial on modeling with VEX that I found enormously helpful:

https://www.cgcircuit.com/tutorial/procedural-modeling-with-vex?utm_source=cgcircuit&utm_medium=website&utm_campaign=home-page [www.cgcircuit.com]

It's not for beginners but it's a great follow-on after you've gone through the learning paths outlined above. Each vex wrangle in the tutorial is concise and single-purpose as opposed to some vex tutorials that get very verbose and complex.
  • Quick Links