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!
I've been wanting to do that since the very beginning... (you can see the issue on google code is rather old : http://code.google.com/p/ogre-procedura
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.
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
, 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.
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!