Announcement

Collapse
No announcement yet.

How to do parallax mapping in UDK?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to do parallax mapping in UDK?

    Is there any ways to do it?
    Please give some tutorial on it, I couldn't find any tutorial about it.
    Thank you.

    #2
    Use the bump offset node in the material editor.

    Just plug a greyscale bump map into the height node and then connect the bump offset to all textures UV nodes. If you just have a diffuse texture, connect that. If you have a normal map too, connect the bump offset to both.

    Comment


      #3
      Well, it works with connecting to the Diffuse only, but it looks really crappy.
      If you use both (and a decent heightmap) it works better and looks better

      Comment


        #4

        Texture technic.


        Manual technic (more cpu calculs, calculc from two channel to get the third channel, its to get more place in the memory)

        Comment


          #5
          Originally posted by Froyok View Post

          Texture technic.


          Manual technic (more cpu calculs, calculc from two channel to get the third channel, its to get more place in the memory)

          Thanks a lot, I will try!

          Comment


            #6
            For future reference, go here. http://udn.epicgames.com/Three/DevelopmentKitHome.html

            Comment


              #7
              http://udn.epicgames.com/Three/Mater...tml#BumpOffset

              That explains parallax mapping in UDK. Th alpha on the normal map in the example is a gray scale height map. This height map is needed for all parallax mapping.

              Comment


                #8
                I was fiddling with this for AGES! Until I realised that my heightmap didn't have an alpha channel! XD

                I just connected it up from the red channel and this is what I got,



                Mmmm, bumpy dirt.

                Comment


                  #9
                  If you want true Parallax Occlusion Mapping with Self Shadowing and Silhouette Virtualization it's a LOT more complex of a shader, over 180 instructions

                  I created the below shader based on documentation i found in the UDN, it has Parallax Occlusion with Self Shadowing and Silhouette Virtualization








                  And so you can see how complex the shader is here's a screen grab of the actual node tree



                  There are simpler ways of doing a 'cheaper' version of the effect utilizing BumpOffset but this is the only way to get true POM in UDK that i know of

                  Below is a 'Cheap' parallax effect, this one is a 2 sided masked faux parallax with specular, you will notice with the cheap shader the texture will 'inflate' and 'deflate' as well as slide around depending on your angle to the surface and there is no silhouette virtualization which breaks the illusion



                  Comment


                    #10
                    @CharlestonN stumbled upon your post today, you mind sharing your "true" POM-shader? Yould come in handy. I already found an enhanced version here: http://oliverm-h.blogspot.de/2012/03...-material.html which also offers self-shadowing and want to compare these. ;-)

                    Cheers!

                    Comment


                      #11
                      These are basically the same. I did only rebuild the POM shader with minor modification to make it available for UT3.
                      You can just download the UDN gem files here: http://udn.epicgames.com/Three/Devel...edMapping.html (very bottom of that page)

                      Comment


                        #12
                        Yeah, the link Malkav!an posted is what i used for reference, i didn't notice they had the GEM download until just now though it could have saved me an hour of recreating the **** nodes! Oh well, i guess it was a better way to learn...

                        The only problem i noticed with that shader was that it causes some strange clipping issues if there is another object with the shader is infront over it and the specularity asnt as nice as nice as it could be, 'm woring on an updated version of the shader that gives more spec control and fixes the clipping issue, i'll post once i have it working

                        I compensated for this in my version of the shader but there are still some small issues with it

                        Also note that you can disable/enable the silhouette virtualization by disconnecting/connecting the 'Opacity' hookup, when you have the sillouhette enabled it won't line up on a tiled surface so it's only good for objects with a 1x1 tile

                        Originally posted by Nanovarium View Post
                        @CharlestonN stumbled upon your post today, you mind sharing your "true" POM-shader? Yould come in handy. I already found an enhanced version here: http://oliverm-h.blogspot.de/2012/03...-material.html which also offers self-shadowing and want to compare these. ;-)

                        Cheers!

                        Comment


                          #13
                          Or you can just Tessellation

                          Comment


                            #14
                            Tessellation is pretty much only useful for smoothing meshes in UDK, it doesn't work well for fine detail like POM does

                            Hopefully this will change in UE4, CryEngine has a much better tessellation that UE does at the moment

                            POM is per pixel and tessellation is still limited to the gpu mesh it creates

                            Originally posted by kensoy View Post
                            Or you can just Tessellation

                            Comment


                              #15
                              I'm almost done with my updated POM Shader, i have added switches for Opacity Mask, Fresnel, Silhouette, Emissive and Diff (Color, Texture or Tinted Texture) as well as others and made it so it can be instances without issue

                              Here are 2 quick tests of the material with all functions on, i made it so the specular now wraps around the depth and so does the Emissive which can be used for some pretty cool effects, the opacity mask also matches up with the depth when enabled



                              Comment

                              Working...
                              X