LIDAR Data

LIDAR Data

Postby bdy26 » Tue Oct 13, 2015 2:16 pm

Here's an interesting new set of data that may be useful - the Environment Agency have been laser scanning the UK.

https://environmentagency.blog.gov.uk/2 ... open-data/

Given a 6m terrain mesh I'm not sure whether it has any immediate use, but an interesting development.

Ben
bdy26
Engine Cleaner
 
Posts: 6
Images: 5
Joined: Sat Mar 29, 2014 2:33 pm
Has thanked: 1 time
Been thanked: 7 times

Re: LIDAR Data

Postby cjbarnes5294 » Fri Oct 16, 2015 11:05 am

Given the limitation of the TS terrain system and grid resolution, I'm increasingly thinking that forming the near-to-track scenery would be best done using 3D model chunks - if the route builder was also a modeller, you could be as precise and detailed with the landscape as you wanted, and additional scenic items could be integrated into the model. The downsides to such a technique would no doubt be increased labour and time, the chunks of nearby scenery might visibly pop into the world as the game loads the next tile, and of course it's not as friendly for other route builders to make use of the same assets in their freeware routes. But it would make for a good experiment, particularly for a miniature railway or other small scale system.

Kind regards,
Chris
The Red Queen Hypothesis, applicable to train sim development?

"Here, you see, it takes all of the running you can do, to keep the same place."
cjbarnes5294
Driver
 
Posts: 398
Images: 82
Joined: Mon Mar 31, 2014 12:40 pm
Location: Gloucestershire/North Yorkshire
Has thanked: 551 times
Been thanked: 187 times

Re: LIDAR Data

Postby AndiS » Fri Oct 16, 2015 1:47 pm

People complained about the quality of LIDAR data in the past - too many holes and spikes. But I have no first-hand experience with it.

I have been dreaming about building such chunks in Blender for years. But I never found the - quite significant amount of - time to put theory to practice. So I am hungry about any success or failure stories.
AndiS
Top Link Driver!
 
Posts: 736
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 268 times
Been thanked: 308 times

Re: LIDAR Data

Postby Pauls » Sat Oct 17, 2015 1:18 pm

AndiS wrote:People complained about the quality of LIDAR data in the past - too many holes and spikes. But I have no first-hand experience with it.

I have been dreaming about building such chunks in Blender for years. But I never found the - quite significant amount of - time to put theory to practice. So I am hungry about any success or failure stories.


Hi Andi,

I've played around with scenery chunks in the past. I found them hard to rotate and position accurately - I also found tiling the textures difficult - the tile patterns were too repetive with a reasonable resolution. Presumably positioning the scenery chunks could be done more accurately using exported track from the World Editor which could then go back as a reference to position the scenery - the track could then be deleted when the scenery chunk was in place by exporting to RW without the reference track ? - hope that makes sense ? :? - I also found that the scenery terrain chunk shading was different to the RW terrain under certain lighting conditions.

I think the above problems can largely be overcome as new work-arounds are developed .

Cheers
Paul
Pauls
Driver
 
Posts: 435
Joined: Fri Apr 04, 2014 10:38 am
Has thanked: 460 times
Been thanked: 188 times

Re: LIDAR Data

Postby AndiS » Sat Oct 17, 2015 6:30 pm

Hi Paul, who always has tried what I dream about. :lol:

I always assumed doing it based on OS maps or whatever in such a way that the model points due north from the start. So there would be no rotating.

What is the remaining issue with exporting track? If can be done now, I read. Never got around trying it, but soon will, hopefully.
The way I see it is this:

I place OS maps decals in World Editor. I fit track to that. I export the result of my matching efforts and load it into Blender (or 3D Crafter in your case). It will be some simple mesh, I keep it separate from the model, "read only" and exclude it from export.

With some luck, I might be able to have Blender lay a Bezier curve along selected edges, or I have to fit is myself. Blender has a nice function that moves a 2D curve along another curve mimicking the RW lofts. But the outcome is converted to a mesh that you can manipulate to your heart's content (or else you could go with a RW loft).

For the texture, you sure need some that tile good. I see some serious work ahead of me in those quarters. What I envision is using two textures, inverse to how people put ambient occlusion shadows on their buildings: Texture 1 is coarse and untiled. You paint the base colour of, say, the street on it. The second is fine-grained and tiling and it only shows the outline of the stones that form the pavement of the street.

I believe I could get texture 2 by subtracting a texture from its very blurred copy. Or(and) by desaturating it completely and maybe applying some histogram curve to it. The thing is: All photos are a bit different in hue and/or brightness on their edges. So if I get "the dark lines" out of a photo, it might be easier to make those really uniform. The area between them will be transparent and the dark lines may have an alpha value well under 1 so the base colour from texture 2 has a chance to shine through.

Where I say "dark lines" in less easy cases it can also be lines in other colours, like mortar between bricks. That that will be harder, because the above advantage of working on shades of gray is lost. Mayby doing that and adding in the colour of the mortar in the end can help.

In theory, you could have a bump map instead of texture 2, but I guess it would be wasteful.


Now if I have one mesh that is nothing but street, all that is left to do is the orientation of the stone patterns. Which can keep you busy if you are like you and me. :lol:

But if I want to save on draw calls, I need to integrate pavement with grass and maybe some wall. One way to do that could be to have a side ratio of 1:2 for the fine-grained texture, maybe even 1:4. I searched the net for confirmations about that being inferior to 1:1 but could not find much outside phone games.

So assume you have one texture that tiles to one direction and has a few stripes for 2 to 4 different types of ground structure. And another one where I can paint (using Blender's texture paint) rather simple colours that I lift directly from photos. Sounds sexy. But I still have not found a way to clone myself, and my wife would not allow it, one instance is enough trouble, she says. :lol:
AndiS
Top Link Driver!
 
Posts: 736
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 268 times
Been thanked: 308 times

Re: LIDAR Data

Postby AndiS » Sat Oct 17, 2015 10:41 pm

I had a quick bash on the two-texture method I mentioned. It was a brick texture that crossed my path, but it worked well to demonstrate the idea.

The following is a crop from the original texture, about 4 texel to the cm, so much too high-res actually but never mind.
brickvariety_cyc.jpg
Original


Below is the result of doing the following:
  1. Downsize it to 1/8 the side length to simulate a low res texture, 1/8 the resolution of the high-res one. Now each row of bricks is 4 texel high, including the gap.
  2. Scale it up to original size to provide a working base for the next steps. Of course, it is extremely blurry now.
  3. Create a desaturated copy of both and subtract them. The result had some black edges as artefacts, which made me insert the next step.
  4. Do some edge detection that brings out the artefacts as white lines in the end, the rest is transparent.
  5. Overlay that with the result of step 3, so the artefacts are painted over in white now.
  6. Play with the tone mapping curve to make the picture more binary, i.e., the grey parts become white and most of the darker parts stay dark. Note that I could have done much better on this step.
  7. Use the result as an alpha channel of the original image. This results in a high-res representation of the mortar and the shadows, with minimal semi-transparent red where the bricks are. Too sad that I lost the finer structure of the brick surface because I was too sloppy with the mapping curve. I could bring some random unevenness now by adding some cloud stuff.
  8. Overlay the high-res image with the low-res one. This is what the game engine would do if you have two textures of different resolutions.
This is the result.
brickvariety_cyc 1to8.jpg
Result

You see that the brick surface looks dull but the edges, mortar and shadows look fair enough. Below is the high-res image produced to the recipe above.
brickvariety_cyc fine.jpg
Overlay

The black parts are transparent in the original. Having something there would make the brick surface look much more interesting. This is just because of my haste and not a problem of the technique.

Of course, for bricks, you would have to make sure that the UV mapping for both textures matches, i.e., the borders between bricks on the low-res texture must match the high-res mortar lines. But for pavement and stone walls, you don't have this issue since all stones are the same colour, save large scale modulation to represent dirt, tracks, hollows and such.
AndiS
Top Link Driver!
 
Posts: 736
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 268 times
Been thanked: 308 times

Re: LIDAR Data

Postby eyore » Sun Oct 18, 2015 9:41 am

Lidar data can be imported by 3ds Max to create poly models, so the data could be used to create scenery chunks, but to improve from an 8m grid to a 6m grid is hardly worth the effort.

Possibly of more interest, with the rise in quadcopter ownership (and price reductions) is the use of quadcopters to create point cloud/photogrammetic data which can be converted into 3d textured models. Have a look at companies such as Sensefly and software like Pix4D which are representative of what can be done.

It could be fun flying a drone over a significant feature of your route and creating an accurate terrain model.
Phil

Image
User avatar
eyore
Passed Fireman
 
Posts: 139
Images: 12
Joined: Tue Apr 01, 2014 6:34 pm
Location: Lake District
Has thanked: 25 times
Been thanked: 67 times

Re: LIDAR Data

Postby longbow » Wed Oct 21, 2015 1:26 am

I'd like to hear more on how to achieve convincing terrain texture variation on a scenery asset - specifically embankment lofts.
longbow
General Shed Duties
 
Posts: 23
Joined: Sat Apr 19, 2014 12:37 am
Has thanked: 2 times
Been thanked: 3 times

Re: LIDAR Data

Postby Rockdoc2174 » Wed Oct 21, 2015 2:19 pm

I doubt that you can do much about varying the surface texture of a lofted asset because they're made from one element that is repeated to fill a certain length. The best you could do with an embankment is add vegetation. In my limited experience, terrain textures only work on the basic terrain layer, not on assets of any kind.

Keith
Rockdoc2174
Driver
 
Posts: 466
Joined: Mon Apr 14, 2014 10:52 am
Has thanked: 137 times
Been thanked: 213 times

Re: LIDAR Data

Postby eyore » Wed Oct 21, 2015 3:05 pm

One technique I have used for lofted scenery is displacement mapping.

I am away from my PC at the moment but I will try and post more later today.
Phil

Image
User avatar
eyore
Passed Fireman
 
Posts: 139
Images: 12
Joined: Tue Apr 01, 2014 6:34 pm
Location: Lake District
Has thanked: 25 times
Been thanked: 67 times

Next

Return to Route Creation

Who is online

Users browsing this forum: No registered users and 1 guest