How to model terrain when gernerating a tunnel with cityengine

1290
2
06-30-2021 03:14 AM
MariaKurzmann-Engler
New Contributor II

Hallo!

I try to model a tunnel under terrain. I can create a tunnel but I don't know how to model terrain so that terrain stays over my tunnel. I want to make a hole in terrain.

I have modeled the tunnel in Arcgis Pro, but I don't know how to create in CE.

Are there some cgas for tunnels?

 

 

0 Kudos
2 Replies
by Anonymous User
Not applicable

Sorry, I don't think there is a way to poke a hole in the terrain mesh for a tunnel in CityEngine.  However you might be able to work around this limitation with one of these tricks:

1. Create a new shape in CE using shape tools or a new model in a 3D application like Sketchup/Blender that acts as a new terrain object, such as the roof of the tunnel, then place it manually like a terrain/tunnel/shape sandwich, and drape the terrain image onto it (like a texture projected in the yUp direction) for a more seamless look.  Or maybe just a grass/dirt texture would work.  The underside of the object might appear blank so hide that with your tunnel CGA.   

This is not a "procedural" solution, which is the reason most use CityEngine, but if you have to do it this might be a way.  

2.  Or it might be possible to make a street-graph layer that could act as the terrain going over the top.   You can angle the sidewalks down as a terrain feature using roof ramps and texture them to look like the massive highway berms shown and then at the tunnel section just extrude a small bit down to look like the metal supports of the bridge.  

Just a thought,

 

 

0 Kudos
by Anonymous User
Not applicable

Here is something I created to show example 2.  This code is placed on the street graph and uses street and sidewalk widths.   Street width and sidewalk width can be adjusted to meet needs.   This code really only works with a street graph that has been set to "smooth" corners, no sharp turns.

Tunnel_Example.PNG

 

version "2021.0"

attr dirtTexture = "BWAssets/Mulch/mulch-tiled.jpg"
attr TerrainHeight = 15
attr TunnelHeight = 8

@Start
Street-->
	extrude(TerrainHeight)
	comp(f){top: TopTexture | vertical: VertTexture | all: Sides}
	
TopTexture-->	
	setupProjection(0, world.xz, 10,10)
	texture(dirtTexture)
	projectUV(0)	

Sidewalk-->
	split(v,unitSpace,0){~1: Sloped_Berm}
	
Sloped_Berm-->
	roofShed(byHeight,TerrainHeight,2) 
	comp(f){vertical: VertTexture | side: Sides}	
	
Sides-->
	setupProjection(0, world.xy, 10,10)
	texture(dirtTexture)
	projectUV(0)

VertTexture-->
	setupProjection(0, scope.xy, 10,10)
	texture(dirtTexture)
	projectUV(0)	
		
Tunnel-->
	t(0,TunnelHeight,0)
	extrude(TerrainHeight - TunnelHeight)
	comp(f){top: TopTexture| vertical: VertTexture | side: Sides}

		

 

 

 

0 Kudos