My first texture replacement. [Updated]
Posted: 03 Jul 2016, 19:44
Update:
After about 5 revisions I finally have these textures pretty much where I wanted them before letting them loose into the general public. My experience is mostly with modeling, texturing is still pretty new to me, so I am sure there is plenty of room for improvement on these, but I am still fairly happy with the results.
https://mega.nz/#!xJVHGQ5K!dyRwJYSasRxF ... -1m8KhTPOU
If you haven't already enabled the extra shader options for terrain textures in your settings.cfg, make sure to follow the link at the very bottom of this post to find instructions on what you need to do. Otherwise things wont look right for you, since those features are disabled by default.
Here are a couple of new screen shots. Not a lot has changed; basically cleaned up a couple of slight seams I missed, added a bit more grunge to the area between the stones and adjusted the specularity a bit.
https://postimg.org/image/9xc7twynr/
https://postimg.org/image/4w9u2a5nb/
https://postimg.org/image/68isw0uyf/
==========
Original Post:
I've been wanting to mess around with the advanced material options offered by OpenMW for a while now, so I finally got around to trying things out with my first texture replacement over the past couple of days. I redid one of the cobblestone textures used in the Hlaalu towns, namely tx_wg_road_01.dds.
Here are a few screen shots of my first pass on this texture replacer in action over in Balmora. I still need to do a few edits before they will be done, but I thought they already looked decent enough to at least share some images with you all.
https://postimg.org/image/545sawx3l/
https://postimg.org/image/5yz6c07dj/
Once I have them fixed up I will post them somewhere to share with those interested in trying it out first hand. For those who would like a better idea of the work flow I used while making this, feel free to follow on with the rest of the post. Otherwise, if you don't care, you can consider this the end here.
==========
I did my best to stay fairly true to the vanilla texture, using it as the basis for a high poly mesh (~5 million verts) and as the base layer of my remake of the diffuse texture, though I did make some changes to allow it to tile better. I started with the model in Blender by taking a plane and subdividing/extruding it as necessary to fit each of the individual stones, added a subsurf and brought the edges down a little bit to round off the edges, applied the subsurf, added a multires modifer and then used a series of displacement modifiers to give a nice stone look to them. After that I added a separate plane that I subdivided a bunch and added a multires to and a few displacements to fill in the gaps between the stones with a bit of roughed up dirt with some small pebbles thrown in.
The stone faces were also split into 4 different objects. This allowed me to use array modifiers on just the bits that needed them to avoid a lot of unnecessary geometry from being generated. Basically there was the main portion that never touched any edges and therefore needed no arrays. Then the stone in the corner was on its own and had 2 arrays one to get it into the adjacent corner along x then a second array along y to fill the remaining 2 corners. Then the stones that clipped off the left side were in an object of their own that had an array modifier set to the x axis to copy them to the right side. The same was done for the stones that clipped off the top edge to copy them along y to the bottom edge. These arrays had to be placed after the multires AND displacement modifiers to make sure that the copies had the same displacement as the originals so they would wrap properly in the baked out texture channels.
Once the meshes were in place I set up an orthographic camera (camera that doesn't do depth distortion) above the mesh pointing down set to match the size of the mesh and in render it was set to my desired output of 1024x1024. I enabled the ambient occlusion in the world settings tab and also added a sun lamp directly above and pointing straight down. Once this was all in place I was able to render everything out to have an ambient occlusion (AO) layer for use in the texture work later on.
Baking the normal map to a simple plane was fairly straight forward and easy, you can find plenty of tutorials on how to do this with a web search. What wasn't so easy was getting a decent height map out that used the full 0-255 spectrum. In the end I had to go through the painful process of applying all the modifiers on the 5 different meshes I was using and combine them, into a single mesh. Crashed about a half dozen times in the process because 8 GB just wasn't nearly enough memory to get the heavy joins done while still keeping the state of previous steps and rendering to the viewport, so I had to disable undo and set the viewport to bounding box display mode. Once combined though, I was able to give it a new material set to shadeless and used one of the procedural texture options, blend, to create a gray scale ramp where the lowest point was black and the highest point was white. I had to go with generated and set the mapping to z for all 3 axes. Then I used my previously created orthographic camera setup to render out the height map.
The texture work (besides the baked bits done in Blender) was all done in GIMP. I started with the original texture and enlarged it to 1024^2 from the original 256^2. I then gave it a Gaussian blur pass to help eliminate some of the detail and baked in lighting data. I brought in that AO render from Blender of the stone faces without the dirt background both to use as an overlay and a quick and easy way to get a selection mask by being able to select the transparent bits between the faces. I made a copy of that and set one to darken only with 100% opacity and the other on top of that as burn set at about 10-20% opacity. I added a bunch of cloud and noise layers that mostly got converted to alpha masks before the content of their layers were deleted and replaced with solid colors fills. These were set at varying levels of opacity until I was happy with the results. I also used one of the AO layers to get a selection of the gaps between stones faces that I then either shrunk or grew a few pixels and applied a feather to the selection to use in adding an alpha mask to a few of the layers I created to add some dirt/grunge just to the areas between the stones and slightly overlapping the stone edges to blend them better.
When I was finally happy with the results I created a new layer from all visible layers and adjusted the color curves on it until it was fairly close to the original texture in color and brightness. The result became the finished diffuse for my texture replacer. I then made a copy of that, desaturated it (using the luminosity option), and then adjusted the result with the color curve again to make it darker for use as the specularity data.
Once all 4 material channels were finally done, I then went through the task of combining them as necessary and exporting them as .dds files from GIMP. The diffuse/specular texture was exported using dxt5 compression, while the normal/height map texture had no compression. They both had mipmap generation enabled as well. Once these were exported my work was done (for the most part). I just had to toss them into Data/Textures and fire up the game to test them out (once the settings.cfg was updated with the proper shader settings anyhow). If you are unaware of the details on which channels belong where and what config settings need to be added/changed then check out the wiki page on texture modding:
https://wiki.openmw.org/index.php?title=TextureModding
After about 5 revisions I finally have these textures pretty much where I wanted them before letting them loose into the general public. My experience is mostly with modeling, texturing is still pretty new to me, so I am sure there is plenty of room for improvement on these, but I am still fairly happy with the results.
https://mega.nz/#!xJVHGQ5K!dyRwJYSasRxF ... -1m8KhTPOU
If you haven't already enabled the extra shader options for terrain textures in your settings.cfg, make sure to follow the link at the very bottom of this post to find instructions on what you need to do. Otherwise things wont look right for you, since those features are disabled by default.
Here are a couple of new screen shots. Not a lot has changed; basically cleaned up a couple of slight seams I missed, added a bit more grunge to the area between the stones and adjusted the specularity a bit.
https://postimg.org/image/9xc7twynr/
https://postimg.org/image/4w9u2a5nb/
https://postimg.org/image/68isw0uyf/
==========
Original Post:
I've been wanting to mess around with the advanced material options offered by OpenMW for a while now, so I finally got around to trying things out with my first texture replacement over the past couple of days. I redid one of the cobblestone textures used in the Hlaalu towns, namely tx_wg_road_01.dds.
Here are a few screen shots of my first pass on this texture replacer in action over in Balmora. I still need to do a few edits before they will be done, but I thought they already looked decent enough to at least share some images with you all.
https://postimg.org/image/545sawx3l/
https://postimg.org/image/5yz6c07dj/
Once I have them fixed up I will post them somewhere to share with those interested in trying it out first hand. For those who would like a better idea of the work flow I used while making this, feel free to follow on with the rest of the post. Otherwise, if you don't care, you can consider this the end here.
==========
I did my best to stay fairly true to the vanilla texture, using it as the basis for a high poly mesh (~5 million verts) and as the base layer of my remake of the diffuse texture, though I did make some changes to allow it to tile better. I started with the model in Blender by taking a plane and subdividing/extruding it as necessary to fit each of the individual stones, added a subsurf and brought the edges down a little bit to round off the edges, applied the subsurf, added a multires modifer and then used a series of displacement modifiers to give a nice stone look to them. After that I added a separate plane that I subdivided a bunch and added a multires to and a few displacements to fill in the gaps between the stones with a bit of roughed up dirt with some small pebbles thrown in.
The stone faces were also split into 4 different objects. This allowed me to use array modifiers on just the bits that needed them to avoid a lot of unnecessary geometry from being generated. Basically there was the main portion that never touched any edges and therefore needed no arrays. Then the stone in the corner was on its own and had 2 arrays one to get it into the adjacent corner along x then a second array along y to fill the remaining 2 corners. Then the stones that clipped off the left side were in an object of their own that had an array modifier set to the x axis to copy them to the right side. The same was done for the stones that clipped off the top edge to copy them along y to the bottom edge. These arrays had to be placed after the multires AND displacement modifiers to make sure that the copies had the same displacement as the originals so they would wrap properly in the baked out texture channels.
Once the meshes were in place I set up an orthographic camera (camera that doesn't do depth distortion) above the mesh pointing down set to match the size of the mesh and in render it was set to my desired output of 1024x1024. I enabled the ambient occlusion in the world settings tab and also added a sun lamp directly above and pointing straight down. Once this was all in place I was able to render everything out to have an ambient occlusion (AO) layer for use in the texture work later on.
Baking the normal map to a simple plane was fairly straight forward and easy, you can find plenty of tutorials on how to do this with a web search. What wasn't so easy was getting a decent height map out that used the full 0-255 spectrum. In the end I had to go through the painful process of applying all the modifiers on the 5 different meshes I was using and combine them, into a single mesh. Crashed about a half dozen times in the process because 8 GB just wasn't nearly enough memory to get the heavy joins done while still keeping the state of previous steps and rendering to the viewport, so I had to disable undo and set the viewport to bounding box display mode. Once combined though, I was able to give it a new material set to shadeless and used one of the procedural texture options, blend, to create a gray scale ramp where the lowest point was black and the highest point was white. I had to go with generated and set the mapping to z for all 3 axes. Then I used my previously created orthographic camera setup to render out the height map.
The texture work (besides the baked bits done in Blender) was all done in GIMP. I started with the original texture and enlarged it to 1024^2 from the original 256^2. I then gave it a Gaussian blur pass to help eliminate some of the detail and baked in lighting data. I brought in that AO render from Blender of the stone faces without the dirt background both to use as an overlay and a quick and easy way to get a selection mask by being able to select the transparent bits between the faces. I made a copy of that and set one to darken only with 100% opacity and the other on top of that as burn set at about 10-20% opacity. I added a bunch of cloud and noise layers that mostly got converted to alpha masks before the content of their layers were deleted and replaced with solid colors fills. These were set at varying levels of opacity until I was happy with the results. I also used one of the AO layers to get a selection of the gaps between stones faces that I then either shrunk or grew a few pixels and applied a feather to the selection to use in adding an alpha mask to a few of the layers I created to add some dirt/grunge just to the areas between the stones and slightly overlapping the stone edges to blend them better.
When I was finally happy with the results I created a new layer from all visible layers and adjusted the color curves on it until it was fairly close to the original texture in color and brightness. The result became the finished diffuse for my texture replacer. I then made a copy of that, desaturated it (using the luminosity option), and then adjusted the result with the color curve again to make it darker for use as the specularity data.
Once all 4 material channels were finally done, I then went through the task of combining them as necessary and exporting them as .dds files from GIMP. The diffuse/specular texture was exported using dxt5 compression, while the normal/height map texture had no compression. They both had mipmap generation enabled as well. Once these were exported my work was done (for the most part). I just had to toss them into Data/Textures and fire up the game to test them out (once the settings.cfg was updated with the proper shader settings anyhow). If you are unaware of the details on which channels belong where and what config settings need to be added/changed then check out the wiki page on texture modding:
https://wiki.openmw.org/index.php?title=TextureModding