Recently I came with an ide how I can use VrayDirt map to create masks for different materials that should show up on one geometry. Example below show how you can use it for roadmarking, which have been struggle to convert into geometry from splines, projected on the road surface. By using VrayDirt whole process is much easier and quicker.
Lets say that’s your terrain and splines that defines where the road is and where the road markings are:
First you want to create instance of those splines:
Then you want to make those instances into references, that means whatever modifiers you will add in the reference they wont show up in the original spline, but if you modify original spline then it will affect reference, and new spline will be processed by modifiers stack.
Now you want to add extrude modifier for both of the references, value have to be adjusted in the way, that you will be 100% sure it goes through the surface you want to project the spline on. It depends on the project, and how far your original spline is from the surface.
Now you will have to set up whole thing in the materials editor, lets say those are your materials for ground, road and road markings:
You will need VrayDirt for each spline
And as you are interested to make a mask inside the area that spline defines you should use setup like this:
Once you create proper vraydirt maps you will have to add referenced splines that have extrude modifier on them to the responding vray dirt map
Once it’s done you can set up references in a way they wont appear in the render
Once its done, you can create new layer, add references to it, and hide the layer
Now you will have to create VrayBlendMateiral, and put the ground material as a base material, road material as the coat1, and road markings as a coat2, put responding vraydirt maps into Blend1 and Blend 2 slots of VrayBlendMateiral
Final render will look like this:
Lets simulate by using FFD modifier, that your client requires update and he sent you new splines for road markings. Using this technique you will have to just attach new splines to previous one, and delete the old ones. Reference on hidden layer will update automatically
You can create more “coats” depending on your needs, for example lets add some puddles
updated road with puddles will look like this,
If you want to have ridiculous ammount of puddles? – not a problem, just edit the spline and render again 😉