Python: evalute point attribute given a uv coordinate

   4455   5   1
User Avatar
Member
2199 posts
Joined: July 2005
Online
Is there a way in python to evaluate an attribute (in this case P) given a prim and a uv coordinate?
I'm guessing yes but have trouble finding a function that seems to do it….
The trick is finding just the right hammer for every screw
User Avatar
Member
1906 posts
Joined: Nov. 2006
Offline
I believe there are functions for that type of lookup on hou.Face or hou.Surface, depending on your geometry type.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
2199 posts
Joined: July 2005
Online
they only seem to be available for curves, i.e you can only specify “u”

Unless it's undocumented?
The trick is finding just the right hammer for every screw
User Avatar
Member
1906 posts
Joined: Nov. 2006
Offline
How lovely. Given the state of HOM it wouldn't surprise me if the documentation was wrong, though that functionality is probably just missing. You might want to submit a support question to be sure though…
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
228 posts
Joined: Dec. 2012
Offline
Edit: These are the closest I could find, but I see what you mean.

surface: attribValueAt [sidefx.com]

face: attribValueAt [sidefx.com]

VEX and Expressions have primUV() so you might want to consider those languages if possible.

But I agree that HOM is still in a pretty early state! Fingers crossed that they will implement more functions soon
www.kmcnamara.com
User Avatar
Member
2199 posts
Joined: July 2005
Online
Yes I hope it gets some more love soon. They got so far with it, it's not missing much. But with VEX improving that does help, just not in this instance. I'll just have to roll my own function.
The trick is finding just the right hammer for every screw
  • Quick Links