Main web site updates

With too many tasks to do for my thesis that I’m going to present at the end of this semester, I did not much time to post news in the blog. In a short time that I had the last weekend, I’ve update my main web site with a new layout and last game’s project that I worked on, like the Direção Defensiva and the Vehicle Cleaner, the last one being a semi finalist in the Imagine Cup 2009.

Fluid Simulation

Today I’ve finished my fluid implementation using SPH (Smoothed Particle Hydrodynamics) method for my thesis master degree. As can be seen in the video below, I archived two way coupling between fluids and rigid bodies. At this time, I need to work in GPU optmization to allow for more particles to be simulated. Also, I need to add others types of emitters for the fluid to simulate more interesting scenes.

“Direção Defensiva” Presentation

This week, the game “Direção Defensiva” was presented at a government conference. As I said in an old post, this game was developed to help people driving better as the player have to obey the traffic rules like stop at traffic light,  don’t exceed the road’s speed limit, and so on. At the same time, the player have make some delivers at a given time, wich is subtracted each time he disobeys the traffic’s rule.
In the conference, people could play the game using a wheel’s joystick, wich gave more immersion for the player. The game was a sucess in the conference and always there was people waiting for playing it. Also, the game got attention for some jornalists that published some post in newspapers and on the TV.

This week, the game “Direção Defensiva” was presented at a government conference. As I said in an old post, this game was developed to help people driving better as the player have to obey the traffic rules like stop at traffic light,  don’t exceed the road’s speed limit, and so on. At the same time, the player have make some delivers at a given time, wich is subtracted each time he disobeys the traffic’s rule.

In the conference, people could play the game using a wheel’s joystick, wich gave more immersion for the player. The game was a sucess in the conference and always there was people waiting for playing it. Also, the game got attention for some jornalists that published some post in newspapers and on the TV.

Pessoas testando o jogo

People trying the game

Jornalistas efetuando matéria sobre o jogo.

The Journalist

Eu testando o jogo

Me testing the game also

Depth Peeling in CUDA

I’ve been working on an algorithm to generate a set of polygons from a given image using CUDA and GLSL. This technique is generally called Depth Peeling [1,2,3]. To setup the data coming from and to textures, I’ve used the format GL_RGBA and type GL_UNSIGNED_BYTE. Obviuosly looking at it, one could imagine that color components is coming in four bytes in the order Red, Green, Blue and Alpha.

 In this case, extracting the color components could be done using the following code:

int pixel = texture[i];
int r = ( ( pixel << 24 ) & 0xFF);
int g = ( ( pixel << 16 ) & 0xFF);
int b = ( ( pixel << 8 ) & 0xFF);

But, for my surprise, the components are retrieved in the inverse order. After looking for why this problem occur and also found others looking for it, as here, I found out the problem. In the code above, I was using integer type. In the Intel architecture, little endian is used, so the most significative bytes are allocated in the end. This is why we get the color components in the inverse order, even requiring some predefined order.

To outline this problem, I changed the type from integer to CUDA’s uchar4, solving the problem as bit ordering are applyed only in 16-, 32- and 64 bit word. After this change in the code, I was able to get the color components in the right order.

 

[1] Cass Everitt. 2001.  ”Interactive Order-Independent Transparency”.

[2] Trapp, Matthias and D”ollner, J”urgen. 2008.  Real-Time Volumetric Tests Using Layered Depth Images.

[3] Liu, Fang and Huang, Meng-Cheng and Liu, Xue-Hui and Wu, En-Hua. 2009. “Efficient Depth Peeling via Bucket Sort”.

Defensive Direction Game Project

Since last year, I’ve been working on a game called Defensive Direction. In this game, the player assumes the role of a delivery of parcels inside a big city, having a fixed time to complete all of them. But unlike other games, in Defensive Direction the player must obey the traffic rules like such as not driving on sidewalks, do not pass by traffic lights, do not run above an estipulated speed among others. Some levels are already finished likes the one where the player drives tipsy. The game is going well and has the prevision to be released in January in the next year.

In the next days, we will be working on the AI of the cars e pedestrian of the city. Whenever possible, I will discuss techniques that were used in the game development process. Below, there’s a video of the game (in Portuguese) for those interested to see it.

Wait for more news!

If you can see this, then you might need a Flash Player upgrade or you need to install Flash Player if it's missing. Get Flash Player from Adobe.

Real Time Shadow Volume

After doing some research about shadows, I found this presentation about shadow volumes. It was presented in 2004 at Siggraph and explain very well about shadow volume technique.

SBGames 2009

In this month occured two of the most important conferences for computer graphics. It was the SBGames and SIBGRAPI that took place at PUC, Rio de Janeiro.

At SBGames I presented a tutorial about using the Unity3D engine for making games. It was a very good presentation and attracted a lot of people for the tutorial. Unfortunatly, only 100 minutes was given for the presentation so only the basic concepts was covered about it.

Another research that I presented there was about using XNA and CUDA for prototyping physical worlds. As this research was only accepted as a short paper, I had only one minute to preset it. So, I made a video of about one minute trying to show my research. The video is in Portuguese and is shown below.

video management, video solution, video streaming

Global Game Jam 2009

Some weeks ago, I take part on the first Global Game Jam, an event that took place around the world in more than 40 universities where teams of two o three people had to design and develop a game in 48 hours!

There was no imposition on what tools used for develop them but here, in Niteroi – RJ, the tool thas was adopt for developing the game was XNA. This could help local judges to measure the games developed here.

In the begginning we saw a video of the contest organizers and attended to a local keynote about game design, which was very important to situate people that that is impossible to develop a complex game in 48 hours.

After that, the theme was announced: “As long we have each other, we will never run out of trouble”. Additionally, the maximum game play time could not be greater than 5 minutes and one of the following adjectives needed to be presented in the design: busy, travelling and tiny.

With this insane theme, our team that was formed by a leader programmer (me), a programmer (Andre Brandão) and a graphics artist (Jorge Lopes) started to think how to make a game with this theme. A lot of ideas came in but that was either very complex or did not fill the theme.

Read the rest of this entry »

Projective Texture Step by Step

In my research about projection, I came to projective texture. I found a lot of material about projective texture on the web but neither of them tells exactly what steps you need to follow to archieve the desired effect. In this post, I will tell in more detail how this works.
Basically, texture projection is a dynamic texture mapping of an object that is changed according to some point of view like a camera or a spot light. It works like projecting a point using the normal world, view and projection matrix but, in this time, projecting a texture coordinate. Below is the shader that accomplish this effect and we will see line by line how it works. So, let’s go.

Read the rest of this entry »

SBGames 2008 – Photos

Hi people,

Today I’m posting some photos of SBGames, a Brazilian conference about games, computer graphics and related topics. This year, I presented a short paper about NPC behaviors compositing.

It’s only for now. As soon as possible, I will discuss my short paper about NPC behavior composition here.

←Older