cloudfx Posted September 27, 2012 Share Posted September 27, 2012 (edited) Hi, I am trying to make a point deformer and I am stucked in a step. Here is my plans copy all the points that I want to deform to the polygon object so they are 1 object using hou.geo.createPoint in python. get uv attributes from the object copy the uv attributes of first frame so it will contain the static uv value while the object is deforming. get position value from the uv and fetch the output position value to the points that I want to deform but it seems like from the uv, it's not getting the right position. Can anybody take a look inside of this file and what step I am missing? point copy to object python script node = hou.pwd()geo = node.geometry()geo2 = node.inputs()[1].geometry()ptGrp = geo.createPointGroup("ptGrp")for point in geo2.points():pos = point.attribValue("P")pt = geo.createPoint()pt.setAttribValue("P" , pos)ptGrp.add(pt)[/CODE][b]get position by uv and fetch to the original points script[/b][CODE]node = hou.pwd()geoPdef = hou.pwd().geometry()geoAnim = node.inputs()[1].geometry()fPtGrp = geoAnim.findPointGroup("ptGrp")ptsGrp = fPtGrp.points()i = 0for point in geoPdef.points():pt = ptsGrp[i]ppos = pt.attribValue("P")nprim = geoAnim.nearestPrim(ppos)[0]u = pt.attribValue("uv")[0]v = pt.attribValue("uv")[1]pos = nprim.positionAt(u)point.setAttribValue("P" , pos)i += 1 [/CODE]test.hip Edited September 27, 2012 by cloudfx Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.