Jump to content

galagast

Members
  • Content count

    252
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by galagast

  1. setting the dop io preset

    That 'presets' parameter is calling a callback python script. You could try this: theGeo = hou.node('/obj/geo1/dopio1') # Keyword argument needed by the internal invokePresetMenu function myArgs = {'node': theGeo, 'script_value0': 'pyro'} # The internal python function called by the presets parameter. theGeo.hm().invokePresetMenu(myArgs)
  2. Detection of open and closed surfaces

    Always glad to be of help! Cheers!
  3. Add Name Attribute Via Python

    The documentation is the first thing I look through. But I agree, it does kinda lack in the way of examples. Next I also google stuff, where the results are usually from this forum, or at Sidefx. For general python syntax and functions, I still use google. Lastly, if I have an issue and all of the above is still lacking.. I would try and post a thread to hopefully get some answers. As for examples, I try and check out built-in HDA's and peek inside the Scripts tab, sometimes it contains python code. Also if you explore the Shelf Tools, most of those uses a module in the form of 'tools' that you can find at $HFS\houdini\python2.7libs They have lots of functions there with descriptions. I'm also still just learning as I go with my day to day Houdini adventure. Wishing you the best of luck!
  4. Detection of open and closed surfaces

    Hi, I've updated the file. It now includes a way to create a group for each connected geometry, and only for those that are open. I used the Connectivity SOP to create 'class' IDs for each connected primitive. Passed everything onto a Foreach by the 'class' attribute, then used the npointsgroup() to filter/switch out only the open geometries, where it then creates a unique group just for that using the Partition SOP. H16.5.268 Indie - open_closed_tag.rar
  5. Detection of open and closed surfaces

    @Noobini Haha indeed! All the while I thought that you need to set the the group entity to Edges in order to have access to all the edge related options. So yeah, the Group Promote can be removed in this case, then just set the Group SOP to a Group Type of Points.
  6. Triggering Animated Crowd Layers?

    Closest I was able to do (that was related to this) was to modify the agent transforms in a wrangle. But it might not work if what you want are animated vertices. Maybe have a look at the agentcliptimes() function? I'll try and do a test later if I have time.
  7. Detection of open and closed surfaces

    Hi, I'm not sure if this is what you're after: open_closed.rar (H16.5.268 Indie) I used a group SOP to detect unshared edges, converted that group to points, then used the npointsgroup() expression to count and detect if there are open edges or not.
  8. Orientation Matrix Help?

    Hi, I checked out your scene and updated it. I added two angle values for yaw and pitch, which were then used in a rotate() function sequentially. You still had the @orient attribute passing through the Sweep SOP. Simply delete that and let the sweep use the PolyFrame's tangentu as N. H16.5.268 Indie - water_flower_v005_upl_jeff.rar I hope this helps!
  9. Calculating / matching orientation

    Hi, here's also another approach. Vex based. The only drawback as of now is that this will not work for non-uniformly scaled objects. H16.5.268 Indie - pc_match_jeff.rar
  10. Hey Ben, some of these threads might lead you in the right direction: And just in case you plan to use particles as points to copy onto: I hope this helps!
  11. Add Name Attribute Via Python

    Something like this? node = hou.pwd() geo = node.geometry() geo.addAttrib(hou.attribType.Point, "name", "") for point in geo.points(): point.setAttribValue("name", "piece" + str(point.number())) Then look at this post by Graham explaining why string types does not have a default value.
  12. Hi, I attached a file that goes through some ways I found that will read a channel from CHOPs using SOP wrangles. It is based on the suggestion from this post of adding a spare parameter that reads in the channel using a chop() hscript expression. Then from there, I just discovered that the ch() vex expression can have a second argument that accepts time as an input! With that, you can now use any attribute from your points to sample the channel. In the example file, I sampled using the standard point numbers, and another one using UVs. H16.5.268 Indie - chop_to_sop.rar
  13. Getting OBJID or dop object name in Sop Solver

    If you're using the RBD Packed Object DOP, I believe you're best option is the one you're using now.. the point attributes. $OBJIDs does not represent a unique ID for each packed primitive. It represents a simulation object's unique ID. In the attached file, I've setup a Packed version and Fractured version. Inside the DOP network, if you look at the Geometry Spreadsheet, this is what it would look like comparing the two: For Packed Objects, you'll get just one simulation object. But for a Fractured Object, you'll get each piece as a separate simulation object. EDIT: I accidentally hit the submit button >__< As for accessing the OBJID, use the Fractured Object method. The Sop Solver already has code on how to access it on the dop_geometry SOP inside. (see the stamp function) As an example, in the attached file, I used a Sop Solver to isolate OBJID 8 and shrunk it down during the sim. A drawback with the Fractured Objects method is that it can be slow to process thousands of simulation objects. That is why the packed method was introduced a few versions ago. As another note, the option to choose which method to use also appears whenever using the RBD Fractured Object shelf button: H16.5.268 Indie - dop_objid.rar
  14. Hi, I played around your scene a bit. This is the result. I also ended up changing your extrusion expression using exp() instead of pow(). The gist of it was to do 2 iteration phases. 1 is ahead, and the other is behind. Then just blend between those two. The challenging part was to create the attributes needed to specify the iteration level, and the blending amount (check the blend_and_iter wrangle node for how I processed it). Although this seems to chug to slow when there's already too many polygons to process. I wanted to place it inside a compiled block, but polyExtrudes are not yet compilable. H16.5.268 NC - Subdiv_Test_v2.rar
  15. Hi, I tested this out. Hopefully the attached HDA example is something close to what you're after. Changing the parameters of HDA will also affect a node's parameter inside it. I assigned the ParmTupleChanged callback through the onCreated event (and removed the callback through the OnDeleted event). Although whenever saving the definition, an error pops up. It seems to error out due to a function eval() call to an undefined variable - which will only be filled after the callback fires. I'm not sure how to bypass that >__< H16.5.268 Indie - otl_parm_callback.hdalc On a side note, the example on the docs for the usage of a .ParmTupleChanged (under the addEventCallback) is probably incorrect.. I found this thread which suggested the correct syntax.
  16. Cool setup Matt! Hey @Atom, I believe the re-ccoking is because of the pointwrangle (2nd node from top) that is transforming the points of the mocapbiped in to the camera space of cam1. I didn't know that this technique could be used to to be able to center and tumble around the target for the Geometry COP! Thank you for the file Matt!
  17. Orient Along Organic Surface?

    @MrScienceOfficer: Thank you for the file! Learned a lot in setting up transform matrices in vex. It makes much more sense now! @julian jonhson: Thank you also for the file, a lot going on in the wrangles But indeed, that looks snazzy. This system could very much be also used with the hair grooming tools. Regarding the scaling: That's a much simpler fix! *thumbs up*
  18. Orient Along Organic Surface?

    Hey Atom, try this one. The important part behind it is to note the order of operations for scaling the bbox. I hope this helps! H16.0.736 Indie - ap_stretch_copy_to_primitve_area_110717_jeff.rar
  19. Orient Along Organic Surface?

    Cool Atom! Yours is now much simpler compared to the last file I uploaded It makes much more sense to generate the copynum from the primitives themselves!
  20. Orient Along Organic Surface?

    Hey Atom, I took another stab at it. Here's probably one approach to do it. The idea is to create the needed number of copies for each of the pighead's primitives. So for example, if the pighead has 300 primitives, and we have 3 doodads (sphere, box, teapot) to scatter.. we need to have 100 spheres, 100 boxes, and 100 teapots to create. Then inside the loop, I also offset the copynum that is assigned. I still have a couple of other approaches that I would like to try, but for now this might do. H16.0.745 Apprentice - copy_on_prims_v2.rar
  21. Orient Along Organic Surface?

    That is an absolutely brilliant approach Konstantin! Reading the code is like hearing a very beautifully composed song! Thank you so much
  22. Orient Along Organic Surface?

    Hey Atom, could you try out the attached file? See if this approach would work for you? I basically processed the incoming mesh in a wrangle. It generated the center points, and directly assigned the vector Up and N attributes to each point for alignment. * Just replace the GEO mesh with your mesh. Or in the case of the above GIF, I used the Test Geometry Pig Head, scaled to 7.5 * H16.0.745 Indie -prim_center.zip
  23. One suggestion might be is to run a point wrangle after your crowd_source targeting the packed agents. Then use agentrigfind() to look for the wrist part of the rig. This would return an ID that you could use with the agentlocaltransform() function. From here you would now have a transform matrix that you can randomize, then just write it back to your agents using setagentlocaltransform() Conceptually I believe that would be the workflow
  24. UVs for Changing Topology Cloth

    Awesome! Always glad to help!
  25. UVs for Changing Topology Cloth

    Hi Alvaro, generally you can (as with your other post regarding ID's) also just generate the UV's before the sim. In the attached file, I also added a (hopefully not too complicated) method to generate the uv's after extruding the simulated changing-topo plane. I colored the nodes light green and scattered notes for some of the changes I've made inside the grid_object1. Odforce.uv.jeff.zip
×