How do I get lighting inside a ViewPortFrame, to match the lighting in the real world?

Hello Fellow Dev Forumers,

How do I get lighting inside a ViewPortFrame, to match the lighting in the real world?

I have been trying to create a portal-like system, but ran into the issue of ViewPortFrame contents, and workspace contents, look very different lighting wise. I already have tried messing with the Lighting of the world, and ViewPortFrame’s with no success.

The way light performs inside a ViewPortFrame is so different than game lighting, which make it hard to make the two look similar.

Examples of what I am talking about:


When you are looking into the doorway, which is a ViewPortFrame, you see a slight difference in lighting which ruins the effect.

Same issue when looking out through the doorway:

I did some digging, and found a few posts pertaining to this same subject. However, they were quite old, and I was wondering if there is a new solution to this problem.

Anyone got any ideas?

6 Likes

Sadly, according to this wiki page [Very end, notes/performance], the lighting is currently fixed so we can’t customize it just yet.

3 Likes

Thanks for the response. Yes, I know this already. My question was more, how do we get around this with our current ViewPortFrame capabilities. What strategies can we use to get as close as possible?

1 Like

Set Brightness very low, use Compatibility instead of Future or ShadowMap

Those will make the world have flat lighting like a VPF, after that just tweak colors

10 Likes

Hey, any way to do it without having to change any lighting?

6 Likes

best i can think of is just repeatedly getting all light sources and cloning the parent part if its not a attachment else have a part at the root and clone it to the same cframe as the worldcframe of the actual one

how is this possible? It clearly works on your video but i cant replicate it. How can you render the model even though it’s not parented to the viewport frame?

PD: I know its from 2020 but you are quite active. I’ve seen you a few times in recent posts.

Here is a post talking about the final result of the project that prompted me to write this post.

Here is also a place that I open sourced that showcases this mechanic:
https://www.roblox.com/games/5498885947/Non-Euclidean-Mechanics-Open-Source#!/about

Hopefully you can see how this works by looking at the source.

1 Like


you might want to fix this because it ruins the illusion

What is it that you think ruins the illusion? It looks fine to me from that screenshot.

when you move around the camera moves and it the part looks wider than it should heres a video of it A - YouTube

1 Like