• June 18, 2014

    Subdivision modelling in 3D Studio Max 2...

    I've discovered a couple of gotchas while trying to model a toy wooden airplane using 3D Studio Max 2012. In order to give the wooden pieces a round...
  • June 17, 2014

    Modelling a vintage lamp post in 3D Stud...

    I've been trying my hand again at 3D Studio Max. I love modelling, but texturing and lighting can be a real pain. Still, you can't have one without ...
  • January 7, 2014

    Awakening: a game that never was

    Back in the day, together with my good friend Alexander Lentjes we would spend many, many hours developing games that we hoped would take the world ...
  • June 27, 2013

    Lightmap baking in Unity does work

    So you've built a wonderful terrain with lots of trees and other models on it, and now you'd like to bake a lightmap onto it? You've probably found th...
Next
Previous

Ruby on Rails – Running multiple instances of a Ruby on Rails applications from the same code with a different database

Ruby on Rails - Running multiple instances of a Ruby on Rails applications from the same code with a different database

I had a fairly complex Ruby on Rails application that I wanted to deploy on my server, and with a very specific requirement. I needed to create a number of subdomains, and each of those subdomains would run the same application but with a different database and showing a different logo, so that I ended up with self-contained websites for each subdomain. I did not want to create a separate copy of the application code on the server for each domain, since that would be hard to maintain.

As it turns out, Ruby on Rails’s environments can be used to do the job. Each subdomain would cause the code to run in a different environment, and the environment would specify the name of the database to use. The biggest issue, though, was to find a way to let Apache’s virtual host somehow cause Rails to run the application instance using the environment specific by the virtual host. I used Apache’s passenger module to run my application.

Read more


3D Studio Max – Modelling a Grundig 2440 antique radio

3D Studio Max - Modelling a Grundig 2440 antique radio

I am currently doing a website project for the “forum of community radios” of Mozambique. While struggling to think how to visualize this concept, I decided to model an actual radio to feature at the topĀ  of the site. After thinking some more, I settled on an antique radio which I felt would be instantly recognizable as a radio, and some of these radios are probably still in use in rural communities.

So I set about modelling an actual Grundig 2440 radio (from this sample photo). Since I need the radio in extreme closeup, I needed to add lots of details. Texture maps were used for the fabric grille over the loudspeakers, and for the reflective dial plate. Read more


Subdivision modelling in 3D Studio Max 2012 using Editable Polygon

Awakening - the game

I’ve discovered a couple of gotchas while trying to model a toy wooden airplane using 3D Studio Max 2012. In order to give the wooden pieces a rounded look, I was looking to use MeshSmooth. In fact, there’s a good example of using MeshSmooth here. However, my models always came out far too round. Playing with MeshSmooth’s parameters didn’t help at all.

As it turns out, MeshSmooth is not a catch-all solution to round off your models with no further work. I ended up experimenting with Editable Poly to get more hands-on experience.

Important tip: Editable Poly is not the same as the Edit Poly modifier. The Editable Poly structure gives you a Surface Subdivision rollout, while Edit Poly does not. It’s this Surface Subdivision rollout that gives you a chance to subdivide your polygons and get a smooth look, so don’t forget to actually convert your objects to Editable Poly if you need this. Read more


Modelling a vintage lamp post in 3D Studio Max 2012

Awakening - the game

I’ve been trying my hand again at 3D Studio Max. I love modelling, but texturing and lighting can be a real pain. Still, you can’t have one without the other.

In recent efforts to redo the old Procurion 9 Awakening game (test renders will be posted shortly), I’ve been playing with photometric lights in Mental Ray. I love the possibilities. It eats up processor cycles to render though. I’ve learned a thing or two about materials though, like using Blend to get dirt spots on lamp glass and rust spots on metal. Here is a simple model of a vintage light post:

Vintage lamp post modelling in 3D Studio Max 2

 

 


A working RTF to HTML converter in PHP

A working RTF to HTML converter in PHP

In a recent project, I desperately needed an RTF to HTML converter written in PHP. Googling around turned up some matches, but I could not get them to work properly. Also, one of them called passthru() to use a RTF2HTML executable, which is something I didn’t want. I was looking for a RTF2HTML converter written purely in PHP.
Read more


Developing a generic count() method for Idiorm/Paris

The minimalistic object relational mapping libraries for PHP, Idiorm and Paris, are wonderful stuff. They have a very small footprint and make your code a joy to read. They allow you to build queries using method chaining, avoiding tedious string concatenation. They’re safer than string concatenation too, since they use parameterized PDO queries under the hood.

And yet, minimalism comes at its own price. Not everything is possible with Idiorm/Paris. Still, whatever seems impossible could very well result from my not understanding the libraries’ potential, or SQL for that matter. Read more


Developing a REST-powered AJAX table control with the Slim Microframework and AngularJS (3)

Developing an REST-powered AJAX table control with the Slim Microframework and AngularJS

Welcome to the third part of a hands-on tutorial on writing reusable user interface components with AngularJS. In this tutorial, we’ll write a table control that asynchronously loads data from a server, display it, and allows the user to sort the data by clicking table headers. The sorting is done client-side. We’ll show how to write a REST-server in PHP, how to define custom HTML elements in AngularJS, and how to setup a controller for the elements. To top it off, we’ll write CSS for our table in such a way that it can be dropped into a user interface in a snap, and scales fluidly with the space allotted to it.

The third part of this tutorial adds CSS to style the output we already have, and adds automatic (client-side) sorting to our table control.

Don’t forget to read the first part and the second part of this tutorial.
Read more


Developing a REST-powered AJAX table control with the Slim Microframework and AngularJS (2)

Developing an REST-powered AJAX table control with the Slim Microframework and AngularJS

Welcome to the second part of a hands-on tutorial on writing reusable user interface components with AngularJS. In this tutorial, we’ll write a table control that asynchronously loads data from a server, display it, and allows the user to sort the data by clicking table headers. The sorting is done client-side. We’ll show how to write a REST-server in PHP, how to define custom HTML elements in AngularJS, and how to setup a controller for the elements. To top it off, we’ll write CSS for our table in such a way that it can be dropped into a user interface in a snap, and scales fluidly with the space allotted to it.

The second part of this tutorial focuses on AngularJS. With a RESTful web service in place, we will now set about writing a new HTML element for our dynamic table. (Read the first part here).
Read more


Developing a REST-powered AJAX table control with the Slim Microframework and AngularJS (1)

Developing an REST-powered AJAX table control with the Slim Microframework and AngularJS

Welcome to a hands-on tutorial on writing reusable user interface components with AngularJS. In this tutorial, we’ll write a table control that asynchronously loads data from a server, display it, and allows the user to sort the data by clicking table headers. The sorting is done client-side. We’ll show how to write a REST-server in PHP, how to define custom HTML elements in AngularJS, and how to setup a controller for the elements. To top it off, we’ll write CSS for our table in such a way that it can be dropped into a user interface in a snap, and scales fluidly with the space allotted to it.

The first part of this tutorial introduces AngularJS, and takes you through the use of the Slim PHP Microframework and the Idiorm and Paris ORM libraries in order to write a RESTful web service, which we’ll need for our table control to talk to.
Read more


Awakening: a game that never was

Awakening - the game

Back in the day, together with my good friend Alexander Lentjes we would spend many, many hours developing games that we hoped would take the world by storm. Unfortunately, we were both 12 and our skills were not nearly sufficient to develop anything good (actually, I’m speaking mostly for myself here). At the time, our great example was Space Quest III, and we desperately wanted to make a clone.

We had made several forays into developing a 3D-animated adventure game (called The Pirate Encounter – and it was actually conceived before The Secret of Monkey Island), but after piles of unfinished prototypes we decided to do a text adventure with static graphics, like the games that Level 9 used to produce at the time. Our company was (and still is) called Procurion 9.

The game was Awakening, and I have recently been able to decode its BSAVEd 4-colour CGA graphics. These were done by Alexander Lentjes, where he was limited to four (very ugly) CGA colours and had to use a self-written graphics package that only allowed him to plot one pixel at a time (there was no flood filler…). By the way – the application I wrote to load BSAVEd CGA images can be found here.

Read more