Keywords: maps
Summary
This simulation demonstrates the use of the "decal" map, which is a unique type of property map for matching one set of geometry to the topology of another. It is intended primarily for mapping relatively flat geometry (such as roads) onto other, non-flat geometry.
Details
The demo scene provides an extreme application of the map — applying a "box" based road geometry to a "terrain" object. Without the decal map, we can place the road geometry above, below, or have it pass through the terrain, none of which is a good representation of having the road follow the terrain (note that this is a real problem with using third-party geometry generators such as CityEngine — making road/lot geometry match terrain geometry is a very difficult task).
The decal map solves this problem by adjusting the vertical position of the geometry on-the-fly so that its always right on top of the mapped geometry (note that like other maps, the decal map has a corresponding material ID associated with it so it will only be placed on geometry with the corresponding id). The horizontal placement of the geometry doesn’t change so it’s important to have it aligned correctly to begin with (there is no concept of projection for the decal map). The effect in the demo is to have the road follow the surface of the "terrain" underneath.
Note that this approach does not work for objects like cars which would be warped to match the terrain geometry. It is intended primarily for flat "cover" objects, things like roads, curbs, lawns, etc.. that might need to be displaced from the underlying surface (otherwise they could be modeled simply using material/texture maps on the surface of the terrain).
Important Files
-
Like other maps, the decal map definition is in the scene file:
demo.scene
-
The geometry being "decaled" is in its own glist:
geometry/map.glist
-
The rest of the scene (sinusoid + unmapped road geometry) is in:
geometry/decals.glist
Setup
This section includes any step-by-step instructions for running and visualizing the simulation.
To run the simulation, perform the following steps:
-
Run the DIRSIG
demo.sim
file -
Load the resulting
demo.img
radiance file in the image viewer.
Results
