Archived post by Lewis Orton

TLDR: Pop fluid node is based on PBD fluid which is partially based on XSPH with some fundamental difference, but it’s not part of the vellum solver, not yet. The Pop Fluid node contains a PBD fluid solver, which is based on the paper by Miles Macklin and Mattias Muller in 2013 from NVIDIA. The difference between traditional SPH and PBD fluid is, SPH uses a kernel to “smooth out” essential attributes around every particle, whose neighbors are within the smoothing radius, so it tends to get unstable when nearby density is inconsistent and requires lots of substeps to solve the problem, very costly. PBD fluid (which contains parts of the XSPH) tries to solve this problem by bringing the pressure solving stage(where the density problem happens) into the PBD framework, which uses constraints to solve problems (constraints avoids). Basically, a new type of constraint which is based on the positions of each particle, rather than a smoothing kernel, is introduced to help to get a more consistent density with iterations(by updating positions directly within each iteration, not accumulating pressure throughout all the substeps and then apply forces).

feel free to correct me if I am wrong

Archived post by lcrs

my fave for doing extract transform in SOPs is this, which gets the full 4@ including scale and possibly skew

instead of using the first 3 points of the first prim you can use first/middle/last points of the full mesh if you have worries about there being some non-affine local deformation

Archived post by Nick D

Here’s a script to flipbook stuff out, and then mp4 it: “`python import toolutils import os import subprocess
def flip(): scene_viewer = toolutils.sceneViewer() flipbook_options = scene_viewer.flipbookSettings().stash() flipbook_options.frameRange( (hou.playbar.frameRange()[0],hou.playbar.frameRange()[1]) ) output = hou.hscriptExpandString(‘$HIP/flipbook/$HIPNAME/$HIPNAME.f.png’).replace(‘.f.’,’.$F4.’) if not os.path.exists(os.path.split(output)[0]): os.makedirs(os.path.split(output)[0]) flipbook_options.output(output) scene_viewer.flipbook(scene_viewer.curViewport(), flipbook_options) ffImage = output.replace(‘$F4′,’%04d’) movPath = output.replace(‘$F4.png’,’mp4′) proc = subprocess.Popen(r’ffmpeg -y -start_number %s -i “%s” -c:v libx264 -preset slow -pix_fmt yuv420p -crf 22 -c:a copy %s’ %(hou.playbar.frameRange()[0],ffImage,movPath)) proc.communicate() proc.wait() print(‘Done’) “`

hmmm, that’s maybe a bit spammy, sorry

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