How can I make working magnifying lenses with unions and the glass material?

Hello, i’m trying to make custom scopes with lenses. I want to make that so the zoom is visible even without aiming. The issue here is that I tried many many lenses, made some myself but none of them seem to properly magnify the image. This below is the result of almost EVERY one of my lenses.


And this is without the lens:

I’m trying to do something like this with no success so far.
I searched on the devforum and nothing. If you need the models just ask and I’ll kindly drop them !

4 Likes

I have a question, do you use this for a special game?

4 Likes

I’m making scopes for guns and i want them realist looking

2 Likes

To me it seems like the effect in the video can done with ViewportFrames. (I know it says glass material but you can recreate that effect with ViewportFrames)

Alright, I will try, thank you

1 Like

If possible, can you give me a link on a model with a ViewportFrame?

Hi, I don’t have any links to models like that right now, but you can look into this, it might help you as has some things such as previewing a model inside the viewportframe

1 Like

You should do as max mentioned, additionally you can manipulate the Camera’s FieldOfView to create a zoom effect. Read the thread he linked and also this one for a better insight on how ViewportFrames wrok.

You can make the scope picture-in-picture which would require the use of ViewportFrame. If i’m not mistaken someone posted an open source of a picture-in-picture rifle scope on Devforum a while ago.

take a mesh sphere ( make sure its glass material ), make the transparency about 0.2 ( your choice) and then mess around with the size. seems to work perfect for me, though my absolute size is very small, not large. but that’s what you generally need for a gun, as small magnifying glass.
with magnification:


without magnification:
Annotation 2020-08-31 140124
this isn’t perfect and it was very rushed to make, mess around with the size and transparency and your sure to make it
also the farther you are from the glass the more magnified it gets:
Annotation 2020-08-31 140335
the longer the sphere mesh is the more it looks like the above, the shorter the more accurate
with magnification (short):
Annotation 2020-08-31 140536
without magnification (short):
Annotation 2020-08-31 140620

8 Likes