3
$\begingroup$

How to animate these DNA bases that are being added one by one . How to assemble them? Do we have to do this with keyframes only, or we have any faster method?

enter image description here

Youtube Video [Timestamp: 1:25]

TIME = 1:33 TO 2:00

$\endgroup$
6
  • 7
    $\begingroup$ Hi there : ) While asking a question please don't use all caps as it is considered as yelling and it is rude. $\endgroup$
    – Nxdhin
    Aug 29, 2020 at 8:12
  • 4
    $\begingroup$ Hello and welcome. Please edit your question and write a short readable title that summarizes the content of the question. Also explain what you are trying to do so that watching a YouTube video is not required to understand what you want $\endgroup$ Aug 29, 2020 at 10:28
  • 3
    $\begingroup$ Personally, I would shoot this in reverse. Start with the assembled strand of matching components. and use some simulation to have them drift away. $\endgroup$
    – Robin Betts
    Aug 31, 2020 at 10:26
  • $\begingroup$ @RobinBetts, that was my first though, but failed to do it so far... any idea? $\endgroup$
    – lemon
    Aug 31, 2020 at 11:21
  • $\begingroup$ @RobinBetts, long time I haven't played with PS... wanted to animate a texture UV but does not work. $\endgroup$
    – lemon
    Aug 31, 2020 at 12:19

2 Answers 2

7
$\begingroup$

Here is a way to do it, a bit tedious because you have a lot of duplications and NLA strips to move but it works.

Basically the method is to create 3 linked-duplicated bars, create an action for each one that makes it stick to the vertical bars, push these actions into the NLA, link-duplicate these 3 different bars and, in the NLA, move the strips so that it delays the animation for each one.

  • Create the path, create one vertical bar, give it a Follow Path constraint with the path as Target, click on Animate Path.
  • Link-duplicate the bar (AltD), in the Follow Path constraint change its Offset so that it's a bit in front of the first one. Repeat until you have a lot of bars.

enter image description here

  • Create a second bar, put it somewhere above the path, where it can't be seen by your camera at the beginning of its animation, animate it so that at one key moment it sticks to the vertical bar. Then create a last keyframe so that it keeps sticking to the vertical bar until the end of the animation, for this last part make sure that the animation is linear (in the Dope Sheet select the keyframes and press T > Linear)

enter image description here

  • In the Dope Sheet, press Push Down in order to push the animation into the NLA.
  • Link-duplicate this second bar, in the NLA, move the second bar's strip so that it sticks perfectly to another vertical bar:

enter image description here

  • Link-duplicate the bar, create a second animation in the Dope Sheet that makes it stick to the second vertical bar, push the action in the NLA:

enter image description here

  • Then same thing, link-duplicate this bar, in the NLA move the strip so that it makes it sticks to another vertical bar, and so on:

enter image description here

$\endgroup$
6
$\begingroup$

One method would be to shoot a Rigid-Body simulation in reverse. This way round, the enzyme comes along and tears the nucleotide pairs apart, and leaves them to drift in whatever force-fields you have placed in the scene.

  • The static 'Base' nucleotides are marked as Passive
  • The initially-attached 'Hero' nucleotides are Active, bound to the Bases by Rigid Body Constraints.

There are 2 Constraints binding the pairs: a 'Fixed' constraint and a 'Point' constraint. (Header > Object menu > Rigid Body > Connect) Their Enabled properties are driven by the signed distance of the enzyme, so they are disabled when the enzyme is close enough. The constraints both use the same driver function, using self, so it can be copied from one constraint to another:

import bpy

def EzRip(self,x_diff):
    
    # the X location of the Empty implementing the constraint
    ownX = self.id_data.location.x
    
    # the X location of the Enzyme
    enzX = bpy.data.objects['Enzyme'].location.x
    
    return(int((ownX - enzX) < -x_diff)) 

 
bpy.app.driver_namespace["EzRip"] = EzRip

(The function is then registered with the file.) The x_diff parameter is set large for the 'Fixed' constraint, so the rigid connection is broken some distance from the enzyme, letting the hero swing on the 'Point' constraint, which is broken when the enzyme is much closer.

enter image description here

Once a single pair is set up this way, it can be AltD instanced down the strip, along with its constraints.

Forces (Wind, Turbulence, Gravity, etc.) can then be set up in the scene, to blow the heroes away once they are disconnected, and background nucleotides can be scattered in the scene.

When played back in reverse, this can be the sort of result:

enter image description here

The simulation is cached in this .blend:

$\endgroup$
3
  • 3
    $\begingroup$ Finally, you did it! $\endgroup$
    – lemon
    Sep 1, 2020 at 11:17
  • 2
    $\begingroup$ I haven't had much time.. I hope this isn't too late .. and I got caught out by the **ing 'Auto' animate button, for a bit.. :D $\endgroup$
    – Robin Betts
    Sep 1, 2020 at 11:21
  • $\begingroup$ thanks a lot, sir! $\endgroup$
    – sumix
    Sep 10, 2020 at 13:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .