Edit: Oh wait, whoops. You are using a StaticModel. You should be able to edit a mesh though. I played around with creating meshes by code once but had some issues but it worked Urho wise. You could change or replace parts of your terrain with code created meshes.
If you would be using the normal terrain you could do this:
You can change the heightmap and splatting map of the terrain during runtime.
This code increases the height of the terrain under the camera Node:
IntVector2 v=terrain->WorldToHeightMap(cameraNode_->GetWorldPosition());
Image* i=terrain->GetHeightMap();
for(int x=-10;x<10;x++)
for(int y=-10;y<10;y++)
i->SetPixel(v.x_+x,v.y_+y,i->GetPixel(v.x_+x,v.y_+y)+Color(0.1,0.1,0.1));
terrain->ApplyHeightMap();
You could use such code to flatten the terrain where the road should be.
I also found code to change the splatting map but I’m not sure if it works, there may have been an issue:
Texture2D* t=(Texture2D*)terrain->GetMaterial()->GetTexture(TU_DIFFUSE);
Color c(1,0.1,0.1);
for(int x=-10;x<10;x++)
for(int y=-10;y<10;y++)
t->SetData(0,x,y,1,1,&c);
terrain->GetMaterial()->SetTexture(TU_DIFFUSE,t);
Does that help you?
I don’t think the terrain can actually be cut (out of the box) to replace it with custom models. You would have to extend the code to allow that. Such a feature would really be useful though.
Also ApplyHeightMap or SetTexture may have had a performance impact. It could be fixed by updating not all terrain parts at once but I don’t know if that’s currently possible. Such a feature would really be useful though, too.