7

I'm trying to make a curve to behave like in the image, without success :(

I tried to search for an answer but couldn't find. Particles are a bit of out of the question here since I need super-clean and smooth line.

What could be the answer?

Here's the .blend of that image:

enter image description here

Manu Järvinen
  • 7,392
  • 2
  • 25
  • 62
  • 2
    https://blender.stackexchange.com/questions/187019 https://blender.stackexchange.com/questions/48801 https://blender.stackexchange.com/questions/121357 https://blender.stackexchange.com/questions/76756 – Duarte Farrajota Ramos Oct 05 '20 at 13:17

4 Answers4

13

Wow, found a wonderful method.

You see, you can add a curve modifier to a curve, who knew!? :)

  1. I made a CURVE profile to the ground that should be followed
  2. Then I added the CURVE_toothpaste that is the shape of toothpaste coming out of tube and put a curve modifier to it, so that it follows the PROFILE
  3. Then I animated the location of the CURVE_toothpaste
  4. And also animated the location of the toothpaste_squeezer that followed the profile curve (note that the animation happens on the curve, not on the squeezer)

See the .blend for clarification

enter image description here

.Blend here:

Manu Järvinen
  • 7,392
  • 2
  • 25
  • 62
  • 1
    wow fantastic, now I need to understand lol – moonboots Oct 05 '20 at 20:59
  • nice, but the start of your paste follows along, is there a way to avoid that? Like playing with Start and End values? – moonboots Oct 05 '20 at 21:12
  • That's a good point - this was enough for my purposes. Hmm.... You could try something with the CURVE_toothpaste shapekeys? If you cram all the points together and animate the shapekey..... ? dunno – Manu Järvinen Oct 05 '20 at 21:15
6

If you don't want to make it with physics (which is probably the most realistic solution), you could try it with hooks:

  • Create a curve that you subdivide, you need as many vertices as you have bends. Hook each vertex to an empty with CtrlH > Hook to New Object:

enter image description here

  • Animate the tube, then animate the empties so that they follow and fall on the ground:

enter image description here

  • If you ever need to make the curve rounder, scale the empty and keyframe again:

enter image description here

moonboots
  • 155,560
  • 7
  • 105
  • 171
  • Wonderful idea! I might give this a go, I probably can backtrack the creation of the toothpasted curve figure I need to make. Thank you! – Manu Järvinen Oct 05 '20 at 13:51
  • you're welcome, it needs a bit of tweaking to make it look a bit realistic ;) – moonboots Oct 05 '20 at 13:53
  • Btw, did you use parent constraint or something so that the empties follow the tube at first but then stick to ground? – Manu Järvinen Oct 05 '20 at 18:22
  • no, just put the empty where they are supposed to be at moment M and keyframe, then continue, and bring some corrections if necessary – moonboots Oct 05 '20 at 18:24
  • Ah, yes, I got it - I shall make some tests, also with the parent constraint now that I mentioned it. But, holy shiet! You can also use curve modifier on a curve.. this will allow some very interesting mechanics, I will post a new test soon :) – Manu Järvinen Oct 05 '20 at 18:26
  • to be more precise, first keyframe the tube (one keyframe each time it changes direction), keyframe the empties at the exact same moments, except each time one sticks to the ground, then the next, etc... Once you'll try it will be easy ;) – moonboots Oct 05 '20 at 18:38
3

This was also one partial solution, to keyframe the curve shape key and to have a separate mesh-tube that followed the curve and was animated... backwards. Not a very handy solution unless the toothpaste-tube makes a straight line.

enter image description here

Manu Järvinen
  • 7,392
  • 2
  • 25
  • 62
2

Flip Fluids [$]

Well yeah I said no particles, but managed to make quite close one with the Flip Fluids test scenario file settings. But you need the commercial Flip Fluids add-on for this to work.

If you just crank the domain's resolution settings higher you get some smooth toothpaste. But this is quite heavy on the computer. If you type more than a couple of letters with this stuff it'll get reeeeeeaaallly slow.

My Flip Fluids version is flip_fluids_addon-1.0.8a_stable_05-mar-2020 and Blender is 2.90.1

enter image description here

Manu Järvinen
  • 7,392
  • 2
  • 25
  • 62