Large Terrain Mesh
-
Unfortunately, this isn't a paid project. It is part of a much larger ongoing personal research project I am conducting. Think of it as a means to visualize the things I discover.
As for saving a few bucks, I'm not trying to be stingy, not by any means. It's simply a matter of money. In these tough economic times, I am sure you can understand. Ordinarily, I would not hesitate to spend whatever is necessary in order to achieve my goal but in this case, I am forced to seek alternative and sometimes even creative solutions. It is by no means easy but I like the challenge.
I completely agree about what I have come to call "dual resolution" and have been seeking that very thing, without much success I am afraid. If there were an easy way to keep high resolution at the lower elevations while greatly reducing the resolution at the higher elevations, I would love to do exactly that.
You are correct about my having direct access to high resolution data but Sketchup is the only CAD-like application I am using. I use Global Mapper GIS software to export the raw data into a variety of forms including DEM, DXF, contours, etc... then import that into Sketchup.
The data itself is 3 meter resolution Lidar data provided by the USGS and is nothing short of beautiful when rendered at maximum resolution but it is far more than Sketchup can handle so I am doing my best to find a decent compromise.
My original approach was to use a TIN generated by importing the DEM directly into Sketchup with an accompanying topo overlay projected as a texture. This worked great until I tried to scale things up.
Here is a sample image of a small terrain mesh generated by importing a high resolution DXF mesh file into Sketchup. As you can see, the resolution is superb, but working with the mesh alone was just about all Sketchup could handle.
@bjornkn said:
Also using crude math, that would give you a resolution of 18mx18m each square.
Or 14x14m with 400% and 12008. That is much more than you need in remote, less visible areas, but way too little precision for close-up areas as far as I can tell..
I don't know if this is a paid job or not, but if it is I think you're wasting a lot of time trying to save a few bucks. I can't see how you could possibly make such a large area at an acceptable resolution from a triangulated point cloud. You obviously have access to the full data and CAD software since you can export contour lines and/or point clouds?
With a TIN you can also easily align a topo orthophoto, because it is actually possible to see the terrain from above. It would also be very easy to make the terrain rectangular. And with Amorph you could output point clouds for the detail areas only and generate accurate meshes that passes through every one of those points. Great for building sites etc too.
How are you going to handle vegetation, buildings, poles, masts, people, cars(?), tracks + the train itself?
SU is not gonna like 300-500k faces + all the props and objects I'm afraid.
Are you going to render this inside SU, or in some external program?@thomthom: I'm in Kristiansand (just updated my profile too )
Just as unflat here as in Trondheim -
I'm officially abandoning point clouds.
I can't believe I didn't see it before but Global Mapper gives me the ability to export DXF mesh files, as mentioned previously. As it turns out, I can also change the resolution of the exported mesh files on the X and Y axis to make the exported DXF mesh file more Sketchup friendly.
It doesn't solve the "dual resolution" problem but it yeilds the same or better results than the point clouds did, and all without the hassle of converting DEM's to XYZ files then importing them as point clouds and waiting for triangulation to finish. Overall, the process is 100x faster.
I'll be the first to admit that I am by no means a Sketchup expert, especially where terrain meshes are concerned, but I am learning fast, the hard way.
-
While reading over everything again, I just realized that we may have been using a term in very different contexts and with different meanings.
Several times I mentioned DEM's only in my case, I meant Digital Elevation Models (GIS data). From reading everything, it appears that the term DEM has a different meaning in Sketchup terms. Previously, I had always assumed that anything (terrain mesh) with a network of triangles was a TIN but it looks like I was mistaken. Can someone set me straight on this one?
-
DEM and TIN are not SketchUp specific terms, but pretty general.
A DEM is a grid with evenly spaced x and y coordinates. For each intersection there is an altitude value. Which means than when viewed from above with no perspective any terrain will look exactly the same, just like a flat grid. It would be impossible to see if it was from the Alps or Holland. No roads, rivers or anything will be visible.
It uses the same grid everywhere, and wastes a lot of unnecessary vertices on flat or even large areas. Even flat water may use thousands of vertices.
A TIN, which means 'Triangulated Irregular Network' is different, because it only should place vertices where there needs to be one, like along a road for instance. Typically they are often made from contour lines stitched together.
The advantage is that you can see from above what the landscape looks like, where the roads are etc.
You can also get sharply defined roads etc, unlike with DEMs where everything is soft. A road in a DEM with a resolution of 6x6m will be pretty much invisible even when seen in perspective.
The main advantage of a TIN, particularly in SU, is that it can be made to cover a huge area at very little cost face-wise, because you can make it as coarse you like in distantly viewed areas, or as detailed as you like in ROIs that will be seen closeup.
Polygon reducers, like those present in Amorph and Artisan will be able to remove a lot of unnecessary faces in DEMs in areas of low frequency, like flat areas etc, but you will still not get crisp edges along roads etc. With orthophotos applied you will often get water climbing up on the terrain around lakes, rivers etc (just take a close look at lakes in Google Earth!) because the resolution is too coarse, and the waterline doesn't follow the square grid. With a TIN you will get a completely flat water plane which could be perfectly textured.
You can get good results with SU and the "From contours" tool in Sandbox, but be prepared to do lots of cleanup.
It isn't that bad actually. The technique I've used for years has been to draw coarse contour lines on top of the imported ones, adding points wherever there's a change of direction etc, and often skipping several altitudes. And then skin a selection of such contour lines with Sandbox, cleanup by flipping edges to remove flat areas, and then explode to merge with the rest of the topo.
The attached terrain was completely handmade using this technique. It took maybe 4 hours and is about 12000 faces?
I tried a small part of that terrain using the original contour lines, but simplified, and it ended up with 40000+ faces and wasn't looking any better. Today I would've used Amorph.
Attached also a version with orthophoto applied. As you can see the entire hill is covered with trees, so even that coarse topo was really overkill anyway. But today there very few trees left there - it's covered with houses, school etc. Unfortunately that job was canceled before I even got to start to build that school
-
I am starting to believe that Sketchup simply doesn't have the horsepower to do what I need to do.
Does anyone know of any decent (free) 3D Mesh poly reduction programs? I heard that Blender can do it but I'll be darned if I can make heads or tales of it's odd user interface. I also tried Meshlab but it crashes at the drop of a hat.
Then there is the problem of converting DXF or other files to formats that the various 3D programs can import. You'd think the 3D software world was ran by monkeys with all the variations of files and interfaces that are out there.
This is starting to give me a headache the size of Texas.
-
@dbwv69 said:
I am starting to believe that Sketchup simply doesn't have the horsepower to do what I need to do.
Does anyone know of any decent (free) 3D Mesh poly reduction programs? I heard that Blender can do it but I'll be darned if I can make heads or tales of it's odd user interface. I also tried Meshlab but it crashes at the drop of a hat.
Then there is the problem of converting DXF or other files to formats that the various 3D programs can import. You'd think the 3D software world was ran by monkeys with all the variations of files and interfaces that are out there.
This is starting to give me a headache the size of Texas.
Can you post your model. It will probably not fit the 3d ware house limit and probably not the Google docs but possibly one of the free ftp sites or post a section. Thinking you may not have not spent enough time with MeshLab? Check drop box it gives a large file size upload
-
@dbwv69 said:
I am starting to believe that Sketchup simply doesn't have the horsepower to do what I need to do.
It's not so much lack of horsepower as getting used to driving with a manual shift But if you want to drive at top gear everywhere you'll not gonna make it work for you.
If you absolutely need to have a 3x3m res in all of your terrain then SU is not the program for the job. 5-6 million polys can probably easily be handled with Blender, and so can most other non-free 3D programs, like LightWave, which is what I'm using when I need thousands of instanced 3D trees, rocks, grass and lots of polys.
In SU you have to "adapt to the terrain" and keep your polycount as low as possible wherever there's no need for lots of detail.
The SU community is so spoilt by all the great free plugins available, as well as lots of affordable ones. Sometimes you can't do without them, but sometimes you can spend a few days/weeks working hard instead of spending $39/$149.@unknownuser said:
Does anyone know of any decent (free) 3D Mesh poly reduction programs? I heard that Blender can do it but I'll be darned if I can make heads or tales of it's odd user interface. I also tried Meshlab but it crashes at the drop of a hat.
Then there is the problem of converting DXF or other files to formats that the various 3D programs can import. You'd think the 3D software world was ran by monkeys with all the variations of files and interfaces that are out there.
This is starting to give me a headache the size of Texas.
As advertised on this page currently there is http://www.mootools.com/plugins/us/sketchucation/index.htm which also comes with a poly reducer, the Polygon Cruncher. It works great, with lots of control, but again it is not free.
-
@bjornkn said:
It's not so much lack of horsepower as getting used to driving with a manual shift But if you want to drive at top gear everywhere you'll not gonna make it work for you.
If you absolutely need to have a 3x3m res in all of your terrain then SU is not the program for the job. 5-6 million polys can probably easily be handled with Blender, and so can most other non-free 3D programs, like LightWave, which is what I'm using when I need thousands of instanced 3D trees, rocks, grass and lots of polys.
In SU you have to "adapt to the terrain" and keep your polycount as low as possible wherever there's no need for lots of detail.
The SU community is so spoilt by all the great free plugins available, as well as lots of affordable ones. Sometimes you can't do without them, but sometimes you can spend a few days/weeks working hard instead of spending $39/$149.In my case, it was a matter of getting used to driving an automatic. I could achieve this with any number of other 3D programs, including AutoCAD, but none of them offer the simplicity or ease of use that Sketchup offers. For a model of this nature, the precision such as that offered by AutoCAD simply isn't necessary and would be akin to using a construction crew to build a park bench.
As stated previously, I do not need high resolution in the entire model and am trying to achchieve some level of compromise between high resolution in the valleys and low resolution in the mountains.
What I am trying to do is possible and one way or another, I will achieve my goal, even if it means learning Ruby and writing my own plugin. I am a programmer ya know, just not in Ruby.
@bjornkn said:
As advertised on this page currently there is {SNIP}
I can appreciate that you want to make a few bucks but I've already made it very clear that I am not interested in buying a plugin at this time. Using pretense to lead into a sales pitch isn't going to change my mind. Besides, I am not fully convinced that your plugin will do exactly what I need to do.
Finding free solutions may not be easy, especially when they are buried under a mountain of advertisements or misleading "free" solutions that aren't really free but don't tell you that until you download and try them, but truly free solutions are out there and I fully intend to find them.
-
@mac1 said:
Can you post your model. It will probably not fit the 3d ware house limit and probably not the Google docs but possibly one of the free ftp sites or post a section. Thinking you may not have not spent enough time with MeshLab? Check drop box it gives a large file size upload
Unfortunately, I don't really have a model yet, at least not one of the full area involved. Originally, I tried creating one and it killed Sketchup so I was forced to seek out alternatives that could simplify the poly counts of the terrain mesh while maintaining an acceptable level of detail. Ultimately, I decided to split the terrain mesh into several segments but again, each of them alone is more than Sketchup can handle without significant poly reduction.
I have managed to make some progress using Mesh lab, after considerable efforts were made to determine why the program kept crashing. As it turns out, it was the file format (Collada) that I had been using to get the data into Mesh Lab. I switched to using OBJ files and the program appears to be much more stable now.
For example, using Mesh Lab I was able to take a terrain mesh containing 400,000 faces and reduce it down to a mere 10,000 faces while mataining a relatively nice appearance. Granted, that was an overall poly reduction, which doesen't exactly achieve my goal of maintaining high levels of detail in the valleys and low levels of detail in the mountains, but it is closer than any previous methods I have tried.
By dividing the mesh, using poly reduction, and careful trimming of unnecessary areas, I am now convinced that I will eventually be able to create a nice terrain mesh for use with the model(s) I am planning. It is only a matter of time now.
-
I have no idea what makes you think that I will get any bucks by advicing you to buy a plugin?
I make no plugins or programs currently, and I will not receive any royalties or any other "bucks" by pointing at any non-free plugins.I don't use Meshlab (free?) or Global Mapper ($350+?), but have bought Amorph and Artisan, and am very happy that I did because it saves me tons of time and makes it possible to do things in SU that would be impossible without them. BTW I have also bought that Mootools/Polygon Cruncher as well as Okinos NuGraf/Polytrans (which will also poly-reduce) and many other tools.
When I need to screw a screw into a wall I prefer to buy a (cheap) screwdriver instead of trying to use a hammer, or to spend hours/days looking for a free screwdriver or make one myself.
BTW, I just did a little test on that handmade terrain I posted earlier. By downsampling selected areas with Amorph (10secs) it looks identical at a distance, and is now 4000 faces, and with the ortho photo intact. Even at <2000 faces it looks pretty good. As you're not interested in solutions that costs a few bucks I won't bother to post the results though.But, by all means, it would be great if you could write a free polygon reducer plugin that makes it possible to do local/area(/altitude?) reductions, and will allow you to stitch the parts together easily afterwards. I'm sure you could even charge a few bucks for such a plugin - and I would probably buy it too
-
I had no idea if you were the one who made the plugin or not but after your having mentioned it several times, even after I made it clear that I wanted to seek free alternatives, it certainly began to look like you either had an agenda or were affiliated in some way.
As for using hammers and screwdrivers...
My problem is somewhat unique and as a direct result, it requires creative and innovative solutions. Fortunately, there are no deadlines so I can spend as much time as I like while trying to find an adequate solution.
How do you think that all these nifty plugins and addons for Sketchup were created in the first place? Quite simply, because someone took the time to do the hard work while trying to find a solution to a problem, whatever that problem might have been. Besides, some of us simply like the challenge.
Speaking of test results, using Meshlab and a variety of other tools, as mentioned earlier I was able to take a terrain mesh containing over 400,000 faces and reduce it down to a mere 10,000 faces while still being able to maintain an appearance that was very close to what I am seeking. All without the need to purchase anything. Plugins are great but they can't "fix" everything.
We aren't talking about a small flat patch of land around a house or even a small sub-division here. I am planning to model an area of over 25 square miles in mountainous terrain and knew very well that it would not be easy before I even began the project. Sure, I could have simply used CAD or one of the other miriad of paid-products made specifically for a project such as mine, but what fun would that have been?
Sometimes it isn't about the destination but about the journey itself.
@bjornkn said:
I have no idea what makes you think that I will get any bucks by advicing you to buy a plugin?
I make no plugins or programs currently, and I will not receive any royalties or any other "bucks" by pointing at any non-free plugins.I don't use Meshlab (free?) or Global Mapper ($350+?), but have bought Amorph and Artisan, and am very happy that I did because it saves me tons of time and makes it possible to do things in SU that would be impossible without them. BTW I have also bought that Mootools/Polygon Cruncher as well as Okinos NuGraf/Polytrans (which will also poly-reduce) and many other tools.
When I need to screw a screw into a wall I prefer to buy a (cheap) screwdriver instead of trying to use a hammer, or to spend hours/days looking for a free screwdriver or make one myself.
BTW, I just did a little test on that handmade terrain I posted earlier. By downsampling selected areas with Amorph (10secs) it looks identical at a distance, and is now 4000 faces, and with the ortho photo intact. Even at <2000 faces it looks pretty good. As you're not interested in solutions that costs a few bucks I won't bother to post the results though.But, by all means, it would be great if you could write a free polygon reducer plugin that makes it possible to do local/area(/altitude?) reductions, and will allow you to stitch the parts together easily afterwards. I'm sure you could even charge a few bucks for such a plugin - and I would probably buy it too
-
@dbwv69 said:
I had no idea if you were the one who made the plugin or not but after your having mentioned it several times, even after I made it clear that I wanted to seek free alternatives, it certainly began to look like you either had an agenda or were affiliated in some way.
My agenda is just to use the right tool for the job.
@unknownuser said:My problem is somewhat unique and as a direct result, it requires creative and innovative solutions. Fortunately, there are no deadlines so I can spend as much time as I like while trying to find an adequate solution.
Not more unique than that we all have to face it all the time when making models in SU, and particularly terrains.
@unknownuser said:
How do you think that all these nifty plugins and addons for Sketchup were created in the first place? Quite simply, because someone took the time to do the hard work while trying to find a solution to a problem, whatever that problem might have been. Besides, some of us simply like the challenge.
Exactly! And some of those great plugin makers wants to make a living from their hard work, while others do it just for fun/challenge.
@unknownuser said:
Speaking of test results, using Meshlab and a variety of other tools, as mentioned earlier I was able to take a terrain mesh containing over 400,000 faces and reduce it down to a mere 10,000 faces while still being able to maintain an appearance that was very close to what I am seeking. All without the need to purchase anything. Plugins are great but they can't "fix" everything.
But then you already have the solution then? Your 25 sq miles should be around 5-6 million triangles at 3x3m resolution, which should convert to around 150k faces in SU, which might work. Then you just have to figure out how to texture it with a 70+ Mpx orthophoto to get 1x1m resolution (which isn't much btw)...@unknownuser said:
We aren't talking about a small flat patch of land around a house or even a small sub-division here. I am planning to model an area of over 25 square miles in mountainous terrain and knew very well that it would not be easy before I even began the project. Sure, I could have simply used CAD or one of the other miriad of paid-products made specifically for a project such as mine, but what fun would that have been?
Sometimes it isn't about the destination but about the journey itself.
OK. As you don't seem to be interested in advice along that road (if it costs anything at all) I think I'll stop spending my time on this "journey" of yours.
Looking forward to see the results though. -
@bjornkn said:
But then you already have the solution then? Your 25 sq miles should be around 5-6 million triangles at 3x3m resolution, which should convert to around 150k faces in SU, which might work. Then you just have to figure out how to texture it with a 70+ Mpx orthophoto to get 1x1m resolution (which isn't much btw)...
Texturing with the orthophoto no longer a concern to me because I have already solved that problem and it's resolution isn't critical because it will only be used as a background texture on the mountains.
@unknownuser said:
OK. As you don't seem to be interested in advice along that road (if it costs anything at all) I think I'll stop spending my time on this "journey" of yours.
Looking forward to see the results though.That's probably a good idea because debating "free" v/s "paid" isn't doing a thing to help me achieve my goal. BTW: Did I detect a note of sarcasm there?
-
dbwv69
I have had some what similar problem with Su=>Collada=>MeshLab=< Su( Collada) and then see a number of self intersecting faces and the obj works much better. Belnder has bug reports, ref. Collada import, my check of latest stable release shows the patch is not yet included but fix is known.
Ploy reduction is one of the easier filters in MeshLab to apply ,but as I am sure you know there are many more. I was thinking the Poisson smoothing could help your problem. I dabble with MeshLab so if you can post even a section I'll take a look. May not get any where but will at least try.
G day and good luck -
Hello Geo specialists,
I am a beginner in terms of geographic information systems. But I am very interested in this subject.
I have a question and would be delighted to receive a response from you. Is it possible to produce a TIN from SRTM 90m Digital Elevation Data and how is it done?. I own Global Mapper 11. Thanks in Advance.Charly
-
@mac1 said:
dbwv69
I have had some what similar problem with Su=>Collada=>MeshLab=< Su( Collada) and then see a number of self intersecting faces and the obj works much better. Belnder has bug reports, ref. Collada import, my check of latest stable release shows the patch is not yet included but fix is known.
Ploy reduction is one of the easier filters in MeshLab to apply ,but as I am sure you know there are many more. I was thinking the Poisson smoothing could help your problem. I dabble with MeshLab so if you can post even a section I'll take a look. May not get any where but will at least try.
G day and good luckThanks for the help, I appreciate it.
I was reading about the Poisson smoothing and while I have not yet experimented with it, the reports I read do sound promising. So far, using MeshLab I have been able to achieve decent results by applying a Quadric Edge Collapse Decimation filter, which produced a TIN that closely resembled the original symmetrical mesh, only at a greatly reduced polygon count.
However, I did notice one thing that could potentially cause problems with proper alignment of the completed terrain meshes. The mesh somehow gets rotated on it's axis when it's imported back into Sketchup. I don't know if it's caused by MeshLab or some part of the convoluted import/export process needed between the various programs.
I extracted a small sample of the area I am working with from the original 3 meter Lidar data, and exported that to a DXF 3D mesh file at full resolution. I can convert it to other formats if needed. See attachment: Sample Section DXF.zip
-
@charly2008 said:
Hello Geo specialists,
I am a beginner in terms of geographic information systems. But I am very interested in this subject.
I have a question and would be delighted to receive a response from you. Is it possible to produce a TIN from SRTM 90m Digital Elevation Data and how is it done?. I own Global Mapper 11. Thanks in Advance.Charly
For the best results, using Global Mapper, you can export the data to either a DXF Mesh file or a DXF 3D Face file but you will need Sketchup Professional to import it.
Alternatively, using Global Mapper, you can export the elevation data to a DEM (Digital Elevation Model) and import that into the free version of Sketchup but the results (in my opinion) aren't as good.
Another method is, using Global Mapper, export the elevation data to an XYZ file and import that into Sketchup as a point cloud with the Cloud plugin. You will then have to triangulate it with either the Cloud plugin or another plugin designed for that purpose.
Lastly, using Global Mapper, you can generate contour lines and export them as Vector data to a DXF file and import that into Sketchup then convert the contours to a mesh using the Sandbox tools but again, you will need Sketchup Professional to import the DXF file.
Whichever method you choose, it is still possible to have problems with the amount of data involved, depending on the size of the area you are using. If you have problems, try changing the sample spacing to a higher number in Global Mapper, prior to export. It will reduce the amount of data but the resolution will suffer as a result.
-
Thanks for the file, I have SU7 free with the dxf import add on so was able to open file, used TIGS obj exporter to create obj file for MeshLab. In my dabbling https://sites.google.com/site/sagesuwiki/tutorials/tips#TOC-MeshLab:-Centric-View-of-Polygon-Me I have convinced my self the export by kmz is better than dae alone and that I seem to run into problems with dae and MeshLab declaring self intersecting faces. I have also noted the axis issue and scaling but previous apps I did not worry too much because of the relative small components I was dealing with.
For your case in MeshLab ( obj file) there was 479K+ duplicate vertices deleted. ( I don't merge vertices because the model can get distorted. For terrain probably Ok but not component model. Zero self intersecting faces, zero non manifold vertices and edges I could see (ML paints them red so for large mesh they get hard to see). Did quad collapse decimation and at Ml recommended value collapsed down to 49k+ vertices and 98k+ faces. Will dabble some more but for what it is worth here is the dxf file exported from MeshLab fileBaseline ML.zip -
Hi dbwv69,
Thank you very much for your detailed explanation. I will try the options described.
Charly
-
@dbwv69 said:
That's probably a good idea because debating "free" v/s "paid" isn't doing a thing to help me achieve my goal. BTW: Did I detect a note of sarcasm there?
I'm afraid I couldn't hide it completely
Nevertheless I couldn't resist wasting another hour+ on this terrain after you posted that "little" dxf detail.
All free tools (I think there are free guide point tools? Although I did use the one in Amorph)
I will not post the Amorph version... It didn't have a chance trying to polyreduce that beast of a terrain in any reasonable amount of time, but could easily build a terrain on top of the dxf.
Advertisement