Jakob Ringler
jajajakob
About Me
専門知識
Technical Director
業界:
Advertising / Motion Graphics | Design | Film/TV
Houdini Engine
ADVANCED
プロシージャルワークフロー | Digital Assets | Crowds | PDG | VEX | Python
INTERMEDIATE
Environments | Hair & Fur | Cloth | Solaris | Lighting | Pyro FX | Fluids
Availability
I am available for Freelance Work
Recent Forum Posts
Updating / Recooking the UI while running a python loop 2022年1月12日17:55
Hey Guys,
I'm trying to update attributes with a python sop and seeing downstream results live.
I'm using the executeInMainThreadWithResult() function that comes with hdefereval.py and I am able to print the values live in the python shell / console while maintaining an interactive viewport during runtime, but the attributes don't update until the script finished.
Im running this code (HIP is also attached):
Is there a way to hack this together to be able to view the changes of each loop live without having to wait until the full script is processed?
I also tried writing the attributes to a different node & piece of geometry but that didn't work because python sop only gets read access to geometry owned by other respective node.
Any pointers would be much appreciated! Thanks in advance
Best,
j
I'm trying to update attributes with a python sop and seeing downstream results live.
I'm using the executeInMainThreadWithResult() function that comes with hdefereval.py and I am able to print the values live in the python shell / console while maintaining an interactive viewport during runtime, but the attributes don't update until the script finished.
Im running this code (HIP is also attached):
node = hou.pwd() geo = node.geometry() import hou import hdefereval import threading import time points = geo.points() def houdini_command(): for i,point in enumerate(points): point.setAttribValue("move", float(n)) print("running") def updateUI(): hou.ui.triggerUpdate() def worker(): global n n = 0 while n < 5: hdefereval.executeInMainThreadWithResult(houdini_command) hdefereval.executeInMainThreadWithResult(updateUI) time.sleep(.5) print(n) n += 1 thread = threading.Thread(target=worker) thread.daemon = True thread.start()
Is there a way to hack this together to be able to view the changes of each loop live without having to wait until the full script is processed?
I also tried writing the attributes to a different node & piece of geometry but that didn't work because python sop only gets read access to geometry owned by other respective node.
Any pointers would be much appreciated! Thanks in advance
Best,
j
New 18.499 Guide Deform Issues 2021年7月27日17:43
Nothing great at least.
I started setting everything up in a way where only the longest hairstrands are used as guides. (in my example from back than i'd only use the purple ones)
Therefore all the shorter ones follow the deformation okayish. Most of the time this works pretty well.
I also extend the guides by 20% before capturing the full groom. That way i make sure everything else is shorter and can be captured properly. However this is a very hacky way and doesn't work well when you need to have accurate collisions.
I started setting everything up in a way where only the longest hairstrands are used as guides. (in my example from back than i'd only use the purple ones)
Therefore all the shorter ones follow the deformation okayish. Most of the time this works pretty well.
I also extend the guides by 20% before capturing the full groom. That way i make sure everything else is shorter and can be captured properly. However this is a very hacky way and doesn't work well when you need to have accurate collisions.
New 18.499 Guide Deform Issues 2021年2月27日10:54
I'm on 18.5.351 still and I have the same issue.
Using Barycentric weights and no "Split Clumps" and no "Pick Single Best Guide" gives me the "best" results. But it still has issues like yours.
Every other method seems to be even worse. (eg. with "Split Clumps" turned on or the legacy Per Point Capture mode)
Example:
The deformed guides
the fully deformed groom
full groom deformed with guides (barycentric weights)
full groom deformed with guides (per point capture)
Best
J
Using Barycentric weights and no "Split Clumps" and no "Pick Single Best Guide" gives me the "best" results. But it still has issues like yours.
Every other method seems to be even worse. (eg. with "Split Clumps" turned on or the legacy Per Point Capture mode)
Example:
The deformed guides
the fully deformed groom
full groom deformed with guides (barycentric weights)
full groom deformed with guides (per point capture)
Best
J