TransDEM Forum https://forum.transdem.de/ |
|
3D UTM Tiles https://forum.transdem.de/viewtopic.php?f=2&t=275 |
Page 1 of 2 |
Author: | geophil [ 01 Nov 2013 15:42 ] |
Post subject: | 3D UTM Tiles |
Since the very first version for Trainz, back in 2005, TransDEM has always supported a “Basemap” feature, generic texture carrier objects, to be filled automatically with images of large scale maps, track schemas or ortho-photography. They are called “UTM tiles” in TransDEM (and adhere to the UMT grid). Since TransDEM 1.2 (2006), these tiles are also placed automatically at the correct position in the route. Such “Basemaps” are a bypass for the limitations of the Trainz ground textures, which cannot be as detailed as we may want them, not if we paint entire baseboards and the whole route module with map images or ortho-photos. Like most other “Basemap” implementations, the carrier objects for TransDEM's variant have been prefabricated meshes, which are flat by nature. In hilly terrain, this is less than ideal, because they have to be adjusted to terrain elevation at the point where we currently work. The textures are individual for each such UTM tile, but the carrier meshes are always the same. Although the original size of 1000 x 1000 m per tile has been complemented with smaller 500 x 500 m tiles in 2010, the smaller ones still have to raised and lowered wherever we are confronted with hill slopes. It would be much easier for the route builder, if the UTM tiles not only show the high-res cartography or ortho-image but also follow the shape of the terrain. This means, of course, that not only the textures but also the meshes have to be fabricated individually, quite a bit of computation work. A year or so ago Trainz user ModelerMJ started a project for such terra-formed Basemaps, his approach closely coupled to Google Earth and other Google services. ModelerMJ has now offered to develop a software tool for route builders, based on his earlier work. Long term TransDEM users may have noticed that I have always been very reluctant to integrate specific Google or other internet service providers' API functionality into TransDEM. The two online services in TransDEM, WMS and Map Tiles, run on on the very basic level of the HTTP protocol, no account registration, no APIs, no cookies, no personal data at all. For the same reason, Google Earth usage is limited to local, offline transfer of simple JPEG images and placemark files. This policy requires that terra-formed UTM tiles in TransDEM must not rely on Google but have to be created independently of any online service. Of course, the best source for shaping individual UTM tiles is the terrain we already have in our Trainz route. And that is what I have tried this week. Here is the result, the first tera-formed UTM tile for the well-known Wupper valley at Muengsten: At the moment, this is only a proof of concept, but I plan to integrate it as a new feature into the next version of TransDEM. It will be called “3D UTM tiles”. Conventional flat tiles will still be offered, then tagged “2D”. 3D and 2D will be compatible as much as possible, including both 1000 and 500 m sizes. As said in the introduction, 3D tiles are computation intensive. For each tile, three additional steps have to be processed:
If everything goes to plan, the only visual change for the TransDEM user – apart from longer computation – will be a 2D/3D UTM tile radio button in the export dialog. Two more aspects:
As always, I can't give any time estimation for it all to be implemented. As indicated above, it's laboratory stage at the moment, proof of concept, with a number of ideas for the final design, but little of the real work has begun. |
Author: | SharkNose [ 01 Nov 2013 17:17 ] |
Post subject: | Re: 3D UTM Tiles |
Roland, Those results you achieved in your testing are very impressive. The Trainz Mesh importer/exporter is readily available on the Trainz Wiki pages if I'm not mistaken. Blender users who create for Trainz should already have it available too. One question - Did you encounter any "flashing" of textures between the terrain ground and the 3D UTM tile? Would the UTM tile need to be raised a tiny bit to overcome this (if it occurred)? Thanks for the look ahead! Andrew |
Author: | geophil [ 01 Nov 2013 18:42 ] |
Post subject: | Re: 3D UTM Tiles |
SharkNose wrote: The Trainz Mesh importer/exporter is readily available on the Trainz Wiki pages if I'm not mistaken. Yes.Quote: Blender users who create for Trainz should already have it available too. I guess quite a few Trainz route builders will have it already. Quote: One question - Did you encounter any "flashing" of textures between the terrain ground and the 3D UTM tile? Would the UTM tile need to be raised a tiny bit to overcome this (if it occurred)? Yes, that's the case. I will have to fine-tune the vertical position, adjusting it by a small offset.
|
Author: | Kookaburra [ 11 Nov 2013 21:16 ] |
Post subject: | Re: 3D UTM Tiles |
This is an amazing breakthrough! Since UTM tiles have always been flat, my entire layout is flat. I raise each UTM tile (carrying a detailed orthophoto) and each track spline 1 meter above the baseboard (to avoid flicker). It looks good, an extensive system of Trainz track laid on flat, photorealistic scenery, but DEM data and 3D UTM tiles will take it to the next level. I can't wait to try it out! |
Author: | geophil [ 12 Nov 2013 19:21 ] |
Post subject: | Re: 3D UTM Tiles |
Kookaburra wrote: ... I raise each UTM tile (carrying a detailed orthophoto) and each track spline 1 meter above the baseboard (to avoid flicker). I am still experimenting with a suitable vertical position for the initial placement. 10 cm may already be sufficient, to suppress most flickering while still allowing low objects like trackbeds to poke through the surface. Proper implementation is now well underway. The texture mesh has become a genuine 3D object, with a corpus and individually triangulated side walls, see the following two screenshots taken with the mesh viewer: 3D tiles will come as either 1000 x 1000 m or groups of 4 with 500 x 500 m, as before with the 2D tiles. (With 500m tiles and a 4096 pixel textures, objects down to 10 cm can be identified.) For the 500 m tiles, anchor points will be the 1000 m UTM grid line intersections, same as before. Apart from the SW tile, the other three in a group of four will be rotated on placement by 90° to 270°. This allows to use the very same textures as for the 2D tiles, not a single line of code needs to be changed in the texture generation part. I have also added vertex normals for terrain shading in Surveyor, compare this screenshot with those in the previous post. (The mesh viewer in the first two images appears to be ambient light only, ignoring normals.) The last screenshot today shows the Muengsten terrain, plastered with 3D tiles. One of them risen above the ground to illustrate the grid of quads. View has been switched to wireframe, with the see-through replacement texture in use. |
Author: | SharkNose [ 12 Nov 2013 21:57 ] |
Post subject: | Re: 3D UTM Tiles |
Outstanding! Is it the nature of the in-game renderer that makes the surface textures look darker than the mesh viewer examples you provided above? Or did you adjust the lighting in Surveyor to emphasize the shadows? Thanks in advance for another great TransDEM feature! Andrew |
Author: | geophil [ 13 Nov 2013 09:57 ] |
Post subject: | Re: 3D UTM Tiles |
geophil wrote: Is it the nature of the in-game renderer that makes the surface textures look darker than the mesh viewer examples you provided above? Or did you adjust the lighting in Surveyor to emphasize the shadows? Yes and no. The shading effect is controlled by my vertex normals, but the intensity is down to the rendering engine and its use of directional lighting. The default scene when starting Surveyor is 10 am, current day and month and World Origin location I think. So, in November in Central Europe the sun is pretty low and shades are long. I already played around with the normals and reduced their effect to 50% of the geometrically correct value because I thought the result was too intense at first. |
Author: | geophil [ 15 Dec 2013 19:26 ] |
Post subject: | Re: 3D UTM Tiles |
3D UTM tiles will be available with the next release. 3D UTM tiles follow terrain contours and will become much more useful in hilly or mountainous terrain than the flat 2D UTM tiles we have had so far. As a route building aid, 3D UTM tiles could take over the role which ground textures had until now. That leaves the question how to utilize the ground texture feature in the future. One idea could be to assign a new job to them. How about background textures? If we use a suitable geo data source – ortho imagery springs to mind – we may paint the ground in colours that reflect the landscape of Mother Nature – and save us some work on manual texturing. For aerial photography the built-in TransDEM ground textures are not adequate. They are optimized for topographic maps which need very few colours. Ortho photos need several more. This requires different textures. The principle of geo data based ground texturing in Trainz – originally invented by HOG – is to define a palette of monochrome textures and for each baseboard ground vertex select the texture colour from the palette that is closest to the colour of the original (map or ortho image) at this point. In TransDEM – as in HOG – you can assign your own custom texture palette. ModelerMJ created one such custom texture set in the past, also for ortho images, but I think he used a general purpose collection of colour values (please correct me if I am wrong). For my ortho imagery texture mapping I went for palette of 128 unique colours (we can use 250 different ground textures per Trainz baseboard. Up to a128 may be taken by TransDEM, leaving at least 122 for your own work). To define the individual colour values, I created a collection of typical ortho photos around the world and processed this with an octree quantizer which will produce my optimised colour set. This is my ortho image source collection (reduced in size here): And this is the result after being transformed with the colour palette, to prove that the new palette is working as expected: The original image has 197352 colours, the result only 128, of course. And this is the colour palette: To use a custom texture palette in TransDEM, you will need the ground texture assets and a texture mapping file to assign RGB values to texture KUIDs: Code: ... rgb 183,198,180 kuid <KUID2:126773:21208:1> rgb 226,179,156 kuid <KUID2:126773:21209:1> rgb 198,185,196 kuid <KUID2:126773:21210:1> rgb 229,197,155 kuid <KUID2:126773:21211:1> ... Ortho photos as ground textures will always be quite blurry, since the resolution is only 5 or even 10 m per pixel, i.e. per ground vertex, not really suitable for route building. However, with the 3D UTM tiles we no longer need the ground textures as a surveying aid, instead we can utilize them as a quick way to paint all baseboards with a realistic varnish which – at least for those baseboards in the distance – could be the only ground texturing those baseboards will ever see. This means, ortho-imagery ground texturing is there to last. These textures may become part of the final route.(There could be copyright issues when redistributing ortho-images, more on this in a future post.) With the longevity of these texture in mind they don't bear the 10m grid and you would also switch off the 1000m grid in a proper route project. The 3D UTM tiles on the other hand will offer you the 10 m grid as an option. See the following screen shots: |
Author: | Jerker [ 19 Dec 2013 06:09 ] |
Post subject: | Re: 3D UTM Tiles |
G'day geophil, ...this is getting better at every post. I am waiting with much anticipation for the next release, Roland. I presume you will be revealing the 'new' texture set at that time, as well and that it will replace the existing one? Jerker {:)} |
Page 1 of 2 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |