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?
Youtube Video [Timestamp: 1:25]
TIME = 1:33 TO 2:00
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.
Sign up to join this communityHow 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?
Youtube Video [Timestamp: 1:25]
TIME = 1:33 TO 2:00
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.
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.
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.
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:
The simulation is cached in this .blend: