PDA

View Full Version : been trying to do this myself, with no luck...animation.c


fluid
April 28th, 2007, 03:29 PM
please read this, its got what i consider to be pretty sharp ideas on how to put this composite manager ahead of the game on every front in terms of innovation and plugins

id really like to do a slight modification to animation.c for shading windows when they are set to roll-up.

i use a laptop with a synaptics touchpad, and occasionally i inadvertantly get a pretty nice effect on rolling up windows. im trying to make it so that i get that effect all the time...

basically, if you have wobbly enabled, and you move a window just 1 or 2 pixels and it starts to wobble, and then shade it the effect produced from the combination just amazes me. the window wobbles and collapses in on itself.

what would it take to add new settings to animation.c for rollup? i wasnt trying to add new settings, i was just going to hardcode for the window to slide 2 pixels up before the rollup occurs....but im having no luck at all.

so i was thinking, if any of you real coders could do it (cause im certainly no real c coder...lol, a few years of this in college years ago didnt prepare me for this, plus math is the devil!)

anyway, if any of you guys want to take this suggestion and try and implement it, it would basically work like this:

new settings added to the schema:

slide distance: the amount of distance to move the window to trigger a wobble, for obvious reasons this should be limited say from 0 to 10 pixels...

slide direction: up/down/left/right/auto (auto would work based on how far away the window was from the screen edge, if it was closer than the move distance specified by the user, it would move in the opposite direction the same amount)

if we can get the window to wobble without moving it that would work just as well, i have not bothered to look at the wobble code to see what it would take to make one wobble...

another idea to implement this might be a "tap" plugin instead. so that everytime you click on a window, it slightly taps it causing a wobble to be triggered where it was "tapped". no real complicated settings for this, perhaps window type you want effected, window element you want to respond to taps (like titlebar only, all, etc). basically you would tap the window and make it wobble on mouse button 1, or some other defined button or key, or combination thereof.

if you want to see the effect im talking about, make sure you are shading to roll up, move a window a little to get it wobbling, and quickly shade it. it will wobble and collapse in on itself in sweet elastic goodness. lol...

ill sit here continuing to try and implement this myself, but at the rate im going i dont think ill ever be successful :(

fluid
April 28th, 2007, 07:26 PM
noone seems interested in this. basically im trying to get an effect i like, and hopefully start a new trend of building plugins that work in conjunction with one another to achieve effects that the plugins were designed for...like this wobbly jello collapse i like.

think of the wobbly plugin, its neat...but it could be broken up into several physics related plugins. break out anchor into a plugin, break out spring, break out friction, anchors, etc...into seperate plugins. add a plugin to determine window "weight" based onscreen dimensions, gravity (not so they fall, but so they are affected during transformations).

then they could be enabled seperately...wobbly isnt a plugin necessarily, but the effect of turning them all on. without spring, and friction, with weight, and anchors, a window would swing as you drug it around your desktop instead of wobble like jello.

weight could help out with stretching the window when it was grabbed and moved. could lead to some interesting new effects as well...say you want to shade your window, we could have a plugin that lets you grab the window on the bottom edge and move it just a tiny bit (say within 10 pixels)..it would stretch the bottom edge down, then when you release it, the window snaps up into itself and is shaded. turning on anchors and giving them different properties would cause the window to shade in a nonuniform way.

anchors could be say, 3 anchors per side, so top_left, top, top_right, left, right, bottom_left, bottom_right, bottom. the only setting for anchor would be anchor weight for each one of those.

instead of just moving the window around the desktop, we could imagine they were laying flat on a table. turning on elasticity in the window, grabbing it in the center with alt-button1 would pick it up...

ok im getting out there, but i just think that creating plugins based on real physics instead of trying to build specific animation effects could go along way towards each user being able to customize their eyecandy, and really make their desktops unique.

im not saying to stop creating plugins that pull off a specific effect, but i definitely think that a lot of what we are seeing now in terms of effects and animation could be pulled off by smaller plugins that we have more control of.

fluid
April 28th, 2007, 07:58 PM
another thing i wouldnt mind seeing, would be simple lighting. either ambient, or a series of toggle-able lights around the cube (just 8 in total that are static, and are always around the cube face you are seeing.)

turning on ambient light to get a regular looking desktop, then toggling the top left light on would create better looking shadowing under windows if the windows could be set with a "virtual distance" from the desktop.

or turn on the center light, windows on the right or left side of the active desktop face would be shadowed appropriately on the opposite side of that light source, dynamically in hardware (or software if someone was unfortunate enough to be running compiz in software rendering). throw in a little color tweaking to those lights by the user, or simple plugins like flourescent flicker or level fluctuation and things could really get interesting.

once lighting is implemented, someone out there could implement a discoball plugin that sits back behind the view of the user and creates goofy discoball reflections down onto the desktop (ok that would never be created, but you see the point...lol)

focus on physics and see what happens.

just my opinion :D

fluid
April 28th, 2007, 09:05 PM
to touch on this a tiny bit more and to hopefully drum up some interest in the effect of plugins that work in combination...the effect that got me thinking about all of this is a simple rollup window shade effect. plain jane, rollup.

the thing that makes it slick is the fact that the window is wobbling when i initiate the rollup.

here is a good example, once in slowmo, once in regular mode ...

http://www.youtube.com/watch?v=A_0et1UP9Co

fluid
April 29th, 2007, 04:32 AM
here is one more real example of what this type of system would bring.

there could be a wind plugin, weight, and flexibility. all of these pertain to windows. for a normal window, i set Close to set the weight to something very low, i set the flexibility up about 3/4 of the way, and i do a strong wind from he left to the right. the window would blow away like paper when i close it. noone has to write a "blow away like paper" plugin, because the 3 in conjunction with appropriate settings would handle it just right.

or i could set wind to 0, weight on close to max, elasticity to max, and close it which would make it drop to the bottom and squish away on the bottom panel if i had one. it could even ooze over other windows if it hit them (just hit them and roll off the side)

im not saying limit everything to a physics engine like this either. plugins like wobbly can still exist, and still function just as they do now.

cornelius
April 29th, 2007, 09:10 AM
Nice ideas. The wobbly roll-up/down looks cool. :)

You can have a look here for even more ideas:
http://forum.beryl-project.org/viewtopic.php?f=40&t=129&st=0&sk=t&sd=a

David is planning/implementing some changes to the drawing framework and vertex generation system. I would wait for those to finalize before considering such inter/multi-plugin window animations.