[Bf-funboard] Refractions in Blender

Chando bf-funboard@blender.org
Thu, 23 Oct 2003 21:01:10 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_000D_01C399A8.C976FE00
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi there,

I've been thinking about one of the biggest limitations of a scanline =
rederer: Refraction (and reflection).
I was sitting today after hours at work waiting to be picked up. I was =
thinking about this problem. And then it struck me. The answer is not =
raytracing of making calculations on light beams, but lattices!
The key idea for this solution is:
1. Objects that are partialy or fully behind a lens or whatever body =
that refracts light and are in view, will actualy get deformed. The =
result should be physicaly correct. Only without the hassle of =
calculation lightbeams.=20
2. The object should deform according to the direction it is viewed =
upon, the distance from the refracting body, the refraction index and =
the shape of the refracting body.

I'm not a Will Hunting or John Nash, but I think it should be doable. =
For example: a planar body (just a block of glass or something) will =
shift things what's behind them if you look through it.=20
I think the way you should look at this problem is by considering the =
refracting body as a type of force field acting on the vertices (or =
lattice) of the object to be deformed.=20
The shape of an object is in direct relationship to it's normals so one =
can think of some functions for this. How the refracted body is deformed =
will be determed by the orientation of the normals of the  defracting =
body, the  distance to the refracting object and so on. I wonder if it =
is possible to calculate the 'deformation forcefield/ lattice' by just =
at the refracting body. For example in the case of a refracting planar =
body whose normal are all parallel to each other, the refracted object =
will be translated, in particular the 'deformation forcefield' act.=20

There is one problem though that I can't think of a solution for yet. If =
you look through a diamond, you will see lots of the same images in it.
On the other hand, the biggest advantage of this method is when you have =
lots of refracting bodies behind each other. You start with farthtest =
visible object and apply the deformation forcefield/ lattice to it, and =
then you apply the deformation again for the next reflecting body, until =
you reach the first visible refracting object in front of the camera.

Well, that's all in a nut shell. I hope that I was making any sense, and =
I hope that some of you out there could contineu to elaborate on this =
idea.=20
Next? caustics? LOL
I have this paper about a fast 2-pass technique for subsurface light =
scattering that could be seamelesly integraten in a scanline renderer. =
That's a project that I'm looking into that now and that I;m seriuos =
about.=20

Ciao for now.




------=_NextPart_000_000D_01C399A8.C976FE00
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi there,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I've been thinking about one of the =
biggest=20
limitations of a scanline rederer: Refraction (and =
reflection).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I was sitting today after hours at work =
waiting to=20
be picked up. I was thinking about this problem. And then it struck me. =
The=20
answer is not raytracing of making calculations on light beams, but=20
lattices!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The key idea for this solution =
is:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>1. Objects that are partialy or =
fully&nbsp;behind a=20
lens or whatever body that refracts light and are in view, will actualy =
get=20
deformed. The result should be physicaly correct. Only without the =
hassle of=20
calculation lightbeams. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>2. The object should deform according =
to the=20
direction it is viewed upon, the distance from the refracting body, the=20
refraction index and the shape of the refracting body.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'm not a Will Hunting or John Nash, =
but I think it=20
should be doable. For example: a planar body (just a block of glass or=20
something) will shift things what's behind them if you look through it.=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I think the way you should look at this =
problem is=20
by considering the refracting body as a type of force field acting on =
the=20
vertices (or lattice) of the object to be deformed. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The shape of an object is in direct =
relationship to=20
it's normals so one can think of some functions for this. How the=20
refracted&nbsp;body&nbsp;is deformed will be determed by the orientation =
of the=20
normals of the &nbsp;defracting body, the &nbsp;distance to the =
refracting=20
object and so on. I wonder if it is possible to calculate the =
'deformation=20
forcefield/ lattice' by just at the refracting body. For example in the =
case of=20
a refracting planar body whose normal are all parallel to each other, =
the=20
refracted object will be translated, in particular the 'deformation =
forcefield'=20
act. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is one problem though that I =
can't think of a=20
solution for yet. If you look through a diamond, you will see lots of =
the same=20
images in it.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>On the other hand, the biggest =
advantage of this=20
method is when you have lots of refracting bodies behind each other. You =
start=20
with farthtest visible object and apply the deformation forcefield/ =
lattice to=20
it, and then you apply the deformation again for the next reflecting =
body, until=20
you reach the first visible refracting object in front of the=20
camera.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Well, that's all in a nut shell. I hope =
that I was=20
making any sense, and I hope that some of you out there could contineu =
to=20
elaborate on this idea. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Next? caustics? LOL</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I have this paper about a fast 2-pass =
technique for=20
subsurface light scattering that could be seamelesly integraten in a =
scanline=20
renderer. That's a project that I'm looking into that now and that I;m =
seriuos=20
about. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Ciao for now.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_000D_01C399A8.C976FE00--