I am hoping to create a blender game using procedural generation(to reduce file size). According to what I have read, procedural generation deals with generating models,texture,etc using a procedure/code. Easy by definition, But I have no idea where to start with. All I can guess is that it deals with blender's python scripting.If I am correct, please help me proceed. If not, help me understand the correct way.

Also, Does procedural generation reduce file size tremendously? If so, at what cost?

Procedural Generation is a broad area. You can use procedural generation to generate terrain, textures, models, growth-behaviour of plants, missions/quests and so on. With my restricted knowledge about pg, I think that I can assure you that if you really want to generate everything procedurally it will be a long way.

I would suggest you read more into procedural generation and determine what you should start first (mesh generation for example?).

There is a textbook about that topic which gives a good and, what is more important, up-to-date overview. You can find it here http://pcgbook.com/.

My experience so far:

You can use Blender to generate the mesh of a object. I let blender create basic objects like a sphere or a cube. Then the algorithm manipulates the object (it's vertices, faces, size,...).

I also tried to generate textures for the object. I used the pillow-library (https://github.com/python-pillow/Pillow) for that. For my project we need about 3 or 4 textures which all have 2K Resolution. I noticed really fast that when I use python-modules, which weren't baked via C++, it gets tremendously slow (Pushing a button and need to wait for 20-30 seconds isn't great for a tool which should be used for game development). So I wrote a C++-Application, which communicates with Blender/Python and does the generation stuff.

And yes, I know that Blender is able to procedurally generate textures with different noises. But we need more control over the generation. And Blender's way wasn't what I wanted.

Regarding to your question about the file size:

It depents. If you are using procedural generation to generate the assets in realtime then you will have a reduces file size. Most of the time. But that does also mean that you need to write good (e.g. optimized) code. When for example your shaders are slow your game will be slow.

But you can also go the way to pre-generate some of your assets and deliver them directly with your game. This can be helpful for computationally intensive calculations or if the 'making it in realtime' is to complicated and the benefit isn't much.

  • I started to use blender as a tool to make art, so I have no experience at all with coding... although I'd really like to learn how to, so I can make procedural meshes. – Espen Sales Oct 29 '16 at 10:29

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.