Saturday, May 14, 2016

36. XNA 4.0 Parallax Occlusion Mapping

     

       Recently, I came across Electronic Meteor's blog post which updated the Parallax Occlusion Mapping Sample to XNA 4.0. In short, parallax mapping is a way to make textures pop out. It's a very efficient way to add depth to a texture, so there is no tessellation here. Parallax Occlusion Mapping was utilized in the hit first-person shooter game called Crysis. This sample also demonstrates another technique called Normal Mapping. In this sample you can switch between the techniques to see each of their effects. The sample was originally created by Alex Alvarex Urban and updated to XNA 3.1 by Canton Javier Ferrero. Thanks to Chris, the sample was updated to XNA 4.0, however he ran into some problems getting the particle system to work. In time, I was able to fix it. I have made the source code available at the following link below for download. If you have found this sample helpful or run into any problems, please comment below.

Also, on a side note, make sure under the File Properties for the smoke.png image, click the drop-down arrow under Content Processor and set the following values like so if they aren't already:

Color Key Enabled = True
Generate Mipmaps = True
Premultiplay Alpha = False
Resize to Power of Two = False
Texture Format = DxtCompressed


Download



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.