<<Previous Archive | Next Archive>>

Release week

Phew, this was tough. First MindArchitect, then yesterday I released CopperCube 4.4, and today, there is now finally a beta of irrKlang for 64 bit architectures available. I could write a lot about every one of these releases, but now I'm too tired. :)

New Mind Map Editor

A few months ago, I was experimenting a bit, and tried to write a graphical shader editor. Then, after I noticed that it sucked, I transformed it to be a graphical programming editor, in order to create complex scripts without programming. Also this one sucked: For programming, it is still best to write everything down in text. You need a huge diagram just to represent a few lines of code, for example a for-loop with a few ifs attached. Also, it is very inflexible, when you try to change something in the algorithm you want to describe.
Anyway, now I had this editor thing, had decided that it wasn't worth adding it into the game engine editor, but what should I do with all this? It was a lot of work, and it would have been a pity to just throw it away. So I transformed it again a little bit, and - voilą - I present you MindArchitect, a free mind map editor for Mac OS X and Windows:

It has many features, and is free for small and mid-sized mind maps. If you need to create huge mind maps, you can buy it, if you like.
Hope you like it. If you try it, any feedback is welcome. You can download it from here.

Grass rendering

There are several ways for rendering grass in 3D graphics, in real time. The method shown below is one of these, a particular simple one:

As you can see, we simply create a few randomly distributed polygon 'crosses' with a grass texture on it, and that's it already. In the image above, I made about half of them solid instead of transparent - that's why they are black - so that you can see easier how they look like. It looks quite convincing in action, especially if you are using a view from the perspective of a standing person, for example:

You will be probably using a lot of grass and plant patches, probably even a few thousands of them. So making each grass patch an invidual object isn't very efficient, it would be nicer to be able to draw the whole grass with a single drawing call. Which would be a 1000 times faster in this case, which would be nice, right?
In the example above, the grass patches are all one single object, and all grass patches are drawn in one call. Unfortunately, this has a slight disadvantage:

As you can see as marked in the red circles, the order of the individual patches isn't correct anymore, since all grass patches are now one single object and drawn carelessly without special treatment with one drawing call. On the screenshots, this might not look that bad, but in movement, this looks really horrible. Basically, grass patches from the back randomly are drawn in front of other ones which are nearer to the viewer.

Fortunately, there is a very simple workaround possible for this: Simply disable alpha blending, and in the fragment shader discard the pixel drawn based on the alpha value of the input texture. In GLSL, the following simple lines do this for you, added to the back of your shader program:

if(gl_FragColor.a < 0.5)

I've now implemented a feature like this also in CopperCube, for all rendering targets (D3D, OpenGL, WebGL, Flash/AGAL, Android). You will be able to find it in the advanced material settings, in the upcoming free update:

I'm not sure how to name this feature, "No alpha blending, render order independent" is probably a bit too technical?

Anyway, with this, it is easily possible to add grass patches, plants and other alpha channel based fake geometry like for example grating and similar. This is a small, but very useful addition in my opinion. This is also exactly how I did the grass in Endtime at Home:

... which still could need a bit of improvement, I think. It still looks a bit too uniform, but - ok - that not the fault of the technique used. :)

My new coffee can

Yesterday, I received this in the mail from an anonymous source:

It came with the text "thanks for the great support". Well, thank you too, I absolutely love this thing :)

Dynamic texture loading and CORS

I just implemented support for easily loading and displaying external textures in CopperCube, like loading a texture from somewhere on your disk when you create a Windows or Mac OS X app, or from somewhere from your webserver if you are using WebGL and Flash. This feature will be in the next upcoming free update, and it looks like this:

The texture with the statistics on it is an image generated by Webalizer, and it was not included in the project, it was dynamically loaded.
This opens a lot of new possibilities for creating more interesting content with CopperCube, but it still is a bit limited: Both WebGL and Flash Stage 3D have quite severe security restrictions, limiting the locations from where you are allowed to load textures. For example by default you cannot load a texture - say - from www.reddit.com when your webgl website is running on www.irrlicht3d.org, for example. There is a way to make this work as well, using CORS - cross-origin resource sharing. Basically the JavaScript code needs to set a specific flag when loading the image, and the owner of the web server needs to enable this feature as well. Most server today apparently don't, unfortunately.