Jump to content

question about houdin function


sea

Recommended Posts

Hi :

how are you ? I have a question , is there some function by that we can get position base on UV , I know we have prim() function , but we have to input primeID ,

you know sometimes , we got a polygon model with UV attribute , I need get a position on the polygon base on UV but we do not know which primeID is it .

just like pointOnMesh() function in maya .

thank you very much

Link to comment
Share on other sites

I guess this is in a shop context. If so you can create a point attribute where you store the primitive ID and then use a parameter node to bring it into your shader.

thank you answer me , but it is not for shader , I want to create some points base on uvmap of poly

james

Link to comment
Share on other sites

There are some expressions which may be close to what you're after, nearpoint() and pointdist()/xyzdist(). The first will give you the nearest point on a mesh from a coordinate, the others will give you primitve number and the nearest parametric uv on that primitive. To get the parametric uv you must first find the nearest primitive, then use that number again in the same expressions to get u and v. This information is now exposed in the H12 Scatter SOP, so if you're scattering points it's much easier to get at that way. You can use this information to do all kinds of cool stuff in VOPS.

If you intend to use a uv attribute you could use nearpoint() as long as you make sure that your attribute is point class and not vertex class. If it's vertex you'll have to promote it.

  • Like 1
Link to comment
Share on other sites

hi :

did you know follicle node in maya , we just need input u , v and a polygon with uv , than it will return a world position on polygon surface . that is what I want , it is possible in houdini ?

thank you for reply

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