| Anonymous | Login | Signup for a new account | 2013-05-18 14:32 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
| 0000885 | Kdenlive | Effects | public | 2009-06-02 11:11 | 2009-07-23 21:04 | ||||||||
| Reporter | Granjow | ||||||||||||
| Assigned To | |||||||||||||
| Priority | normal | Severity | feature | Reproducibility | always | ||||||||
| Status | new | Resolution | open | ||||||||||
| Platform | OS | OS Version | |||||||||||
| Product Version | Recent git | ||||||||||||
| Target Version | Fixed in Version | ||||||||||||
| Summary | 0000885: Allow non-linear movements for Composite effect | ||||||||||||
| Description | At the moment moving/scrolling a clip is linear, the speed changes from 0 directly to e.g. 4 Pixel per second and stays there. Non-linear movements would be nice here. Cosine and sine look kind of natural. | ||||||||||||
| Additional Information | Example Java code I've used for one of my projects. HILL goes a little bit over the target position and floats back again. SINE2 is just the square sine, it stops a little faster. /** * Paints the currently visible part of the image. * If the animation has been started, the position will be calculated * by looking at the passed time, the total time an animation should take, * and the selected transition. * @see #setAnimationType */ public void paintComponent(Graphics g) { g.clearRect(0, 0, (int)windowSize.getWidth(), (int)windowSize.getHeight()); int x = animationSrc * (int)windowSize.getWidth(); long timeDiff = System.currentTimeMillis() - animationStart; if (timeDiff < animationTime) { int d = (animationDest - animationSrc) * (int) windowSize.getWidth(); float completedFrac = (float)(System.currentTimeMillis() - animationStart) / animationTime; double multiplier; switch (animationType) { case LINEAR: multiplier = completedFrac; break; case COSINE: multiplier = cos(PI/2 * completedFrac); break; case COSINE_FULL: multiplier = cos(PI * completedFrac)/2; break; case SINE: multiplier = sin(PI/2 * completedFrac); break; case SINE2: multiplier = sin(PI/2 * completedFrac) * sin(PI/2 * completedFrac); break; case SINE_: multiplier = Math.pow(sin(PI/2 * completedFrac), 1.5); case SQUARE: multiplier = sqrt(completedFrac); break; case HILL: multiplier = -2.5*completedFrac*completedFrac + 3.5*completedFrac; break; default: multiplier = completedFrac; break; } x += multiplier * d; } x = -x; g.drawImage(pic, x, 0, null); } | ||||||||||||
| Tags | No tags attached. | ||||||||||||
| Build/Install Method | (select) | ||||||||||||
| Attached Files | |||||||||||||
Relationships |
||||||
|
||||||
Notes |
|
|
(0003709) Granjow (developer) 2009-07-23 20:45 |
Supplementing: Linear sliding looks terrible. |
|
(0003710) j-b-m (administrator) 2009-07-23 21:02 |
If we want that feature, it should be implemented in MLT. I think Dan has been doing some work on the keyframe handling in MLT, not sure what is going on on that side. The best would probably be to improve the "geometry" parameter in MLT to be able to specify how the path between keyframes should be calculated... |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2009-06-02 11:11 | Granjow | New Issue | |
| 2009-06-02 11:11 | Granjow | Build/Install Method | => (select) |
| 2009-06-02 11:16 | Granjow | Additional Information Updated | |
| 2009-07-23 20:45 | Granjow | Note Added: 0003709 | |
| 2009-07-23 21:02 | j-b-m | Note Added: 0003710 | |
| 2009-07-23 21:04 | j-b-m | Relationship added | related to 0001026 |
| Copyright © 2000 - 2013 MantisBT Team |