Monday, November 12, 2012

Updates!

Wow, It has been a while since the last time I posted something here... Well, I need to update this blog!  I am now living in Halifax, NS, Canada and I am a visiting student at Dalhousie University (as part of the Science Without Borders programme of the Brazilian Government). I am still programming some nice stuff, I hope I can show you something new soon!

See ya!

Friday, January 27, 2012

CG related projects!

As promised, I'll show you some of my undergraduate projects. I'm beginning with computer graphics related projects and I plan to show you some other projects in latter posts.

NeoCore
As I said before, after the first semester of my undergraduate course I wrote a ray-caster. NeoCore is the result of this work. It's a simple first person shooter game engine, written in C (and not optimized) using Allegro, capable of rendering a maze-like scene with some interactive objects (like the lava, which causes you damage if you step into it, and a bot, which has random movements). This is one of my last programs written for Windows (although It wouldn't be hard to port it to Linux as I didn't use any Windows API calls explicitly).

An early version of NeoCore (v.0.0.4).



NeoCore version 0.0.9.


You can download NeoCore from SourceForge. Before you download, I warn you that the code that I wrote for this project (although it's much better than the one I wrote for "the Core") is of bad quality!

O vôo da Discovey (The Flight of Discovey)
This project was EPIC! Simply no words to describe it... We (Gustavo Buzogany, Leticia Rostirola and I) created a 3D scene showing Discovery's last return to Earth from the International Space Station. This project was meant for our Computer Graphics discipline. In this discipline we had to create an animated 3D scene (using OpenGL for graphics). So we wrote a C++ program (using OpenGL and SDL) that could read OBJ models (we borrowed some code for OBJ parsing and bitmap loading) and render them in the scene, this program also used some shaders (GLSL) for atmospheric scattering of light (used on Earth's atmosphere) and for day/night/cloud textures on Earth.  The user could interact with this program (for camera control) using the computer keyboard or trough the 4th generation iPod Touch gyroscope (as shown in the following video).

The "trailer" for our presentation, showing some parts of the 3D scene (Portuguese version).

Same as above (English version).


Open Core Raytracer
After finishing my Computer Graphics discipline I started this project. This is a ray tracing program based on my CG teacher's Raytracer. It is very similar to his Raytracer, although mine is written in C++ (his is written in Java) and has a few more features (like parsing a file describing the scene to be rendered). This Raytracer is still very simple, it lacks some basic features like texture mapping and 3D model rendering. You can also download it from SourceForge. These are some images rendered with this Raytracer.

Some reflections...


And this is the "scene description file" for the image above...


scene {


    antialiasing;
    
    save("scene3.bmp");


    dimension {
        width = 400;
        height = 400;
    }
    
    background {
        color = (40, 40, 40);
    }


    camera {
        viewup = (0, 1, 0);
        lookat = (0, 5, 0);
        eye = (-5, 8, 5);
        fov = 45;
        zvp = 0.1;
    }


    light {
        ambient = (255, 255, 255);
        diffuse = (255, 255, 255);
        specular = (255, 255, 255);
        position = (2, 11, 6);    
    }


    sphere {
        position = (0, 5, 0);
        radius = 1;
        material {
            ns = 300;
            transp = 0;
            reflt = 0.15;
            ambient = (0.1, 0.1, 0.1);
            diffuse = (0.8, 0.8, 0.08);
            specular = (0.98, 0.98, 0.8);
        }
    }


    box {
        position = (0, 4, 0);
        size = (3, 0.5, 3);
        material {
            ns = 300;
            transp = 0;
            reflt = 0.75;
            ambient = (0.1, 0.1, 0.1);
            diffuse = (0.5, 0.5, 0.5);
            specular = (0.8, 0.8, 0.8);
        }
    }
}


That's all for now gentlemen! See ya!

Wednesday, January 4, 2012