procedural railroad

Started by Dune, March 05, 2011, 12:11:38 PM

Previous topic - Next topic

Volker Harun

The only thing we ought to do is to get the cuts more smooth ... how is the railway, the street running, when the terrain is below 0m? Does it run on bridge?
Or does it go plain wherever the slop goes -> 0°?

dandelO

I'd imagine it would follow the terrain, whatever the underlying features are, that is, that it would flatten out the portion that is to be road/track, according only to the blending that Ulco has in place, to cut it into the existing ground.
Rotating or moving the entire road, and the blending of the road, whether through transform or functions would just flatten out the areas where it appears according to that rotation/translation, and flatten those areas to accommodate the road/track.
That's where I believe that fractals are kind of difficult to use for such purposes, in that; you can't describe easily how much of a fractal is applied to any given point along the length of the road that curves, this creates the deep and sharp cuts that are quite are apparent here because you have to actually cut into the existing fractal, instead of being able to build up a fractal from the road's centre, outwards.
I'm sure this would be possible, somehow, it certainly is with altitudes, but I can't see an easy way to recreate it laterally from the road centre and outward.

Also, Ulco, if you do manage to make it bridge a chasm, I'll make you my new God! (Secondary planet/plane objects do not count!) ;)

Volker Harun

Quote from: dandelO on March 06, 2011, 07:27:47 PM
I'd imagine it would follow the terrain, whatever the underlying features are, that is, that it would flatten out the portion that is to be road/track, according only to the blending that Ulco has in place, to cut it into the existing ground.
Rotating or moving the entire road, and the blending of the road, whether through transform or functions would just flatten out the areas where it appears according to that rotation/translation, and flatten those areas to accommodate the road/track.
That's where I believe that fractals are kind of difficult to use for such purposes, in that; you can't describe easily how much of a fractal is applied to any given point along the length of the road that curves, this creates the deep and sharp cuts that are quite are apparent here because you have to actually cut into the existing fractal, instead of being able to build up a fractal from the road's centre, outwards.
I'm sure this would be possible, somehow, it certainly is with altitudes, but I can't see an easy way to recreate it laterally from the road centre and outward.

Also, Ulco, if you do manage to make it bridge a chasm, I'll make you my new God! (Secondary planet/plane objects do not count!) ;)

That is the point, to bridge a chasm is the easy way ... to follow slopes and do the cut is harder.

Dune

The angled geometry at the big cut is so pronounced because the terrain happens to be high there, but I agree about it's 'geometricality'. It can easily be solved with some local extra displacement, but the whole thing is already that complicated that I didn't bother at the time. I may also add a rocky surface for angled surfaces (now it's only one grass layer with three PF's for color). The road is also not good enough yet, I like it to be a double track. But I'm making a platform now, so that's first.

Dune

#19
In my setup the cuts even out the terrain, so they 'bridge'. Where the terrain dips, the cuts go 'up'. It could be otherwise, perhaps. But you often have these areas in the real world where they have thrown up a lot of ground for a railway track, and dug it up somewhere else. But you cannot have a very steep or rough terrain, or it'll be too contrived, depending on the smoothness of the valley, that is. I add some roughness later, after making the valleys, or cuts. The thing is that a bridge would be possible (YES, I'll be your God!), if you locally add some (well, a lot of) lateral displacement, and keep it at bay with a simple shape mask (perhaps triangular or so). Do so on the other side of a valley, the other way and hopefully the bridge ends will meet.....

About following slopes. If it would be possible to use the same PF for terrain and warping of the line and lay out the line kind of along the valley edges, perhaps.... but then it would be harder to flatten that area, that's easier of course if the line goes perpendicular to the main terrain.

Redwolf

this is the reason why i didnt make long rails on my scenes (not posted here) that I cant achieve flat surface throughout.
There is a locomotive model over in ashundar by the way i uploaded a year ago

Dune

#21
You're absolutely right. I got into problems when making a small path alongside the railway; it became a slippery, angled pathway, only suitable for mountaineers. There should be a way to level out simple shape rigged paths/roads perpendicular to the simple shape.... perhaps I'll post this as a feature request. Also good for rivers.
I found your locomotive, curious to see it up close. Thanks!

EDIT: With platform. The side path isn't that bad, actually.

inkydigit

looks excellent, now all you need are some procedural cables!

otakar

You never cease to amaze me, Ulco. Your speed of work is amazing and so are your ideas. That last render, so intriguing. I'm still scratching my head how yo got to level that terrain. When you happen to add a steam train to the scene and get to the smoke part, please share :) I got a little stuck on that aspect....

Dune

QuoteI'm still scratching my head how yo got to level that terrain
I'll tell you this and you'll figure it out; the terrain is a PF with values like 300/3000/300 and displacement of 300. You copy that and lower the displacement to 100 in number 2. Then you stack them but inversely blend number 1 by a simple shape and blend number 2 by the same simple shape... voila.

@inkydigit: perhaps a hovering plane with the same smooth displacement as the terrain, and blended by two very thin simple shapes.... you'd need pylons as well though.

inkydigit

Quote from: Dune on March 08, 2011, 02:11:42 AM
QuoteI'm still scratching my head how yo got to level that terrain
I'll tell you this and you'll figure it out; the terrain is a PF with values like 300/3000/300 and displacement of 300. You copy that and lower the displacement to 100 in number 2. Then you stack them but inversely blend number 1 by a simple shape and blend number 2 by the same simple shape... voila.

@inkydigit: perhaps a hovering plane with the same smooth displacement as the terrain, and blended by two very thin simple shapes.... you'd need pylons as well though.
...of course!

otakar

Quote from: Dune on March 08, 2011, 02:11:42 AM
QuoteI'm still scratching my head how yo got to level that terrain
I'll tell you this and you'll figure it out; the terrain is a PF with values like 300/3000/300 and displacement of 300. You copy that and lower the displacement to 100 in number 2. Then you stack them but inversely blend number 1 by a simple shape and blend number 2 by the same simple shape... voila.
...

Thanks for the explanation! Make sense. I shall give it a shot.

Dune

Modified rail system... still procedural, except for a sleeper mask.

Dune

And another one. I don't know if this cute little machine ought to go the other way, but then it's going back. No post. And no compute terrain either, come to think of it, wasn't necessary here.
Only the road needed a few more seeds, because there's a parking lot, which I don't like.

FrankB

Both renders are great Ulco. So you're painting the masks in these two images?
In any case, the rails and sleepers look really good.

Cheers,
Frank