Jump to content

computenormal()


Mcronin

Recommended Posts

I saw this function, computenormal(), in the VEX code of a displacement shader. It wasn't profiled in the VEX code and I can't find it in the help docs or through the texports. It takes 3 args, a Point a Normal vector, and a Geometry Normal. Can anyone explain to me how computenormal() works and how to implement it in VOPs? I tried using an inline VOP but that didn't seem to work. Is the normal Vector the displaced N? or N prior to displacement?

Link to comment
Share on other sites

Well, it is in the docs, in the VEX documentation under $HFS/houdini/vex/html/

straight from there:

vector computenormal(vector P, ...)
vector computenormal(vector P, N, Ng, ...)

 Computes the normal for the described by P. This is done performing the cross product of the derivatives of P. The second form takes the original surface normal and geometric normal. The computed normal will be "adjusted" so that interpolated normals will be relatively correct.

 Additional arguments may be specified to control the area computation.

seems to be the same as the renderman shading language 'calculatenormal' function, to recompute N after displacement.

Cheers

Jens

Link to comment
Share on other sites

The Function Quick Reference ($HFS/houdini/vex/html/quickref.html) is quite handy. It lists all functions as links to the descriptions, so you don't have to wade through pages of text to find something..

But the "find on page" idea would be a nice RFE. Should be easy to implent, as mozilla already has this functionality.

Cheers

Jens

Link to comment
Share on other sites

The Find function is already available with the HoudiniBrowser. Just type Ctrl+F to bring up the dialog. B)

Hm, doesn't work for me. :( The only mozilla keybinding I tried that worked so far is Alt+A for Select All.

A normal mozilla works just fine.

6.1.149 under Linux, KDE 3.1

Cheers

Jens

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...