Jump to content

vector displacement


jumper

Recommended Posts

Hi,

I was taking a look at the thread over on the sidefx forum ....

http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=15077&postdays=0&postorder=asc&start=25

haikalle had a example of a vector displacemnt shader that worked in h10 then stopped working with H11 ...

The problem seemed to be the vex function..

vop_computeTangents($tanU, $tanV, normalize(N), $uv, 2);

which is in the inline code vop...

In the thread rafal suggests using vop_computeTangentsOld instead. This seemed to work for haikalle ... I tried to simply change the function to vop_computeTangentsOld myself but I was still getting the errors

"/tmp/vop_VEX/displacement50280.vfl" line 110 ERROR (1023) Invalid number/types of arguments used to call "vop_computeTangentsOld"
    vop_computeTangentsOld(tanU, tanV, normalize(N), uv, 2);

                                                           ^
"/tmp/vop_VEX/displacement50280.vfl" line 113 WARNING (2003) Write only or uninitialized variable "tanU" used as argument 2 for "normalize"
    nvec1 = normalize(tanU);

                           ^
"/tmp/vop_VEX/displacement50280.vfl" line 119 WARNING (2003) Write only or uninitialized variable "tanV" used as argument 2 for "normalize"
    nvec2 = normalize(tanV);

Looking at $HFS/houdini/vex/include/voplib.h the function signature for vop_computeTangentsOld() - I noticed the function needed some extra parameters - in_tanu, in_tanv so I added vectors {0,0,0} to the function...

vop_computeTangentsOld($tanU, $tanV, normalize(N), $uv, {0,0,0}, {0,0,0}, 2);

That stopped it erroring but I am not sure this is correct.

Any help will be much appreciated!

Thanks

Stephen

vectorDisp2.hipnc

Link to comment
Share on other sites

you could use Compute Tangents operator instead of an inline if your not sure about it..

or you could just create a Compute Tangents operator in an empty SHOP net and check if your code is correct (by viewing it as VEX code)..

I guess you also need to include voplib.h to use vop_foo functions inside an inline code operator..

hope this helps..

cheers.

Edited by bhaveshpandey
Link to comment
Share on other sites

you could use Compute Tangents operator instead of an inline if your not sure about it..

or you could just create a Compute Tangents operator in an empty SHOP net and check if your code is correct (by viewing it as VEX code)..

I guess you also need to include voplib.h to use vop_foo functions inside an inline code operator..

hope this helps..

cheers.

Hey, Thanks for your help I'll take a look at the Compute Tangents operator.

Cheers!

s

Link to comment
Share on other sites

  • 2 months later...

this example of a vector displacement in mudbox really, really caught my eye.

now that mudbox can paint ptex, and with houdini's support of ptex, then vector displacement support in houdini is even more attractive. Vector displacement and Ptex go hand in hand apparently.

amazing detail can be added to very low poly base meshes with a mudbox / houdini workflow.

amazing ear vector displacement

Pixar Ptex Vector Displacement Mudbox (see timecode 3:22 if nothing else) 1000 poly base mesh. wow. (timecode 28:30)

Edited by smaugthewyrm
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...