Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Tutorials & Guides => Topic started by: maru on 2016-04-21, 20:47:10

Title: Easy way to create own IES for fancy crystal lamp shades
Post by: maru on 2016-04-21, 20:47:10
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!

(https://forum.corona-renderer.com/index.php?action=dlattach;topic=11630.0;attach=45615;image)

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 :)
(https://forum.corona-renderer.com/index.php?action=dlattach;topic=11630.0;attach=45618;image)
Title: Re: Easy way to create own IES for fancy crystal lamp shades
Post by: Tanakov on 2016-04-21, 22:41:52
Thanks for doing this here, I think that this method even if fake will speed up rendering of some crystals etc.
Title: Re: Easy way to create own IES for fancy crystal lamp shades
Post by: Noah45 on 2016-04-22, 02:09:17
In this case, how would one project spectral color?
Title: Re: Easy way to create own IES for fancy crystal lamp shades
Post by: Tanakov on 2016-04-22, 09:32:47
Id suggest the Diamond Techchique

Just a fast add in to scene (wip) 25 pass
Title: Re: Easy way to create own IES for fancy crystal lamp shades
Post by: Noah45 on 2016-04-23, 03:14:13
Trying to get control of projected color
Title: Re: Easy way to create own IES for fancy crystal lamp shades
Post by: Tanakov on 2016-07-11, 11:50:33
Using this tehgnique here

https://forum.corona-renderer.com/index.php?topic=12510.msg80963#msg80963

Trying to get control of projected color

Just add a color map then.
Title: Re: Easy way to create own IES for fancy crystal lamp shades
Post by: Tanakov on 2018-03-01, 22:10:37
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.
Title: Re: Easy way to create own IES for fancy crystal lamp shades
Post by: maru on 2018-03-02, 09:03:17
Just render a bigger image before saving it as IES?
Title: Re: Easy way to create own IES for fancy crystal lamp shades
Post by: maru on 2019-07-10, 13:15:51
This also works in Corona 4 and Max 2020, but you can use the new native caustics :)
See:
https://forum.corona-renderer.com/index.php?topic=25407.msg152439#msg152439