Author Topic: Realistically fake refractive dispersion caustics  (Read 11307 times)

2014-03-18, 04:43:16

borisquezadaa

  • Active Users
  • **
  • Posts: 615
    • View Profile
I just want to share an aproach to Realistically "FAKE" dispersion in a refractive material.

Since Corona A5 does not have a dispersion setting and i needed to have a diamond, came up with this idea.

The post render tab in corona allows to save green, red or blue channel of a render, so in order to fake diamond refraction one just need to find the refrection index of diamond for determined color.

This page shows the index of refraction as a curve and can show you the IOR for determined wavelength. http://refractiveindex.info/?shelf=3d&book=crystals&page=diamond
I use diamond specs but it could be applied to any refractive material.

So we need to find the aprox equivalence between wavelength and RGB color... (remember this is a fake, but a very informed one... XD). This place has something one could use http://academo.org/demos/wavelength-to-colour-relationship/

For red (255,0,0) = 658nm that gives us a IOR of: 2.40975
For green (0,255,0) = 510nm that gives us a IOR of: 2.43024
For blue (0,0,255) = 440nm that gives us a IOR of: 2.44856

So we create 3 materials each with diferent IOR as stated, then render just saving the channel for that IOR color.For  example, apply the first material with IOR 2.40975 and save the image but just the red channel (set appropiate numbers in post tab of corona red:1 green:0 blue:0).

Do that for each Material saving the correspondent color channel for that ior.


The next step is open the 3 images in photoshop as layers and set the layer as Linear dodge (ADD) to get the composite of the 3 wavelengths.

And there you have it. A really convincent fake dispersion for a diamond render or any refractive material.

Here can have the test scene used in max 2014 and corona A5 and the composite in photoshop, and the final image as shown.

By the way the scene is illuminated just with CoronaSun and sky only. But i Guess works with hdrs or custom illumination as well.

« Last Edit: 2015-03-14, 04:20:18 by borisquezadaa »
What i do with Corona My Corona post of random stuff rendering
WARNING: English.dll still loading...

2014-03-18, 09:50:26
Reply #1

Alessandro

  • Active Users
  • **
  • Posts: 323
    • View Profile
    • Cover Image Snc
Curious approach to solve this problem, but the result seems to be realistic, thx for sharing!
My Ducati or a render with Corona.....mmm, hard question!
http://www.coverimage.it

2014-03-18, 10:17:49
Reply #2

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 8904
  • Turning coffee to features since 2009
    • View Profile
actually you just invented spectral rendering in Corona :D
Rendering is magic.
Private scene uploader | How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2014-03-18, 17:19:35
Reply #3

Utroll

  • Active Users
  • **
  • Posts: 164
    • View Profile
Can you say fake when you're just bypassing a limitation...
It's like rendering 4 slices 8000px wide and pretend you did a FAKE 32k wide rendering after stitching.
Your 'fake' is fake :D

Thanks for the tricks (maths)

2016-07-27, 09:38:04
Reply #4

laurenth

  • Users
  • *
  • Posts: 3
    • View Profile
Now that the layered materials are quicker you can actually compose all the differents IOR in a blend material with R G and B refraction colors and each blended material to 33,3333 blend amount and it renders pretty quickly. I'm not sure how big of an issue it is that 33,3333 is not exactly 100/3 for the blend, but it gives devent results.

2016-07-27, 16:48:32
Reply #5

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9198
  • Marcin
    • View Profile
Now that the layered materials are quicker you can actually compose all the differents IOR in a blend material with R G and B refraction colors and each blended material to 33,3333 blend amount and it renders pretty quickly. I'm not sure how big of an issue it is that 33,3333 is not exactly 100/3 for the blend, but it gives devent results.
Most probably you will end up with wrong IOR/other problems when mixing refractive materials. The problem is acknowledged and listed here:
https://coronarenderer.freshdesk.com/support/solutions/articles/5000516180-known-bugs-and-limitations

2017-09-28, 16:37:20
Reply #6

borisquezadaa

  • Active Users
  • **
  • Posts: 615
    • View Profile
Now there is dispersion in corona so forget about this old thread. XD.
Great work as usual guys!
What i do with Corona My Corona post of random stuff rendering
WARNING: English.dll still loading...


2017-10-04, 08:27:09
Reply #8

snakebox

  • Active Users
  • **
  • Posts: 493
    • View Profile
    • Snakebox Media
And soon[tm] we will have proper caustics! https://trello.com/b/EfPE4kPx/corona-road-map-3ds-max

Not so soon anymore, looks like it has been moved to maybe 1.9 ? :/