I decided to put a demo on the market of Twin Pictures. In that free version, the only difference with the paid version is that you cannot change the pictures. But all the other effects are there.
Here's the link: https://market.android.com/details?id=com.blogspot.widgg_research.twin_demo
If you like it, you will definitely like the full version where you can change the images!
I use this blog to share (presentable) results from my research as a PhD student in computer science.
Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts
2011/08/04
Twin Pictures DEMO
Labels:
Android,
demo,
live-wallpaper,
market,
trial,
twin pictures
2011/07/28
upgrades on Twin Pictures
So today I published a new version of Twin Pictures. I added some interesting features.
First, for the second image, you can choose instead to use the first image in negative. So, just like the default settings with the Android logo, it creates a really great effect. You can really enjoy the dueling process for the two images with the negative option.
Here's an example with the Mortal Kombat Logo:
I also added new ways to split the screen for the images:
https://market.android.com/details?id=com.blogspot.widgg_research.twin
First, for the second image, you can choose instead to use the first image in negative. So, just like the default settings with the Android logo, it creates a really great effect. You can really enjoy the dueling process for the two images with the negative option.
Here's an example with the Mortal Kombat Logo:
I also added new ways to split the screen for the images:
- Random: the original method, no real structure, it's spinning around at various speed
- Symmetry: this method splits the screen in two. So you see equally part of image 1 and image 2 at all time.
- Asymmetry: this method can look symmetrical on certain point of view, but not on the part shared by the images. At some point, you will not see one of the image.
- Symmetrical Yin Yang: this one is inspired by some pictures I showed in a previous post. The screen is split in two, but there's no axis of symmetry.
- Asymmetrical Yin Yang: just like asymmetry above, it splits the screen, but not necessary equally and without an axis of symmetry.
It's also possible to set the brightness. The minimum is 50% and by default it's at 100%.
Next upgrade:
I'm looking at options for the part of the screen where the images intersect. For now, there's a very small change between the images. But it's enough to be a rough one (but it will be an option). So, i'm planning 5-6 options just to give more choice to the users with the visual aspect.
https://market.android.com/details?id=com.blogspot.widgg_research.twin
Labels:
aesthetic,
Android,
GPU,
images,
live-wallpaper,
market,
masking images,
merged voronoi diagram,
symmetry,
twin pictures,
voronoi diagram
2011/07/26
A new live-wallpaper
Recently, I showed images about grouping points together to create a different kind of Voronoi diagram (see Merging Voronoi).
The case with two groups is very interesting because it splits the plane in two parts. I was first intrigued by what it would look like animated and then I imagined that if each group is associated with an image. It's possible to show parts of the first image where its group is visible and part of the second image where the second group is.
So I came up with a very simple live-wallpaper. All you need to do is select two images and let the animation do the rest. This is much more easier to use than the Weird Voronoi (Pro) with all the functions.
Here's some outputs:
(this one is the default, when you first start the live-wallpaper)
Here's the link and the QR code:
https://market.android.com/details?id=com.blogspot.widgg_research.twin
The case with two groups is very interesting because it splits the plane in two parts. I was first intrigued by what it would look like animated and then I imagined that if each group is associated with an image. It's possible to show parts of the first image where its group is visible and part of the second image where the second group is.
So I came up with a very simple live-wallpaper. All you need to do is select two images and let the animation do the rest. This is much more easier to use than the Weird Voronoi (Pro) with all the functions.
Here's some outputs:
(this one is the default, when you first start the live-wallpaper)
Here's the link and the QR code:
https://market.android.com/details?id=com.blogspot.widgg_research.twin
Labels:
Android,
GLSL,
GPU,
live-wallpaper,
market,
masking images,
merged voronoi diagram,
OpenGL ES,
plane,
qr code,
voronoi
2011/07/18
Weird Voronoi Pro (news and possible improvement)
So first, after playing around with all the functions. I found my favorite configuration yet (but I might found a better one... who knows).
And for the improvements, one option is to at least double the number of steps. But I will wait for some comments about this. As you can see, in the above configuration, I don't even need the last one.
Also, I'm still looking for more functions to offer a larger variety of transition in the [0;1] range. Particularly functions that might reach both limits more than once in the [0;1] of the input. This will create more disturbance inside one cell alone!
This week, I will start writing some documentation, to explain all of this and to present the choices available later to develop your own function with GLSL.
| field | value |
|---|---|
| Select a ratio, R = | (d1*d2)/(d3^2) |
| x = f(R) | f(R) = tan(R*pi/4) |
| y = f(x) | f(R) = R*(0.5*[!] + 0.5) |
| z = f(y) | f(R) = R^2 |
| c = f(z) | f(R) = R |
And for the improvements, one option is to at least double the number of steps. But I will wait for some comments about this. As you can see, in the above configuration, I don't even need the last one.
Also, I'm still looking for more functions to offer a larger variety of transition in the [0;1] range. Particularly functions that might reach both limits more than once in the [0;1] of the input. This will create more disturbance inside one cell alone!
This week, I will start writing some documentation, to explain all of this and to present the choices available later to develop your own function with GLSL.
2011/07/16
Weird Voronoi Pro
Finally, I published my professional version of my live-wallpaper. Currently (while I'm writing those words), the live-wallpaper is not available on the Market, BUT NOW IT'S AVAILABLE. I think there's a delay before a paid apps is officially available (I hope it's not too long).
The big changes compared with the free version is the number of functions. First, you can choose a "ratio" as a basic value. For each pixel, before determining its color, the three closest points (according to the distance function used, not necessary the straight line) are found. Let d1, d2 and d3 be those distances. In the free version, the only ratio that exists is d1/d2. Which is the basic one used to draw Voronoi diagram. The background used on this blog is drawn with that ratio. Remember that where there's a Voronoi's edge, it means that two points are a the same distance, so d1/d2 = 1. If the pixel is right on a point, then d1/d2 = 0.
But in this new version, you have access to other ratio, like d1/d3, d2/d3 and (d1*d2)/(d3*d3). You, currently, have 11 choices for this. And the ratio influence the shape of the cells. For the color, only ratio using d1 and d2 make sense. All the other creates weird interaction. But some people might like it.
Second, the functions. For now, the function used to compute the distribution of the color consist of 4 steps. Let R be the ratio, then you have:
where 'c' is the value used for the color. For each step, you can choose among 55 functions (but let say 54, because if you choose f(R) = 1, then you remove a lot of choices). The default function is f(R) = R.
So, if we consider all possible choices (and ignore those that opposed each other), you have 54^4 possibles functions with 11 ratios. Therefore, you have 93 millions functions available to you.
NOTE that all function are f:[0,1] -> [0,1]. So, by restraining to this interval, it's easier to control at each steps.
Among the functions, there's some that use [?] and [!], two values between 0 and 1. These are values controlled elsewhere in the computation.
Here's the qr code and the direct link:
https://market.android.com/details?id=com.blogspot.widgg_research.WVP
Here's some screenshots:
The settings for the function. From the settings, click on "Functions" then "Cell and Color functions". You can see the selection of the ratio first followed by the four steps of functions.
I also post an update for the [!] feature. First, I was using the function sin(pi * t) where t is in [0;1]. But I forgot that this function is not continuous on the first derivative. This mean that at some point, the transition was not very fluid. It was following an half-circle and going fast on the 0 and took a lot of time around the 1.
Therefore, I changed it to cos(2*pi*t) * 0.5 + 0.5. With this, the function is still in the [0;1] range but the transition is very smooth. There's no drastic, unaesthetic, changes. All of this because the this function is continuous on the first derivative.
The big changes compared with the free version is the number of functions. First, you can choose a "ratio" as a basic value. For each pixel, before determining its color, the three closest points (according to the distance function used, not necessary the straight line) are found. Let d1, d2 and d3 be those distances. In the free version, the only ratio that exists is d1/d2. Which is the basic one used to draw Voronoi diagram. The background used on this blog is drawn with that ratio. Remember that where there's a Voronoi's edge, it means that two points are a the same distance, so d1/d2 = 1. If the pixel is right on a point, then d1/d2 = 0.
But in this new version, you have access to other ratio, like d1/d3, d2/d3 and (d1*d2)/(d3*d3). You, currently, have 11 choices for this. And the ratio influence the shape of the cells. For the color, only ratio using d1 and d2 make sense. All the other creates weird interaction. But some people might like it.
Second, the functions. For now, the function used to compute the distribution of the color consist of 4 steps. Let R be the ratio, then you have:
- x = f(R)
- y = f(x)
- z = f(y)
- c = f(z)
where 'c' is the value used for the color. For each step, you can choose among 55 functions (but let say 54, because if you choose f(R) = 1, then you remove a lot of choices). The default function is f(R) = R.
So, if we consider all possible choices (and ignore those that opposed each other), you have 54^4 possibles functions with 11 ratios. Therefore, you have 93 millions functions available to you.
NOTE that all function are f:[0,1] -> [0,1]. So, by restraining to this interval, it's easier to control at each steps.
Among the functions, there's some that use [?] and [!], two values between 0 and 1. These are values controlled elsewhere in the computation.
- [?] is a random value that changes for each frame rendered. This value is not stable so it creates effects that some time might look like lightnings.
- [!] on the other hand is more stable. It's a wave that follow the positive values of a sine. Therefore, it goes from 0 to 1 and then from 1 to 0. It can be used to have a regular effects over the color distribution. By default, it takes 4 seconds to have a full cycle, but it's possible to change the speed.
Here's the qr code and the direct link:
https://market.android.com/details?id=com.blogspot.widgg_research.WVP
Here's some screenshots:
The settings for the function. From the settings, click on "Functions" then "Cell and Color functions". You can see the selection of the ratio first followed by the four steps of functions.
I also post an update for the [!] feature. First, I was using the function sin(pi * t) where t is in [0;1]. But I forgot that this function is not continuous on the first derivative. This mean that at some point, the transition was not very fluid. It was following an half-circle and going fast on the 0 and took a lot of time around the 1.
Therefore, I changed it to cos(2*pi*t) * 0.5 + 0.5. With this, the function is still in the [0;1] range but the transition is very smooth. There's no drastic, unaesthetic, changes. All of this because the this function is continuous on the first derivative.
Labels:
Android,
cell,
color distribution,
market,
pro,
professional,
qr code,
voronoi,
weird
2011/06/26
Live-Wallpaper on the Market (feedbacks)
In three days, the number of download is already over 100. Which is a good news.
But, I was hoping for more ratings than that. But I checked other apps, and some with 250000+ downloads only have around 1000-2000 ratings. So, less than 1% of users take the time to rate.
Anyway, it's not a reason to stop. I will post an update version very soon because I found a better way to distribute the orientations and I might try a new way to distribute the points too.
But, I was hoping for more ratings than that. But I checked other apps, and some with 250000+ downloads only have around 1000-2000 ratings. So, less than 1% of users take the time to rate.
Anyway, it's not a reason to stop. I will post an update version very soon because I found a better way to distribute the orientations and I might try a new way to distribute the points too.
Labels:
Android,
animation,
download,
live-wallpaper,
market,
OpenGL ES,
rating,
voronoi,
Weird Voronoi
2011/06/23
Live-Wallpaper available on the Market
I finally managed to put a first version of my live-wallpaper on the market.
You can find it right here:
https://market.android.com/details?id=com.blogspot.widgg_research&feature=search_result
Post comment on this post to tell me what you think about it. It's a first version and there's a lot of work to do to create the professional version and also to improve this one.
For major problem, I will do my best to put a new version of the application on the Market as fast as possible.
The live-wallpaper is rough on the fragment shader that I created in OpenGL ES 2.0. So it's very important to control the execution of the application base on this. Fewer points and a lower FPS (frame per seconds) will give better results.
I'm also interested to know the performance of your Droid, particularly if they run on Honeycomb. So, I'd like you to post your device, version of Android, number of points and FPS that you used in your settings.
Here's some screenshots:
You can find it right here:
https://market.android.com/details?id=com.blogspot.widgg_research&feature=search_result
Post comment on this post to tell me what you think about it. It's a first version and there's a lot of work to do to create the professional version and also to improve this one.
For major problem, I will do my best to put a new version of the application on the Market as fast as possible.
The live-wallpaper is rough on the fragment shader that I created in OpenGL ES 2.0. So it's very important to control the execution of the application base on this. Fewer points and a lower FPS (frame per seconds) will give better results.
I'm also interested to know the performance of your Droid, particularly if they run on Honeycomb. So, I'd like you to post your device, version of Android, number of points and FPS that you used in your settings.
Here's some screenshots:
Labels:
Android,
animation,
fragment shader,
GLSL,
GPU,
live-wallpaper,
market,
OpenGL ES,
Weird Voronoi
2011/06/20
Live Wallpaper (list of function)
I started to implement the settings and it's going well. Here, I will present a partial list of function use to compute the color of a particular pixel.
But first, the weird Voronoi diagram presented here are not so different from the original one. The cells and edges still have the same meaning. Therefore, when there's an edge, it means that points on this edge are equidistant from two sites. Even if the method used to compute the distance is not the Euclidean one.
The function that I present here all use value R, which is the ratio of d1 over d2. Where d1 is the distance to the closest point and d2 the distance to the second closest point. So if R = 0, it means it's directly on the site, and R = 1 is on an edge.
First, functions with exponent, there will be three models:
But first, the weird Voronoi diagram presented here are not so different from the original one. The cells and edges still have the same meaning. Therefore, when there's an edge, it means that points on this edge are equidistant from two sites. Even if the method used to compute the distance is not the Euclidean one.
The function that I present here all use value R, which is the ratio of d1 over d2. Where d1 is the distance to the closest point and d2 the distance to the second closest point. So if R = 0, it means it's directly on the site, and R = 1 is on an edge.
First, functions with exponent, there will be three models:
- R^n
- 1 - R^n
- (1-R)^n
where n is a value in {1/2, 1, 2, 10}.
The other possible functions are:
- sin(Pi * R)
- 1 - sin(Pi * R)
- 1 + log(R)
- -log(R)
In gray scale, a value from the function of 0 or less means black and a value of 1 or above means white.
In color, each site will have its color assigned. And that color will influence the color in the cell. The color will be randomly assigned to the points.
I hope to post a first version by the end of the week.
2011/06/16
Live Wallpaper (some progress)
So, I progressed a lot in developing my first Live Wallpaper for Android. For now, I call this app "Weird Voronoi" because it uses the concept of the Voronoi diagram with some tweaks to create various visual effects.
I had a bit of difficulties to convert directly my fragment shader used on my machine to a fragment shader that can be used on Android with OpenGL ES 2.0. There's some restriction over the language that requires a certain adaptation. But in the end, the result is mostly the same.
Other problem in development, the emulators available cannot run shaders. So I have to debug completely on my Galaxy S. This mean that I know it's working on my phone, but I don't know about any other. I suspect that any phones more recent than the Galaxy S won't have any problem running it.
For now, in the project, I made the majority of the test I wanted to do. To see what are the limits. And actually, compared to a desktop, it's very limited. On my phone, running more than 4 points can be tricky while on the desktop, hundred points is not really a problem. So the objective was also to use this limited amount of points to be able to create some nice effect and I think I managed to do this.
Here's a first images of what the Live Wallpaper will look like:
I took this images from an app I'm developing on my desktop, but the visual effect is mostly the same.
Now that I know the limitation and the possibilities, the main thing left to be able to produce a first version to put on the Android Market is the settings to control the Live Wallpaper.
For now, the common options would be to choose the number of points. Even if 4 on my phone is the limit, there's some benchmark showing that some phones might be able to handle 16 points without a problem. The users will be able to choose if the points are moving, and at which speed. Same thing of the spirals (or if they want a spiral or not).
A variety of functions will be available to choose the right distribution of color. And the possibility to choose between a colored version or a gray scale version.
When the app will be available on the Market, I will give more detail about the features.
Meanwhile, I might post other images of other functions to show other visual effects.
I had a bit of difficulties to convert directly my fragment shader used on my machine to a fragment shader that can be used on Android with OpenGL ES 2.0. There's some restriction over the language that requires a certain adaptation. But in the end, the result is mostly the same.
Other problem in development, the emulators available cannot run shaders. So I have to debug completely on my Galaxy S. This mean that I know it's working on my phone, but I don't know about any other. I suspect that any phones more recent than the Galaxy S won't have any problem running it.
For now, in the project, I made the majority of the test I wanted to do. To see what are the limits. And actually, compared to a desktop, it's very limited. On my phone, running more than 4 points can be tricky while on the desktop, hundred points is not really a problem. So the objective was also to use this limited amount of points to be able to create some nice effect and I think I managed to do this.
Here's a first images of what the Live Wallpaper will look like:
I took this images from an app I'm developing on my desktop, but the visual effect is mostly the same.
Now that I know the limitation and the possibilities, the main thing left to be able to produce a first version to put on the Android Market is the settings to control the Live Wallpaper.
For now, the common options would be to choose the number of points. Even if 4 on my phone is the limit, there's some benchmark showing that some phones might be able to handle 16 points without a problem. The users will be able to choose if the points are moving, and at which speed. Same thing of the spirals (or if they want a spiral or not).
A variety of functions will be available to choose the right distribution of color. And the possibility to choose between a colored version or a gray scale version.
When the app will be available on the Market, I will give more detail about the features.
Meanwhile, I might post other images of other functions to show other visual effects.
2011/06/14
Live Wallpaper
Playing with texture can be very nice. But when your objective is to find ways to generate them and to generate them, you need to find various methods to place points and other parameters, you notice that if some points or parameters changed a bit, the texture looks almost the same, but with a little difference.
Therefore, being able to change those parameters a little bit at the time, we are able to create animations. So instead of a static texture, we have a texture evolving with the time. And if it's done properly, this animation won't be the equivalent of an animated GIF that repeats itself forever. Each new images is unique and to have a close loop over that animation can take a while.
Live Wallpapers are a feature available sine Android 2.0. It allows you to put a wallpaper with some sort of animation, and some times interaction when you press on the screen or move your phone (if there's an accelerometer on it).
Here's some statics images produced earlier that can be converted into an animation for the live wallpaper:
Right now, there's no official date for a release. I'm taking my time to develop it properly, to be sure it won't drain batteries and it will be smooth enough.
With the limited power of a smartphone, the number of points used to control the data would be much lower. In the previous images, there's around 64 points, more or less... sometimes much more. But on a phone, 4 to 16 points might be the top. But what is important is to have enough options so the users can create the live wallpaper they want.
More information about this soon!
Therefore, being able to change those parameters a little bit at the time, we are able to create animations. So instead of a static texture, we have a texture evolving with the time. And if it's done properly, this animation won't be the equivalent of an animated GIF that repeats itself forever. Each new images is unique and to have a close loop over that animation can take a while.
Live Wallpapers are a feature available sine Android 2.0. It allows you to put a wallpaper with some sort of animation, and some times interaction when you press on the screen or move your phone (if there's an accelerometer on it).
Here's some statics images produced earlier that can be converted into an animation for the live wallpaper:
Right now, there's no official date for a release. I'm taking my time to develop it properly, to be sure it won't drain batteries and it will be smooth enough.
With the limited power of a smartphone, the number of points used to control the data would be much lower. In the previous images, there's around 64 points, more or less... sometimes much more. But on a phone, 4 to 16 points might be the top. But what is important is to have enough options so the users can create the live wallpaper they want.
More information about this soon!
2011/06/07
Red and Cyan Stereoscopy (P.S.)
Just a special note, the method presented in the previous post can work on OpenGL ES. So if you're developing on Android or iOS, you can create stereoscopic scene that can be viewed on smartphones and tablets.
On Android, here's two apps (not necessary using OpenGL) that allow you to play with the stereoscopy:
On Android, here's two apps (not necessary using OpenGL) that allow you to play with the stereoscopy:
Subscribe to:
Posts (Atom)





























