Skip to main content

Posts

Automating Level imports from Blender to Godot

  Recently I've been making some levels in Blender an importing them into Godot. There are only about 7 or 8 shaders for each level, not counting dynamic objects which will be added later. But to improve rendering performance, it can be a good idea to split the meshes up into sections. At that point you might be faced with a list like this: Or it might be even more chaotic, if you didn't use simple names for the objects in your level. So it can take a long time to sort out all the meshes, make them unique and add textures and so on. Blender imports with simple Blender textures, or with placeholder materials. This is sometimes OK, but if your Godot shaders are very different to those used by Blender, it means applying new materials to every mesh object in the level when you import the scene. I found that during the design process, I was importing and readying a level several times before I was happy with the final layout. So at first I was wasting a lot of time. In Blender, I us...

Fake "reflective" material shader.

GODOT has a great shader system, and the roughness/metallic settings do a great job of representing a range of materials... but sometimes you want something a bit different. It is possible to have object specific "reflections", using a fairly old technique called "matcaps". It's not a particularly realistic looking effect, but if you want to go for that stylized effect, it can be a fun throwback. vec2 offset = (normal_map.xy) - vec2(0.5); vec2 v_n = (normal.xy / 2.0) + vec2(0.5, 0.5); v_n.y = (v_n.y * -1.0) + 1.0; v_n = v_n + offset;     vec4 refl = texture(mat_cap, v_n); Here 's the code you need for making the matcap project properly on your model. I've included a section to make sure the normal map will distort the reflections, just like with the metallic effect in GODOT. You can see in the image above that if we don't do this (left) the effect doesn't look good. Be sure to use the right import settings on your normal map textures, so that th...

Text crawl and other effects GLSL shader

For my project, I've been working on a kind of 80s style sci-fi monitor display.In game, this is going to be handled by a single texture effect with a GLSL shader. Different sections of the texture will be cut down and used on different view screens. Here's a preview of how it looks in action: Screen capture in Linux Mint is always a bit buggy. :( Or maybe it's because my computer is over ten years old... Here's another set of screens with different colors and contents, for the planet that the player gets to visit in the first episode (you can see in this preview how the "alert effect" is activated to change colors of the scan): You can see the original effect I'm trying to duplicate in the Star Trek movies: Anyway, it's a nice set of old school effects, and I'm going to explain how they are achieved in a game engine with a GLSL shader (In this case, GODOT, and awesome free game engine). First you need to set up the different layers of your image. ...

New Project: Basilisk

 I've been working on a new project this month. It's a serial point and click adventure, set in a familiar universe. It's going to be a non-profit project, to stand as a showcase for everything I've leaned in game design and programming. The setting will help to make it more visible.  This was a tactic I used with some success in the past, when I made a battletech fan game. The number of views and downloads for that game were roughly ten to twenty times higher than for any of the games which I made based on my own ideas and settings. I'm going to be able to reuse a lot of assets I originally designed for a previous sci-fi project, so that should save some time. There are going to be new assets, and I've already made some of the characters. There's a story, with an arc which covers a whole season of mini episodes. Godot is a great game engine for this kind of project. Very light weight and easy to use, but with a full set of features. Godot 4 will include an ...

Dynamic terrain in GODOT

Long time no posts. I haven't been keeping up with the projects I started. At first it seems fun and exciting, but I always run in to limitations in the setup, plus the grind of just making stuff without any real challenges... It ends up being something that I don't want to commit to. So right now I'm just messing around with some ideas and see what comes out. No commitment to a bigger project, just some time to try new things. This week I've been working on procedurally generated terrain.  In the past, there were some big limitations on how I approached this, because the game world had to have the whole map, from the micro to the macro. I had to choose a scale somewhere between, which meant I couldn't have really large maps, or really small details. I think I've found a way around that. Below you can see two types of map data coexisting on top of each other. The wireframe is the collision data, used for physics and for clicking on the map, to move characters ar...

Project Lemonade December Update

It's the beginning of December, and I don't know how much work I'll get to do on the project this month. So I'm posting an update now, and another one maybe in January. I've been working with GLSL shaders to create the outdoor terrain. There's now a texture splatted ground plane, animated grass, animated trees and animated water. The textures are just placeholders for now, and all the models are temporary. Right at the moment, I'm just working on how the elements are going to be coded in the game, so later some better quality assets can just be dropped in to replace those being used for testing. Some of the shader code I used was inspired by examples found here .

Project Lemonade November Update

It's been a while since  posted here. I've moved from Blender Game Engine to GODOT, and I've started a new project. The proposal for Project Lemonade is in an earlier blog post , so I won't go back to talking about that. Here's a quick overview: Solar city (Project Lemonade ) will be a non-violent game designed with the intent of making people think about ways to regenerate their communities in case of coming social breakdown. It is inspired by Solarpunk . I haven't made massive progress yet, because I've had to learn a whole new game engine. However, I have already taken some steps towards a working prototype. I've got a controllable character in the game, plus a working tileset system (GODOT has a great tileset feature), and also some simple AI agents, just wandering around for now. It's not very impressive yet, (all the assets are placeholders, just while working on functionality) but it feels great to have finally moved on from the ...