VEX s,t parameter scaling

   5049   5   1
User Avatar
Member
301 posts
Joined: July 2005
Offline
I come from a RenderMan shader background and learning VEX now.

I wrote a simple checker shader in VEX, it works on a NURBS Grid SOP.

I added a Texture SOP between the Grid SOP and Shader SOP in the hope to get a denser checker pattern. It did not work as expected.

Following that, I created another scene with a Grid SOP, followed by a Texture SOP finally followed by a Shader SOP. This time round, I use the provided VEX Decal shader. I was able to scale/repeat the decal successfully.

Is there some hint I have to pass on to shader compiler to get the texture coordinate from the SOP? Am I solving the problem along the correct path.

I notice there is UV and there is ST, is it the case that s,t are the parameter for the geometry whereas I should be using the uv information and that I should hide the uv parameter via #hint

A sample shader would be helpful.

Hope I have explain my problem well.

Cheers

Nicholas Yue
Nicholas Yue
User Avatar
Member
7715 posts
Joined: July 2005
Offline
The source code for all the standard VEX shops are available. Right-click on an instance of the VEX Decal SHOP, choose “Operator Type Manager…”. This should pop up a new dialog with the entry on Shop/v_decal. Right-click on this name and choose “Edit Contents…”. Select “Vfl Code”. Now you can copy out the source code and examine at your leisure.
User Avatar
Staff
4438 posts
Joined: July 2005
Offline
You can also see the code for any SHOP by choosing “Type Properties…” from the RMB menu, and going to the VEX Code page. The advantage of this dialog is that you can actually edit the code and your changes will be applied automatically, so you can easily experiment with the existing code.

Mark
User Avatar
Member
301 posts
Joined: July 2005
Offline
mtucker
You can also see the code for any SHOP by choosing “Type Properties…” from the RMB menu, and going to the VEX Code page. The advantage of this dialog is that you can actually edit the code and your changes will be applied automatically, so you can easily experiment with the existing code.

Mark

I tried the above, it displayed

“No VEX Code associated with this operator”

I am using 6.1.175 Houdini Master Apprentice on WindowsXP

Anyone can shed more light on this?

Nicholas Yue
User Avatar
Member
225 posts
Joined: July 2005
Offline
you're trying to view the code of the shop “sop”, not on
You can view code of the shops (shaders) themselves, go to shops and create any shader, RMB type properties and view the code in the vex tab
User Avatar
Member
301 posts
Joined: July 2005
Offline
tallkien
you're trying to view the code of the shop “sop”, not on
You can view code of the shops (shaders) themselves, go to shops and create any shader, RMB type properties and view the code in the vex tab

Cool, I got it.
Nicholas Yue
  • Quick Links