Archive for the ‘Ramblings’ Category

For all practical purposes I consider the work I’ve done on exporting the standard material type from ShaderFX to Ogre3D readable format, complete.

It now exports correctly all the subnodes and lights and the calculations all appear correct now, including advanced functions like projection mapping based on vertex positions, alphas based on vertex colors, ambient occlusion, diffuse, normal and more.

I’m now going to proceed to create an exporter for the Glow and Subsurface scattering materials, as those are the ones I see us needing in the near future.

Even though this has taken a lot of time to implement I think it will save us untold hours of work in the future. This applies even if I leave it standing at only the standard material.

Unfortunately I’ve not gotten any further response from Luminox on this matter, so I don’t know if this work will ever reach the public. I can’t release it on my own as it is proprietary software that I’ve made extensions on…

“You like defeating impossibly difficult foes, struggling until you eventually achieve victory, and beating other players as well as hanging around with people you trust and helping people.”

This hits the mark for me pretty well. My favorite game moments all involve defeating the super-hard endgame bosses in Everquest back in the day. Every single MMO I’ve played after that has failed to induce the brainpounding pleasure of those successes.

“Each BrainHex Class also has an Exception, which describes what you dislike about playing games. Your Exceptions are:

» No Commitment: You dislike being asked to complete everything, preferring to pick and choose which tasks you will attempt, or simply messing around with a game.”

This does not ring true at all. I felt I responded truthfully to all questions but the point was that I immensely enjoy doing this for other people but I don’t really enjoy doing it for my own parts, preferring just a patchwork of drops that I’ve gotten incidentally here and there…

I’m 34 today (yay), but as usual it doesn’t seem to confer any kind of new respectability or greater wisdom, despite my graying hair and deteriorating memory. Lets see if it comes along later on in the day.

I’ve been using Lumonix’ excellent ShaderFX plugin for 3ds max to generate shaders, and then altering the generated shaders to comply with the Ogre3D material framework. To say the least this has not been without problems. The main problem is that Ogre3D is designed to be very open as far as the content pipeline is concerned. The material structure is very flexible, but at the same time suffers for it in its inability to use techniques native to shader programs.

A shader program usually follows a set pattern. At the top are definitions of constants and “tweakables”. These are the inputs to the shader program, such as colours, values for specular and gloss levels, texture samplers and more. After these follow definitions of the matrix structures the shader requires to work properly, such as the world matrix, world view projection, view matrix and many many others. Thereafter come definitions for input and output structs for the vertex and fragment shaders. Then comes the real meat, the vertex and fragment shader entry points themselves and their internals. Last come the technique definitions, where everything is woven together.

Most 3d engines read the techniques and apply materials to the objects in the 3d representation. Ogre goes about this circuitously at best. It does not read the techniques at all, but leaves it to the programmer to know the entry point names and then declare shader definitions that are in turn used in material scripts. To add to this, most shaders exported from any shader authoring software do not compile properly with Ogre without alteration. For example matrix multiplication is reversed when multiplying multi column matrices with single column (vectors). The shader declarations need to include the entry point name, the target (vs_2_0, ps_3_0, etc) and the source file for the shader proper. Then you define the bindings for the world matrices to the shader inputs, e.g. wvp -> world view projection matrix. These, in turn, are read by entirely different files, called material files, where you point to the declarations you made in the previous files, called program files.

This process is labourious to say the least. So, I’ve been trying to find ways to automate some of the steps. The biggest hurdle at first was editing the shader files to conform to Ogre’s format. If you’ve ever seen the contents of a shader file, you know what I mean when I say that it is not pretty. Second was writing the shader definition files (.program) and thirdly including it in the materials. I wrote a short python script that cleaned up the shader file for comsumption by ogre, but it seemed a cumbersome way to do things, parsing the code of the shader and then outputting it to a new file. After trying this with a few different shaders, I decided to trash the project and try something else.

I started looking into how ShaderFX is constructed. Without going into too much detail (proprietary software etc), I managed to build a half assed export extension that exports Ogre compatible shaders. Now I just need to get some support from Lumonix to extend the extension so that it generates the necessary material and program files. So far Lumonix have responded well to this project, so I hope they will be able to answer the questions I have raised with them.

I’ve spent a bit of time lately playing NFS:SHIFT (Shift from now on) and I’ve gone from a stand of “neat” to “yikes”. This game is in fact awfully good.

Before playing it the first time I had seen a few gameplay videos and trailers and was somewhat put off by all the goings on in the interface while driving. Thankfully you can turn all of this off, which I did. There is nothing on my screen but the 3d representation of the interior of the car I am driving. And it looks fantastic. The feeling of driving very fast, braking hard and turning comes back to you in a great way, better than any game I have experienced so far. GTR and GRID do this well too, but this takes the immersion to a new level. I’m playing with a MOMO wheel controller with gas and brake pedals and I feel that this is as close as I am likely to come to real racing in the current technological paradigm.

The graphics are outstanding. The cars look damn near photo-realistic, and yes, I hate using that phrase. You’re aware you are looking at a computer generated 3d representation of the objects in the game, but they look so good and the lighting is of such quality, you just forget from time to time. I was readily Some tracks look better than others. The real tracks, i.e. those that represent real tracks that are raced upon in the real world, look distinctly better. Spa GP and Nordschliefe (Nurburgring) look fabulous in particular. The conceptual tracks look worse but not so as to put you off in any way. I’ve never personally been to these tracks myself, but from image and footage I have seen of their real world counterparts, they seem to be faithful renditions.

The drawbacks of the game are the gameplay elements that cater to the consoles. These are achievements, stars, points and announcements thereof in the middle of races. Thankfully these can all be turned off, and then ignored when they are presented as part of the career mode, the heart of the gameplay dynamic, but where you cannot actually turn them off. I would have been well off just getting the money and doing the races.

I thouroughly recommend this title to any who are hungry for some simarcade racing. Some say that games like Forza Motorsport and Gran Tourismo are better games, but I’d rather play yatzee on facebook than play a racer on consoles. And I hate facebook. Not yatzee though, that’s cool.

Need for Speed is indeed back with Shift, but not in the way of the last 4 or 5 iterations. It’s back to pure racing, doing away with the pomp and circumstance of open world mucking about and storylines, leaving you with unadulterated joy.

For those who don’t know, Hearts of Iron is a WWII deep strategy game. I don’t really play a lot of this type of game, but I spent a while playing this one.

Some time ago I tried to play Hearts of Iron II, the preceding release in the series. After trying for a couple of hours, I gave up, as the interface and gameplay was too difficult to get into. I read some reviews and forum postings about the new release and saw they were mostly favourable so I decided to give this installment a try. I bought the game on steam and started diving in. I read several informative tutorial posts on the Paradox Plaza HOI3 After Action Reports forum, and I finally got into the game.

My initial impressions were very good. The gameplay was relatively easy going, with only a slight learning curve. I started a game as the British Empire in 1936. After several restarts, I finally got the hang of the detailed resource management and thought I was in a good position by 1939, when the war historically started. Then things started to go a bit downhill. The problem is not the socio-political management simulation, which is good. The land combat modelling is also very nice, enabling the player to perform envelopments and tactical retreats and more. The problem lies in the fact that the naval and aerial combat modelling is completely broken.

This might not affect players if they are playing as germany or russia or another major land antagonist. It does however severely affect any player playing as Britain, USA or Italy. All these nations historically relied on air and naval power to forward their objectives. The north african campaign for example was arguably decided by air and naval power alone. Sure, there was grunt work involved, but British air power based on Malta, and naval power based in Alexandria managed to nearly stop alll reinforcements from reaching North Africa from Italy. There are examples of convoys leaving Italy and losing fully 3/4 their number to airplanes.

In Hearts of Iron ships are hardly ever sunk by airplanes. Airplanes have little if any effect on land combat, even specialized close support units. This is completely at odds with historical fact. The battle of the bulge took a decided turn when the weather lifted and air attacks destroyed the german tank columns.

My first game developed along the usual (HOI3) lines of germany attacks poland and eliminates it, then attacks france and is stopped at the Maginot Line. Attacking through the low countries never occurs to the german AI. Italy then proceeds to conquer France. None the less, after France falls, it goes to Germany, either annexed or Puppeted as Vichy France. Germany then attacks into Denmark and is stopped by the Danish and Swedish armies. Seeing this, I sent my army into Denmark, cut of roughly a thirds of the german army there, and then proceeded to conquer all of Germany.

Those landings in Denmark and northern Germany should have been impossible due to the number of planes in german possession. But all of my ships got through, despite heavy air attacks on the landing fleet.

In my next game germany never declared war on the allies. They invaded Greece and took it, but no invasion was ever attempted on France. In the game thereafter, everything looked like the same thing would happen, and I finally decided to declare war myself. My african armies quickly eliminated the italians in Africa, and I decided to take a closer look at what was happening in Europe. As it turned out, the germans had not invaded France yet, but the Italians were deep in Champagne country. After taking stock of my forces, I sent all units that were not engaged in East Africa stamping out the remains of the ethiopian army, to the border of Italy and France, cutting off most of the Italian army inside France without supplies. Again, if air power was properly modelled I would never have been able to send dozens of ships, unmolested, up the west coast of Italy, to land forces at the top of the boot. After the Italian army in France was enveloped and destroyed, France happily went ahead and conquered all of Italy while I sent my forces into Germany. 2 months later it was all over again.

After this I can’t really justify spending time on this game. Even though building up your forces in the pre-war years is fun and interesting, the actual war is without any challenge whatsoever. Added to that, playing as a naval nation is neutered by the wierd ineffectiveness of landbased air power. It should be difficult to maintain supply lines to North Africa for the British, with the Italians controlling the air. It’s not. It should be a challenge to face the Japanese in the Pacific, facing supply difficulties and distances. Ditto here. The Japanese are overrun in the first months of the war by the Nationalist Chinese in short order and are a non-entity in the game.

After spending hours in the buildup, the game is always completely dissapointing in the endgame. What a shame, as it promised to bring a deep strategy game to the masses, yet fails by the fact that it plays completely unrealistically.

I installed and did the first few races in Need for Speed: Shift tonight. Even after pretty rave reviews on ign and gametrailers, I was sceptical, but decided to go ahead and treat myself. Since my long term relationship with GRID ended, I’ve not gotten enough use out of my MOMO steering wheel.

It’s really quite good. It strikes a nice balance between GRID’s arcadey dynamics and the rock hard realism of GTR and iRacing. I rather think I will enjoy the rest of it.

I can only hope that it does not employ the methods of NFS MW where it danced with you, held you tenderly and then, around the middle, proceeded to punch you in the stomach, bend you over and do unspeakable things to your nasal passage, by way of the small intestine.