(c) copyright Zehne Ziba Co., Ltd. For more information, please refer to copyright notice.
Du/Dv is a derivative of normal map and is usually used for water refraction. In this tutorial, we create a base texture with Photoshop filters, save it as TGA, and generate a Du/Dv map from our TGA file with TGAToDUDV utility.
[alert color=”blue”]I was always using NVIDIA Photoshop plugin to generate Du/Dv map. However after installing NVIDIA Photoshop plugin for Adobe Photoshop CS6, I noticed that DuDv function does not work correctly.[/alert]
Creating The Base Texture
Run photoshop, open up a new document by pointing to New on the File menu, and set the size of your document and hit OK button. [alert color=”blue”]Because we are creating a texture, it’s strongly recommended to use power of two dimensions for width and height. Otherwise, game engines have to resize texture dimensions at runtime. In the worst case scenario, game engines won’t display textures if you save them as DDS format. I used 512 * 512 dimensions.[/alert] Set the active forground color to white and background color to black and go to Filter | Render | Cloud menu to generate tileable cloud patterns.
Now go to Filter | Filter Gallery…, expand Sketch filters, select Bas Relief, and hit OK to apply the filter. You final texture should look something like this:
Save your texture as TGA and close Photoshop.
Please download TGAToDUDV Utitlity from their website (it’s right after Usage section). open TGAtoDUDV.exe, locate your TGA texture, and hit OK button to generate the Du/Dv map. A message box should appear saying “success…”. Your new Du/Dv map is saved beside original TGA texture and has the appended _dudv to the end of its name.
I applied Du/Dv Map to water surface in Vanda Engine. Here’s the result:
[youtube_video] 4_b0iB4KoWI [/youtube_video]
Let’s stay in touch!
Never miss a single tutorial, sign up for our monthly newsletter. You can unsubscribe at any time if you wish to stop receiving email newsletters from vandaengine.org