vex beginner
23561 20 2- bobster
- Member
- 88 posts
- Joined: March 2006
- Offline
- Cylibral
- Member
- 135 posts
- Joined: July 2005
- Offline
hey Bobster
You can try this websites… this shows pretty much how everything is written out…
http://odforce.net/tips/shaderwriting1.php [odforce.net]
http://odforce.net/wiki/index.php/VEXUsageTips [odforce.net]
http://odforce.net/wiki/index.php/VEX [odforce.net]
http://odforce.net/happy_rendering_with_vex/ [odforce.net]
these should help and also the help section in Houdini would help as well as give you examples on how it all works…
Good luck man…..
PS…If you can get the Houdini book it;s good as well…
You can try this websites… this shows pretty much how everything is written out…
http://odforce.net/tips/shaderwriting1.php [odforce.net]
http://odforce.net/wiki/index.php/VEXUsageTips [odforce.net]
http://odforce.net/wiki/index.php/VEX [odforce.net]
http://odforce.net/happy_rendering_with_vex/ [odforce.net]
these should help and also the help section in Houdini would help as well as give you examples on how it all works…
Good luck man…..
PS…If you can get the Houdini book it;s good as well…
3D Mind body and Soul Great illusions are done by great artists…
- Mario Marengo
- Member
- 941 posts
- Joined: July 2005
- Offline
bobster
Can someone please show me a simple step by step for compiling a simple vex code to implimenting it into the inline vop to applying it to some geometry. From what I gather you just need to run vcc test.vfl but I can't seem to make anything happen with it. Much appreciated.
Building From VEX code:
1. Write your code:
#pragma opname test
#pragma oplabel “Test Compilation”
#pragma label Cd “Surface Color”
#pragma hint Cd color
surface test ( vector Cd = 1 { Cf = Cd; }
and save it to a file (say, “test.vfl”).
2. Compile and create an OTL (which builds a dialog for our shader, using those #pragmas that we put in there, as well as the default data-type UI).
Go to where you saved “test.vfl” and type:
vcc -l test.otl test.vfl
If compilation succeeded, then you should see an OTL file called “test.otl” alongside your original source file “test.vfl”.
3. Start Houdini and go to “File>Install Operator Type Library…” and load the otl we just created (test.otl). Go to /shop and TAB>“te” – you should see the “Test Compilation” shader in the tab menu. Use it as you would any other shader (e.g: drag-and-drop onto your object in the viewport).
Adding Inline Code Using the Inline VOP:
The contents of the InlineVOP are inserted into the body of the context function (e.g: the body of the actual shader in the surface-shading context). The only caveat is that you should precede any local variable names with a dollar sign ($) – this is to avoid name clashes when Houdini builds the vex code. So:
1. Start Houdini and go into /vex (or the “VEX Builder” desktop if you prefer). TAB-add a “VEX Surface Shader” operator. Call it “inlinetest”, and set its “SHOP Type Name” parameter to “Inline Test”. Go into it (press Enter).
You'll see an Output VOP called “ouput1” in there – ignore it for now.
2. Add a Parameter VOP (TAB>“par”>Enter) with:
Parameter Type -> Color
Parameter Name -> “Cd” (no quotes)
Parameter Label -> “Surface Color” (no quotes)
Color>Color Default -> 1 1 1
3. Add an Inline VOP with:
Output 1 Type -> Vector
Output 1 Name -> “col”, “col” (no quotes)
4. Connect the “Cd” output of the ParameterVOP to the first input of the Inline VOP (labeled “next”). Select the inline vop, click on the “Inline VEX Code” field, and type Alt+e to bring up the text editor.
5. In the test editor's top pane, type:
$col = $Cd;
and hit Accept to dismiss the editor and accept its contents.
6. Connect the “col” output of the InlineVOP to the “Cf” input of the OutputVOP (all shaders have a fixed Output VOP – you don't add that one yourself, it's added for you).
7. RMB on any one of the VOPs you just created and from the popup menu select “Create New Shop From VOP Network”. Now go to /shop and you should see a new “inlinetest1” shop. Use as you would any other shader.
HTH.
…waiting for renders to finish…
- edward
- Member
- 7773 posts
- Joined: July 2005
- Offline
- bobster
- Member
- 88 posts
- Joined: March 2006
- Offline
- Cylibral
- Member
- 135 posts
- Joined: July 2005
- Offline
- Mario Marengo
- Member
- 941 posts
- Joined: July 2005
- Offline
- edward
- Member
- 7773 posts
- Joined: July 2005
- Offline
I've taken the liberty of adding it to the odwiki here:
http://odforce.net/wiki/index.php/CompilingVEXCode [odforce.net]
http://odforce.net/wiki/index.php/CompilingVEXCode [odforce.net]
- pbowmar
- Member
- 7044 posts
- Joined: July 2005
- Offline
What I can't understand is why the fairly extensive docs I wrote for H4 (first version of VEX) have disappeared from the Houdini docs, since they took you through all this stuff, shader concepts and examples of writing all the different types of VEX ops and shaders. If they sucked, maybe someone should have said so and had them fixed
Cheers,
Peter B
Cheers,
Peter B
Cheers,
Peter Bowmar
____________
Houdini 20.5.262 Win 10 Py 3.11
Peter Bowmar
____________
Houdini 20.5.262 Win 10 Py 3.11
- Mario Marengo
- Member
- 941 posts
- Joined: July 2005
- Offline
edward
I've taken the liberty of adding it to the odwiki here:
http://odforce.net/wiki/index.php/CompilingVEXCode [odforce.net]
Thanks a lot Ed!
@peter: If you still have them kicking around, maybe you can add them to the wiki as well? – I'm sure they're good, and VEX hasn't changed all that much so they couldn't have become obsolete
Cheers.
- mfilter
- Member
- 1 posts
- Joined: March 2007
- Offline
pbowmar
What I can't understand is why the fairly extensive docs I wrote for H4 (first version of VEX) have disappeared from the Houdini docs, since they took you through all this stuff, shader concepts and examples of writing all the different types of VEX ops and shaders.
Are these docs still available somewhere? Sounds useful to me!
- AlvinYap
- Member
- 56 posts
- Joined: March 2007
- Offline
Hey welcome to the forum!
I think these may be the ones:
http://www.soulvector.com/pages/tutorials/houdini/ [soulvector.com]
Scroll down to the Vex* docs.
Alvin
I think these may be the ones:
http://www.soulvector.com/pages/tutorials/houdini/ [soulvector.com]
Scroll down to the Vex* docs.
Alvin
- pbowmar
- Member
- 7044 posts
- Joined: July 2005
- Offline
- graphos1
- Member
- 53 posts
- Joined:
- Offline
- pbowmar
- Member
- 7044 posts
- Joined: July 2005
- Offline
- AlvinYap
- Member
- 56 posts
- Joined: March 2007
- Offline
- pbowmar
- Member
- 7044 posts
- Joined: July 2005
- Offline
- AlvinYap
- Member
- 56 posts
- Joined: March 2007
- Offline
- pbowmar
- Member
- 7044 posts
- Joined: July 2005
- Offline
- AlvinYap
- Member
- 56 posts
- Joined: March 2007
- Offline
-
- Quick Links