Roads, Ideas needed!


19-08-2013 15:23:39


I am looking at OgreProcedural to automatically generate roads, in fact I am looking at complete cities, but roads seem particularly difficult. Its incredibly easy to generate a road along a spline using the extrude tool, however were I am stuck is how to deal with junctions properly. I can not find much info on the internet about this, and I am not sure OgreProcedual is flexible enough to help me.

Any thoughts would be much appreciated!


20-08-2013 10:17:06

I've been wanting to do that since the very beginning... (you can see the issue on google code is rather old : ... tail?id=20).
I thought I needed 3d CSG first (and it is not stable enough yet..), but re-thinking about it, there might be a simpler way to do this, if I set a few sane hypotheses (all the paths intersect in the same plan, with the same orientation and same scale).

Now, if you don't want to wait for me to implement this... there aren't many solutions :
- if you don't really care about how bad it will look, you can set one of the intersecting roads as the 'main one' and have the other not cross it
- or you can let the intersection blank, and put a hand-made mesh at the intersection (less flexible and more work, but maybe better looking)

That's everything I can think of at the moment, but I'd be interested to know other people's thoughts on the subject.


20-08-2013 12:12:10

Good to hear you are thinking about it! I have just found one of your previous posts with this video in it;
This is also what i am after, and the quality needs to be better than the options you gave :D, although this is not urgent so I have quite a bit of time to think about it.

The way I see it there are two areas that need to be solved, geometry and textures. I am not very good with textures and UVs so not to sure how that would be solved, maybe decals?? Although 3D CSG would be an awesome feature I think it is overkill for roads, and potentially error prone. So could you define a new type of path called graph, and add to the extruder so it can handle it. Each 'node' on the graph could take some parameters so the extruder could do different things with it.

I am planning on importing data from OSM, so graph like data structure does appeal to me anyway, but I do think it would be a better design for procedual roads.

Anyway, let me know your thoughts, happy to help with code if there is some interest in this.


24-10-2013 11:59:31

The streets and their textures have been created with ogre procedual. Then we load them into 3dsmax and create the crossings and correct the textures.


11-11-2014 05:58:51

It strikes me that creating from scratch every frame would be a big performance drain. Although in the past I've done this with a skeletal rig and that is also pretty ugly... imagine a bone hierarchy 80 bones long!