houdinitricks.com/sample-colors-outside-of-houdini/
?
used stuff like this a lot to do grassy fields and tbh we didn’t always have it generate the geo inside mantra, you can switch the hairgen to just creating standard SOPs geo. obvi the IFDs got massive that way, but if you’re rendering from Indie direct to mantra i’m not sure there’s much speed or memory improvement having it generate inside mantra vs. baked inside H and then streaming the geo to mantra… 100 curves with 300k render-time hairs here streamable.com/m6km2
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20185309/07/18/Ls_hairgen_from_lines_v02.hiplc
yeah 😦 i could potentially have a catch for that
😮
secccc
“`c //this still goes in a prim wrangle void select_border_diff(string current_group; int primnum){ int in_curr = inprimgroup(0, current_group, primnum); if(!in_curr) return; int h = primhedge(0, primnum); int temp = h; do{ int nb_prim = hedge_prim(0, hedge_nextequiv(0, h)); if(!inprimgroup(0, current_group, nb_prim)) setedgegroup(0, “border”, hedge_srcpoint(0, h), hedge_dstpoint(0, h), 1); h = hedge_next(0, h); }while(h != temp); } string a = chs(“group_a”); int in_a = inprimgroup(0, a, @primnum); select_border_diff(a, @primnum); “` this one selects only the border of a single given group
which is what i shouldve done in the first place but 🤷
“`python class InLockedAsset(): ”’Class for unlocking and relocking nested nodes.”’ def __init__(self, node=None, verbose=False): self.baseNode = node self.verbose = verbose print ‘BASENODE:’,node.path(), self.baseNode.path() self.isInLockedAsset = self.baseNode.isInsideLockedHDA() self.__buildLockedNodeList__() def __buildLockedNodeList__(self): self.__lockedNodeList__ = [] inLockedAsset = self.isInLockedAsset currentNode = self.baseNode while inLockedAsset: currentNode = currentNode.parent() if isHDA(currentNode): self.__lockedNodeList__.append(currentNode) inLockedAsset = currentNode.isInsideLockedHDA() self.__lockedNodeList__.reverse() def firstUnlockedParent(self): if len(self.__lockedNodeList__) > 0: return self.__lockedNodeList__[0] else: return None def unlockParentNodes(self): for currentNode in self.__lockedNodeList__: print ‘Unlocking asset: %s’ % currentNode.path() currentNode.allowEditingOfContents() def relockParents(self): topParent = self.firstUnlockedParent() if topParent is not None: try: print ‘Re-locking asset: %s’ % topParent.path() topParent.matchCurrentDefinition() except hou.OperationFailed: if topParent.isLocked(): pass else: topParent.matchCurrentDefinition() “` Usage: “`python inAssetNode = InLockedAsset(node=’/path/to/node’) inAssetNode.unlockParentNodes() “` Then, if you want to re-lock them: “`python inAssetNode.relockParents() “` Feel free to clean this up. Some funky stuff in there.
Needs this too: “`python def isHDA(node): try: node.type().definition().libraryFilePath() return True except: return False “`
Old eyes
there is a way it can work
if I remember right the timeshift wont work on something coming through the fetch input block begin but if it comes into the blob this way it’s ok
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20181408/08/18/timeshift_foreach_01.hip
“`vlength(vtorigin(“.”, “../YOUR_FOCUS_OBJECT_HERE/”))“`
that’s how ud do it
Hey chaps, handy little snippet which you may already be aware of to find the closest point that is not self: `int nearpt = nearpoints(0, @P, 1e34, 2)[1:][0];`
i did a little write-up on how to roll your own VEXpressions using Python: www.toadstorm.com/blog/?p=595
Quick tip: hold down middle mouse button on any color parameter, you can sample any pixel’s color on your whole screen even outside Houdini, cross platform!
maybe I am the last one who learned this 😅
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20181106/10/18/unknown.png
Here is Rich Lord’s awesome Vex/Vop math hip. Great for learning the ins and outs of orientation, quaternions, dihedral, etc: http://richardlord.tumblr.com/post/159277887181/ive-started-collecting-a-bunch-of-tricks-i-use-a
probalby grab it from there instead since I mightve made modifications by mistake