Magnification Material

Dear Develpers

Could you help me Blueprint a material that can magnify.
with one variable containing Magnification
and one variable containing Focus
so that is could be changed in the details pennel.

a screenshot of the solution would be more than welcom

I can’t give you a very detailed solution but here’s how I’d go about it sponaneously:
If you want to build a magnifying-glass:

  1. Attach a “SceneCapture2D” to the backside of your magnifying-glass.

  2. In your content-folder, create a “TextureRenderTarget2D” (Right click in content folder/Materials&Textures/MediaTexture)

  3. Drop your Media Texture to your TextureTarget-Slot in your Scene Capture in Details/Scene Capture

  4. Create a Material from your Media Texture by right clicking on your texture and choosing Material

  5. Drag your new Material onto the glass part of your magnifying-glass. You should now be able to see on your object what your SceneCapture2D-Camera sees. Adjust the location of the camera until it fits.

  6. You can now adjust the Focus in the Details of your SceneCapture2D under Lens/DepthOfField (it might take some time to find the right setting)

  7. Change your Material so it looks more like glass (low roughness etc.)

  8. If you want the player to be able to see through both sides of the glass in the same way, you have to repeat the process with a different material for a second layer of glass on the other side and a second SceneCapture2D. The captures are not exactly healthy performace-wise, so try to use this with caution.
    I hope this works! :slight_smile: