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

   5082   7   0
User Avatar
Member
5 posts
Joined: 2月 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 - 2022年4月30日 17:15:55
User Avatar
Member
644 posts
Joined: 6月 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
8839 posts
Joined: 7月 2007
Offline
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
4731 posts
Joined: 2月 2012
Offline
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 | pragmaticvfx.gumroad.com
User Avatar
Member
339 posts
Joined: 11月 2013
Offline
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
8839 posts
Joined: 7月 2007
Offline
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 - 2022年4月30日 16:00:41
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
8045 posts
Joined: 9月 2011
Offline
The best way to learn vex is to use vops.
User Avatar
Member
339 posts
Joined: 11月 2013
Offline
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