Crase

Crase

About Me

Connect

LOCATION
Not Specified
ウェブサイト

Houdini Skills

Availability

Not Specified

Recent Forum Posts

[Vellum] Techniques for driving a mesh 2021年3月16日14:20

Hello !

I am currently using Vellum and I am stubbling across an issue :
I have a mesh I need to drive with an animation, and some collisions from external objects are occuring on it.

To drive the mesh, so far I found that the 'Pin to target' constraint was working pretty well, however when it comes to the collision with it, it seems that the constraint enter in conflict with the collisions, and vibrates a lot.
Only solution I found was to put the constraint Pin to target as 'soft' and increase the damp to calm down the vibrations.

I was wondering if there was any other techniques to drive a mesh in vellum, without using a 'Pin to target' constraint ?

Thanks

Python States Handles - Specifying a position to the handle 2020年11月9日10:14

Hello Everyone !

I am trying to specify the starting position of a handle with a python state, however I can not find the way to do that.
Starting from the sideFx example, the Handle is correctly being called when the user is moving it around with old values ( transform ) and new values, but I could not find anything about changing starting parameters for it.

This is what I am using so far :

from __future__ import print_function
import hou

class PythonTwistState():
    def __init__(self, state_name, scene_viewer):
        self.state_name = state_name
        self.scene_viewer = scene_viewer

    def onHandleToState(self, kwargs):
        # Called when the user manipulates a handle

        handle_name = kwargs["handle"]
        parms = kwargs["parms"]
        prev_parms = kwargs["prev_parms"]

        print("User edited handle:", handle_name)
        for parm_name in kwargs["mod_parms"]:
            old_value = prev_parms[parm_name]
            new_value = parms[parm_name]
            print("%s was: %s now: %s" % (parm_name, old_value, new_value))

    def onStateToHandle(self, kwargs):
        # Called when the user changes parameter(s), so you can update
        # dynamic handles if necessary

        parms = kwargs["parms"]
        print("Parameters are now:", parms)
        for p in parms:
            print(p)


template = hou.ViewerStateTemplate(
    "pythontwist",
    "Python Twist",
    hou.sopNodeTypeCategory()
)
template.bindFactory(PythonTwistState)
template.bindHandle("xform", "twist_handle", cache_previous_parms=True)

hou.ui.registerViewerState(template)

I figured I probably could specify the handle position in a definition ‘OnEnter’ when the python state is activated

Thank you !

Exporting Houdini particles to Maya 2010年7月26日8:51

up