sea Posted April 3, 2012 Share Posted April 3, 2012 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 Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted April 3, 2012 Share Posted April 3, 2012 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. Quote Link to comment Share on other sites More sharing options...
sea Posted April 4, 2012 Author Share Posted April 4, 2012 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 Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted April 4, 2012 Share Posted April 4, 2012 Sorry but I am not understanding what you are trying to do. By creating points do you mean. 1. Scattering points? 2. Emitting particles? 3. Adding additional points to the geometry? Quote Link to comment Share on other sites More sharing options...
tjeeds Posted April 4, 2012 Share Posted April 4, 2012 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. 1 Quote Link to comment Share on other sites More sharing options...
sea Posted April 5, 2012 Author Share Posted April 5, 2012 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 Quote Link to comment Share on other sites More sharing options...
tjeeds Posted April 5, 2012 Share Posted April 5, 2012 of course it's possible in houdini, you just need to get familiar with the methods i posted before. Here's a simple setup with a single point and multiple points. uvprim.hip Quote Link to comment Share on other sites More sharing options...
sea Posted April 5, 2012 Author Share Posted April 5, 2012 thank you very much , you do give me some idea, thank you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.