Archive for the ‘Rants’ Category

Summer summary

Friday, August 28th, 2009

This post tries to address the recent lack of blog updates presenting a summary of remarkable dates occurred during this summer. :-)

Summer Collage

  • 3rd June – I registered a Twitter account, you can read about me and gamedev at a faster pace.
  • 1st July – Me and M3xican announced the development of the independent game Evolution War and registered the Lowpoly Studios domain.
    Check also the related Twitter accounts: EvolutionWar and LowpolyStudios.
  • 22nd July – I got a Bachelor’s Degree in Computer Science with higher marks and honours from the “Federico II” University of Naples, Italy. :-D
  • 3rd August – The Khronos group announces the release of OpenGL 3.2 specifications at SIGGRAPH 2009, at last it comes with different profiles support!
  • 10th August – I bought the “10 Top Indie Hits” on Steam: great games at a great price!

A long presentation…

Tuesday, June 10th, 2008

The professor of the computer graphics course at my university was continuosly annoyed by my protests and comments during her lectures..

I’m sorry but I just couldn’t stand some claims like: “Phong shading is never used in interactive applications because of it being computationally too heavy”… :)
Fortunately she gave me the opportunity to give everyone a small technological update. :D
After about a month, my presentation was born.
Made entirely with LaTeX Beamer, VIM, Dia and GIMP, it deals about what modern GPU are capable of, showing some GPGPU applications, along with traditional ones (videogames :D ), and some shader examples together with commented code.

I discussed it yesterday in a couple of hours, I was all shook up at first but then I advanced smooth and plain. ;)
It is in Italian, of course, but I published it anyway: Le Moderne GPU.

glUniform1f() is working!

Monday, March 17th, 2008

I faced this problem for the first time a year ago, while working for my parallax mapping demo, and I met it again these days, in which I’m busy to fine tune my depth of field demo to permit keyboard driven parameters tweaking.

Bug

The issue I’m talking about is quite seriuos, on my machine it is impossible to pass a float uniform variable to a shader, and I’m not the only one reporting it:

The first link is a forum thread from GameDev written by a girl whose applications suffer from this annoying issue, he has written a proof of concept which works perfectly on my box, i.e. float uniforms are NOT passed. :)
But it has been the third one which made me think about how to fix the problem: it has been reported that, after calling glewInit(), glUniform*f() functions work again.

The first thing I did, of course, was to download and investigate inside GLEW sources to see what was happening inside that magic function. What it does, actually, is redefining all the GL function pointers calling glXGetProcAddress() for everyone of them, I thought it would have been a good thing to try to replicate this behaviour in my programs, and I was right! :D

This is what I added to my sources for the incriminated function to work:

PFNGLUNIFORM1FPROC glUniform1f = NULL;
glUniform1f = (PFNGLUNIFORM1FPROC)glXGetProcAddress((const GLubyte*)"glUniform1f");

This also seems to explain why my Python shader demo didn’t suffer from all of this, I think that PyOpenGL initializes itself retrieving the addresses for all the GL functions it needs.

IMPORTANT UPDATE
M3xican, the shader master came with THE solution, just add -DGL_GLEXT_PROTOTYPES to CFLAGS.
Hail to the master! :D

Back in blog

Saturday, December 1st, 2007

My blog is back, at last!
I was starting to lose the hope for a data rescue and beginning from scratch (as a matter of fact I wrote the Photon post before this one), but, fortunately, it was not the case…

WordPress Logo

Our marsnomercy.org server has been down since the 31st of July for a stupid fan problem, the Mars site/wiki/bug tracker and my little blog have followed it. :(
On that server, in my mailbox, I used to collect blog backups… yes, I’ve been so stupid to weekly archive database backups on the same machine running the DBMS… :)
But now, thanks to Dekki, our great 3d artist and sysadmin, we have all the data back on a replacement server!

But, as you have probably noticed, the blog is now hosted on Netsons, a reliable and feature rich free hosting solution, which is also the home of my new Encelo’s Projectz site, now running on Drupal.

Today I’ve been busy with xml imports/exports, ftp uploads and tons of manual phpmyadmin updates, but it has been worth the effort.
I have installed the latest WordPress from scratch (welcome integrated tagging! ;) ), updated all the plugins, imported the access statistics and made a Last.fm and a Ohloh widget.

The blog is back and it is here to stay! ;)

Hail to the Photon

Monday, November 26th, 2007

On Thursday I assembled Photon, my brand new workstation, the day after I received also the surround speakers set and the fantastic wide monitor.

For the detailed configuration you can have a look at the page written for this purpose. :)

Photon

The specifications are not extraordinary (except for the monitor, maybe, which is a bit larger than usual, but you all know that the display area of a monitor is never enough ;) ), Photon was built with the aim to be cheap but effective, no bells and whistles, but a solid and balanced platform.
Moreover, buying from the entry level segment avoid the situation when you wake up a morning and discover that your hardware is worth 25% less than the previous day…

With Photon I have the possibility to be part of the next-gen gaming era, to exploit multi-threaded programming with a real performance gain, to explore the Shader Model 4 and OpenAL benefits… and to run a heavy Compiz Fusion configuration at 1680×1050! ;)

I’m 24 and I’m a gamedev :)

Thursday, June 7th, 2007

I turned 24 today!
It has been a year of studying, graphics/game programming and, of course, entertaining. :)

Birthday Cake

The year that has just sterted will be characterized by a summer of work instead…
Working for the Summer of Code is hard, it is a real work after all, but also funny, and getting paid for enjoying writing Python (actually Pyrex) code and researching on graphics techniques is fantastic. :)

It also legitimate my status, I’m a game developer. ;)

The quest is over!

Sunday, April 15th, 2007

The quest for the lost fragment is over, at last!
Today I have returned from Athens and installed in Electron the additional ram module and the long awaited shader capable MSI FX5900XT-VTD128 card!

MSI FX5900XT-VTD128

The first thing I’ve done was to update the Nvidia driver packages from ‘nvidia-96xx’ to ‘nvidia’, this currently means going from 96.31 to 97.55.

This is what’s new from GeForce4 Ti 4200 (NV25) to GeForce FX5900 XT (NV35):

  • The OpenGL version string is now 2.1.0
  • The CineFX 2.0 engine allows for two new anti-aliasing modes: 4x Bilinear Multisampling by 4x Supersampling and 4x Bilinear Multisampling by 2x Supersampling
  • There are eighteen new extensions available: GL_ARB_fragment_program, GL_ARB_fragment_program_shadow, GL_ARB_fragment_shader, GL_ARB_half_float_pixel, GL_EXT_blend_func_separate, GL_EXT_framebuffer_blit, GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_object, GL_EXT_stencil_two_side, GL_EXT_texture_sRGB, GL_NV_float_buffer, GL_NV_fragment_program, GL_NV_fragment_program_option, GL_NV_framebuffer_multisample_coverage, GL_NV_half_float, GL_NV_primitive_restart, GL_NV_vertex_program2, GL_NV_vertex_program2_option

What follows is a series of test, actually they are exactly the same, and with the same settings, as the ones shown in the Easter gifts post:

Test NoAA, NoAF 2xAA, 4xAF
glxgears 4852.8 2678.0
Blender 9978 7927
GL_shadow 1189.4 793.0
GL_pointz 544.8 552.0
GL_blit 2006.0 1391.4
GL_smoke 449.4 402.8

Some tests perform better on Electron than on Thunder (which has a much faster graphic card and DDR RAM), this is very strange, maybe I’ve got to run these tests on Thunder again. ;)

Accepted for Summer of Code

Thursday, April 12th, 2007

Dear Applicant,
Congratulations! This email is being sent to inform you that your
application was accepted to take part in the Summer of Code.

Yeah, one of my two proposals has been accepted!

Dilbert Doodle

My first proposal was about working on GL O.B.S. under the Python Software Foundation, unfortunately it was very likely going to be discarded.
I learned this from a mentor who contacted me, he wrote that my application was based on a personal program and that it would have been hard to find someone to mentor me, moreover I wouldn’t have contributed to the Python community. He also added that I could have been a good candidate for his project, he is, indeed, Arc Riley, Project Manager of PySoy.
And so I did, I wrote another application and, this time, it has been accepted. :)

My work will be to integrate multi-texturing in the PySoy rendering loop and API, document API additions, test the whole under many different free software drivers and then implement some related techniques, like bump or normal mapping.

I’m really glad of this opportunity, I will learn many interesting OpenGL and Python topics and I will improve my design, teamwork and communication skills.
Thank you Google! ;)

Easter gifts

Sunday, April 8th, 2007

While in Greece to spend holidays with my family I was able to get my hands on some interesting piece of hardware to bring back in Italy for Electron: a 128MB module of SDR RAM to fill up the last motherboard slot and *two* different graphic cards (my old 5900XT and a 6200)! :)
Actually all this was possible thanks to Easter gifts! ;)
My uncle installed a 512MB module of DDR RAM inside his old PC, while both me and a friend of mine changed our old cards with the good and cheap Gigabyte GV-N76G256D-RH, a GeForce 7600GS equipped card with 256MB of DDR2 memory.

Gigabyte GV-N76G256D-RH

It is a completely silent card which delivers sufficient performance at a great price, it is capable of running Shader Model 3.0 vertex and fragment programs, supports OpenGL 2.1 and all the G70 Extensions, moreover it features a lm_sensors compatible thermal sensor on the GPU core. :)

A reduced series of tests follows, all performed at 640×480 excepts Blender 2.43 draw benchmark, which was run at 1024×768, my desktop resolution.

Test NoAA, NoAF 2xAA, 4xAF
glxgears 4966.6 3123.3
Blender 10855 10764
GL_shadow 1428.8 996.2
GL_pointz 631.0 617.6
GL_blit 2052.8 1223.8
GL_smoke 358.2 316.8

The low resolution at which most of the test were run could have made the results a bit too cpu limited, some other games I’ve tested seem to confirm this theory, however that the card shows its strength and I’m satisfied with it.
I hope you also get nice Easter gifts and I wish you a merry Easter! ;)

The quest for the lost fragment

Tuesday, February 6th, 2007

Yesterday I was donated a new graphic card from a generous guy at the university, including cables, manual and bundled software, it is a nice MSI G4Ti4200-DT64 with red PCB.

MSI G4Ti4200-DT64

It’s a good card but unfortunately it has only a primitive version of pixel shaders, they are neither floating point (supporting at most the proprietary “HILO” format) nor GLSL compliant, and they cannot be used via GL_ARB_fragment_program (as a matter of fact it is not present in the extensions array :( ), but only through the family of GL_NV_register_combiners and GL_NV_texture_shader functions, which make use of the OpenGL state machine.
Nvidia Cg actually supports the fp20 profile, but its output is just a nvparse program, which has to be passed to a function that will setup GL texture states.

Anyway, let’s analyze what’s new going from a GeForce4 MX440-8X (NV18) to a GeForce4 Ti 4200 (NV25):

  • The OpenGL version string hasn’t changed (mainly because of the lack of Shader Model 2.0), it is still 1.5.8.
  • Thanks to the Accuview AA Engine there are three new anti-aliasing modes: 4x Bilinear Multisampling, 4x Gaussian Multisampling and 2x Bilinear Multisampling by 4x Supersampling.
  • There are twenty new extensions available, most of them are related to multisample, depth textures, occlusion queries, shadows and texture shaders:
    GL_ARB_depth_texture, GL_ARB_multisample, GL_ARB_occlusion_query, GL_ARB_shadow, GL_ARB_texture_border_clamp, GL_EXT_shadow_funcs, GL_EXT_texture3D, GL_EXT_timer_query, GL_HP_occlusion_test, GL_NV_copy_depth_to_color, GL_NV_depth_clamp, GL_NV_multisample_filter_hint, GL_NV_occlusion_query, GL_NV_register_combiners2, GL_NV_texture_compression_vtc, GL_NV_texture_shader, GL_NV_texture_shader2, GL_NV_texture_shader3, GL_SGIX_depth_texture, GL_SGIX_shadow.

Of course I performed some benchmarks too (have a look at Electron specs), all at 1024×768, except from glxgears and globs tests, they were run at the default 640×480 resolution.
Quake 3 was tested on the four.dm_68 demo with sound, Blender 2.42 was tested with the draw benchmark, while the GLSLvp_pointz test uses only vertex shader to move and color points.
Note that this last test is emulated in software on NV18 while is performed in hardware on the NV25, but shaders plus full scene anti-aliasing seem to be impossible to achieve on the latter.

Test NV18 NV25
NoAA, NoAF 2xAA, 4xAF NoAA, NoAF 2xAA, 4xAf
glxgears 1568.5 833.5 2976.7 1571.7
Blender 2580 1580 7000 4484
Quake 3 93.0 51.7 113.6 92.3
gl_shadow 296 148.4 674.6 360
gl_pointz 421.8 272.6 526.2 398.4
gl_blit 600.6 285.8 1197.4 612.4
gl_smoke 299 177.2 404.2 302
GLSLvp_point 118.6 103.8 317.6 X

The card is nice and fast, but the search for the fragment (extension) has not ended. ;)