Archived post by lcrs

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

Archived post by jake rice

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 🤷

Archived post by Baldrax

“`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

Archived post by flight404

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