Getting "surface" domain materials into UI

Surface domain materials are obviously not intended to be used in the player’s UI, which happens to be exactly where I want them. To clarify, I’m making a (in the bluntest of terms) Minecraft variant. It has similar voxel building mechanics as seen in many other games, most famously in Minecraft. I want the player to be able to preview the material he or she is about to choose, rather than have to switch out of the interface to see what the block looks like.

Is there any way to create a preview of a surface material for use in UI by use of Blueprints? Aside from manually imaging each material used and creating a new texture to be used as each material’s preview, I can’t think of much.

Well, as far as I’m aware you can’t simply get surface shader group materials within the GUI, but I whipped up a cool material-based solution to your problem. It’s a bit wonky, but it was fun to tackle.

I decided to generate a fake shaded cube using an input texture as the texture sample. I tried to keep it modular so your pre-existing block textures may work on it. To utilize this in your blueprint, I would recommend making a struct of all your block parameters. In that struct you can define a texture array with values for each block and you could use a DMI to change the texture on construct to the proper one for that block based on index.

I’ve tossed the images I rendered for the UV distortion and masking down below so your can use them if you decide this is how you’d like to handle it.

http://i.imgur.com/qhxxmcj.png

http://i.imgur.com/FMU3yUT.png

http://i.imgur.com/cPyPu9p.png

http://i.imgur.com/mSAYTZY.png