EasyRoads3D will auto adjust the terrain shape and vegetation to match the created road network. This section explains all the options and how you can optimize the system to your project specific needs.
[include link to General Settings discussing Terrain Management]
To flatten the terrain according the road network shape, activate the terrain tab from the main EasyRoads3D Toolbar in the Inspector.
Before flattening the terrain there are a number of options to chose from to improve the performance / workflow while creating the road network.
- Target Terrain(s): In case there are multiple terrain objects in the scene, it is possible to flatten all terrain at once or one of the terrain obejcts can be selected from the dropdown or by CTRL + ALT + click the terrain. Especially when you are working on a specific area of your scene and during testing, it is recommended to select that terrain from the dropdown. It will save valuable time.
- Selected Road Objects Only: The terrain will only be adjusted in the area covered by the selected road objects. This is useful for quick testing while working on specific road objects.
- Remove Trees: This will remove trees affected by the road network.
- Remove Detail Objects: This will remove detail objects affected by the road network.
- Update Terrain Splatmaps: This will blend the road shape in the terrain according the splatmap settings of each road object.
- Add Side Object Vegetation: This will add all side object trees linked to terrain tree prototypes to the trespective terrain object(s).
- Calculate Road Tangents: This will add additional tangent info to the road, crossings and side objects mesh data which is required when you use bumped shaders.
- Calculate Lightmap UVs: This will generate lightmap UVs for road, crossings and side objects. Note: Unity will rebuild the mesh resulting in different vertex count. This means all crossings need to be rebuild after switching back to Edit Mode. To save time during development you may want to keep this setting switched off.
- Build LOD Groups: (inactive) This will generate LOD groups for each road.
- Build Terrain(s): This starts the buildprocess. You will see a progressbar. This progressbar is not yet fully optimized, it may seem nothing is happening. Especially scenes with many trees and details objects can take some time.
- Finalize Road Network: This will remove all script components from all road network objects. Only use this option when all work on the road network is completed. It is recommended to duplicate the scene first in the project folder and keep this scene as a backup just in case changes to the road network are actually required. This Finalize option is especially intended for when only side objects are involved or when custom road shapes are used that do not require terrain deformation. This Finalize option is also available in Build Mode covered here below.
After the Build Terrain process has finished the Inspector will update:
IMPORTANT:
Changes to the terrain object settings (such as heightmap resolution or detaill map size changes) should be done with the road network in Edit Mode.
When this is done with the terrain addjusted to the road network the originally stored terrain cell index positions will no longer match the same position on the terrain. The terrain will indeed not accurately restore back to the original terrain.
It is possible to select road objects in Edit Mode. The same side object options will be available for the road itself and for individual markers. Note that this option is suitable for side objects generated on the terrain. It is not suitable for side objects that affect the terrain shape.
The Cam Fly Over option to quickly view road objects is especially useful in Build Mode. It will appear in the Inspector after selecting a road.
|