How to make a sphere that will reflect what is around?

How to make a sphere that will reflect what is around?

Hello, what you might be looking for is a raytracing in Unity, I havent used it so I dont know if exists or not, but to make an object reflect all the objects around and all the objects reflect the other objects, that’s called Raytracing.

Also, you might look on the different shaders that are on the page, maybe there is one that could help you out doing some reflection…

But again, look about the raytracing :slight_smile:

If the object is static (i.e. not moving), don’t forget taking a picture of the environment, then mapping it as a texture to the sphere. Not a raytrace, just a pre rendered texture. Much less performance hit than trying to raytrace it.

Nope, it’s not just for reflection, here is what wikipedia says;

In computer graphics, ray tracing is a technique for generating an image by tracing the path of light through pixels in an image plane…

So you can render anything with ray tracing.

Anyway there is no need for ray tracing, and for “taking a picture of the environment” the object doesn’t have to be static.

What you need is called “Cube Mapping”. Basically, you take 6 renders of the environment each frame (or once a couple of frames for better performance) and map the object with this cubemap.

My bad :), but also real ray tracing reflects all the objects in a scene, you sure use it for rendering and get realistic images :), but you can do real time ray-tracing too :slight_smile:

What do you mean real ray tracing reflects all the objects in a scene? Of course reflecting materials reflect all the objects in a scene, cube mapping or sphere mapping does it too. Ray tracing is a different rendering technology that’s all.

Yep realtime ray tracing is possible, but dead slow. Actually nvidia is working on a realtime raytracing engine right now. Read about it here