ikSystemInfo Posted July 9, 2010 Share Posted July 9, 2010 I'm wondering if someone could provide a sort of learning road map if I wanted to create a node that is similar to a fixed length curve in maya (you can pull on the last point, and all previous points will adjust to keep the curve at a fixed length). I have some programming/scripting knowledge, and only a little houdini knowledge. Perhaps this can even be created with a dops network, I don't know. I just want to be able to use it real time, interactively. We have a proprietary tool here at work for fur and the curves have locked length so its easy to edit groom (just grab the end and pull it around), I would just like to have the same tool in houdini. Anyways, I'd appreciate it if someone could tell me how they would tackle this project, thanks. 1 Quote Link to comment Share on other sites More sharing options...
Vormav Posted July 9, 2010 Share Posted July 9, 2010 (edited) I'm wondering if someone could provide a sort of learning road map if I wanted to create a node that is similar to a fixed length curve in maya (you can pull on the last point, and all previous points will adjust to keep the curve at a fixed length). I have some programming/scripting knowledge, and only a little houdini knowledge. Perhaps this can even be created with a dops network, I don't know. I just want to be able to use it real time, interactively. We have a proprietary tool here at work for fur and the curves have locked length so its easy to edit groom (just grab the end and pull it around), I would just like to have the same tool in houdini. Anyways, I'd appreciate it if someone could tell me how they would tackle this project, thanks. The resample SOP can already do this. Give it 'max segment length' of const_hair_length/num_segs_in_hair, and a 'maximum segments' of num_segs_in_hair. If you really wanted to roll your own, though, GU_Resample is your friend: const unsigned constLength = 1; // pre-pack array of prims since gu_resample modifies the gdp as we go. UT_PtrArray<GEO_Primitive*> prims; GEO_Primitive* prim; FOR_ALL_PRIMITIVES(gdp, prim) prims.append(prim); GU_Resample resampler; resampler.setLength(constLength); for(unsigned i = 0; i < prims.entries(); ++i) { GEO_Primitive* const thisPrim = prims[i]; GEO_PrimPoly* resampledPrim = resampler.resampleFace(dynamic_cast<GEO_PrimPoly*>(thisPrim)); // obviously you should make sure it really is a primpoly first... gdp->deletePrimitive(*thisPrim); } Rough, but something like that can achieve the same effect. Edited July 9, 2010 by Vormav 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.