svictor
Registered
As seems more modders looking for ways to get into new PBR road material creation. Here I will try share some of related info from my experience.
Note this should not be considered as definite way of doing things, but hopefully it will give some insight about how some of the things could be done, and provides some help.
The tool that I uses for this guide are Blender & GIMP & Krita & AwesomeBump(all opensource programs), and using Dundrod track as an example.
Create groove UV mapping in Blender
To create proper groove UV mapping, it requires to create a new UV mapping in any unused secondary UV channels of the road object, since groove requires and follows with player's best driving line which different from road's main UV mapping that follows along the center line.
I do this in blender by creating a groove line curve, then attaching a groove surface piece(with the new groove UV map) as Array to the groove line curve, then apply all modifiers and merge all groove surface pieces into one single piece and transfer the groove object UV mapping into each of the road objects' secondary UV channel. Below are some of the steps explain.
1. Create groove line curve, notice that groove line follows best driving line rather than main road center line.
2. Create a section of groove surface piece with groove texture UV mapping, then add array & curve modifiers that pointed to groove line curve. (you may further subdivide this piece for additional smoothness)
3. After subdividing, applying all modifiers and merging all groove pieces, notice how the groove is different from main road. And before continue, it is important to get the groove size correct for best visual.
Note: you also need to find & join together start & end of the groove mesh (remove any overlapping section), then apply "Follow Active Quads" from "UV" menu, this is to make sure that UV mapping is continuing through the entire groove mesh, otherwise it may cause visual problems in later steps with transferring UV mapping.
4. Next step is to snap this new groove mesh onto the main road surface(notice that I have also extended some groove section further to cover the side road sections). This can be done by switch to top down view(press Num7) in Edit mode, enable "Face" snap and "project individual elements". Then select all groove mesh, press "G" > press "Z" > press "Enter", and all mesh will be snapped to the ground surface(you may want to hide all none surface objects first).
Also note that, if you find snapping to be difficult to do (for example for track with big elevation changes or complex terrain), you can also manually move meshes vertically as close to the road surface as possible, and it will still work with UV transfer.
5. Now select road surface object, and MUST select "UVchannel_2" from right panel (make sure to do this for every road objects that will have groove mapping), this channel will be used for storing the new groove mapping.
6. With road surface object selected, Ctrl+Click on the groove object from right side layer panel to also select & highlight groove object (make sure groove object is the main selection). Then open "Transfer Mesh Data" from menu (or Ctrl+L), and MUST make sure "Data Type" is set to "UVs", and "Face Corner Mapping" set to "Nearest Face Interpolated". Repeat this step for all road objects.
Note: "Transfer Mesh Data" has many other usage and is a very powerful tool.
7. Now with all road objects mapped with groove in secondary UV channel, they can be exported to game for assigning new PBR material in material editor(make sure to set correct groove UV channel letter in material editor, in this case it should be "UV_B" which matches UVchannel_2 ). Here is how groove looks like with "Manual Groove" option on:
More continues in the posts below.
Note this should not be considered as definite way of doing things, but hopefully it will give some insight about how some of the things could be done, and provides some help.
The tool that I uses for this guide are Blender & GIMP & Krita & AwesomeBump(all opensource programs), and using Dundrod track as an example.
Create groove UV mapping in Blender
To create proper groove UV mapping, it requires to create a new UV mapping in any unused secondary UV channels of the road object, since groove requires and follows with player's best driving line which different from road's main UV mapping that follows along the center line.
I do this in blender by creating a groove line curve, then attaching a groove surface piece(with the new groove UV map) as Array to the groove line curve, then apply all modifiers and merge all groove surface pieces into one single piece and transfer the groove object UV mapping into each of the road objects' secondary UV channel. Below are some of the steps explain.
1. Create groove line curve, notice that groove line follows best driving line rather than main road center line.
2. Create a section of groove surface piece with groove texture UV mapping, then add array & curve modifiers that pointed to groove line curve. (you may further subdivide this piece for additional smoothness)
3. After subdividing, applying all modifiers and merging all groove pieces, notice how the groove is different from main road. And before continue, it is important to get the groove size correct for best visual.
Note: you also need to find & join together start & end of the groove mesh (remove any overlapping section), then apply "Follow Active Quads" from "UV" menu, this is to make sure that UV mapping is continuing through the entire groove mesh, otherwise it may cause visual problems in later steps with transferring UV mapping.
4. Next step is to snap this new groove mesh onto the main road surface(notice that I have also extended some groove section further to cover the side road sections). This can be done by switch to top down view(press Num7) in Edit mode, enable "Face" snap and "project individual elements". Then select all groove mesh, press "G" > press "Z" > press "Enter", and all mesh will be snapped to the ground surface(you may want to hide all none surface objects first).
Also note that, if you find snapping to be difficult to do (for example for track with big elevation changes or complex terrain), you can also manually move meshes vertically as close to the road surface as possible, and it will still work with UV transfer.
5. Now select road surface object, and MUST select "UVchannel_2" from right panel (make sure to do this for every road objects that will have groove mapping), this channel will be used for storing the new groove mapping.
6. With road surface object selected, Ctrl+Click on the groove object from right side layer panel to also select & highlight groove object (make sure groove object is the main selection). Then open "Transfer Mesh Data" from menu (or Ctrl+L), and MUST make sure "Data Type" is set to "UVs", and "Face Corner Mapping" set to "Nearest Face Interpolated". Repeat this step for all road objects.
Note: "Transfer Mesh Data" has many other usage and is a very powerful tool.
7. Now with all road objects mapped with groove in secondary UV channel, they can be exported to game for assigning new PBR material in material editor(make sure to set correct groove UV channel letter in material editor, in this case it should be "UV_B" which matches UVchannel_2 ). Here is how groove looks like with "Manual Groove" option on:
More continues in the posts below.
Last edited: