Creating a 3d model of a terrain

Here is an update connecting the solid mesh into the Custom Preview Materials component. It also incorporates @trpatt’s method of baking the texture mapped mesh to Rhino with the ESRI World Street Map material.

Glen Etive Topography_Solid Base with Texture (33.8 KB)

Also, while looking for higher resolution topo the best I could find for this part of the Highlands was this one which has been compiled from various sources at 20m resolution, slightly better than the 30m SRTM. The same author has other parts of Europe available as well here. You will need to download the 1.12 GB tif file and use it as the input for ImportTopo.

Glen Etive 20m Topography_Solid Base with Texture (28.8 KB)


1 Like

Thank you for all the help! I am happy with the model that I created in Rhino and grasshopper.

I learned from the CNC operator that the machine can detect flat surfaces and mill it so it likes water/waves.

Is there a way to also make grasshopper detect the lakes and rivers and make these surface flat in the model?

Otherwise I will try to do that the old fashion way without grasshopper…

Hi @Hobnob ,
You can use Gismo’s “OSM shapes” to automatically generate 2D or 3D house, road, tree… shape for the chose address and radius.
See below the Lochan Urr lake surface projected to terrain, along with neighboring rivers.

(the same as previosly, to make the components run, set all red colored toggles to “True”)
SCT Lochan Urr 2km radius (1.5 MB)


I have had a break from my project but now I am back :slight_smile:

I do not know what I am doing wrong. I do not get the same terrain as you with the rivers and lake. Every red toggle is set to true and also I tried to increase the radius to get more of the surrounding terrain but it does not change when I set it to 12000 meters.

The orange component gets error message
"1. No OSM object can be found for the given _keys and _values.

These can be due to the following few reasons:
1) The simplest one: there really isn’t that kind of OSM object at that “_location” and for that “_radius”.
2) You might be searching in incorrect “shapeType_” input.
keys and values are affected by "shapeType" input of the “OSM shapes” component. For example, trees will always be located (if they exist at that location) for shapeType = 2 (points). They can not be found in shapeType_ = 0 (polygons).
3) OSM object is basically found by matching certain _keys with _values. It can be that you haven’t initially defined a list of specific _keys so that this component would find the OSM object based on them.
To solve this problem define the “requiredKeys_” input of the “OSM shapes” component by using the “OSM keys” component. Generate the keys in “OSM keys” component by using the same OSM object for which you are performing a search in this component."

Hi @Hobnob ,
Can you right click on the component marked in blue, and enable “Preview”:

Then post a screenshot of Rhino’s “Top” view. Because rivers and lakes should be visible in that view.

Like this?

Hm, but can you turn off “Terrain Generator” component. Because it blocking the view.
When you turn the “Terrain Generator” off, then click on “OSM shapes” component (that’s the one whose “preview” you turned on). When you select that component, does something appear in Rhino’s “Top” view?

Sorry it was ju me being stupid. I forgot to type in my own API key…

It works now…

But I tried to change radius to 12000 meters. Is it not possible?

What I actually need is to be able to capture a bigger area. My site is Lochan Urr, the lake, but I need to include alot of the mountains in the north, upper part of map. So I need to either zoom out to capture a bigger area and then cut the model to make it smaller. Or to be able to change the center so it is not in the lake to get more of the mountains in the north.

But I am not sure how I can bake this terrain including the lake and river in the terrain?

EDIT: I added a mesh component to the TerrainGenerator component, and now I can bake a terrain that is larger. I do not know why the TerrainAnalysis component only generates a small radius

Hi @Hobnob ,
Glad you succeeded.
About your last quote:

Because we have the inputs for that component internalized.
To prevent the from being internalized, connect the outputs from “Terrain Generator” to these parameters:

1 Like


Is it possible to have the lake and river part of the terrain? If they are part of the landscape, like for example as lines or similair, as long as they are marked in the landscape then the CNC machine will mill it out.

Well “OSM search” component in my latest attached .gh files, made the lake and river projected to the terrain. Is this what you after?
Or you want the lake and river to make some sort of “hole” in the terrain?

Yes, the OSM search component projected the lake and river to the terrain. But it was more like two different objects melting into each other. Like two objects occupying the same space. I do not think the CNC machine will recognize the lake and river. I would like the lake and river to be marked on the terrain. I am not sure if a “hole” is the best. I could try though and see if the software in the CNC machine recognize it. Otherwise the lake and river can be defined with lines which the CNC mill can follow. Or the lake and river surfaces is “punched down” a litte bit to just define them on the model.

Hi @Hobnob ,
There are two solutions:

A) Drill lake and rivers into the terrain model.
Bake “A” output shown above to get lake and river surfaces. Extrude lake and river surfaces, to make 3D solids from them. Use the following extrusion settings:

Such 3D lake and rivers can then be subtracted from the terrain with BooleanDifference difference command. As a result you will get the lake or river to be slightly drilled into the terrain:

B) Set up the “B” boolean toggle to “False”.
This will create lake and river polylines projected directly to the terrain.

1 Like

I expanded the radius to get more of the terrain, but the river does not follow. It did not get the rest of the river. I tried to find out which component to manilpulate but cant. Is it an easy fix?

@Hobnob ,
Gismo’s “OSM shapes” component generates geometry based on database.
For that particular location around the lake Lochan Urr, only the lake itself and a few neighboring rivers have been modeled as a closed body of water.
Every other small river and stream have been modeled as a polyline.
Check the attached definition, which now includes those smaller rivers and streams as polylines (shown in red color below):

SCT Lochan Urr 2km radius (1.5 MB)
(as always, to run the .gh definition, use your APIkey, and set the toggle switches to “True”)

So you mean it will only model the lake between the red lines? And I (we) can not do anything about that? I need to have more of the “main” river marked as yellow. Otherwhise it will look wierd in the model that the river just ends abruptly. I do not need the surrounding smaller rivers.

Hi @Hobnob ,
There are two possibilities:

  1. Openstreetmap is mainly based on volunteer work.
    You as well, can draw that yellow river banks in openstreetmap with the use of ID editor. The editor works inside any internet browser, and it is as simple, as drawing lines over a satellite image. If you do this, then not only that you would be able to load these changes by Gismo - but also the whole openstreetmap community will have benefit from it.

  2. Offset those yellow polylines in both directions, to create a closed polyline. Then make a surface from it. Repeat the upper step “A” from my reply.


Thank you for your explanation! You have been very patient with me, I appreciate that alot! Thanks!

About option B) I tried baking different ways, but I guess it will still be two seperate objects, the lake/river and the terrain?

I suggested “B)” option as well, because you said the CNC can mill lines on terrain. Lines on terrain, and terrain itself are two separate objects. Or I misunderstood you?

Yes the CNC can mill the lines, but I think the lines has to be one with the terrain but fully visible, like a line on a paper. With option B my lines kinda goes through, on top, and under the terrain on some parts. But I will check next week, maybe the machines software can distinguish the lines on the terrain.

Once again, I appreciate all your help so far! Thank you very much!!!