<div dir="ltr">this is already done using the volume scatter node.<br>first, how the ray refracts:<br>it hits a surface, detect the surface (polygon) normal, then refract based on ray incident direction and polygon normal.<br><br>with volumes, what is the normal? you are refracting on a spherical point in space, so it can jump anywhere, and this is exactly what volume scatter node does.<br>did I miss something?</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 6, 2017 at 3:31 PM, Zauber Paracelsus <span dir="ltr">&lt;<a href="mailto:zauber@gridmail.org" target="_blank">zauber@gridmail.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I had suggested this a while back, though with a different purpose in<br>
mind, which was to produce a gravitational lensing effect.<br>
<div class="HOEnZb"><div class="h5"><br>
On 02/05/2017 05:45 PM, Mircea Kitsune wrote:<br>
&gt; This is something I&#39;ve been wanting to get to the developers to for a<br>
&gt; while. It&#39;s a feature I hoped to use on several occasions, but<br>
&gt; unfortunately it doesn&#39;t exist nor seems to be in any official plans as<br>
&gt; of yet. Please consider a solution if possible. Thank you.<br>
&gt;<br>
&gt; Suggestion request: Implementing a volume refraction shader. Either by<br>
&gt; allowing the existing Refraction BSDF to work on the Volume material<br>
&gt; output, or by defining a new Volume Refraction shader if that is a<br>
&gt; better approach.<br>
&gt;<br>
&gt; Suggested functionality: When a ray passes through a volume affected by<br>
&gt; this shader, its trajectory is bent, just like Glass BSDF or Refraction<br>
&gt; BSDF does for surfaces. Optionally, an IOR value may let users define<br>
&gt; the probability and / or angle at which rays have their course modified,<br>
&gt; whereas a Roughness value adjusts how blurry the view gets through such<br>
&gt; a volume... the two ideally operate in an independent way so that<br>
&gt; refraction and blur can work without one another.<br>
&gt;<br>
&gt; Purpose 1: The most important practical use of this shader is proper<br>
&gt; heat haze, emulating the air deformations we see above hot ovens / jet<br>
&gt; engines / roads during summer days. As a workaround, this is already<br>
&gt; possible to do with render nodes, by rendering your volume as a black &amp;<br>
&gt; white mask on a different render pass then plugging it into the Vector<br>
&gt; input of a Displace node through which the main render is passed.<br>
&gt; However this is just a workaround that so happens to work: It leads to<br>
&gt; quality loss due to smudging and stretching the render result, causes<br>
&gt; empty spaces if the transformation of the mask warps near an edge, is<br>
&gt; much less realistic compared to the ray actually traveling a different<br>
&gt; trajectory, and might ultimately be slower depending on what<br>
&gt; calculations are implied.<br>
&gt;<br>
&gt; Purpose 2: This would allow a greater level of detail for objects such<br>
&gt; as crystals, diamonds, gems, ice crystals, and other types of rough<br>
&gt; glass. You can already design realistic crystals in Cycles, by<br>
&gt; customizing the IOR and Roughness of a Glass BSDF or Refraction BSDF,<br>
&gt; causing different spots to refract or blur in different amounts. However<br>
&gt; you can&#39;t differentiate such spots volumetrically inside the crystal<br>
&gt; itself, and can&#39;t create rough blurry strands or inner glass pieces that<br>
&gt; have a different refraction angle from others. This can of course be<br>
&gt; worked around by adding smaller meshes inside the main crystal and<br>
&gt; giving them different materials, but this technique will cause sharp<br>
&gt; edges and is less correct and flexible compared to volumes in many cases.<br>
&gt;<br>
&gt; ______________________________<wbr>_________________<br>
&gt; Bf-cycles mailing list<br>
&gt; <a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
&gt; <a href="https://lists.blender.org/mailman/listinfo/bf-cycles" rel="noreferrer" target="_blank">https://lists.blender.org/<wbr>mailman/listinfo/bf-cycles</a><br>
<br>
<br>
______________________________<wbr>_________________<br>
Bf-cycles mailing list<br>
<a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
<a href="https://lists.blender.org/mailman/listinfo/bf-cycles" rel="noreferrer" target="_blank">https://lists.blender.org/<wbr>mailman/listinfo/bf-cycles</a><br>
</div></div></blockquote></div><br></div>