Sandbox Roadtool

From CryWiki

Sandbox Roadtool
Jump to: navigation, search

Contents

How to Use Essential Road Tool Functions

Image:Sandbox_Roadtool_image001.jpg

Overview

This tutorial shows you how to build a road and then drive on it with a vehicle. Firstly, we will setup the road geometry and later assign a material.

Have a look at the terrain modification tutorial to get the basic landscape done before you start using the road tool.


Placing a vehicle

The first step you need to do is to get the scale of the road right by placing a reference object. To do this we simply place a vehicle:

Go to the RollUpBar click Objects and then Entity and place a vehicle from the Vehicles folder.

Image:Sandbox_Roadtool_image003.png

Drag the vehicle on the map where you would like the road to start. The exact position doesn’t matter. You can move the vehicle wherever you want it to be. Now you can see much better how big your mountains and terrain bumps are.

Image:Sandbox_Roadtool_image005.png


Creating a road

Now we are ready to create a road. Below the entities button is the miscellaneous objects button, which contains the road tool. Click on it to activate it.

Image:Sandbox_Roadtool_image007.png

The RollUpBar now shows a new set of variables to customize your road.

Image:Sandbox_Roadtool_image009.png


Placing your road

Click on the terrain with the road tool active at the position where you want the road to start. This will be the first key point of your road. Click again to place more points on the landscape to define your road. To set the last point, double-click.

Image:Sandbox_Roadtool_image011.png

Even if your road looks a little strange and not suitable to drive on, don’t worry too much – you can easily tweak the road later on.

Image:Sandbox_Roadtool_image013.png

If you look closely at the road you will see that the default texture is always projected on the surface below the geometry that defines the road. Thus the road doesn’t need to perfectly align on top of the terrain. The road segments between the key points try to smooth the road bends to create a more realistic look.

Image:Sandbox_Roadtool_image015.png

You have a road with a default texture place on the surface, but the surface itself is still far from drivable. To change this click the button “Align Height Map” in the road tool properties:

Image:Sandbox_Roadtool_image017.png

This will change the terrain and align it exactly to the geometry of the road tool. The terrain next to the road will also be changed applicably.

Image:Sandbox_Roadtool_image019.png


Modifying a road

After you have placed your road, it can easily be modified. Click on the Edit button in the Road Parameters box (if the button should be disabled please de-select the road and select it again).

Image:Sandbox_Roadtool_image021.png

You are now able to control every key point on the road, changing the X, Y or Z position separately, X and Y together or move the key point on top of the terrain. For this choose one of the modes with the X, Y, Z or XY Lock on Axis buttons in the task bar.

Image:Sandbox_Roadtool_image023.png

Now click on a key point of the road and drag the point to its new position. Choosing the Lock on Z Axis mode enables you to change the height of this key point to manually smooth the road if the particular section is too steep to drive on.

Image:Sandbox_Roadtool_image025.png

With the Align Height Map button and by modifying the key points, you can place the road exactly where you want it to be.


Changing the texture on the road

Up to now the road still has the default texture on it. To change this, open the material editor through the pull down menu.

Image:Sandbox_Roadtool_image027.png

Inside the material editor open the Materials folder and then the Terrain folder followed by the Road folder. Here you will find a list of available road materials.

MATERIALS/TERRAIN/ROADS/*.mtl

Select the road_concrete_driven_on material.

Image:Sandbox_Roadtool_image029.png

To apply this material to the road entity we just created click the Assign material to Selection button in the material editor.

Image:Sandbox_Roadtool_image031.png

As you notice you can apply the same material to several road objects at the same time if you select more than one road object.

Note: if you can’t see the texture on the road make sure you have both the check boxes Roads and Decals turned on in the Render Settings (you can find the settings in the RollUpBar)

Image:Sandbox_Roadtool_image033.png

Changing the road parameters will allow you to make it look even better:

Image:Sandbox_Roadtool_image035.png

MTL:This shows which material is currently assigned to your road. Click on the button to get to the material editor where you can change texture or select another material.

Minimal Spec: Used for setting in which hardware configuration the entity is rendered or not, not recommend to be changed for road tool, as road should be rendered on all specs.

Width: The Width of the road.

BorderWidth: Only used for the Align Height Map function, this will make a smooth edge on the terrain geometry if the BorderWidth value is higher than the Width value.

StepSize: A smaller StepSize will increase the polycount used for the road surface, so for roads with smooth corners you want to use a smaller size than the default 4.

ViewDistRadio: Specifies how far the road entity will be rendered.

TileLength: The length of the Road Texture. Tweak this in combination with StepSize to avoid stretched textures.

SortPriority: This setting can be used if you want to have a specific road drawn above another road.

Result

Press CTRL+G to enter game mode, then enter your vehicle (by pressing the F key next to the door) and press F1 to enter third person view. Now, you will be able to easily see if your road is too wide or narrow for your car.

Image:Sandbox_Roadtool_image037.png

See Also

Personal tools