Home Technical Talk

Parallaxed Textures!

triangle
Offline / Send Message
GMuller triangle
Hi everybody! I've always been really interested in parallaxing and would be thrilled to learn how it's done =)

I'm currently working on a redesign of Knight Commander Meredith's sword from Dragon Age 2 where the bulk of the blade is primarily crystal (red lyrium)- and thus thought of how cool it would be if the crystal itself had perceivable depth! As far as I've been able to tell there are 2(?) ways to parallax: either layering a series of 2D images on top of one another or scanning/modeling out what you want to parallex like in Marvel's Spider-Man for the skyscraper windows. I found a nice example from Down-limit's artstation but it still left me wondering "how tho?". Parallaxing to this point for me is like knowing how an airplane works but having zero idea how to build one myself :s

Here's the link for the tutorial/example I found and would love if someone could help me fill in the gaps of what's going on! =)

https://down_limit.artstation.com/projects/Kr1gxr

Replies

  • poopipe
    Options
    Online / Send Message
    poopipe grand marshal polycounter

    In the simplest case all you do is offset the UV coordinates of each layer's texture based on view angle to the surface normal - 
    You basically just apply a scale factor to the camera direction vector and add it to the UV coordinates fed into the texture sampler.(disclaimer : there's almost certainly another simple step that would be obvious if I was actually making it at the moment)
    The example given is probably done in that way but it does fall down when you start pushing it. For your use case I expect it will work quite well, you're not talking about a lot of depth and it's something I've used successfully on ice blocks etc

    Parallax occlusion mapping is more complicated, you need several layers and there's maths involved in working out what should obscure what.

    The interior mapping shaders used in Spiderman etc  involve generating and uv mapping a box in the shader which requires several sums that are quite hard



  • GMuller
    Options
    Offline / Send Message
    GMuller triangle
    Cool! Thank you! I bugged my teacher about it and he was kind enough to help me with resource hunting and came back with these links! :lol:

    This one is text based with some image help and is probably most useful to someone who is familiar with Unreal and Texture nodes:
    https://80.lv/articles/developing-artistic-ice-in-unreal-engine-4/
    This one is a video that's great for people like me who are messing with it for the first time and goes step by step about the process (also you hold 1 and right-click in unreal to create a scaler node that just gives a value (I got confused about where those came from because I couldn't find them in any of the node categories and he doesn't show how to make them in the video)):
    https://www.youtube.com/watch?v=3cEcb3xo5Lw&feature=youtu.be
    There is also this third link but a lot of my questions were answered by the second video so I haven't watched this one all the way through:
    https://www.youtube.com/watch?v=L_BuoIB_cMk&feature=youtu.be

    I hope these help anybody who comes to this thread!
  • Eric Chadwick
Sign In or Register to comment.