No cookie for

Adding Fences to Your Terrain

Posted by on VR-Forces

VR-Forces and VR-Vantage customers often want to add additional features to the terrains provided by MAK or want to understand how to add features to the terrains that they have developed. One type of feature that is often requested is fencing, for example around an aerodrome. 

Fences are flat extruded linear features that have no thickness. They are created from a shapefile by the MAK Earth terrain engine within VR-Vantage and VR-Forces. It is your responsibility to create or obtain a shapefile that has the fences you want to add.

The aerodrome earth files provided by MAK have a flattened area around them. If you are adding a fence to an aerodrome, you should ensure that your fence features fit within the flattened area. If they are in unflattened areas, they might not conform to the terrain.

To add your fences to an earth file, add the following block of code. Replace  "../../data/Terrain/World/Features/myAirportFencesL.shp" with the path to your shape file. If you add it to .\userData\servers\airports.worldwide.xml, it will be included in the procedural terrains provided by MAK. However, you can add this example to any earth file.

 

!-- Extruded  fences Aerodrome -->

<model name="aerodrome_fences" 

       driver="feature_geom" 

       vrfsim:enabled="true"

       cacheid="aerodrome_fences">  

  <features name="aerodromewalls" driver="ogr">

    <url>../../data/Terrain/World/Features/myAirportFencesL.shp</url>

  </features>

  <backface_culling>false</backface_culling>
  <!—backface culling needs to be on, so that fences render on both sides -->

  <clustering>true</clustering>

  <cluster_culling>false</cluster_culling>

  <lighting>true</lighting>

  <layout>

     <tile_size_factor>3</tile_size_factor>

  </layout>

  <styles>            

     <library name="us_resources">

         <url>http://vr-theworld.com/vr-theworld/filemanager/download/public/Library/catalog.xml</url>

     </library>

     <style type="text/css">

         default {

             extrusion-height:      2;

             extrusion-flatten:     false;

             extrusion-wall-style:  building-wall;

             extrusion-random-seed: 1;

             altitude-clamping:     terrain;

             altitude-resolution: 0.00068664550781250000;

         }            

         building-wall {

             skin-library: us_resources;

             skin-tags:    fence;

             skin-random-seed: 1;

             fill:         #ffffff;

         }

     </style>

  </styles>

 </model>

 

Last modified on
Trackback URL for this blog entry.

Comments

  • No comments made yet. Be the first to submit a comment

Leave your comment

Guest
Guest 16 July 2019