VEX 简介
VEX is a high-performance expression language used in many places in Houdini, such as writing shaders.
VEX是一种高性能的表达式语言,在 Houdini 的许多地方都使用,比如编写着色器。
VEX evaluation is typically very efficient giving performance close to compiled C/C++ code. VEX is not an alternative to scripting, but rather a smaller, more efficient general purpose language for writing shaders and custom nodes.
VEX 计算通常非常高效,其性能接近编译后的C/ c++代码。VEX不是脚本的替代品,而是一种更小、更有效的通用语言,用于编写着色器和自定义节点。
VEX is loosely based on the C language, but takes ideas from C++ as well as the RenderMan shading language.
VEX 不是严格的基于C语言,只是和RenderMan着色语言一样从c++中汲取灵感。
VEX is used in several places in Houdini:
Houdini 中 用到VEX的几点:
-
Rendering – mantra uses VEX for all shading computation. This includes light, surface, displacement and fog shaders.
-
渲染-Mantra中所有的阴影计算都使用VEX。这包括光,表面,位移和雾着色器。
-
compositing – The VEX Generator and VEX Filter COPs allows you to write complex custom COPs in VEX. The expressions evaluate very close to C/C++ speeds and run 1000's of times faster than the Pixel Expression COP.
-
合成- VEX Generator 和 VEX Filter COPs 允许我们在VEX中编写复杂的自定义 COPs。这些表达式的计算速度非常接近C/ c++,并且运行速度比像素表达式COP快1000倍。
-
Particles – The POP VOP allows you to do almost anything that POPs can do themselves. It is possible to write one single VEX function which performs the task of many POPs. Because the VEX code is localized to one single operator, the VEX code will typically run faster than a network of POPs.
-
粒子- POP VOP允许你做几乎任何POPs可以做的事。可以编写一个VEX函数来执行多个pop的任务。由于VEX代码本地化为一个操作符,所以VEX代码通常比POPs网络运行得更快。
-
Modeling – The VEX SOP allows you to write a custom surface node that manipulates point attributes. This can move points around, adjust velocities, change colors. As well, you can group points or do many other useful tasks. VEX SOPs typically run 10 or more times faster than a point SOP.
-
建模- VEX SOP允许您编写一个自定义表面节点来操作点属性。它可以移动点,调整速度,改变颜色。此外,您还可以分组点或执行许多其他有用的任务。VEX SOPs通常比SOP节点运行速度快10倍或更多。
-
CHOPs – The VEX CHOP lets you to custom CHOPs. The CHOP functions can manipulate arbitrary numbers of input channels and process channel data in arbitrary ways. In some cases, the VEX code can run faster than compiled C++ code.
-
CHOPs VEX CHOP 让您自定义CHOPs。CHOP函数可以操作任意数量的输入通道,并以任意方式处理通道数据。在某些情况下,VEX代码可以比编译的c++代码运行得更快。
-
Fur – Procedural fur behavior is implemented with VEX.
-
Fur - 程序化 fur 行为是用VEX实现