This Renderman shader applies a street texture to a surface,
consisting of an asphalt road, two stripes on the edges of the lanes,
and a center stripe.Shaders
two_lane_blacktop - A procedural shader for a street surface
The user can control several parameters, including the color, length and width of the stripes, the turbulence of the asphalt, etc.
The anti-aliasing of the stripe could use some improvement, especially where it recedes into the background.
Parameter |
Data Type |
Usage |
Example |
---|---|---|---|
asphalt_turbulence |
float >= 1.0 |
The "turbulence" of the asphalt, smaller values give bigger chunks |
asphalt_turbulence = 16 |
stripe_rotation |
float 0 to 360 |
The degrees of rotation of the stripes on the surface, typically 0 or 90. |
stripe_rotation = 90 |
center_stripe_color |
RGB color |
The color of the center stripe |
center_stripe_color = color(1, 1, 0) |
edge_stripe_color |
RGB color |
The color of the two edge stripes |
edge_stripe_color = color(1, 1, 1) |
stripe_width |
RGB color |
The width of the stripes |
stripe_width = 41 |
center_stripe_count |
integer > 0 |
The number of center stripes on the length of the road surface |
center_stripe_count = 80 |
center_stripe_length |
float 0.0 to 1.0 |
The painted proportion of the center stripe area. |
center_stripe_length = 0.5 |
fuzz_s |
float 0.0 to 1.0 |
The anti-aliasing value for the width of the stripes |
fuzz_s = 0.05 |
fuzz_t |
float 0.0 to 1.0 |
The anti-aliasing value for the length of the center stripes |
fuzz_t = 0.05 |
View the two_lane_blacktop shader source
Download the two_lane_blacktop package for Presenter 3D