I know it's been a while since I posted something, and I will post some new results soon.
If you're interested to play with the fragment shader in WebGL, here's a wonderful link: Shader Toy.
Plus, the Khronos Group is working on to define a JavaScript binding to the Khronos OpenCL with WebCL, which is a very good thing.
I use this blog to share (presentable) results from my research as a PhD student in computer science.
Showing posts with label GLSL. Show all posts
Showing posts with label GLSL. Show all posts
2012/04/18
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/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.
Subscribe to:
Posts (Atom)














