How to draw roads on a Terrain

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
Vincent
Gnoblar
Posts: 7
Joined: Tue Feb 24, 2004 7:15 pm

How to draw roads on a Terrain

Post by Vincent »

Hi all,

after a long time I came back to play around with Ogre's new Terrain System. The results of the tutorial look really great, but I have a question about the texturing of the terrain.

As I understand it, the default MaterialGenerator generates the final texture/material out of the textures supplied in the layers of a Terrain instance. In the tutorial the blend maps are computed depending on the height which is fine for a basic look. Is it also possible to assign a texture to the quads in the terrain manually, so that a brush with a road tetxure could be used to draw a road onto the terrain? The road texture should be splatted with adjacent textures.

Thanks and cheers
Vincent
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 139

Re: How to draw roads on a Terrain

Post by c6burns »

Ogitor has a painting interface for the terrain component
Vincent
Gnoblar
Posts: 7
Joined: Tue Feb 24, 2004 7:15 pm

Re: How to draw roads on a Terrain

Post by Vincent »

Thank you for the hint. I will have a look at the Ogitor project.
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 139

Re: How to draw roads on a Terrain

Post by c6burns »

No problem, you can at least paint splat layers that way. That would work for dirt roads, but for something like highways which have markings that point along the direction the road faces ... that would require something more. I've seen papers on spline based roads, but personally I would find a way to handle something like that in DCC tools
Vincent
Gnoblar
Posts: 7
Joined: Tue Feb 24, 2004 7:15 pm

Re: How to draw roads on a Terrain

Post by Vincent »

Ok, I see.

I am working on an arcade flight simulator and my idea was, to create my own scene editor with the Qt Framework (which I already have showing the terrain) where I could design my terrain, add trees, buildings, roads and so on. If I understand you correctly, you would do this in a DCC tool like Ogitor or similar ( at least the basic terrain with trees, roads, train tracks and so on, other objects like destroyable buildings, trigger areas would be done in my own editor) and import it into the game or my own editor?
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 139

Re: How to draw roads on a Terrain

Post by c6burns »

When I think of DCC, I think of programs like Max, Maya or Blender. Ogitor is more a scene editor. It's done using Qt also, and it already has tools for importing/painting/sculpting terrain.

My point about roads is just that if you needed oriented markings, such as the dotted lines in the center of the road, a simple splat layer on the terrain won't cut it.
nickG
Greenskin
Posts: 122
Joined: Fri Jan 20, 2012 6:44 pm
Location: Russia,Moscow
x 1

Re: How to draw roads on a Terrain

Post by nickG »

so maybe as decal?
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 139

Re: How to draw roads on a Terrain

Post by c6burns »

nickG wrote:so maybe as decal?
The real problem is sorting out the UVs to get road markings pointed in the right direction. If all your roads are going to face only 1 direction, or they don't need road markings then there's no problem. You can use a splat layer or a decal as you like. If you do need road markings on curved roads, just moving from blend layer to decal isn't going to solve the issue.

Of course, I am assuming you want decent resolution roads, which perhaps you don't. If you have really small terrains and/or really large terrain textures, you could just paint all the roads by hand. Generally this still looks like junk when you get close to the ground, but I don't know what your quality requirements are for this flight sim.
Post Reply