Author Topic: Easy way to create own IES for fancy crystal lamp shades  (Read 8409 times)

2016-04-21, 20:47:10

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9412
  • Marcin
    • View Profile
Note: I did not invent this method, I am not the author of the tools used, I did not even find it. Credit for finding this technique goes to Michal W (forum name Tanakov).
Note #2: This method is NOT physically-correct - it is 100% fake, but produces pretty amazing results!



Here we go:

1. Create a small Corona light at 0,0,0 position (or any other point, but it's important to create all objects at exactly this position)
2. Uncheck: visible directly, visible in reflections, visible in refractions, occlude other lights
3. Create a camera at the same point - free camera will work best; it has to be leveled horizontally - we will be rendering spherical view from it
4. Create/import lamp geometry - geometric details will work best - place it so that the light represents the position of the light source inside the lamp
5. Create a sphere which will cover all the other objects inside it

6. Create a dark gray material (e.g. RGB20) and assign it to the big sphere
7. Create a glass material - set diffuse level to 0, do not enable reflections, set refraction level to 1, you can use any IOR you wish, enable caustics; then nest this material inside a rayswitch material in GI slot and clear all other slots
8. Assign this material to the lamp shade geometry

9. Select your camera, add CoronaCamera modifier to it, enable spherical projection
10. Go to Render Setup > Performance > Devel/Experimental* > Basic configuration > Render engine and change progressive to PPM (you can probably use others too, but this one seems to do good job here)
*if you don't see "devel" rollout, enable it at the top of performance settings ("enable devel/debug mode")
11. Set current view to the camera

12. Load the IESfromCaustics.mzp script (link below)
13. Change the name of your IES if you wish, change resolution if you wish (very low resolution may lead to "pixelated" IES)
14. Hit "Create IES to...", pick your save location, click save

15. Rendering should start
16. When the rendering is of reasonable quality you can stop it
17. You should see "success" message

18. Open the scene where the IES should be used
19. Assign a standard glass material to your lamp shade, you can make it invisible to GI to get rid of caustics, or add any other needed modifications
20. Place a small but intensive Corona light inside the lamp shade
21. Load your IES

Done!

Additionally you can play with "Keep sharp patterns" option in the Corona lighe - enabling it will make the patterns sharper, but less realistic.

Rendering the IES may require some tweaking, for example:
-changing the size of the big sphere
-changing the thickness of the glass
-changing the size/intensity of the light
-changing the brightness of the dark gray material
Usually our goal is to have nice contrasty caustics visible.

It may be good to set tone mapping values to "neutral" (highlight compress to 1, contrast to 1).
If you are after additional physical correctness you can set output gamma to 1 before rendering the IES (I am not sure about this, maybe someone else will have something to say here).

Links and resources:
Original article on 3ddd.ru - it is in Russian, but Google Translate does a pretty good job - http://3ddd.ru/blog/post/skript_dlia_sozdaniia_ies_dlia_vstroiennykh_svietil_nikov_na_osnovie_sfierichieskoi_proiektsii_kaustiki
The script - http://pankov.abvideo.ru/3ddd_blog/IESfromCaustics/IESfromCaustics.mzp
Sample Corona files in the attachments below.



*I might add more images tomorrow
**Let me know if there are some mistakes in the text or if you are unable to do this
bonus: foggy version :)

2016-04-21, 22:41:52
Reply #1

Tanakov

  • Active Users
  • **
  • Posts: 795
  • Corona is faster than diarrhea
    • View Profile
    • https://www.behance.net/Gringott
Thanks for doing this here, I think that this method even if fake will speed up rendering of some crystals etc.
Corona since 2014.06.02
https://www.behance.net/Gringott

2016-04-22, 02:09:17
Reply #2

Noah45

  • Active Users
  • **
  • Posts: 428
  • press *1
    • View Profile
In this case, how would one project spectral color?
Retail Illustrator  (for ever' 80's )
3DMax 2020/Corona Version: 6DB

2016-04-22, 09:32:47
Reply #3

Tanakov

  • Active Users
  • **
  • Posts: 795
  • Corona is faster than diarrhea
    • View Profile
    • https://www.behance.net/Gringott
Id suggest the Diamond Techchique

Just a fast add in to scene (wip) 25 pass
« Last Edit: 2016-04-22, 14:45:29 by Tanakov »
Corona since 2014.06.02
https://www.behance.net/Gringott

2016-04-23, 03:14:13
Reply #4

Noah45

  • Active Users
  • **
  • Posts: 428
  • press *1
    • View Profile
Trying to get control of projected color
Retail Illustrator  (for ever' 80's )
3DMax 2020/Corona Version: 6DB

2016-07-11, 11:50:33
Reply #5

Tanakov

  • Active Users
  • **
  • Posts: 795
  • Corona is faster than diarrhea
    • View Profile
    • https://www.behance.net/Gringott

2018-03-01, 22:10:37
Reply #6

Tanakov

  • Active Users
  • **
  • Posts: 795
  • Corona is faster than diarrhea
    • View Profile
    • https://www.behance.net/Gringott
Its been a while, this method is still amazing. Im here to ask if anyone has some idea how I can increase the IES's resolution.
Corona since 2014.06.02
https://www.behance.net/Gringott

2018-03-02, 09:03:17
Reply #7

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9412
  • Marcin
    • View Profile

2019-07-10, 13:15:51
Reply #8

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9412
  • Marcin
    • View Profile