Planetside Software Forums

General => Terragen Discussion => Topic started by: cyphyr on April 09, 2019, 07:14:04 AM

Title: Road
Post by: cyphyr on April 09, 2019, 07:14:04 AM
I'm looking for some help on how to get a road to follow a hilly terrain.
The road is flat (or even gently cambered) in its cross section but should rise and fall along the terrain.

I can make a procedural or image based "map" of the road (or many roads) and add them a displacement along the terrain but they will always take on the shape of the terrain so if the road is going round the side of a hill one side of the road is higher than the other.

I know something along these lines is possible in World Machine and even in Vue with splines but I can't think how to do it in Terragen.

Any ideas greatly appreciated :)
Title: Re: Road
Post by: Dune on April 09, 2019, 01:33:08 PM
I have worked on a solution for this for a long time, and the only thing I came up with is on NWDA. But that's based on a single road (warped SSS) and not on a terrain with roads at your choice, I'm afraid.
Title: Re: Road
Post by: cyphyr on April 09, 2019, 04:41:30 PM
Yes I thought of your solution but I don't think it would work with a drawn road on an imported terrain.  World machine has a spline option but I don't think even that will work.  Back to the drawing board ...
Title: Re: Road
Post by: Oshyan on April 09, 2019, 04:50:30 PM
Terragen doesn't have a built-in road or other spline option at present, of course. So I think this is something you'd ideally accomplish in a 3rd party terrain editor and export to Terragen. Would that work? In that case I'd look at any app that has road/spline functions. World Machine does, though I see you have some concerns about whether it will work (what, specifically?). World Creator also has a path tool which may work. But I think my money might be oh Houdini :D

- Oshyan
Title: Re: Road
Post by: cyphyr on April 09, 2019, 07:21:06 PM
Houdini is the best bet I think but that is outside my ken for now.  Even then I think there may be some logical problems but I'll leave that for greater minds than mine :)
Title: Re: Road
Post by: Dune on April 10, 2019, 01:53:30 AM
I have an idea, but I have to test if it works  8)
Title: Re: Road
Post by: René on April 10, 2019, 05:28:43 AM
How about displacing the road with the same terrain but with a negative value for the terrain.
Title: Re: Road
Post by: cyphyr on April 10, 2019, 07:14:15 AM
Quote from: René on April 10, 2019, 05:28:43 AM
How about displacing the road with the same terrain but with a negative value for the terrain.

This actually has some promise, thank you :) ... It is actually working on an un-modified terrain but if the terrain has masks (controlling valley floor and hight modifications) this seems to not be properly passed through to a final "Displacement shader to scalar" which can then be colour inverted.