Jump to content

creating procedural geometry


Recommended Posts

Hi, all!

I want to implement what I did for Urho3D and Godot

i.e. procedural roadmap + buildings (but on different level, i.e. not 90 degrees angles and different building styles will be

implemented. Where should I start?

I do have all the algorithms implemented already, I just need to have engine-specific hooking.

1. How can I implement procedural geometry for buildings with LODs. The buildings should be enterable and with


2. How such code is best integrated into engine, i.e. where to look for hooking that in?

3. Later I will want to have procedural terrain generation, where to look how this is done?

4. How can I store generated geometry in save file so it generates everything on New game and then everything persists throughout playthrough?


Link to comment
Share on other sites

Anything that is like a road can use the road tool, you just add nodes and it will generate a road to there.

Simple geometry can use the sketch tool maybe.

Terrain can also be modified realtime, but the size cannot change.

But a whole building that can be entered is very complicated, you would need some code that generates a regular 3D model.

The LOD part I would leave out since that is too complicated for now.

Link to comment
Share on other sites

I would search the old garagegames forum, especially the resources, since often people have already done it and I think to remember mutiple people doing this already.

Or look up the sourcecode in classes that already generate geometry, like terrain, ground plane, clouds, sketch tool, mesh road tool, collision mesh generator in shape editor etc etc there are already a lot of places where that happens.

Link to comment
Share on other sites

You can find examples of different rendering methods here:


This file in particular:


shows how to render a hard-coded cube. In order to do it procedurally, you would feed it your procedurally generated vertices.

This is only for rendering, you would have to add to that in order to get collision working.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...