lunes, 2 de septiembre de 2013

New website


Recently I've finished (almost) the redesgin of my ancient official website. Check it out at: http://www.gamedusa.com Also, the blog was moved to: http://www.gamedusa.com/blog/ I'm very proud with the new design. There you can find more information about cool developments if you want to hire a coder :D

martes, 19 de junio de 2012

Host emulator

This is the last program that I finished. The program basically, receive, sends and displays messages in linux. Can be configured in UDP and TCP modes. I used Ubuntu 12.04 for the development but the end aplication works into a Fedora Core 9. Also uses GTK+ 2.0 and the development environment was of course: http://www.codelite.org

jueves, 29 de diciembre de 2011

Terrain updates (II)


This is a new screenshot of my 3d planet simulation.

There are a lot of improvements since the last blog update, but I'll try to explain it in the next blog entries...

miércoles, 23 de febrero de 2011

Terrain updates

After at least one year without any entry, finally I decided to post my evolution on terrain rendering.

The planet has geometry and texture streaming of whole earth at 1km resolution (for now). And as a bonus, a little galaxy :D










lunes, 29 de marzo de 2010

Pack normal and height data in one float texture

Wow, hard coding night. But in the end I can code two routines that allows me to store normal mapping data and terrain height in one float texture. Remember that in order to perform vertex texture fetch in the vertex shader we need to access to the topology with one float texture.

I coded this in C++ but it's easy portable to GLSL or HLSL.

In this example I store only 2 normal components: X and Y in range 0 to 255. Remember that you must extract third component as follows: sqrt( 1.0 - nx*nx + ny*ny );

Heightmap has custom precision values, due big imprecision of floating point conversion. With 11 bits of precision we can store heights from 0 to 2043. This happened because we loose 4 numbers with this precision. The formula is:

unsigned char hPrecisionBits = 11; // (1<<11) = 2048
unsigned char expectedError = 1 << (hPrecisionBits - 9); // 4
unsigned short maxHeight = (1 << hPrecisionBits) - expectedError; // 2044

//! Gives fractional number
inline float frac( float _value ) {
return _value - floorf( _value );
}

// NX | NY | HEIGHT -> float32
// 8 | 8 | 16
inline float packNormalAndHeight( unsigned char _nx, unsigned char _ny, unsigned short _height, char _hPrecisionBits )
{
return
(_nx / 256.0) +
((_ny / 256.0) / 256.0) +
(_height / ((float)(1<<_hPrecisionBits)) / 65536.0);
}

// float32 -> NX | NY | HEIGHT
// 8 | 8 | 16
inline void unpackNormalAndHeight( float _value, char _hPrecisionBits, float* nx_, float* ny_, float* height_ )
{
*nx_ = floorf( frac( _value ) * 256.0 );
*ny_ = floorf( frac( _value * 256.0 ) * 256.0 );
*height_ = frac( _value * 65536.0 ) * ((float)(1<<_hPrecisionBits));
}


Usage example:

unsigned char hPrecisionBits = 11; // (1<<11) = 2048
unsigned char expectedError = 1 << (hPrecisionBits - 9); // 4
unsigned short maxHeight = (1 << hPrecisionBits) - expectedError; // 2044

// Pack as 8 | 8 | 16
float packedValue = packNormalAndHeight( 231, 137, 2043, hPrecisionBits );

// Unpack from single float
float x,y,h;
unpackNormalAndHeight( packedValue, hPrecisionBits, &x, &y, &h );

Notice that 'expectedError' brings us the amount of error values returned in height function. For example, if our precision bits are 9, expected error will be 1 (135 when we store 136 number). For 10, error will be 2, for 11, will be 4, for 12 will be 8, etc...

I hope it will be useful.

miércoles, 6 de enero de 2010

A message to the world



...or when the human beings became adults.

sábado, 5 de diciembre de 2009

Codelite


Surfing through the xubuntu repository I found this new fantastic c++ multiplatform ide:
In Windows it uses gcc 4.4 and has an integrated Subversion plugin!!!
http://www.codelite.org/

Currently I'm trying it with my home projects. OhYesYesYesYes

martes, 13 de octubre de 2009

Campanas por la gripe A

Una de vacunas:

TERESA FORCADES, doctora en Salut Pública, hace una reflexión sobre la historia de la GRIPE A, aportando datos científicos, y enumerando las irregularidades relacionadas con el tema.



Explica las consecuencias de la declaracion de PANDEMIA, las implicaciones políticas que de ello se derivan y hace una propuesta para mantener la calma, así como un llamamiento urgente para activar los mecanismos legales y de participación ciudadana en relación a este tema.

viernes, 18 de septiembre de 2009

Lucera Project

"Lucera Project is a small videogame company that wants to realize some basic libraries to help other ‘indie’ programmers to make games easily. Performing all difficult and cumbersome stuff to allow developers to implement their games without worrying about details like load sounds and textures, render on screen, capture inputs, and so on.

In addition, Lucera Project libraries are cross platform and can compile the same code for different platforms such as Windows or iPhoneOS.

We hope to help many people to achieve their dreams of creating video games."

Blog:
http://lucera-project.blogspot.com/

2D engine:
http://mindshake-lucera.blogspot.com/

Sound engine:
http://brainwave-lucera.blogspot.com/

Good luck!

sábado, 12 de septiembre de 2009

Indian Hopi message

Roy LittleSun's message:

sábado, 29 de agosto de 2009

ShaderX7 contribution

Finally, my article doesn't appears in the ShaderX7 book :(
But, hey! I appear inside as contributor. My fifteen minutes of fame :D





jueves, 13 de agosto de 2009

Light shafts





In my holidays I'm trying new techniques for my terrain engine. Unfortunately, in my screen space terrain implementations, the well-known artifact of "vertex swimming" appears and it's very noticiable :|

I think that I can reuse the technique in order to code a cool screen space water effect in the near future.

For now, I'd been added the "Game Programming Gems 6" terrain technique (very simple, pretty fast, and without any pre-calculation), light shafts (but the effect needs a radial blur), and particle billboards for cloud rendering.

viernes, 26 de junio de 2009

jueves, 5 de marzo de 2009

sábado, 22 de noviembre de 2008

Screen space terrain

Lastest days I've been busy coding a demo of a "screen space terrain". There isn't geometry here, only heightmaps. A grid is projected over a plane by a projector camera (in red). At now I'm trying to fix vertex interpolation and making a more better projector. Frame rate is constant because the projected grid has the same size along the scene.
When I finish it, I'll upload a demo with full source code.



lunes, 3 de noviembre de 2008

How to configure SMC EZ-Connect usb wifi stick into Ubuntu



My current distro is xubuntu 8.10, but it could be apply to
an older xubuntu 8.04, kubuntu, and ubuntu distributions:

1. Install ubuntu
2. Install ndiswrapper from cd instalation folder. Click over this two files:
"/pool/main/n/ndiswrapper-common_1.50-1ubuntu1_all.deb" and
"/pool/main/n/ndiswrapper-utils-1.9_1.50-1ubuntu1_amd64.deb"
3. Copy your ".inf" file from SMC driver CD to a local folder.
4. Type this into console (changing your name and driver name, of course):
ndiswrapper -i /home/user_name/xxxxx.inf
ndiswrapper -mi
5. NOTE: You could be use ndisgtk also, and remember that if your ubuntu
runs at 64bit you need the 64 bit driver (xp64 for example).
6. Type sudo gedit /etc/network/interfaces
7. Copy and paste this into file:
auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp
pre-up ifconfig wlan0 up
pre-up iwconfig wlan0 essid WLAN_20
pre-up iwconfig wlan0 key s:'C1131DA6BFB21'

8. NOTE: Change 'WLAN_20' to your wireless name and 'C1131DA6BFB21' to your WEP password.
9. Save file changes and reboot
10. Open firefox and type www.google.com :)

viernes, 24 de octubre de 2008

3DisplayForum

This month I've been busy by preparing my conference for the first 3DisplayForum. In the website you'll can download the conferences of the other partners soon.


Hey, that's me :D

My conference was titled "Photo-realistic illumination in real-time" and you can download the PDF of the conference here (sorry, at now only in spanish).

This year was showed in Madrid, I hope that if you live in Spain you can
attend next year if you're interested.

domingo, 5 de octubre de 2008

10.000 visits

Hey, 10.000 visits, but seriously: I'm not worthy.
Anyway, a lot of thanks ^^

martes, 2 de septiembre de 2008

Google Chrome

I've been download google chrome and all that I can say is that it's the fastest web-browser I ever seen. Newer times, newer browser. Wow, but we want the Linux and Mac version too :D

martes, 12 de agosto de 2008

OpenGL 3.0

Unlike other coders I'm very glad with the new openGL specification, because I hate strong object-oriented design in a low level API. Until now I design my 3d engines using this design paradigm but with the use in some games I learned that the most useful code was the oldest openGL design that avoids classes and pointers (at least at the highest level). With this in mind I built a lite 3d framework that uses index instead pointers ala openGL.

I'm sure that people that has been used the two APIs can remember entire openGL sintax because it uses the same subset for all commands.

I believe that Khronos group follows a smart movement by avoiding API re-design every 2 years like directX does when new GPU features arrives.