Parallax scrolling node material?

Hello! I was hoping to get some help for a node setup, because I’m stumped (and am not entirely sure if it’s possible). I’m trying to get a material where several image textures are stacked on top of each other, and are following the camera using the camera/window texture coordinates, whilst having the textures in front offset more than the ones in the back.

Sorry if it’s confusing to read, I’m not the greatest with words. But basically looking like the layered backgrounds of 2D games.

Thanks for any help

(Since I’m so doubtful in my ability to convey meaning, this website has a good example: http://hotdot.pro/en/)

If using Cycles, use mixer, and have alpha on foreground image contol mix. Background channel should show through. (And it’s alpha controls subsequent mix, etc…) Not entirely sure about the rest, but my best guess is using a driver to control a vector mapping node. It can then offset the texture coordinates. There’s also the UV warp and UV project modifiers that may be of interest too.

Alternately, just use multiple simple planes as meshes, and have alpha control mix with transparent. Might be easier to just animate those than textures.

Thanks. I’ll play around with it later today and post the results

Almost working! I played around with drivers and nodes and got this result:



(Sorry, I’m not great with .gifs)

I’d like to have it purely with nodes (and/or scripts) but this will have to do for now. I have a bit more work to do to get it working properly (zoom in and out, better rotation)

Here is my current node setup:


1 Like