Page 1 of 1

Is it Possible to Create a Rainbow Arch

Posted: Mon Mar 17, 2014 11:57 am
by riley1389
Hello, I am need of assistance in creating the oh so cliche rainbow arch. I've skimmed through the forums and have learned that it's possible to get Indigo to refract light into a rainbow, although I had had time to read the first few posts. However, I'm wondering if there's anyway I can get that refracted light to travel in an arch (or actually a half-submerged circle.)

Any help would be very much appreciated!

Re: Is it Possible to Create a Rainbow Arch

Posted: Mon Mar 17, 2014 1:18 pm
by Zom-B
Interesting question! With all the enhancements to atmospheric scattering etc. that has been recently done, maybe there is a way...

I just remembered a paper that describes a technique to implement rainbows in a raytracer:
http://zurich.disneyresearch.com/~wjaro ... cally.html

Re: Is it Possible to Create a Rainbow Arch

Posted: Tue Mar 18, 2014 10:41 am
by riley1389
Interesting, and the article just got me thinking.

Assuming that Indigo hasn't yet implemented this non-circular refraction technique. I'm thinking that I might be able to simulate one if I create a parade of circular orbs and arrange them in an arch form. Each orb would be assign a prism material, which I thought I saw somewhere. So light would be traveling throughout the entirety of the arch.

Of course this would be an entirely makeshift method.

Re: Is it Possible to Create a Rainbow Arch

Posted: Tue Mar 18, 2014 10:29 pm
by galinette
riley1389 wrote:Interesting, and the article just got me thinking.

Assuming that Indigo hasn't yet implemented this non-circular refraction technique. I'm thinking that I might be able to simulate one if I create a parade of circular orbs and arrange them in an arch form. Each orb would be assign a prism material, which I thought I saw somewhere. So light would be traveling throughout the entirety of the arch.

Of course this would be an entirely makeshift method.
There is no such arrangements in a rainbow. Only water spheres.

If you make a large number of tiny spheres (for example with a particle system) and assign them a water material, it could work (but there may be precision issues). Other way is to implement a medium which simulates a water sphere suspension (but this isn't available yet)

Re: Is it Possible to Create a Rainbow Arch

Posted: Thu Nov 24, 2016 9:39 am
by Onizuka
Other way is to implement a medium which simulates a water sphere suspension (but this isn't available yet)
Hello, is there already this implemented maybe ? Or did someone try something with good results ?

Re: Is it Possible to Create a Rainbow Arch

Posted: Thu Nov 24, 2016 9:58 am
by FakeShamus
I remember seeing an example of this on Nick's blog. old-old-old, like before Indigo was Indigo(?)
I don't know if it was a true rainbow arch, but something similar was definitely possible at some point, at least experimentally. I know this is not very helpful, but the mention of a rainbow just brought back my memory...

Re: Is it Possible to Create a Rainbow Arch

Posted: Thu Nov 24, 2016 10:02 am
by Onizuka
Before Indigo was even Indigo ? well it must have been long time before this post then :lol:

Re: Is it Possible to Create a Rainbow Arch

Posted: Thu Nov 24, 2016 10:15 am
by FakeShamus
:lol: yeah, well, probably exaggerating. but before it was released as paid software, anyway...

Re: Is it Possible to Create a Rainbow Arch

Posted: Thu Nov 24, 2016 10:19 am
by Onizuka
ok :)

I will try to put tiny water spheres to see how it looks like, but anyone feel free to give solutions :D

Re: Is it Possible to Create a Rainbow Arch

Posted: Thu Nov 24, 2016 1:35 pm
by lycium
FakeShamus wrote:I remember seeing an example of this on Nick's blog. old-old-old, like before Indigo was Indigo(?)
I don't know if it was a true rainbow arch, but something similar was definitely possible at some point, at least experimentally. I know this is not very helpful, but the mention of a rainbow just brought back my memory...
Yep, I member this too!

He basically put a whole bunch of spherical water droplets at the right angle to the sun, and sure enough it rendered a rainbow, truly brute force way :twisted: I don't think there's a nice efficient way to do it currently, maybe with ISL?

Re: Is it Possible to Create a Rainbow Arch

Posted: Thu Nov 24, 2016 3:10 pm
by Onizuka
Yes it's what I tried, 4967967 spherical water droplets on aproximately 0 to 50m height, cauchy b coeff 0.003, but I get no rainbow. And a box of sss to do some fog, I tried uniform and RGB. I'm using path tracing with MLT I don't know if it's correct to have a rainbow effect

Re: Is it Possible to Create a Rainbow Arch

Posted: Fri Nov 25, 2016 6:05 am
by galinette
You need the refractive index of water, and the cauchy b coef of water. You need a sun not too high above the horison, and look towards the water droplets with the sun in your back. You also need a large FOV (at least 80° horizontally, which means a 18mm focal length on a 35mm film camera.

Re: Is it Possible to Create a Rainbow Arch

Posted: Fri Nov 25, 2016 10:55 am
by Onizuka
For now I made several tests, with various settings such as cauchy b coeff between 0.0013 to 0.003 even some to0.1,0.5, or 1; and IOR 1.3, with and without scattering with water spheres approximately 1mm diameter, in spaces from 5m cubic to 200m cubic, seen from far, seen from near, or seen from inside; with FOV from 20° to 88°, the sun respecting the limit of not above 42° up the ground and coming from the back. I tried with SS box fog englobing the scene, uniform and RGB, and I tried without; I tried Reinhard, I tried camera; I used, path tracing with MLT, Bidirectional path tracing with MLT, Bidirectionnal Path tracing. Nothing concluding, I must do something wrong, or maybe it's just not possible to do a rainbow;
I'm reading a paper about making physical simulation to create rainbows in a ray tracer, they talk about techniques such as "Lorenz-Mie theory" and other techniques derived from it; I guess it will not really help me since I'm totally noob with shaders or other things like that :lol: but it's still interesting. But they say one thing, it's that to get realistic rainbow it needs optical effects such as dispersion,
polarization, interference, and diffraction

Re: Is it Possible to Create a Rainbow Arch

Posted: Sat Nov 26, 2016 7:42 pm
by galinette
The artefacts in the bottom of the images show that you have reached floating point precision limit. In that case, the rays cannot be calculated accurately inside the spheres. This will clearly be a limitation

Re: Is it Possible to Create a Rainbow Arch

Posted: Sun Nov 27, 2016 8:26 am
by Onizuka
In the first image it is not artefacts, it is just that I scattered the spheres on many planes since we can not scatter objects into a volume in Indigo (yet ? ) , the spheres having a water material, and the planes a null material to be invisible. So the lignes and spaces on the bottom of the image are just the spaces between scattered planes were there is no sphere