A Fancy Tree

on my journey to make one fancy looking virtual game tree

·

14 min read

A fancy tree, really?

My first concept of a fancy tree and the logo for this project.

This doesn't look like a fancy tree. Or does it? Don't be surprised. While everything except the Tree might not look that bad, that's not a sign of artistic mastery but just the result of playing around with some tools. I am not an artist. And that shows. (Well, to be fair, at least not a visual artist. I am capable of some other art forms, but more on that later.) You don't know how much time I spent trying to draw a somewhat realistically-looking tree. I failed. Although I memorized the warm-hearted saying "there is no such thing as wasted time when practising art", which I picked up in some drawing tutorial on YouTube (sadly I forgot which one, otherwise I would link to it here), I found it hard to truly accept that for the image I present here. This is because I made a mistake: I tried to reach some level of realism when drawing the tree, without mastering the basics of drawing first. Well, I learned from that mistake, didn't I? Then it wouldn't be wasted time. But I'm not sure. I'm not sure I really learned that because I was aware of that before I even started drawing. I was just too stubborn and expected that I would be able to get at least some basic structure of a leafless tree right. Hopefully, I won't make this mistake again in the future. Then I will really have learned from that.

So, what's all the fuzz about a "fancy tree"? (Wait, that would make a good heading. Here we go:)

What's this fuzz about a "fancy tree"?

I enjoy gaming. And similar to a lot of gamers, I often dreamt about making my own video game. It's not a cliché without cause. Seeing myself as someone with a creative drive, this made it even more desirable. But as everyone, who has the necessary brain cells to do some reasoning, will realise, it requires a lot of skills and knowledge to create a game. Although I obtained skills and knowledge over the years to make very simple and rudimentary games from a technical side, I never realised a more sophisticated project. Due to my lack of artistic skill, I probably wouldn't even be able to make 2D games which don't look like the graphics came from the hands of an elementary school student. And I have no interest yet to make a text-based adventure.

The next thought is rather obvious:
What does one need to do to tackle this lack of knowledge and skill? That's right: learn and practise!

Before I dive into a more sophisticated project (and possibly overwhelm myself with that), I need to master the basics first. So I asked myself, "What would be a good framework within which I can develop my knowledge and skills and directly test them in action?" And the idea I had was, "Make a tree, make a fancy tree."

Why a tree? Well, because it's one of the first random, ordinary, everyday objects which came into my mind. If I can't create simple things, how am I supposed to create more complex ones? And a tree is an object which I could use to develop various skills. Starting with simple 3D shapes, increasingly making the model more detailed and sophisticated, and also starting with simple textures until I can render a realistic bumpy surface. Adding on that, letting the branches sway in the wind, which will make the topic of animations important, creating a weather system around it, where rainwater can be seen flowing down the bark, dripping from leaves, a day-night cycle, leaves falling from the tree, et cetera. From the interactive part, not just implement some first-person-shooter-like movement which allows the player to see the tree from all sides, but also let them carve some shapes into the bark, let them kick the tree and see how it shakes; the list of features I could add to that goes on and on. And at each step, if ordered in a meaningful manner, I would learn something new and increase the level of my skills and knowledge. My capabilities would grow as the tree would grow. Everything new would be directly reflected in the tree. Isn't that a neat metaphor? (To be honest, I noticed what a fitting metaphor this is, only after I decided to make a fancy tree. Lucky coincidence.)

I imagine the tree embedded in some diorama-like setting: A very small scene with the tree at the centre, some grass and loamy soil as the ground, and maybe a small river or a pond at the side. The player will be spawned directly in that diorama and can walk around, look at things, and interact with things somehow.
I will think about a more detailed roadmap soon and present it here on the blog. But it will certainly start very simple.

Thus, the tree will certainly not be fancy in the beginning, as you can already clearly see now. But my goal is to reach a point where it will look really fancy. When I achieve that goal, I will have acquired a lot of skills and knowledge which will prove invaluable for a more sophisticated game project.

That's the theory. And I'm eager to see how my plans will work out in practice.

Why I created a blog for this

There are two reasons why I want to accompany the progress of this project with a blog:

  1. It will document my progress in a diary-like manner. It is interesting for me to see the development of my skills. Comparing my current level with the one of the past can help to encourage me and possibly others.

  2. As some learning resource for others. I am not the first and will not be the last who will venture into the realm of game development without taking a designated study programme at a university for this, but will approach this rather from a lateral entry, whether as a professional or a hobbyist. This could help others who follow a similar path as I do. Although I won't provide detailed tutorials here, I intend to sketch the most important steps of what I do.

Regarding the last point, keep in mind, that I don't claim to be a professional at game development and design. What you will find here on this blog is a protocol for my learning experience. There will be errors, maybe I will do things not in the most efficient or standard way. But I will make iterative improvements, which will be reflected in newer blog posts as well as the GitHub repository for my fancy tree. Also, I am always open to constructive discussion and helpful comments. So don't expect a fully-fledged super-duper-cool-mega-master-tutorial for game development and don't be shy to talk to me, be it here in the comments or on GitHub! :) (Maybe I will add further social media instances, like Discord one day.)

To see where I need to go to reach the goals I set here for myself, I need to take a look at where I am first. This will be important for you as well since I have some of the required prerequisites to do game development.

My prerequisites

Heads up: here you will get some life story ~cracking my fingers~.

I am currently in the process of preparing my master's thesis in the field of robotics. I am nerdy enough that I even want to pursue a PhD afterwards. I have strong programming skills in various languages, especially in C++ which I have been learning since I was a kid.
Also, I came in touch with game development on different occasions: My first encounter was creating some mod maps for the good old Star Wars Battlefront II (the 2005 one) when I was still pretty young. Still in school, I had a project, where I programmed a small minimalistic tower-defense game (which had so many bugs that Windows said goodbye to me with BSOD, hehe). Later, in university, I worked with Unity's game engine for a project regarding the psychological effects of immersion using new hardware interface tools for a virtual environment. Also, I started some minor Minecraft mods which I did not finish, but at least I contributed to an existing one (and there is still some stuff I want to contribute that I procrastinate since). Having several years of work experience, my skills with C++ got even stronger.
I know various frameworks, relevant to robotics, image manipulation, computer vision and artificial intelligence / machine learning (which both are keen interests of mine).

If you are a beginner and feel, that's a lot, fear not. The most important takeaway from this is some basic game engine knowledge and programming skills. For both, you will find various good learning resources on the beautiful and vast World Wide Web. I will also link to resources from time to time, that I know and can recommend and/or use(d) myself.

So, I am well equipped from the technical side. And I advise everyone, who will read and follow this blog, to get those skills somehow, as this blog focuses on my individual progress, which is why I won't detail stuff like programming fundamentals or computer architecture.

Regarding the visual-artistic side, however, I am much less proficient. I am such a bloody amateur, that I wouldn't even touch the word "proficient". I created a simple 3D shape for an art project in school once and that's about it. I had several attempts in the past to learn 3D modeling, but never got the time or discipline to continue that. And forget about drawing or painting. Take my knowledge about colour theory for example, which ends with "there are three distinct base colours". And my drawing skills are reduced to technical sketches of circuits and simple models which are qualitatively sufficient enough to be readable without issues. Look at the stupid tree I drew. There you can see how good I am at drawing. ;)

At least I know how to use GIMP for simple tasks, which is why terms like "layers" and "brushes" are not something exotic to me. Due to my knowledge about image processing, I also have a better foothold here. (Although my knowledge there is of technical and not of artistic nature.) I made some simple wallpapers ages ago when I was still a teenager. Those were basically the result of throwing some filters and algorithms into a pot and seeing what happens. And apart from some minor photo manipulation tasks that's about it.

I don't know how to make good 3D models, I don't know how to draw and I don't know how to paint. Those are crucial skills if you want to create some 3D games with a consistent art style. Needless to say, I will have to do a lot of learning and practising on that end.

But I am not a completely art-naive. I learned to play the piano and saxophone for years, although I need to start practising again (it has been a while \sigh**). Recently I also picked up the Ocarina (yes, another Zelda-fan here). Especially, the piano part will come in handy when I connect my keyboard/piano to my computer, as it will certainly ease the production of a soundtrack for games. And yes, you guessed it, digitally producing music is also something which I need to learn from the ground up. Also, I love creative writing. I have been doing that occasionally, sometimes more intensively since I was a teenager. When I get the time and I'm in the mood, I am working on a novel. Apart from that it's mainly poems and short stories or creative texts. I have filled countless pages with my literary effusions. Wether they're worth a read, lies in the perception of the reader.
Having a creative side is surely advantageous when making games. If you don't feel so creative, don't worry. You probably wouldn't be here if you didn't have at least a little creative drive. That's something you can build up on, as with every other skill as well. :)

So... technical part: check.

Artistic part: Crucial gaps.

Where I intend to go from here

Within the last week, I have set a lot into motion to realise this project. I learned the basics of the Godot game engine version 4.1 (via the documentation and tutorials here: https://docs.godotengine.org/en/stable/ ), I bought a graphic tablet and took a look at Krita. (I have made the not-yet-so-fancy-tree image on this blog post with Krita and my mouse). Furthermore, I took a more detailed look at GDExtension in order to implement the fancy tree as much as possible using C++. (I will detail my reasons for that in an upcoming post.) After setting up the development environment, doing some tests, creating this blog here and creating a GitHub repository for A Fancy Tree, I also downloaded the awesome 3D modelling tool Blender.

Regarding those tools and the development environment, I will probably also make a blog posting or two soon to give some tips or to just document what I did.

You might have observed a pattern here, I try to exclusively use open-source tools. I will talk about that a bit more a bit later in this post.

Now, what's left for me to do is to learn all that fancy stuff such that I can make a fancy tree. While I am less worried about the technical side, I am nervous about the artistic side. How much time will this all take? Can I master the most important basics rather fast? What if my skills just stay miserable? Will I then be able to achieve that high-quality realistic-looking fancy tree goal? I hope I will. Practice leads to mastery after all.

Right in front of me, there are four things, which I want to prioritise:

  1. Create a roadmap. Having a plan, a common thread which leads you through a project helps to set intermediate goals (or "milestones" as some developers like to say) and to put decisions during the project into perspective. It also helps to guide you towards results. The roadmap will probably also reveal topics which I need to learn and master, like shaders for example.

  2. Create a very basic scene in Godot with a ground and a placeholder for a tree. Additionally, implement a player with typical first-person-view mechanics, who can move around the scene.

  3. Learn and practise 3D modelling.

  4. Learn and practise drawing and painting.

Then profit. Probably... Hopefully.

My requirements and expectations

As you might have noticed in the previous section, I exclusively mentioned open-source tools, which I intend to use for this project. This is a requirement I have for the whole project. I want to make this experience as much open-source as possible. And if I sometimes can not rely on open-source tools (because there might be none), then it should be at least free to use. If it's absolutely necessary to buy something, then it should have a reasonably low price. By reasonably low price I mean, that whatever I buy, should be a product which satisfies some minimum quality requirements while being at the lowest possible cost. Take a graphic tablet for example. I don't need to buy the fanciest high-end device on the market for thousands of thousands of €/$/¥ — or whatever currency it is you are using — if a cheaper device would do a sufficiently good job as well. But it should also not be the cheapest piece of trash on the market either just for the sake of saving a few bucks.

There are several reasons for this approach. One of them is that I want to keep this as accessible as possible. Nowadays, money should not become a problem when trying to make some cool creative digital stuff. (It should never become a problem, but that's sadly the world we live in.) Being a student, I am not very rich (yet, muhahahaha ]:> ). I can cover my expenses, but I can't afford much. And there is a tremendous amount of people out there who are in a similar spot. Or think of those for whom this just starts as an occasional hobby. Why should they invest so much money into something they might not want to continue doing?
Another reason is my love for the ideas behind open-source. An open access for each and everyone, an environment where everyone can participate, learn from others and contribute to a project in a welcoming community, working on projects which drive technology — and ultimately humankind — forward. That's what open source is to me. Humanity has achieved great things by working together, which each other. We should not exclude others and become rivals. That usually doesn't end well.
Relying on open-source tools as much as possible is also some sort of interesting challenge for me, a "proof-of-concept" you could say.
A final reason, which I find important to mention, is that I want to give back to the community. I am using open-source tools to realise this project, building on the work of countless volunteers. I only find it fair to contribute and do my part by doing this project in an open-source manner as well. As I profit from their work, others might profit from mine.

However, there might be situations where I would need to prefer a closed-source software over a FOSS alternative. That might be due to dependencies or maybe it would be incredibly more difficult to do something using a FOSS. And thinking about learning resources, what if I am going to need to buy a book to get a good source for self-studying a specific topic? It would be naive to expect that I can do everything using FOSS alone. Some things might not even exist yet or are not supported by existing FOSS alternatives.
But I will certainly do my best to keep it free and "open-sourcey". ;)

Let's start!

Having said all that, which is already a lot, and a bit more than I originally expected, I am eager to dive into the fancy tree project and hopefully, you can get something out of this journey as well. I will write further blog entries within the next couple of days to cover the very beginning of my journey, which started just last week. This might also be helpful for others who might have difficulties setting up their development environment. And after that, I will just keep you posted on my progress. :-)

So, let's start already!

- Zacryon