2
$\begingroup$

I'm trying to create projection of objects in my scene onto one specific object (in my case a sphere). In theory it is simple, by giving the object a reflective surface but here is my problem, the sphere has to be semi-transparent. Meaning it should be reflective and showing the other objects in the scene clearly but at the same time then parts of the sphere not showing any other object should be semi-transparent. I'm trying to get this working with cycles (cycles is a must) but no luck so far. I'm open for any ideas.

Update: semi-transparent sphere I created a small test case containing my sphere and a cube with a marked corner. The reflection of the cube is on both sides of the sphere but I want it to be only on the side pointing towards the corresponding object. Additionally, the Mix Shader of the Glass and the Transparent BSDF turns the reflection grainy (for lack of words).

Update 2: semi-transparent sphere 2 I found a way to remove the unwanted reflection but this results in the reflection that I want to only be visible from the direction of the reflected object. I can not see the reflection through the sphere, which is the reason I want the sphere to be semi-transparent.

$\endgroup$
  • $\begingroup$ do you have a picture (real photo for example) of what you want? $\endgroup$ – moonboots Aug 8 '18 at 11:18
  • $\begingroup$ I can't post a real image, since the goal is to render an image of the scene to visually explain the concept of spherical camera, but I posted my test case if that helps. $\endgroup$ – Richard S Aug 8 '18 at 12:04
  • 1
    $\begingroup$ You may find the compositor helpful here. You could do it with 3 render layers: one with a completely reflective sphere, one with a transparent sphere, and one to make a mask of how you want the two spheres to blend $\endgroup$ – dixiepig Aug 8 '18 at 12:26
  • $\begingroup$ I found this link about a similar use of the compositor. Any idea on how to do the masking? $\endgroup$ – Richard S Aug 8 '18 at 12:34
  • 1
    $\begingroup$ I tried that as well, but the reflective and non-reflective parts render in different color because of the glossy of glass shader. The reflected color aka the background color will mix with the color of the transparent part showing a clear border between the two. $\endgroup$ – Richard S Aug 9 '18 at 6:51
0
$\begingroup$

As I understand it you are trying to illustrate a spherical camera using reflection on a sphere. But your main problem is that the reflection is relative to the position of your (the viewer) perspective.

As you rotate around your sphere, to eventually seeing the backside of it, the reflection of the square gets distorted. For example, in the image below (fig 1) I have positioned a NURBS path to go from the center of the cube to the center of the reflection on the sphere. Yet as we move around the workspace, we see that the distortion causes the reflection to change its position on the sphere (fig 2): camera relative distortion

If you wish for the "reflections" (if we can even call it that at this point) to be mapped to the sphere regardless of camera position, then you need baking. (animated gif):

sphere mapping

How I accomplished this:

  1. First I set up my scene: added a background, the sphere, some props from the archimesh addon and a cube with black lines around it.
  2. I selected the sphere and went into edit mode, turned on orthographic mode, and snapped to front view via numpad-1.
  3. I unwrapped the sphere using "sphere projection" (u key) and opened the node editor and the uv/image editor.
  4. I created a new "blank image" in the image viewer, and set up the material for the sphere, like so:node setup Note how the Image node is not connected. It is also important that the image node uses the new blank image, and that the image node is the selected node.
  5. With the sphere selected I go to the render panel, under "bake", select "glossy" and click the bake button: bake settings
  6. As you can see in the image editor, the "blank new image" is no longer blank: baked image
  7. Then I reconfigured the sphere material to use the baked image, taking into account the transparency you asked for, etc

After this, it works! However, there are some caveats:

  • Because it's a baked image, it doesn't work well when the environment around it is changing. To get by this you would have to bake an image sequence of it per frame or take advantage of the equirectangular uv mapping and somehow pipe a camera into its texture (not sure if that's even possible).
  • It's annoying to have to rebake every time you change something.

Good luck and happy blending!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.