Modeling llght refracion through medium

Hi all,

I am trying to get a light to refract through a medium, in this case glass, using Cycles Render and Blender 2.77. I’ve set up an scene where I have an ambient light (sun), a spot light (with 1 degree cone to produce a small dot), two planes for ground and background, a box to see half of the spot light, and a cylinder to refract light. Here is the blender model: https://www.dropbox.com/s/eb8831v78cua6f8/scene.blend?dl=0. And here are two screenshots:Fig 1-(a)/uploads/default/original/4X/4/e/d/4ed0b68d3ad78a92a4c0118bef0544a4c7722d3b.pngstc=1 Fig 1-(b)

in Fig 1-(a), the spot light cone do not intersect with the cylinder while in Fig 1-(b) it does. In both cases the spot light impacts first with the Cube in front. This is just to see that the spot light is being rendered when trying to see if it is refracted.

With this set up, I want to achieve something like the following:Fig 2-(a)/uploads/default/original/4X/3/5/6/3565e201376e3c44f9aa87a703ca30fa9120d40a.pngstc=1Fig 2-(b)

In the previous picture, it can be seen how in Fig 2-(a), where the glass of water is not in between the laser pointer and the orange plane, the laser is projected almost to the edge of the orange plastic. In Fig 2-(b), where the glass of water is in between the laser pointer and the orange plastic, the laser is projected in an other place. However, I get the following results:Fig 3/uploads/default/original/4X/5/b/b/5bbb2b55c8ddec5fc6e12ed49ac6f17087e6f841.pngstc=1

In Fig 3-(a), the red point is projected to the background, as expected since there is no object in between. Fig 3-(b) shows how using Fig 3-(d) nodes for glass (only Glass BSDF) the red point is not projected to the backround orange wall. Finally, Fig 3-© shows how the red dot is projected to the background using Fig 3-(e) nodes for glass (a combination of Glass BSDF and Transparent BSDF mixed using the light path). Although in Fig 3-© the red dot is projected, as I want, it can be observed that it has been projected to the same spot than in Fig 3-(a) which does not fulfill the reality observed in Fig 2. I suspect that this is because on the nodes, I set the cylinder to Transparent when the light ray is shadow (i.e. it has passed through an object).

Does anybody know how to simulate properly what I have observed in Fig 2?

Thank you very much.

Attachments




a)
Your model is no true-to-life representation of your real world experiment. For example: Your glass object has a diameter of 2 meters and is curved lengthwise, because you’re using smooth shading on parts that should be straight - hence the weird shading of the glass object in the render. Disable “Doube sided” and enable “AutoSmooth” to take care of the latter.

b)
Cycles is an unoptimized pathtracer and is in no way a suitable tool for those kinds of lighting simulations. This will never work the way you intend or at least need an ungodly amount of samples to even get close.

better use Yafaray or Luxrender
might work

cycles is not up to this task yet !

happy cl

I see what you say in a. I’ve disabled the smooth on the glass and it does look better. However I don’t know where to disable “Double sided” and enable “Auto smooth”

From both you answers I understand that cycles is not my rendering tool. Is there another render that could work? Maybe pov-ray?

Autosmooth is in the Object settings panel:

https://dl.dropboxusercontent.com/u/27650383/AutoSmooth.png

Don’t know POV-ray well enough, sorry. But is POV-ray physically correct?
My guess is that LuxRender might be your best (free) bet.

I finally managed to do a proper light refraction using LuxRender and blender 2.77a using Ubuntu 14.04. Here are the steps and some discussions:

  1. Insatll LuxRender
  2. Set up ans scene with some refracting material and a light to be refracted
  3. Render USING BIDIRECTIONAL rendering mode. Other modes do not do the trick

Here is the result and the scene scene.blend (795 KB)
/uploads/default/original/4X/1/8/2/1827d4d7ed1bba03fb2dfa2ec439353a86e871b4.pngstc=1/uploads/default/original/4X/d/b/3/db3285c87abc01305abd9483b26ca50ef9ca3c21.pngstc=1

Attachments