EasyRoads3D v3.2+ for Unity - Introduction - Getting Started

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello everybody welcome to this introduction video for easy roads 3d version 3.2 and later in this first episode of a new easy roads 3d tutorial series we are going to look at the basics the easy roads 3d workflow we will create a new road network object we will look into the easy roads 3d toolbar option in the inspector show how to create new roads and crossings in the scene how the terrain is updated to the road network shape and we will look at how to add side objects like lamp posts guard rails and fences you will see how this tool can build roads and a whole range of other objects in your scenes directly in unity because it is a lengthy video both the description below and the tutorial page on our website include direct links to the start of each topic in this video so you can always come back here and use those direct links to quickly watch parts of the video again we will use the new version 3.2 plus demo scene that is part of the easy roads 3d demo package this demo package can be downloaded from the unity asset store it is free if you have a copy of easy roads 3d pro all of the assets used in this video are included this scene is a work in progress it will be expanded with new assets and grow further as new features are added to the tool it is a useful resource to get familiar with easy roads 3d so this is the first video in a new series of tutorials and showcase videos for easy roads 3d starting next month new videos will be launched every one or two weeks watching these videos and learning the tools will help get the most out of it so you may want to subscribe to this official easy roads 3d channel let's first have a quick look at the unity asset store page and the packages we will use in this video the easy roads 3d pro package is the core tool this is the tool you want to use for creating roads in your scene it is a framework meaning that it is not limited to what is offered by the tool itself you can use your own assets or other third party assets assets like road materials or side object models like for example lamp posts guard rails and fences because it is a framework additional assets in this package are currently limited to one road type and two crossing examples with these limited assets the frequent version updates will import fast and the project folder will remain clean with no unused assets the easy roads 3d demo package this is the package that we will use in this video it is listed for a price of 45 dollars but this package is actually free if you own an easy roads 3d pro license just make sure to log in with the same unity account used to get easy roads 3d pro this demo package includes a wide range of assets like road types guardrails fences walls lamp posts power lines bridges and tunnels these assets can be used as a resource to get familiar with the tool but also for example to quickly prototype your scenes as mentioned in this tutorial we will use the scene that is part of this easy roads 3d demo package we already have the package imported in our project but let's start with an empty scene first in the project folder we have the main easy roads 3d folder the easy roads 3d assets folder and the easy roads 3d scenes folder the easy roads 3d assets folder is a separate folder only part of the demo package we prefer to keep tool specific assets and additional assets in separate folders but if you want you can move both the scenes folder and the assets folder into the main easy roads 3d folder the manual is also located in this folder in the easy roads 3d scenes folder we have the previous version 3.1 scene and the current demo scene so let's get started the first thing we want to do is create a new road network object in the scene this can be done through the main unity menu at the top a new easy roads 3d menu item will be available in game object 3d objects easy road 3d with the option new road network this option is also available from the hierarchy right click and you will see the same menu path let's create a new road network when side object presets are available in the project we will be asked if we want to import all of these presets side objects are additional objects that can be added to the road network objects like guardrails lamp posts fences but also bridges tunnels or any other object that you want to generate along the road shape usually we want to import all presets but in large projects and scenes with different themes you may prefer to import only theme specific site objects in that case select no the required presets can be imported manually after the road network object is created in this demo package we have side objects for version 3.1 and side objects for version 3.2 and later so you probably first want to view these side objects in the two demo scenes so you have an idea of the package contents in any case version 3.1 side objects will also work in the newer versions we will also be asked if we want to import all the road types that are available in the project because you may not use all road types in every scene we have the same option as for side objects when you select yes both individual road types inside objects can always be removed from the scene in a later stage easy roads 3d can backup terrain data we didn't see this but when creating a new road network and when new terrain objects are detected there will actually also be a notification saying that a new terrain object is detected with the question if you want to back up the terrain we will look later at these terrain backup options but you want to select yes and back up the terrain when you're asked for this unless perhaps when you already have a terrain backup system in your project the road network object is created and selected in the hierarchy the hierarchy structure is simple all road objects will be parented to road objects all crossing objects will be parented to connection objects the easy roads 3d toolbar will be visible in the inspector let's have a quick look at the toolbar tabs we will look deeper into each tab afterwards the first tab is the scene view tab when a road or crossing is selected the properties will be displayed here the next tab is the new road object tab here we can create new road objects the crossing connections tab all available crossing connection prefabs are listed here these prefabs can be selected and instantiated directly in the scene the build terrain tab easy roads 3d can adjust the terrain shape to the road network this is done in this section we call this build mode the final state of the road network with the updated terrain so the road network is generated in edit mode then we can switch to build mode to adjust the terrain we can move back and forth between edit mode and build mode to see the final result while working on the road network we will look at this all a little bit later in this video the next section is the general settings section here we have a range of options to manage the general road network behavior and options scene view options this section is related to both visualizing aspects of the road network in the scene view window and controlling the behavior and the workflow in the scene view window we will look at this once we have some roads in the scene road types we already mentioned this road types are important in easy roads 3d using road types make the road network so much easier to manage and it improves the general workflow as we will see later in this section you can create road types add project road types you remember we were asked if we wanted to import the project road types you want to use this button to import a selection of project road types if you selected no in this case the button is disabled because all of the project road types are already available in this scene we can manage project road types road types can be removed here import road types from other projects and export road types so they can be imported in other projects here we can select a road type from the drop down to edit the default settings most of the controls are self-explanatory we will get back to some of these options a little bit later the crossing connections prefab section in this section new crossing connection prefabs can be created we will look at this later when we start building roads and crossings level of detail options as you may already have seen in the build terrains tab there is an option to create lod levels for the road this is based on the unity lod group component in this section we can set the number of lod levels set the resolution of each level relative to the original mesh resolution and at which mesh bounds ratio relative to the screen this lod level should be triggered by using lod groups it is also possible to cull roads farther away this is useful for large scenes to do so simply set the bound size of the last level to zero terrain management easy roads 3d can update the terrain to the road shapes we already saw this in the middle terrain tab updating the terrain to the road shape was actually the main reason why we started this tool because it is almost impossible to do that manually in unity not to speak of how time consuming this manual process is in this section we have some options related to this when new terrains are detected you'll be asked if you want to back up these terrains we already mentioned this when we created a new road network object backing up terrain data is an additional safety measure here in this section the backup can be updated after manual terrain changes and if necessary the terrain can be restored using the most recent backup we can also set perimeter values for terrain detail and tree removal terrain detail and vegetation near the roads inside these ranges will be removed in build mode the last option in the general settings tab is related to auto-generating road networks easy roads 3d can generate road networks from road data at the moment both openstreetmap and kml files are supported we will fully cover this in another tutorial but the workflow is fairly simple for openstreetmap the road data file can be downloaded from the openstreetmap website this file can then be imported here into unity road objects will be generated according to the road data in the osm file the next tab is the site object manager here we have similar options as for road types to manage side objects in the scene and in the project there are several side object categories we will look deeper into creating new side objects in another side object specific tutorial but this demo package already includes a wide range of examples that can be reviewed working with side objects in the scene will be covered later in this video the most right tab is the info tab it shows the installed versions and various useful links to for example the online documentation so that briefly covers the easy roads 3d toolbar we have the scene tab showing the selected objects the new road object tab the crossing connection tab the build terrain tab where we can switch to build mode and update the terrain the general settings tab the side object manager and the info tab let's put all of this into practice and start with adding some roads through the new road object tab we will actually do this in the demo scene so let's move back to this scene and put the focus on an area where we can add some roads first we select a road type as already mentioned it is very much recommended to work with road types all settings like the road width and material will be inherited from the selected road type already created roads are better manageable in a later stage and using road types also improves the workflow when crossing connections are involved we will talk more about that later in this video the road types in this list are all part of the demo package it is the same list of road types also available in general settings road types there are also presets like fence power line and palm trees these presets will actually not create roads instead only the activated side objects for these presets will be generated this option makes it possible to quickly create other types of objects for your scenes we will see later how that works and how easy it is to create these types of presets for your scenes let's first create some roads for example a primary road since we now have a road type selected the other road options will be disabled both the road width and material associated with the selected primary road type will be used click add new object and shift-click in the scene shift-click will add marker control points these marker control points define the road shape the road itself the road mesh will appear after adding the second marker control point the rode properties are visible in the inspector one thing that may need attention here is the state of the gizmos tab on the right above the scene view window the gizmos tab should be active to show the marker handles this tab will be active when using the default unity factory settings but you may want to check this when no marker handles are visible in fact this gizmos tab in active state seems to interfere with unity events the shift click event in this case after shift-click the terrain will also be selected this is the default unity behavior when clicking an object in the scene so we want the gizmos tab to be active all road network handles are visible again in this state where the road network object has the focus the terrain can still be selected by double-clicking the terrain let's continue with the road we just created we can reselect the road object by clicking one of the blue marker handles or by clicking on the road mesh the selected road object will show in the inspector we can now continue adding markers with shift click this can be done on both ends of the road we can move markers also upwards remove markers with shift r insert markers with the i key and change other road properties we will look more into these options later let's first continue with the options in the crossing connections tab the third tab in the inspector easy roads 3d supports two types of crossing connections built-in dynamic crossing connection prefabs and custom crossing connection prefabs dynamic crossing connection prefabs are based on a road type settings like the crossing corner radius and resolution can be adjusted custom crossing connection prefabs are based on models this can also be your own models it works by importing the model into the system and defining connection points where the road objects will attach this custom connection system is a powerful tool to create your own unique road networks and it can also be used to create other infrastructures for example railroad infrastructures it is a tool by itself and offers endless possibilities for complex infrastructures of any kind new dynamic and custom crossing connection prefabs can be created from inside the general settings menu we will fully cover that in another tutorial but to already give an idea dynamic crossing connections are based on road types this type of crossing connection can be easily set up from the road type section through the create new connection prefab button below the connection material field the connection material will be used on the crossing object custom crossing connection prefabs can be set up in the custom connection prefab editor window the model can be dropped in the window the mesh wireframe will appear in top down view the new connection prefab is created in the project folder then it is a matter of assigning connection zones to the mesh where roads will connect this should be done in clockwise direction this is important to define a connection area the vertices parts of this connection are selected by pressing shift and drawing a rectangle around these vertices after all connections are set we click apply as mentioned we will cover this with different models in another tutorial but the demo scene includes various prefabs like this that can be reviewed for example the motorway roundabout and exits dropping these generated prefabs from the project folder in this window will show the setup let's go back to the crossing connections toolbar tab in the inspector once new crossing connection prefabs are set up they will be listed in this tab ready to use in the scene these prefabs are located in the project folder it is safe to remove unused prefabs from the project folder if you want to clean up the list by default the prefabs are listed in the crossing connections tab as buttons optionally they can be displayed as sizable thumbnails when the prefabs are displayed as buttons it is possible to mark them and sort the list by most used prefabs marked prefabs will be listed at the top for easy and quick selection let's have a look at the scene workflow how they are instantiated in the scene and how roads connect to these crossing objects this workflow is very similar for both built-in dynamic crossing connections and custom crossing connection one way to create a crossing is by simply spawning it in the scene we have roads based on the primary road type in the scene so let's select the primary road crossing prefab just like when adding road markers press shift and click in the scene the primary road crossing will appear we can move and rotate the object in all directions matching roads can be attached to the crossing connections by moving the marker towards the green connection handle when within the range the road marker will snap we can still freely move the crossing connection around after a road is attached the road will update according to the crossing position changes we can detach the road by dragging the marker away from the connection let's remove some markers and also remove this crossing object another way to add crossing connection objects is by selecting a road and attaching the crossing object directly to a road because we have a road selected less crossing connection prefabs will be visible in the inspector this is also mentioned here at the top only connection prefabs that match the shape of the selected road are displayed the reason for that is that in order to connect a road to a crossing the road and crossing connection shape profiles must match this is important because certainly when working with custom connection prefabs connection shapes of road and connection objects in the scene may not necessarily match for instance a railroad track cannot connect to a dynamic primary crossing object and primary road type roads cannot be attached to a railroad connection so only those crossing prefabs with matching connection shapes will be displayed when a road is selected in the scene if necessary the instantiate new connection prefab button can be used to quickly deselect the road all prefabs will be visible again but in this case we continue with the road selected after pressing one of these matching crossing connection prefabs in the inspector the prefab instance will instantly snap to and align with the road because the crossing connection will align with the road this is the more efficient way of adding crossings to already existing roads in the scene a crossing connection can also be inserted at any marker the original road object will be split into two road objects with the crossing object in between a third quick way to add a crossing object not involving the inspector is by snapping roads together directly in the scene this is the easiest way to connect two existing roads let's have a look at this and add two new road objects we create a new road object and shift-click in the scene to add marker control points and another road object when we move the road marker over the other road and the shapes of these two road objects match a blue circle will appear this means that connecting both roads is possible as you can see this can be done with any marker not only the first or last marker when there are multiple matching crossings available the best matching crossing will be selected in this case we have roads based on the primary road type we do have a crossing connection prefab available for this road type so this is the one that will be inserted starting from version 3.3 it will also be possible to start new roads from other roads very easy this demo scene actually already uses the beta version 3.3 so this option is available when this package is imported in fact the flex connector introduced in version 3.3 will be inserted between the two roads let's create some room and try this press shift and the left mouse button a blue circle will appear as an indicator drag away from the road the new roads will appear and after releasing the mouse button the flex connector is inserted so now we have some roads and crossings in the scene we already saw that unused crossing connections appear with green handles roads can connect to these crossing connections by moving the marker towards these green handles new roads can also be started from the green handle by pressing the handle and dragging the mouse away from it so altogether there are different ways to create crossings it entirely depends on the situation for what option will work the best for example imagine a city block with many similar crossings the crossings can be added first followed by inserting the roads between the crossings let's first remove the road and crossing objects the grid option is useful in this case crossings and road markers will snap to the grid cell corners after activating the grid option in the scene view section it will become visible we can set the cell size the grid display size the grid color and opacity can be customized and the grid can be rotated we will add the same primary crossing prefab shift-click in the scene will now snap the crossing connection instance to the nearest cell corner and as long as no other road network process was performed shift-click in the scene can be repeated to add more crossings so this functionality can be used to quickly add the crossing objects to the scene we can now pull roads out of a crossing connection and instantly snap the road to another crossing connection to quickly build the city block let's deactivate grid control when the scene view window has focus the j key can also be used to activate or deactivate grid display we can connect the other roads in the scene to these new crossing objects when a crossing connection is selected we can turn x crossings into t crossings and we can add sidewalks we will look into these options in another tutorial individual crossing connections can be further edited by selecting them in the hierarchy that can be done directly from the inspector as can be seen here the crossing object itself is now selected in the hierarchy there is a range of options available this too will be covered in another crossing connection specific tutorial but you can try these options out it is all self-explanatory the crossing will update so you can see what changed the crossing connection prefabs in the project folder can be edited in a similar way through the unity prefab editor system the same options are available already existing scene instances can be updated through these buttons if necessary these options will also be looked at in the crossing connection specific tutorial it can for example be used to add additional props to the prefabs this button will update all instances in the scene so we now have some roads and crossings in the scene let's have a closer look at the middle terrain tab the road network is currently in edit mode in this terrain tab we can switch the road network between edit mode and build mode in build mode the final road network is generated the terrain is adjusted to the road network shape and terrain vegetation like grass and trees is removed with this edit and build mode workflow the tool integrates well with all terrain tools on the unity asset store switching the road network to build mode is done by pressing the build terrains button but we do have some options here for final builds we usually want all options active during testing however we can speed up the processing and workflow for a scene with multi-terrain setup it is possible to select the terrain tile we are currently working on this can also be done by ctrl alt click on the specific terrain tile in the scene this is probably the easier way we can choose to build the selected road only this is useful for example when working on a complex road in a hilly area and to quickly view the final results we also have road network specific options for example calculate light map uvs and build lod groups these two options are not really needed during testing while working on the road network let's switch to build mode by pressing the build terrains button this process can take a few seconds depending on the complexity of the road network when finished the terrain height map is adjusted to the road shape trees and detail vegetation near the road is removed the inspector now shows a different set of controls we can raise the road network above the terrain this can be used to deal with z fighting with the terrain sea fighting with the terrain can also be dealt with through the easy roads 3d shader terrain offset options this will be covered in another tutorial generally you want to keep the rays value at the default value of around 0.02 we can switch back to edit mode and continue working on the road network the other options are more related to final terrain tweaks and the state-of-the-road network object we can smooth in indent and surrounding areas we will look more at these indent and surrounding areas in a minute when we continue with the road options reapply critical heights you may want to do some manual terrain changes after the terrain is adjusted it is recommended to do this at the end when the road network is ready and there will not be any further changes to the road shapes when doing so changing the height map may result in the terrain overlapping the roads which is not what we want this reapply critical heights button can be used to fix this and level the terrain with the road again in these areas let's have a quick look at this and raise the terrain a little bit near the road the opacity strength is a little bit too much but let's see what happens when we press reapply critical heights the critical area near the road is restored and leveled with the road again preserved terrain contours when roads are positioned higher above the original terrain the terrain will also raise the preserved terrain contour slider can be used to balance between an artificial look and a more natural look preserving the original terrain detail and contours the area of the terrain we are working with is relatively flat area so there will not be much noticeable difference but you can experiment with this in a hilly environment one thing to take into account here is that this option will smoothen the terrain over the surrounding distance as mentioned we will look at the surrounding control in a minute when we will look further into road specific settings we also have some road network related options the finalize option will remove all script components from the objects in the road network this should only be used when work on the road network is completed and when the scripting api is not required at run time the scripting api is used to create roads at runtime or to control traffic on the road network so if that is what you'll be doing then the road network should not be finalized also when actually finalizing the road network it is recommended to backup the scene before doing this that way you'll always be able to make changes at a later stage we can export the row network if we want to make changes in a modeling application mesh assets in project folder unity stores dynamically generated meshes in this case the road meshes in the scene file if you prefer these assets to be physically present in the project folder the store mesh assets in project folder option is what you want to use storing the mesh assets in the project folder is for example required for unity prefabs also for this option this should be ideally used at the end when all work is finished additionally to this and recommend it in case you want to use a prefab to move the road network to another scene there's an easier more efficient way to do that try this load both scenes in the hierarchy drag the road network object from the original scene to the target scene and only save the target scene that way the road network will remain fully editable let's switch the road network object back to edit mode and look a little bit deeper into the various options we have to further work on the road network earlier in this video we created new road objects using road types this is the recommended way but roads can also be added with no road type selected and by setting the width and assigning a material this is useful for roads or other objects that are only required once or twice we add the object to the scene and shift-click to add road markers and create the road shape let's have a look at the inspector the first tab on the left the road properties are displayed in five sections the main road settings side objects marker settings the option to bake the road shape in the terrain splat map and the cam flyover option to quickly move over and view the road from start to end we can open each section because of the comprehensive list of options in each section several sections being open at the same time may be unclear and perhaps even a little bit overwhelming in the beginning when just starting working with easy roads 3d an easy way to prevent several sections being open at the same time is by holding the shift key when opening a section other open menu sections will close let's go through each section at the top we have the main road settings we press the shift key so all other sections are indeed closed we have a range of options here in the main road section at the bottom we can expand the options with additional settings this option can be used to tidy up the inspector when it turns out that you will generally not use these additional options we can see here that indeed no road type is selected for this new road the displayed road properties depend on road type selection in this case the road width and material options are visible and editable because no road type is assigned we can still select a road type if we want the road will update according to the primary road type settings and since now a road type is assigned the road width is disabled but still visible as a reference material options are no longer displayed if necessary we can change the road width or material in the road type settings we already have the primary road type selected we can change the road width and the material further below this materials drop down by the way can be used for quick material selection all materials in the road material project folder will be displayed here this folder so if you drop your road materials here these materials will also appear in the drop down for quick selection after changes to the road type we can press the update scene instances button at the bottom this will update all the road and crossing connection objects in the scene that are based on this road type so now we have a road based on the primary road type once again for a more complex road network infrastructure it is recommended to work with road types that way the system will know which connection prefabs are available matching roads can snap to each other and crossings can be inserted automatically and the row network will also be better manageable in a later stage when a road object is based on a road type the values and state of all the controls in the main road settings are inherited from the selected road type generally these settings do not need attention unless you want to add some variation for the selected road as we already saw visibility of the control options can be minimized and expanded with additional settings to your preference all of these settings will be discussed in depth in a separate more advanced road options tutorial for now you could play around with these settings to see what they do here for example we can control the bumpiness of the road we will actually look at this in a minute there are for example also material and decal options which are useful for smooth road transitions the next section is side object related the same side object category options are displayed with the same list of side objects as in the side object manager in this section we can activate side objects for the selected road we will get to that in a minute let's first continue with the road marker options just like for the road object in general for road marker sections we have various options to control the shape of the marker section let's first remove this road and continue with the roads we already created before road objects can be removed from the hierarchy from the main road section in the inspector and with shift control r we can select road markers by clicking the blue handle the inspector shows which marker is selected as we already saw when we want less detail in a section we can remove the selected markers using shift r to add more detail to a road section markers can be inserted with the i key the new marker will be inserted at the mouse position the hotkey section in the manual is a useful resource for this type of options the most right info tab in the inspector toolbar includes a direct link to this page on our website we can move markers in all directions we find that the easiest and most flexible way for this is by dragging the horizontal square when we press the ctrl key the marker will snap to the terrain height at that position this is useful in hilly areas and when the road should stay aligned with the terrain multiple markers can be selected by keeping the shift key pressed when selecting a road marker and all road markers can be selected with shift z marker changes also side object related will affect all selected markers when two markers are selected shift z will select all markers in between these two markers when two markers are selected with markers in between them there will be marker alignment options in the inspector just play around with these options to get a feeling what they do alignment changes can always be undone distribute y evenly is for example useful to align road markers on the side of a mountain all marker heights will be adjusted according to the height difference between the selected two markers and the distance between these markers we will look more into these alignment options with clear terrain specific examples in another road specific video but the options are self-explanatory and can be tested easily in a similar fashion as what we just did with the distribute y evenly option in the inspector we have various other options in the marker settings we can add tilting to the selected marker let's zoom in a little bit the road can also be tilted directly in the scene using the unity rotation tool which can also be activated with the e key the next option in the inspector is road shape related the control type by default this spline controller is used resulting in gently winding roads but we do have other options here for straight and circular sections these three control types give more control over the road shape and are for example useful for creating race tracks let's move to an area where we have a little bit more room to create a short racetrack section we create a new road object add some road markers we can make this section for example circular moving the surrounding markers will change the circular shape you want to experiment with this to get a feel how the circular shape adapts to various marker position changes we can make this section a straight section straight sections can be followed by a circular section and vice versa you want to avoid consecutive straight sections spline controller sections can be anywhere we now have a short race track section with these typical straight and circular road sections so these additional controller options work well for these types of tracks but also for any other road where you want to have a little bit more control over the shape of specific sections the circular section can for example also be used to create a sharp 90 degree turn let's move back to the other roads we created add some curves here in road options we can set the bumpiness of the road let's change the orientation a little bit for a more horizontal view we can set minimum and maximum ranges for the size of the bumps and for the distance of each bump this will create randomness between these minimum and maximum values this randomness can be adjusted per marker section for primary roads you want to use lower bumpiness values over long distances for more rural roads higher bumpiness values over shorter distances the higher the y offset values and smaller the distance values the more noticeable the effect these more noticeable bumps could be used for example on older rural roads to add distinct shapes and variations in some sections but generally you want to use lower values just to make the road look less artificial and more realistic next are terrain control options in the build options we already saw controls to smoothen indent and surrounding areas the size of the terrain that will be adjusted to the road shape depends on the terrain specifications especially the terrain height map resolution relative to the terrain size to guarantee the best possible results the terrain must be leveled with the road over a certain minimum distance sideways away from the roadsides these default values can be customized in general settings scene settings the indent value represents this distance sideways over which the terrain will be adjusted to the same height as the road the lower the terrain resolution the higher this minimum indent value will be we can check what this minimum value is by entering a low number like 0. it changes to 1.5 so 1.5 is the minimum value for the terrain in this scene the surrounding value represents the distance over which the terrain will be leveled from the road height back to the original terrain height there is no minimum limit for this but you want to give this at least a value of 1 or higher otherwise the results will not look smooth the value in the max indent surrounding control will be used as the maximum value for inspector indent and surrounding minimum maximum range slider controls let's go back to the road marker options both indent and surrounding values are customizable per marker these indent and surrounding areas can be highlighted and visualized in the scene view window the default state for these visibility options can also be set in general settings scene settings the indent and surrounding areas are clearly visible showing these surfaces can also be useful in hilly areas where the terrain breaks through the road even when the road is partially overlapped by terrain the road shape will still be clearly highlighted and visible in edit mode and you will also have a clear visual reference of how the terrain will be adjusted the spacebar can be used to toggle these highlighted surfaces quickly on or off if that does not work then make sure the focus is actually on the scene view window instead of for example the hierarchy or inspector so we can tweak these indent and surrounding distances per marker this can be used in various ways to control the shape of the final terrain for example let's raise a marker further above the terrain the surrounding edges clearly snap to the terrain in build mode we can see the final result with the terrain adjusted let's build this road only the terrain is adjusted exactly according to the shape of the highlighted surfaces we will now adjust the indent and surrounding values for this marker section so we switch the road network back to edit mode we change the values in the inspector this will result in smoother terrain see how the highlighted surfaces update to the new values there are some overlap here that may be a little bit too much we will see yes the terrain is not 100 smooth here but we can easily fix that we will decrease the surrounding value a little bit in edit mode something like this customizing these indent and surrounding values can for example also be used to flatten the terrain for buildings right next to the road or for example to create parking zones in hilly areas the other options like terrain deformation and vertex color related or more advanced we will cover these in another video just like with the main road settings for this marker section in the inspector we also have the choice to show all marker options or only display those options that are more frequently used if you prefer that next is side objects first we will go back to the main side objects section here we can activate side objects for the road itself let's first hide these highlighted surfaces again with the spacebar the focus must be on the scene view window for this to work activating a side object is straightforward click the check box next to the side object name let's activate the guardrail side object in this case the guardville will be auto-generated based on rules taking into account the terrain profile and the road shape after activating the side object a foldout arrow will appear clicking the arrow or the side object name will open the main settings of this side object for this specific road indeed auto generate is active for this road this is the default state for this specific side object which is set in the side object manager we will look at auto-generated side objects in a minute let's first see how we can control side objects when they are not auto-generated based on rules to do this we take the default marker active state checkbox the side object will no longer be auto-generated based instead it will be active on all marker sections we can also untick this box so no guardrails are created at all generally you want to use this state for side objects that will only be active on some marker sections we can activate the guardrails per marker section the reason for this workflow is that it'll be easier to activate the side object for a limited number of marker sections than having to deactivate it for all other marker sections this default marker active state can also be set in the side object manager we have more options here in the case of guard rails the random rotation option can be used to add damage or make this side object look less artificial or computer generated minimum and maximum ranges for the rotation angle can be set and minimum and maximum ranges for the density the distance over which these rotations will happen the guardrail will be generated randomly based on these minimum and maximum values you can play with the other settings they speak for themselves generally you want to set these values in the side object manager and optionally also in the road type section when the side object is auto activated for the involved road type that way we can use different default settings per road type for the same side object take for example the exact position of lamp posts relative to the side of the road this will probably vary per road type setting the road types up this way will speed up the workflow considerably and it will still be possible to change specific settings here to add variation for some roads if you want let's move on with the marker specific side object settings all active side objects will be available in the drop down here in the marker side object settings we only activated the guardrail for this road object so that will be the only side object listed here for this guardrail side object we have controls for both the left and right side of the road this behavior can be set in the side object manager instead of the default center position the position is set relative to the left side of the road so the guardrail will be generated relative to the left road edge because the side object will be generated relative to the road edge we also have the option to make it dual sided when dual sided is active the side object can be used on both sides of the road for this guardrail side object which is positioned relative to the left side of the road it means that marker controls will also be available here for the right side of the road we can deactivate and activate the guard rail for the selected marker section this can also be done for multiple marker sections let's close the main side object section so the focus is on the marker side object section only we can change the offset position relative to the start and end of the marker section this can be done directly in the scene view window ctrl h will activate and deactivate offset handle display the side object will update when dragging the handles this offset can also be set in the inspector let's activate all marker sections again we can also add manual rotations to side objects per marker section for side objects like guardrails and fences this can be used to add additional usually more significant damage the rotation angle can be entered the distance over which the rotation will occur and the center position of the rotation you want to experiment with these options and values to get a feel of how this works generally you want to use stronger rotation angles that is about it for the side object marker options let's go back to the main side object section we already saw that initially auto generate was toggled on for the guardrail side object let's reset the guardrail and change it back to auto generate by deactivating and reactivating it or by pressing the reset button below auto generate is another way to add side objects to a road side object sections will be generated based on a set of rules for the road shape and the terrain profile this behavior is set in the side object manager let's also activate the two sharp turn sign side objects these two side objects will also be auto-generated in sharp turns when the main road network object has focus each auto-generated side object section on a road object can be selected and customized directly in the scene view window this way we can for example deactivate a section in an area where we do not necessarily need it in edit mode the section will still be visible in transparent mode so it can still be reselected easily in build mode this section will not be generated let's move back to edit mode we can see that this guardrail section still has focus in edit mode clicking elsewhere in the scene or the close icon in the top right will remove the focus from the selected section we also have the option to change the side object preset when multiple similar side objects are activated for the selected road object let's do this for the sharp turn sign post section for which we activate it to different versions we can see that now the single post version is used for this auto-generated section we already mentioned that the rules for generating these objects are set in the side object manager each side object type has its own set of rules we can set rules for barrier type of side objects walls retaining walls in particular bridges and tunnels and props in general we will cover all this in depth in another side object specific tutorial so to conclude auto-generated site objects can be used to quickly create a road network with a variation of side objects positioned at strategic or appropriate spots the demo package includes several examples also for retaining walls bridges and tunnels here are some examples in the demo scene first we will look at how bridges are generated automatically we can move a marker up once the distance between the road and the terrain exceeds the set threshold distance in the side object manager a bridge section will be created retaining walls are generated in a similar way but in this case the height difference between the road and the terrain will only be at one side of the road here we have another typical bridge situation the road being higher above the terrain and a tunnel will be created when the road is actually lower than the terrain this is all auto-generated based on rules here we have another tunnel and retaining wall example these examples are all part of the version 3.2 plus demo scene the setup of these side objects can be reviewed and the options are all documented in the manual the last side object related topic we will cover in this introduction video is generating objects in the scene based on side object presets not involving roads in the new object tab there is a side object checkbox we can use this to do exactly that create objects that will only generate side objects no road this feature turns easy roads 3d into a diverse scene builder tool with many new options all in one package let's create a fence we add markers as you can see no road is created instead we see the spline curve visualized by a line all we have to do now is activate a fence side object we now have a fence object only it is also possible to create new presets for this which makes creating these types of objects even easier let's remove this fence object first take for example the fence object preset this preset is also created in general settings road types further below in the road type settings we can mark the object as is side object no road will be created and in this case we have the fence chain link side object activated that is it the fence will be built instantly when we create a new scene object based on this preset we also have options here to customize the side object settings per preset overriding the default settings in the side object manager let's add a fence object in the demo package we have a similar preset for power lines all of these side objects are generated through the easy road 3d framework the demo package includes a variety of examples that you can review and more will follow and you can use your own assets within this framework create presets for these assets and build your own unique side objects it is very easy and fun to experiment with we will look more into this on another side object specific video let's move on to the last road related option in the inspector add shape to terrain splat map laying out roads over the terrain can look a bit artificial to make this look more natural we can blend the roads more with the terrain by baking the shape of the road in the terrain splat map to do that we activate this feature we can now select to which terrain layer the shape should be added we will use the third layer we have options to expand the size of the shape blend the shape smoothly with the original terrain and set the opacity level for the shape in this case we want to use a lower opacity value to blend the shape with the original grass this splat mask option is not active yet the shape of the road will actually be baked in the terrain when switching to build mode we can test that the road does indeed blend better with the terrain and does look more natural now these terrain splat map options can also be set for road types that way it is not necessary to do this here for each individual road like activating side objects for road types this too will speed up the workflow okay so that completes all of the road options but there is one more feature here at the bottom cam flyover this chem flyover feature can be used to quickly view the road shape from start to end we can move the cam along the path and position it higher above the road if we want in edit mode this feature is useful to quickly view the road shape and the alignment and positioning of side objects especially auto-generated side objects but generally you want to use this option in build mode to check the final result with the terrain also adjusted it is possible to automatically move the cam over the road the cam speed can be set but we usually do this manually doing this manually results in a faster workflow and it gives more control you can for example move faster over straight road sections and you can easily stop to view critical areas that may need attention so that concludes this introduction video we hope you enjoyed watching it as mentioned at the start a summary with quick links to each topic can be found below in the description when coming back here to watch a specific part again you can easily select the direct link to that topic we ourselves will be back soon here with more videos so you can subscribe to this channel if you have not already done that and you can always contact us if you have questions all contact information can be found in the readme file in the easy roads 3d root directory in the unity project folder or you can contact us through our website www.easyroads3d.com the link is included below in the description bye for now
Info
Channel: EasyRoads3D
Views: 19,304
Rating: undefined out of 5
Keywords: EasyRoads3d, Unity, Unity3d, Game Development, Road Networks, 3D Road Networks, EasyRoads3D Tutorial
Id: fIcdU8AveXA
Channel Id: undefined
Length: 68min 9sec (4089 seconds)
Published: Mon Apr 12 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.