VEX how to's

   15676   10   1
User Avatar
Member
170 posts
Joined: July 2005
Offline
I don't understand! Where did all the index files go?
How do I make Houdini load my custom VEXSop?
If something changed, why isn't it reflected in the PDFs?
The Things I Do For Love!
User Avatar
Member
170 posts
Joined: July 2005
Offline
Never mind! ops:
The Things I Do For Love!
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
As you probably found out, we still support the old method of bringing in shaders. If you use the Operator Type Manager, you should be able to see all your custom shaders in the Other Scripted Operators folder.

We (SESI) converted all the default shaders in to OTL's but I still have hundreds of my VEX operators at home and they come in fine. I haven't finished converting them to OTL's.
There's at least one school like the old school!
User Avatar
Member
170 posts
Joined: July 2005
Offline
So what do I do?
I still can use index files right?
BTW. Where can I find some VEX examples to look at(I'm especially interested in anything related to VEX Surface OPs)
Most of the default OPs don't have accompanying VFL code.
While “VEX Language Reference” is a good source for finding out about VEX I still have trouble understanding many things due to my inexperienceness in programming so, being able to look at other people's code would be a big help.

This gives me an idea.
Do you think it would be usefull to have a forum here dedicated to VEX?
The Things I Do For Love!
User Avatar
Member
4260 posts
Joined: July 2005
Online
You can look at the code for all the vex releated operators. For example. Create a VEX Plastic SHOP. Then right click on it choose type properties, then go to the VEX Code tab. That's the source.

Other places to check/learn are odforce, and renderman.org. There are a lot of shaders there. While the renderman syntax is slightly different the shaders are good learning tools. Same applies to the Advanced RenderMan book.

jim.
if(coffees<2,round(float),float)
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
A forum dedicated to VEX is a great idea. I shall suggest it. Hardhats must be worn in the vex forum though. 8) I need a hardhat smiley.

I agree with Wolfwood. The Advanced RenderMan book is a must-have and is a great user guide. The Renderman Companion is needed as well but is a technical reference explaining the ins and outs of prman, which is very close to mantra. A third book that I highly recommend is the book Texture and Modelling: A Procedural Approach http://www.csee.umbc.edu/~ebert/book2e.html. [csee.umbc.edu] It has a better explanation of shader anti-aliasing and the different approaches that you can take than Advanced RenderMan. Break out your old math books.
It also has a good chapter on creating good shader UI, rendering volumetrics and fractals up the waazo (Kenton Musgrave).

I always recommend two sites:

The Renderman Repository:
http://www.renderman.org/RMR/ [renderman.org]

Rick May's site: http://www.accad.ohiostate.edu/~smay/RManNotes/rmannotes.html [accad.ohiostate.edu]

I still can use index files right?
Yes, that hasn't changed. You still need to manage your HOUDINI_PATH as well. Compile your shaders, install them in the correct directories, edit the index files, then make sure everything is visible to HOUDINI_PATH or the specialized variants like HOUDINI_VEX_PATH.
There's at least one school like the old school!
User Avatar
Member
170 posts
Joined: July 2005
Offline
Where should i point index file in the first line?
What to include? OTL Librariaes?
As for VEX forum I'll second that again.
Shure, books on using RenderMan is good way of learning but since I don't know PRMan's lahguage, I find it easier for me to start with VEX and than move on to PRMan.
The Things I Do For Love!
User Avatar
Member
4140 posts
Joined: July 2005
Offline
Shure, books on using RenderMan is good way of learning but since I don't know PRMan's lahguage, I find it easier for me to start with VEX and than move on to PRMan.

No question that is true, but unfortunately there's not a lot of places you can get the *theory* behind all this stuff. There's not a lot of books(any?) that go into things like sophisticated AA algorithms that use only pseudo-code - the breaking stuff is in prman and those sources that Jeff mentioned(oops sorry - there's also “Advanced Renderman” by Gritz and Apodeca that's invaluable). They really are the “bibles”. The good news is that VEX and rman and tremendously similar…
Now, if you're talking about “how to write a decal shader” - that's different - existing examples and the proposed VEX forum make more sense than that. However, the really juicy stuff would be those books…

Cheers,

J.C.
John Coldrick
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Since you are interested in geometry VEX operators, we will look at that case directly. All work to be done in $HOME/houdini6 as it is in the default HOUDINI_PATH.
There are now two ways to pick up VEX operators that you write yourself (no VOPs).

- old method of putting compiled shaders and dialogs in to vex/SOP and shop directories (for shaders only), then editing the file VEXsop to point to the new VEX geometry operator.
- new method of using vcc to compile your shader directly in to an OpType Library.

The second method is easier as the output is a single file, and if you choose to put all your VEX geometry nodes in a single OpType Library, then a single file holds all your custom VEX nodes.

In a shell with the houdini environment installed, type vcc -h. I assume that if you are writing shaders, you are using shells. Very difficult to do it any other way really.

You will end up doing something like:

vcc -l my_custom_SOPs.otl fancy_SOP.vfl

This will put the custom SOP fancy_SOP.vfl in to the otl called my_custom_SOPs.otl. If the otl does not exist, it will create it.
Now in Houdini, you just need to install the shader from the File menu and there it is.

Now another pitch for VOPs. If you develop your VEX skills with VOPs, you will have a much easier time of it. Noting will stop you from viewing the code. The code generated from VOPs is very clean and readable. If you want to write code, then I won't stop you at all.

As for the books, they really are indispensible even though they are intended for PRMAN. If you are truly interested in learning the ins and outs of shader writing, you need them. It is the methods that you need to learn. There is a lot of proven standard methods to putting certain parts of shaders together that you just need to know from reference. The Advanced Renderman book explains very well why things are done in particular ways. One example that pertains both to geometry and shaders is the way you displace points based on normals. The Advanced Renderman book explains this very clearly in only a couple pages.


-jeff
There's at least one school like the old school!
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
To see the code for the default shaders in Houdini6, go to $HFS/houdini/otls and expand one of the otls in to $TEMP as follows:

hotl -x $TEMP/houdini_SOPs OPlibSop.otl

Now go to $TEMP/houdini_SOPs. This directory now contains the expanded contents of the default OTL containing all SOPs for you to inspect. Some are built with VOPs, others are old school hand written code. Go in to Sop_1v__mountain as this is hand written. View the VflCode file and that is where the original shader code is contained.

When you run vcc with the -l or -m options on your own handwritten shaders, it packages up your shader code in the same way in a .otl.
There's at least one school like the old school!
User Avatar
Member
170 posts
Joined: July 2005
Offline
Awsome!
Thanks jeff
The Things I Do For Love!
  • Quick Links