Blend shapes along curve?

   5495   14   5
User Avatar
Member
192 posts
Joined: April 2015
Offline
Hi,

I was this tutorial and I have been wondering how you could do this along a curve.

https://youtu.be/nN_-uF9VFPs [youtu.be]

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:


Any ideas?


-
Edited by OdFotan - July 16, 2020 19:40:06

Attachments:
blendAlongCurve.hipnc (151.0 KB)
Screenshot 2020-07-17 at 01.34.33.png (521.4 KB)

User Avatar
Member
1795 posts
Joined: May 2006
Online
Here's one way.

  1. make all your blendshapes
  2. give them each a @variant attribute
  3. make a curve, give each point a @variant attribute driven by its position along the curve
  4. copy the shapes onto the curve using the copy to points ‘variant’ option.

There's probably a much easier way to do this with MOPS.

Attachments:
blendshapes_on_curve.hipnc (106.0 KB)
Selection_017.png (124.2 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
382 posts
Joined: April 2017
Offline
Well if Matt's gonna call me out…

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.

Here's the hip…

Attachments:
Untitled.png (436.9 KB)
blend_along_curve_toadstorm.hip (310.5 KB)

MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
8037 posts
Joined: Sept. 2011
Offline
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’

Attachments:
sweep_curve_blend_shape.png (972.6 KB)
sweep_blend_shape.hip (233.6 KB)

User Avatar
Member
493 posts
Joined: July 2005
Offline
Here is another way using sweep and using a foreach with vex to create different cross-sections. The main problem is, that sweep is

not creating inbetween blend values for the float variant attribute, so there is probably no other way to create every cross-section

independently from a base set of cross-sections, where each (new) cross-section represents a discrete variant.

Attachments:
sweep_blend_curves.hipnc (135.1 KB)

User Avatar
Member
192 posts
Joined: April 2015
Offline
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.
User Avatar
Member
382 posts
Joined: April 2017
Offline
Can you elaborate on what exactly you mean here? What do you mean by determining where on the curve each cross section appears?
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
192 posts
Joined: April 2015
Offline
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:

Attachments:
blendAlongCurve4.hipnc (567.6 KB)

User Avatar
Member
192 posts
Joined: April 2015
Offline
I mean,

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).
Edited by OdFotan - July 18, 2020 18:20:12
User Avatar
Member
192 posts
Joined: April 2015
Offline
Ah, see:
I can carve the input curve of these FallOff nodes, this is amazing
Edited by OdFotan - July 18, 2020 18:58:33

Attachments:
ScreenFlow2w.gif (8.3 MB)

User Avatar
Member
382 posts
Joined: April 2017
Offline
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.

Attachments:
sweep_cross_sections_toadstorm.hip (392.3 KB)

MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
4682 posts
Joined: Feb. 2012
Offline
Hi,

You can also do something like this without using a for loop:

Attachments:
blend.hiplc (122.9 KB)

Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
192 posts
Joined: April 2015
Offline
Thanks animatrix_, I am gonna look into the file,

but wow
How did you get the nodes to display in the viewport?
Reminds me of TouchDesigner.


edit:
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:
Edited by OdFotan - July 19, 2020 04:26:02

Attachments:
keyframe.gif (4.4 MB)

User Avatar
Member
4682 posts
Joined: Feb. 2012
Offline
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
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
275 posts
Joined: Sept. 2012
Offline
Thats a serious quality addon!

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
Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
  • Quick Links