So that it’s kinda like a Sweep node but with multiple and different cross sections. At the start and the end, but maybe also cross sections in the middle. But let's start with start and end:
Here's one MOPs-y way to do it, and one using vanilla Houdini nodes. In MOPs I'm just copying the square shape and the circle shape separately to the same curve, then using a Spline Falloff to create a weight attribute from one end of the curve to the other. Then I can use MOPs Apply Attributes to act as a blend shape based on that weight.
The vanilla way that I could think of was to animate a single point along that spline by abusing Attribute Interpolate, then copying an animated blend from square to circle to that point. Then a Trail SOP to draw the changing shape along the curve over time before a Skin SOP to turn it into a single geometry.
If you want to blend multiple cross sections, use the sequence blend instead of the blendshape.
The sweep node can use the variant attribute to map the cross sections to the curve. To get just the cross sections unskinned, change the output to ‘rows’
Sweet and helpful files, thanks enormously you all
Do you guys think it's possible to determine where on the curve each cross section appears with this sweep/multiple cross sections approach?
I think that needs to happen before the Sweep right? That each cross section has an curveu_position attribute that is somehow taken into account by the sequence blend and thus less blends are created between two cross sections if they are near towards each other, and more when the two sections are far away? or something .. Would that be possible to do in a fairly simple way like MOPs?
I am in for the complex Houdini way but Matts comment has got me curious about the MOPs tools.
I had tried this with MOPs after Matts answer but I was not able to get the correct orientation along the curve while also maintaining the original rotations of the object-merge nodes:
the first cross-section is obviously starting on curveu 0, and last cross-section on curveu 1…
And maybe I would like cross-section2 to be on curveu position 0.1, and cross-section3 on curveu position 0.73. Like, custom curveu positions for these two middle cross-sections (in this example I gave), which will decide where that shape appears on the curve, and maybe also how many interpolations/blends are needed to bridge the length, if you wanted uniform distribution.
I guess I wouldn't mind placing these cross-sections ‘on the curve’ itself before doing this, with a carve (extract point) on the curve and a copy to points a cross-section and in that way decide the position (with the carve).
Here's a couple different ways you can customize which cross-section goes where. @jsmack's example file shows you the correct way to do it with the Sweep SOP using a “variant” attribute… I'm just posting a simplified version of his setup where you use a ramp parameter to control which variant goes where.
I'm attaching a MOPs setup too just for comparison, though to be honest it's not really that much easier in this particular case.
OdFotan That's a good method with good benefits. It's nice that you can decide there also where the cross sections appear via the Animation editor:
Image Not Found
@OdFotan: Glad you find it useful
OdFotan but wow How did you get the nodes to display in the viewport? Reminds me of TouchDesigner.
A lot of custom Python Qt coding
You can see it in action here:
If you like to see this in Houdini, please submit an RFE to SESI so they might consider adding it (RFE ID is 101685). More people would need to express interest to SESI to normalize some of my “out-there” ideas
It will be great also to be able to have a thumbnail capture of the latest node selected when saving to help managing assets. Obviously a more advance option will be to have something like the houdini blueprint website, something which could be batch launch in the background