Saturday, 20 August 2016

Double Sided Materials

Since I last tried to create a double sided texture in Maya, I thought about whether or not there was an easier and more accessable solution. UE4 is great for many things, so why not double sided textures? Turns out my buddy UE4 had my back and has that as an option afterall, so let's go through it. :D 

UE4 has Blueprinting which is similar to the Hypershade in Maya, just it's directly in engine so I don't need to figure out a way to export or add it in or anything like that. As long as it's in the blueprinting it'll be in-game!

I tried a couple of ways - one which worked slightly but not quite (though it did give an interesting effect), and one which worked perfectly. Here's the first one that didn't quite work, along with what it created:

The second 'Lerp' is for the material's Alpha so that it has transparency, so that part isn't necessary - just the top one. Now as you can see it sooorta worked, but it isn't quite doing what I wanted. It'd be interesting to test this effect on other meshes though, as I like the alien-esque effect it gave to my mesh. 

Now this is the blueprint that worked correctly:

 (You can click the images to see them on a larger scale!)

This blueprint is a little fiddlier but not by too much, and it gets the intended effect. As you can see the mesh now has two separate textures for each side, which is perfect! 

The individual textures aren't visible in the screenshot so let me explain - to do it you need to make sure you have the front and back textures imported, and then place them both into the Blueprint as a 'TextureSample'. Then you can just go from there with the rest of the blueprint. :D

I also made a little gif showing what the mesh looks like with the Sine&Panner combo added, so here's that to end this post with:

No comments:

Post a Comment