Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Motion/Moving effect with animation on still image

I am trying to implement animation in a still image in a user-guided direction, something like this:

Original image

original image

Expected result

expected result

For this, I have tried the CIBumpDistortionLinear CIFilter. It is animating, but the animation is not exactly like that.

let bumpDistortionLinearParams: [String: AnyObject] = [
    kCIInputImageKey: coreImage!,
    "inputCenter" : CIVector(string: coordStr),
    "inputRadius": 300.0 as AnyObject,
    "inputAngle" : 90.0 as AnyObject,
    "inputScale" : 0.1 as AnyObject
]

let bumpDistortionLinear = CIFilter(name: "CIBumpDistortionLinear", parameters: bumpDistortionLinearParams)
like image 456
Arvind Avatar asked Jun 14 '19 10:06

Arvind


People also ask

Can you make a picture look like it's moving?

StoryZ lets you quickly blend powerful art and special effects with your photos. Create animated Double Exposure Effect with combination of static imagery and overlay video. Storyz is a unique app to create and share photo motion art. Bring your photographs to life with user-friendly and simple tools.

What is the app that makes still pictures move?

Motionleap brings life to images through animation, creating moving pictures that will wow anyone from your friends to Instagram followers. Animate one element or several, drawing attention to parts of your photo that YOU want to come alive.


1 Answers

You can use SpriteKit with SKTexture / SKTextureAtlas.
Small example:
https://www.raywenderlich.com/144-spritekit-animations-and-texture-atlases-in-swift

Update:
If you need dynamic animation, you can make solution base on Metal
Example:
https://github.com/KrisYu/Water
Metal tutorial:
http://metalkit.org/

like image 126
Eysner Avatar answered Oct 21 '22 19:10

Eysner