Showing posts with label Applications. Show all posts
Showing posts with label Applications. Show all posts

PID Project - Part 2: Parallax Mapping

This is the continuation of the previous post, in which an application created for a University subject (Digital Image Processing or PID) was explained.

On the previous post, the Normal Mapping technique was explained, we are going to focus on the other technique implemented now: Parallax Mapping.

The goal of Parallax Mapping is the same as in the previous technique (Normal Mapping): to show in a single polygon (which is in a low polygonation structure) a set of polygons (which are in a high polygonation structure).

Let's remember that a high polygonation models contain more polygons than low polygonation models. That is why a polygon in the second model will represent a set of polygons from the first one. And it must look like that: if the light or the object itself changes, the pixels of that polygon must change showing shadows, etc (as if more than one polygon were there).

With the Normal Mapping technique, the pixels of a polygon behave in the way the normal map indicates them to. A normal map is previously created (ideally out of the high polygonation model, although we have shown in the previous post that it is also possible to obtain from the low polygonation one) and then the technique is applied.

That normal map can be applied to the low polygonation model in different ways. Normal mapping assigns to each pixel of the polygon, a pixel from the normal map. So, pixels in the polygon are not changing their position, they are changing their colour (to show differences in the light when the object or focus are moved). This way a pixel in the polygon always has a matching (or equivalent) pixel on the normal map.

Normal Mapping
However, if the camera is really close to the polygon, or the angle between the camera and the polygon is almost 0, then the polygon doesn't look like a set of polygons. This is resolved in the Parallax Mapping technique.

This technique not only changes the colour of each pixel in the polygon, but the position of the pixel too. By doing this, pixels on the polygon move, showing a sense of depth even when the angle is close to 0 or when the camera is really close.

As pixels move, there are gaps between them that must be filled. The parallax mapping technique resolves that too, extending the original pixels and interpolating the ones in between.

Parallax Mapping
In all techniques, the GPU recalculates the information of each pixel every time (in order to work directly with the GPU in XNA is common the use of the HLSL language).

Let's see this technique implemented on the application itself.



This is a slightly different technique from the Parallax Mapping one:


(Read More)

PID Project - Part 1: Normal Mapping

This project was developed in 2008. It was originally created for a subject called "Digital Images Processing", additionally, it was submitted to a contest between the best university projects of that year, winning the contest which prize was an Xbox 360 Elite.

The project is a Windows Form application that integrates XNA 3.0. The application shows two techniques normally used in videogames to display 2D scenes as 3D: Normal mapping and Parallax mapping. Additionally, there is a small modification that focuses on the parallax mapping process that allows the user to see the changes made easily.

The first video shows the application itself.


The interesting thing of this application is that it doesn´t need a high polygonation model to extract the normal map and use it on the low polygonation model. The normal map is automatically obtained from the texture map using my own algorithm.

One of the main requisites was that the application must be completely configurable by the user. This was because it would be used as a educative application.

Firstly, I will show the normal mapping technique using normal maps obtained from the high polygonation model and from the texture map. In the next post, the Parallax mapping technique will be shown.

Part 1 (Normal Mapping - Parameters Explanation):


Part 2 (Normal Mapping - Examples):

(Read More)

Bachelor's Degree Final Thesis - Part 2: Texture Comparison

This project was present with honors in the academic year of 2005/2006 as a final thesis.

For more information about the project and the segmentation process, please read this post

Comparison methods are applied below.

These methods are based on two different studies on this field: the first one is focused on the SVD algorithm and the second on logical operators.

Both methods make the comparison from different points of view. The SVD method focuses on calculating whether or not two images have the same texture. It first executes an exclusion algorithm, and if it is not conclusive, it executes an inclusion one next.


The second method makes the comparison according to different features of the images, such as contrast, roughness, size and regularity of their internal elements. This algorithm does not identify whether two images are the same or different, it analyses their features.


Due to the high complexity and the mathematics component of the project, the algorithms used have not been explained in detail. To learn more, read the documents linked at the begining of this post.
(Read More)

Bachelor's Degree Final Thesis - Part 1: Texture Segmentation

This final thesis was presented with honors in the academic year of 2005/2006 as a final thesis.

It is based on different theorical publications on texture identification and comparison. The algorithms of these publications were implemented with special emphasis on the teaching and learning side, so that the user could set the parameters of the algorithm and investigate the different results obtained.

These publications are below:
- Clustering of singular value decomposition of image data with
applications to texture classification
.

- Texture Classification Using Logical Operators

Note: Although the videos are thoroughly discussed, it requires the reading of the publications and a certain level of mathematics to understand them in depth.



This video shows the results of the image segmentation algorithms. The algorithms of the publications were improved by adding:

- The ability to apply colour inversion and black and white filters to images, as well as being able to rotate them.

- The segmentation of the images has not been generated taking only into account the middle row. This row has just been highlighted to generate the graph.

- Mathematical corrections were applied, resulting from the application of the algorithm at a practical level.

- Important results were obtained regarding the segmentation of images by these methods due to the accuracy of the different parameters, which was absent on the publications

(Read More)