Big brain maths question that sadly IDK!

So uhh I am trying to make a mirror and I want to make it as REALISTIC AS POSSIBLE so yknow how real mirrors have reflectance like:


dat how u do dat? we need to find theta how we do that? and how do we inverse it to find the other angle to do reflect. in simple words

I need a way to find the angle at which the camera is looking at the mirror and inverse the CFrame of the viewport (mirror) camera to make it look at the object like real mirrors do so.
Cam to Mirror angle = 45 degree
Mirro to Object angle = -45 degree

Get it??? no? please dont say no thats the best I can explain!

2 Likes

Maybe you can check out this post.

Edit : I remember checking it a few months ago, and honestly I don’t even know what it’s doing and what the equations mean.

1 Like

hmm nope as thats for non-euclidiean things aka portal 2 like games I want mirrors the basic idea is I need a way to find the angle between 2 rays
aka the ray “YOU” and “PERPENDICULAR RAY TO EXPLAIN” in the imagine in my original post.

There’s a thing called dot product which is essential for helping with bounces.

1 Like

whats that? explain more please.

In regular reflection, the angle of incidence (where the wave first approaches the glass) is equal in magnitude to the angle of reflection (where the wave first leaves the glass).

Theta is 45 degrees.

1 Like

yea I know thats basic but what about the formula for it? and googling topics is too long to read

Li = Lr

You won’t learn anything by abstaining from Googling.

1 Like

bruh I AM ASKING for calculation of the angle OFC the magnitude will be the same because duh

You can’t do:

90 - 45?


You have a plane which reflects light.

That light hits the plane at 45 degrees.

You have a perpendicular line from the plane.

That’s 90 degrees from the plane.

90 - 45 = 45.

1 Like

bro it wont anyways be 45 it can vary from where the camera is! that was for example.

The perpendicular line is always 90 degrees from the plane.

90 - angleIncidence.

1 Like

alright but how 2 find angleinscidence

When you make a ray (or at least using the old Ray method instead of the new one) it returned a angle, and you can just make a ray from the camera to whatever is in front of it

Is the angle at which the wave first approaches the plane.

You’ve already stated that this is 45 degrees.

Practically, I would calculate the distance the player is from the plane and construct a triangle.

You can then use the sine law to calculate the angle of incidence, given the perpendicular angle of the triangle with the two sides distancing the player from the plane.


latest_009

4 Likes

They should just make a mirror tool in studio that just works as a normal mirror i tried many ways to make one and it either was really low quality or lag was to much i also tried to do pixel by pixel but that also was ridiculous

Hey, I just want to point out the fact @anon_j1124 is giving you help for free wasting his time in the progress. Try to be less rude because he has no reason to help you.

3 Likes

oh I am not at all being rude rn was just clearifying things here I am sorry @anon_j1124 (sorry for ping) If I am being rude I truly am.

1 Like

Hm that looks interesting lemme try that out real quick.

1 Like

Ill be sure to public it once its done and ofc do credits for those who helped me with the formula to make it realistic.