Create Lane Markings
From the series: Getting Started with RoadRunner
Demonstration of creating lane markings including material properties, textures, and lane marking styles.
Published: 9 Apr 2020
Hello. This is Aidan. Today, we are going to be learning about lane marking creation within Roadrunner. For this tutorial, I have created a Demo folder within the Markings folder. The Markings folder is where most lane markings you use or create will be stored.
However, some markings that you use or create may be organized into other folders. For example, the Damage folder contains lane markings that are used to represent wear and tear on the roads, such as tar streaks, cracks, and more. Now let's talk about making your own marking.
Back in our Demo folder, you can see that I have assembled a Diffuse, a Normal, and Specular Map. If you are unfamiliar with these terms, diffuse is color. It is the physical appearance of your marking. Normal is texture. It makes things like this asphalt appear to actually be rough and uneven on the road, although in reality it is a flat 2D plane. Finally, our Specular Map controls how our material interacts with light. For example, it could make a car or a freshly painted marking shiny and reflective.
For this tutorial, I will be making a variant of the single solid white lane marking. This is a nice, crisp marking. But what if I want it to look aged as though it was on the street for a long time and has begun to fade? For that, I will need to create a new lane marking.
Back in the Demo folder, I have already gathered the textures to do so. Naturally, if you wish to create your own lane marking that is different from mine, you will need to prepare your own textures beforehand. It is also possible to create a lane marking without normal and specular textures. At minimum, all you need is the diffuse for color.
Once you have prepared your textures, right-click anywhere within the folder and select New Material. Give this material a name. In your material, you should see three slots for a Diffuse Map, Normal Map, and Specular Map.
With your materials selected, click and drag on each Texture Map to put it into its equivalent slot. Make sure you click and drag. If you just click, you will select the Texture Map and you'll have to re-select your material before clicking and dragging.
You should now see that your material has our texture maps attached and that we can edit it. If you've attached the wrong Texture Map, either right-click the square and click Clear to remove it before attaching the right Texture Map, or simply drag a Texture Map into any other square and it will overwrite that square.
Now let's take a look at the different attributes on our material that we can edit. Starting off, we have the Texture Size attribute. This is fairly straightforward. It allows you to increase or decrease the size of your texture maps as they are looped infinitely around your object. Very useful if you want to make these cracks larger or smaller.
Next let's talk about Diffuse Color. This is an addition to your Diffuse Map and allows you to overlay a specific color over your entire material. Leaving it at white will turn off its influence so that only your Diffuse Map determines the color of your material.
Next, the Specular and Roughness attributes would be used to determine your object's shininess if you did not have a specular map. Further down, the Emission Map and Emission attribute are used in case your object emits light. The Emission Map determines how or what part of your object emits light. And the Emission attribute sets its intensity.
This is mostly used for compatibility with programs like Unity or Unreal, in case you explore your Roadrunner scene to them.
Finally, at the bottom of our list, we have Shadow Caster and Shadow Receiver. These do exactly what the names imply they do, allowing our material, once attached to an object, to cast shadows and have shadows cast upon it. Leave those checked.
Now that we are familiar with the material, let's talk about making a lane marking. To start, right-click anywhere in the folder and select New Lane Marking. Give it a name.
You can see various attributes within the Lane Marking tab, which we will go over in a moment. For now, let's start by bringing this out a little bit and assigning a material.
As you can see, we assigned a material to our lane marking the same way we would assign texture maps to a material. Similarly, you can right-click Clear to delete a material assigned to a lane marking, or drag in alternate materials on top of an existing one to overwrite it.
Now let's go over some of the attributes. As you can see here, we have a preview of what our lane marking will look like. This preview will change and update as we alter different attributes.
And the first attribute is Marking Type. It allows you to alter the appearance of your lane marking.
Next up is Width, which allows you to alter the thickness of your lane marking. This applies regardless of marking type.
We will follow up with Separation. Separation controls how far the two lanes are from each other. You can mix and match this with Width. Note that this does not apply on the single lines.
These next attributes will be easier to visualize with a marking drawn on the map. Select the Marking Curve tool, and then select the lane marking. Use right-click to drop it down. I'm going to place three points, so we have a little bit of a curve.
Now let's click on our lane marking again. You should see our usual Attributes screen. Dash Length controls the length of the dashes. Once we finish dragging it in here and let go, it will update in our scene.
Dash Spacing controls the distance in between dashes. Note that both of these attributes will not apply on solid lines.
Wrapping things up, Default Color applies exactly the same as it did in the material tab, allowing you to overlay a color over your entire material. Leaving it white overlays no color and maintains the standard material. Finally, curved space texture alters how your material and texture maps apply to the object itself.
Zooming in, we can see that curved space texture has altered how this material applies to our lane marking. Sometimes it may be necessary to use curved space texture. But for this particular marking, we will leave it off.
For the final part of this demonstration, I will select the marking curve itself and change its color to make it a little more visible. Now, several of the attributes on the marking curve are self-explanatory. But let's talk about a couple that aren't.
The Blend Distance attributes blend a marking into the ground below it. This is useful if you want to make your edges look less defined or if you want to make a marking look extremely old and faded away.
The Phase Shift attribute controls the offset of our dashes, along the marking curve. It goes all the way from zero to one, with one being a complete loop=around back to its original position. As you can see, there is no change between zero and one. But the dashes do interpolate between the two.
This is useful because our lane marking does not have the ability to control where our dashes appear on the marking curve. It can only control the length of the dashes and the spacing in between them.
Finally, let's talk about the sort index. When you draw in a marking curve, it will automatically appear on top of any other marking curves you have already drawn. All marking curves have a default sort index of zero.
By adjusting the Sort Index number, you can choose which markings appear above or below other markings. See how we are now underneath the street markings. Markings with a higher sort index number-- up here above markings with a lower sword index number.