Would it make sense to learn Python in order to write VEX

   4224   7   0
User Avatar
Member
5 posts
Joined: Feb. 2022
Offline
I've read that VEX is based on Python. Would it make sense to learn (the basics of) the Python language itself or am I better off looking up VEX in the manual or watching tutorials?

Edit: Thanks for the responses everyone! Turns out it's more like C. I'll hop straight into VEX via: https://www.sidefx.com/learn/vex/ [www.sidefx.com]
Edited by XpL0iT - April 30, 2022 17:15:55
User Avatar
Member
636 posts
Joined: June 2006
Offline
VEX comes more from RSL but it has more like c++, javascript syntax.
It is not hard just it takes some time to understand. Python is a bit diffrent but just try to learn it. When you know the basic of programming both languages will be easy to understand.
User Avatar
Member
8507 posts
Joined: July 2007
Online
If your goal is to learn VEX, learn VEX

Python will not help you much as the differences in practical use are huge

Both share basic programing principles and that's it
Knowing Python, various fancy modules, hou API etc is of a little help in VEX world

Learning both is the most useful, not only for understanding the difference and use cases for each of them, but mostly to be able to use each for tasks it's meant for
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
4486 posts
Joined: Feb. 2012
Online
VEX is very different than Python. For FX I would recommend VEX first and then Python for more tools/automation work.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
272 posts
Joined: Nov. 2013
Online
Vex syntax is basically C, but without the more complicated concepts that make C hard. Vex isn't anything like Python. If you want to learn vex syntax you could get a beginners book about learning C and just read the the chapters that cover variables, arrays and functions and includes. Skip any chapters about pointers and memory management because that's not something you have to worry about using vex.
User Avatar
Member
8507 posts
Joined: July 2007
Online
I wouldn't advise to start with other languages thinking it will be easier way to get into VEX, there is plenty of resources for VEX directly
It's very specific especially in wrangles where @ bindings come into place
It's important understanding its SIMD nature and very specific VEX functions and how they tie to the actual geometry processing or shading
Seeing the desired results directly is very rewarding, motivating and enforces learning

You can always of course to refer to any other languages when looking for examples of fundamental programming flow control
Edited by tamte - April 30, 2022 16:00:41
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
7727 posts
Joined: Sept. 2011
Online
The best way to learn vex is to use vops.
User Avatar
Member
272 posts
Joined: Nov. 2013
Online
I agree Tomas but it depends where you're starting from I guess. Wrangle bindings don't much sense until you understand what a variable is and SIMD is jumping the gun when a function call looks like a scary foreign language. C is nice because it has a very limited set of language features and those features are pretty close to vex. It also gives a good overall foundation for moving to another far more complicated language like Python (features wise, not syntax).
  • Quick Links