Here's another result. Here, we are trying to create some caustics, those reflection that you can see at the bottom of a pool caused by the sunlight and the surface of the water. We already have very nice outputs that can be achieved simply by distributing points and orientations. We used a poisson-disk sampling for the points.
Here's some of the outputs:
Like this, it doesn't seam very useful or look like caustics. But these kind of images can be used to add information on a surface. One trick is to use an image like this and a texture, for example the bottom of the pool, and when it's time to draw them, for each pixel, you compare the color on the caustic image and on the texture and you take the highest value for the red, green and blue. This way, you can alter a simple texture with and image like this.
Plus, the method that we use can be converted into an animation very easily. All you need to do is to move around the points and their orientations a little bit at each frame. This way, you have a fluid animation that will never loop on itself.
Actually, there's already something that you can use to see a caustic effect. My live-wallpaper, Weird Voronoi Pro, that I presented here a few months ago can produce an animation like this that won't loop. My favorite configuration (that I show here) creates a simple caustics with a little variation of intensity.
I use this blog to share (presentable) results from my research as a PhD student in computer science.
Showing posts with label rendering. Show all posts
Showing posts with label rendering. Show all posts
2011/11/06
Caustics
Labels:
caustic,
caustics,
new renderer,
point distribution,
rendering,
Weird Voronoi,
Weird Voronoi Pro
2011/10/05
more smoke
So, yesterday I presented some smoke textures that I created. I continued to work on it and after altering some values, I managed to create some new interesting smoke textures. These textures look cleaner than those made yesterday. I made sure that the background would be closer to black and it helps to see the curves made by the smoke.
Here's some of these outputs:
When the process would be easier to control, with well defined functions to distribute the points, I will be able to generate as much smoke textures as I want. Might put a package of a hundred of them on Renderosity.
Here's some of these outputs:
When the process would be easier to control, with well defined functions to distribute the points, I will be able to generate as much smoke textures as I want. Might put a package of a hundred of them on Renderosity.
Labels:
background,
new renderer,
rendering,
smoke,
smoke texture
2011/08/25
first pattern
So, yesterday I mentioned two steps that we need to work on to finish the hierarchy project. And one of them is to work on patterns or structures to show what is possible to do with that product.
Today, I managed to to a first structure, a flower. Very simple to do. Just needed some adjustment first, but I got that result in few minutes. So here it is:
Naturally, I just showed the final product. I had other images created before I managed to do the right effect that I wanted. I think that this is a nice preview of what that product can do.
Let me know what you think about that output!
Today, I managed to to a first structure, a flower. Very simple to do. Just needed some adjustment first, but I got that result in few minutes. So here it is:
Naturally, I just showed the final product. I had other images created before I managed to do the right effect that I wanted. I think that this is a nice preview of what that product can do.
Let me know what you think about that output!
Labels:
cuda,
flower,
hierarchy,
pattern,
procedural texturing,
rendering,
texture,
voronoi diagram
2011/08/05
SIGGRAPH
This week, I will be at SIGGRAPH in Vancouver. I will try to share some of the stuff I will see on the blog. I hope to be able to talk about the last stuffs in procedural texturing and rendering.
2011/07/04
More texture synthesis
In this post, I present some new result that we really like. Again, it's a variation of the Voronoi diagram. You can observe the Voronoi cells interacting with each other. The colors help to see clearly the cells. And because of the few number of color, some cells might share the same color but are not related at all.
Here's some of the results:
This method, if it produces the result we're expecting, can be used to create texture by simply specifying some parameters or an artist can use a program with that method implemented to place some control points and control other parameters.
Again, all these images can be computed with CUDA because each pixel is unique.
Here's some of the results:
This method, if it produces the result we're expecting, can be used to create texture by simply specifying some parameters or an artist can use a program with that method implemented to place some control points and control other parameters.
Again, all these images can be computed with CUDA because each pixel is unique.
2011/06/21
Yin Yang Texture
Here's a post on texture.
Previously, we were using a method to control images with points and normals. Alone, a point and a normal split the plane in two, a positive and negative part. But combined with other points and normals, we can actually control curve shapes. To visualize it, we assign white to the positive part and black for the other.
The textures proposed here are made by first splitting the plane in two parts. The two parts must be symmetrical just like the Yin Yang symbol.
We then distribute points and normals inside one of the part. We then reflect the point into the second part, but not the normal.
The method create a contrast and a perfect symmetry. Here's some results:
I won't describe the method to render those images because it's very complex. Also, the process is very slow. Unlike the live-wallpaper I'm working on, or the previous images I showed, we cannot compute those in real-time.
Unfortunately, we haven't implement this with CUDA. With CUDA, it wouldn't be in real-time, but it would be much faster. Specially the per-pixel rendering part. Let me know what you think about these Yin-Yang images.
Previously, we were using a method to control images with points and normals. Alone, a point and a normal split the plane in two, a positive and negative part. But combined with other points and normals, we can actually control curve shapes. To visualize it, we assign white to the positive part and black for the other.
The textures proposed here are made by first splitting the plane in two parts. The two parts must be symmetrical just like the Yin Yang symbol.
We then distribute points and normals inside one of the part. We then reflect the point into the second part, but not the normal.
The method create a contrast and a perfect symmetry. Here's some results:
I won't describe the method to render those images because it's very complex. Also, the process is very slow. Unlike the live-wallpaper I'm working on, or the previous images I showed, we cannot compute those in real-time.
Unfortunately, we haven't implement this with CUDA. With CUDA, it wouldn't be in real-time, but it would be much faster. Specially the per-pixel rendering part. Let me know what you think about these Yin-Yang images.
Labels:
color distribution,
cuda,
normal,
nvidia,
point,
reflection,
rendering,
symmetry,
synthesis,
texture,
Yang,
Yin
2011/06/01
The Background
The image I used as the background, at least the one used when I created this post, is a Voronoi diagram. To draw this diagram, we don't use any algorithm to find the vertices and edges of the diagram.
Our procedure consists first of splitting the unit square in YxY cells where each cells contains between 1 and X points. To render the image, that is a square of ZxZ pixels, we first convert the coordinate of the pixel into the unit square, then find in which cell the pixel is.
To draw the diagram, we need the two closest points from that pixel. To find it we first compare the pixel with other points in its cell. Then we also explore the surrounding cells to be sure to find the exact two points. When a cell is on the border of the square we use the cell on the other side to create a texture that can be tiled.
Let d1 and d2 be the distance from the pixel to the closest and second closest point respectively. Then, we can determined the gray color of that pixel as (d1/d2) * 255. Other method can be used too to determined the right color. The ratio d1/d2 gets a value of 0 when the pixel is right on the closest point and a value of 1 when the pixel is right between the two points. Therefore, in this case, the white pixels are part of a segment on the Voronoi diagram. The following image was created with this approach.
For our image in the background, we use an interpolation to determined the color for the pixel. Plus, we used d3, the distance from the third closest point to the pixel.
For the interpolation, we solve the following linear system:
| 0 0 1 || x | | 1 |
| 1 1 1 || y | = | 0 |
| a b 0 || z | | 0 |
Our procedure consists first of splitting the unit square in YxY cells where each cells contains between 1 and X points. To render the image, that is a square of ZxZ pixels, we first convert the coordinate of the pixel into the unit square, then find in which cell the pixel is.
To draw the diagram, we need the two closest points from that pixel. To find it we first compare the pixel with other points in its cell. Then we also explore the surrounding cells to be sure to find the exact two points. When a cell is on the border of the square we use the cell on the other side to create a texture that can be tiled.
Let d1 and d2 be the distance from the pixel to the closest and second closest point respectively. Then, we can determined the gray color of that pixel as (d1/d2) * 255. Other method can be used too to determined the right color. The ratio d1/d2 gets a value of 0 when the pixel is right on the closest point and a value of 1 when the pixel is right between the two points. Therefore, in this case, the white pixels are part of a segment on the Voronoi diagram. The following image was created with this approach.
For our image in the background, we use an interpolation to determined the color for the pixel. Plus, we used d3, the distance from the third closest point to the pixel.
For the interpolation, we solve the following linear system:
| 0 0 1 || x | | 1 |
| 1 1 1 || y | = | 0 |
| a b 0 || z | | 0 |
where a and b are two different constants.
Then, the color of the pixel is determined by 255 * ((d1/d2) * x + (d1/d3) * y + z). Naturally, if the value is above 255 or below 0, we considered them as 255 or 0.
To program this procedure, we used CUDA. With CUDA, each pixel gets his own thread and even with an older version of CUDA (I just have CUDA 1.1 on my GeForce 9800 GTX+) the computation is done in less than a second for a 1024x1024 images.
The work load associated with a pixel is determined by the value X, the maximum number of point in a cell. To find the two (or three) closest point to a pixel, the maximum number of point to check is 9X. The memory required for the diagram is proportional to Y*Y*X.
REFERENCE
Steven Worley. 1996. A cellular texture basis function. In Proceedings of the 23rd annual conference on Computer graphics and interactive techniques (SIGGRAPH '96). ACM, New York, NY, USA, 291-294. DOI=10.1145/237170.237267 http://doi.acm.org/10.1145/237170.237267
REFERENCE
Steven Worley. 1996. A cellular texture basis function. In Proceedings of the 23rd annual conference on Computer graphics and interactive techniques (SIGGRAPH '96). ACM, New York, NY, USA, 291-294. DOI=10.1145/237170.237267 http://doi.acm.org/10.1145/237170.237267
Subscribe to:
Posts (Atom)























