Corona Renderer Forum

General Category => Corona Goodies! - User contributions => Topic started by: Siger on 2015-04-27, 03:02:50

Title: ComplexFresnel Texmap
Post by: Siger on 2015-04-27, 03:02:50
Beta version released. Quick presets test (used same glossiness value for all materials (exl. Chromium) only for testing purpose).
Tested with V-Ray 2.x.x, 3.x.x, Corona Renderer 1.x.x, Default Scanline

Based on OSL shader code by Vlado (Chaos Group): http://docs.chaosgroup.com/display/OSLShaders/Complex+Fresnel+shader#

Installation instructions included.
Title: Re: ComplexFresnel Texmap
Post by: oncire on 2015-04-27, 03:27:32
thanks!
Title: Re: ComplexFresnel Texmap
Post by: steyin on 2015-04-27, 17:27:26
I assume this is like Grant's method of adjusting the colormap graph, but instead you can insert the exact values for RGB based off the wavelength charts?
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2015-04-27, 23:47:59
Texmap calculate own fresnel for each wavelength. If you put texmap in the Corona material reflection color slot - don't forget disable material fresnel calculations (enter 999) :)
Title: Re: ComplexFresnel Texmap
Post by: romullus on 2015-04-28, 09:52:03
Hi Regimantas, is it possible to add ability to save own presets or we have to go with map / material library route?

Didn't have much time to play with it, but i find results rather strange. But of course more tests is needed to draw some conclussions.
Title: Re: ComplexFresnel Texmap
Post by: gabyanz on 2015-04-28, 17:02:10
Any chanche to have it for max 2012?

I'd like to play with.... since I've read the Viscorbel article...


tnx
Gaby
Title: Re: ComplexFresnel Texmap
Post by: fco3d on 2015-04-28, 20:45:02
So... how do I use this?
If I go to that website link I only get one value for n and k, I can't find anything that tell me the RGB parts,
also if I compare the presets values with the info in that website, they look different.

Any ideas?
Thanks.
Title: Re: ComplexFresnel Texmap
Post by: steyin on 2015-04-28, 21:42:57
So... how do I use this?
If I go to that website link I only get one value for n and k, I can't find anything that tell me the RGB parts,
also if I compare the presets values with the info in that website, they look different.

Any ideas?
Thanks.

The RGB wavelength values are taken as the median of their ranges typically. If you look up red on wikipedia for example, its range is 620-740, so the 650 value used in the map is an approximation of its average. You would then find that number for each color, and input it into the wavelength box on the refractive index page.

For example (the copper values), inputting the R value of .65 gives you an n=.27105 and k=3.6092, hence the .271 and 3.609 in the map. Inputting the same RGB wavelength values under a different material from the index pull down will give you the corresponding n and k values for that material (ie: for aluminum, R value of .65, n=1.3424, k=7.4737, which aligns with the values on the fresnel map)

These are estimated numbers of course, not exact values.
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2015-04-29, 01:08:50
Another experiment ;)
I try to develop a Texmap plug-in which reproduces the effect of thin film interference on a surface.
It is based on code: http://www.gamedev.net/page/resources/_/technical/graphics-programming-and-theory/thin-film-interference-for-computer-graphics-r2962
Plugin will be free and compatible with Corona Renderer.
Title: Re: ComplexFresnel Texmap
Post by: fco3d on 2015-04-29, 01:21:57
So... how do I use this?
If I go to that website link I only get one value for n and k, I can't find anything that tell me the RGB parts,
also if I compare the presets values with the info in that website, they look different.

Any ideas?
Thanks.

The RGB wavelength values are taken as the median of their ranges typically. If you look up red on wikipedia for example, its range is 620-740, so the 650 value used in the map is an approximation of its average. You would then find that number for each color, and input it into the wavelength box on the refractive index page.

For example (the copper values), inputting the R value of .65 gives you an n=.27105 and k=3.6092, hence the .271 and 3.609 in the map. Inputting the same RGB wavelength values under a different material from the index pull down will give you the corresponding n and k values for that material (ie: for aluminum, R value of .65, n=1.3424, k=7.4737, which aligns with the values on the fresnel map)

These are estimated numbers of course, not exact values.

Thank you for the explanation, now it make sense.
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2015-04-29, 10:14:13
Any chanche to have it for max 2012?

I'd like to play with.... since I've read the Viscorbel article...

tnx
Gaby

Unfortunately, lower than 2013 it isn't planned.
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2015-04-30, 01:57:17
Small ThinFilm texmap test.
Works perfectly for Corona Interactive - it is possible to experiment up to infinity... :D
Title: Re: ComplexFresnel Texmap
Post by: maru on 2015-04-30, 10:57:50
This looks so sexy. Can't wait to try it! Reminds me of the good old CoronaColorMapper times:
https://corona-renderer.com/forum/index.php/topic,577.msg4397.html#msg4397
Title: Re: ComplexFresnel Texmap
Post by: pokoy on 2015-04-30, 12:09:52
The thin film tests look good!
Title: Re: ComplexFresnel Texmap
Post by: dubcat on 2015-04-30, 12:26:26
Small ThinFilm texmap test.
Works perfectly for Corona Interactive - it is possible to experiment up to infinity... :D

Love it !
Title: Re: ComplexFresnel Texmap
Post by: johan belmans on 2015-04-30, 13:27:13
Nice Regimantas!!
Title: Re: ComplexFresnel Texmap
Post by: antanas on 2015-04-30, 17:39:39
 Really nice things both of those!
 Looking at 'em, they got me thinking- it could probably be possible to do some similar map for translucency fraction map and of how tremendously helpful that map could be, I mean some sort of similar falloff driven map which could have some presets for imitation some real world translucency values (I know those arent' there in reality, but...)  for let's say some plastics, leaves, marbles and other semitransparent stones - those which can be relatively easily faked without the use of sss. Plus that map could have some fresnel driven map inputs on it's own to help imitate some of the more complex stuff, though not necessary cause one can possibly use it in the mix or coronaMix maps to make that, still it could be easier to use that way for sure. Of course some logic must be found for it to operate in the desired/predictable way + no small amount of testing might be needed too but in the end, something tells me, it could be really great )
Title: Re: ComplexFresnel Texmap
Post by: Ondra on 2015-04-30, 18:22:29
So... how do I use this?
If I go to that website link I only get one value for n and k, I can't find anything that tell me the RGB parts,
also if I compare the presets values with the info in that website, they look different.

Any ideas?
Thanks.

The RGB wavelength values are taken as the median of their ranges typically. If you look up red on wikipedia for example, its range is 620-740, so the 650 value used in the map is an approximation of its average. You would then find that number for each color, and input it into the wavelength box on the refractive index page.

For example (the copper values), inputting the R value of .65 gives you an n=.27105 and k=3.6092, hence the .271 and 3.609 in the map. Inputting the same RGB wavelength values under a different material from the index pull down will give you the corresponding n and k values for that material (ie: for aluminum, R value of .65, n=1.3424, k=7.4737, which aligns with the values on the fresnel map)

These are estimated numbers of course, not exact values.

Let me know if you want to improve this - there are some CSV values that allow you to convert between spectrum and cieRGB/XYZ/sRGB. Each of sRGB primaries actually corresponds to multiple spectral wavelengths
Title: Re: ComplexFresnel Texmap
Post by: 3dwannab on 2015-05-01, 01:52:41
Really nice. Only just got round to using this now. And thanks very much.

Would it be possible to only have just the n values also. I know we can manually type this in the the Fresnel IOR but with this plugin maybe there's a possibility to save these reusable values as a preset and for the complex metals that have different value in the RGB range which was suggested above somewhere.

So with this plugin you can save values for basic materials like polycarbonate with a Fresnel IOR (n value) of 1.5846 http://refractiveindex.info/?shelf=3d&book=plastics&page=pc (http://refractiveindex.info/?shelf=3d&book=plastics&page=pc) this can be saved without the need to refer back to a reference.

Would be really handy to have a seperate area for basic materials and n values along with what's there. So we could plug it into the Fresnel IOR map for the simple mat types also. Just a wee suggestion.

Again, thanks for the freebee :)
Title: Re: ComplexFresnel Texmap
Post by: oncire on 2015-05-01, 03:08:16
+1 for presets especially for repeatetive task... i dont know how plugins works.. but you can add "saveinisettings" and "getinisettings" in the code for user to load save some values...
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2015-05-01, 05:06:13
+1 for presets especially for repeatetive task... i dont know how plugins works.. but you can add "saveinisettings" and "getinisettings" in the code for user to load save some values...

At this stage I don't think of the user presets. Perhaps in the future... It's not a maxscript - c++. Implementation is possible, but it not an easy way as with maxscript. But it is possible - read/write values from/to text/xml file or whatever.
About single n value - it exactly isn't :) This texmap is not for this purpose.
Title: Re: ComplexFresnel Texmap
Post by: danielmn on 2015-05-02, 03:44:20
great job siger

here are some test i did with the copper preset  and using the glossy falloff curve viscorbel talks about.
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2015-05-04, 14:03:17
ComplexFresnel texmap plugin for 3ds Max version 1.0.0 available for download (Free!).
http://www.sigerstudio.eu/shop/3ds-max/sigertexmap-complexfresnel/
Title: Re: ComplexFresnel Texmap
Post by: oncire on 2015-05-04, 19:06:22
cool!!!... and with "presets"...
Title: Re: ComplexFresnel Texmap
Post by: aTanguay on 2015-05-11, 01:34:25
Thank you for both of these map types...they're very very cool.

Mmmm, subtle.
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2015-05-12, 16:40:09
ComplexFresnel texmap plugin updated to v.1.0.1
Fixed Thread Safety issues. I recommend to re-download updated version for production use.
http://www.sigerstudio.eu/shop/3ds-max/sigertexmap-complexfresnel/

Now texmap can be used and as simple Fresnel map. Enter 0.0 values for k parameter. When n parameter values will be different - you get a colored Fresnel curve :) For metals it's physically incorrect, use both params (n and k).
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2015-05-18, 23:26:59
ComplexFresnel plugin updated (v.1.0.2 - minor bug fixes).
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2015-05-25, 22:13:29
ComplexFresnel plugin updated (v.1.0.3 - added standard Output dialog).
Title: Re: ComplexFresnel Texmap
Post by: KOGODIS on 2015-07-03, 16:40:38
some issues with this plugin, if you open a scene created with an earlier 1.03 version it renders wrong or if you pick the map inside the material (complex fresnel) 3dsmax crashes, and if you open an scene created with 1.03(new version) on an pc that have an earlier version of the plugin installed, it crashes to, here is a pic with the error result with the new version of the plugin.
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2015-07-10, 13:26:30
Hi,
yes, early versions not compatible with newer version: added Output dialog - changed paramblock. ThinFilm plugin have the same issues.
Problem can be solved by paramblock version checking, but I can solve it only when return to home. Currently I'm on leave...
Title: Re: ComplexFresnel Texmap
Post by: johan belmans on 2015-07-10, 16:36:54
Hopefully you mean "on holiday"...
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2015-07-11, 07:45:42
Hopefully you mean "on holiday"...

Yes :D
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2015-08-19, 15:44:05
Currently I'm work on new CMPPmax update. I think about remade all metal materials with my ComplexFresnel plugin.
What your opinion? Whether it is worth doing it? In principle, materials will be more physically correct...
Title: Re: ComplexFresnel Texmap
Post by: johan belmans on 2015-08-19, 17:25:51
I am quit happy with the current presets.
Mostly if people on different forums talk about making materials better on you comapre those results with there previous results, you hardly see any noticeable changes.
If I were you and you see clearly the changes, I would make use of your plugin.



Title: Re: ComplexFresnel Texmap
Post by: steyin on 2015-08-19, 17:42:13
I think it helps make your product more unique if you're including a map you made with the materials. Anytime I use your mats I replace the falloff with the fresnel map, so having it done for me already would be nice too.
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2015-09-03, 14:01:49
Updated free plugins: ComplexFresnel and ThinFilm to v.1.0.4:
* Fixed references issues.
Many thanks to Ondra Karlík (Corona Renderer team) which found a silent bug and helped to remove it.
Version compatible with previous (1.0.3).

http://www.sigerstudio.eu/shop/plugins-free/sigertexmap-complexfresnel/
http://www.sigerstudio.eu/shop/plugins-free/sigertexmap-thinfilm/
Title: Fresel Tin (Not possible)
Post by: 3dwannab on 2015-10-06, 19:45:46
Trying to get the tin Fresnel values to work but came up against a limit on the the µm. For tin it's (0.73 – 12) which is out of range for the map.

In say an advanced custom mode could the user add in their own µm and relate it to the value of n and k.

Tin: http://refractiveindex.info/?shelf=main&book=Sn&page=Golovashkin-293 (http://refractiveindex.info/?shelf=main&book=Sn&page=Golovashkin-293)
Title: Re: ComplexFresnel Texmap
Post by: zhangjx511 on 2015-11-05, 15:33:12
Thank you for the plug-in, ask how soap bubbles materials tone, you can tell me, thank you.
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2016-10-01, 17:22:49
Important ComplexFresnel update - fixed and optimized performance (up to 50%).
Title: Re: ComplexFresnel Texmap
Post by: pokoy on 2016-10-01, 17:45:18
I have to say many many thanks for these maps and for making them available for free, they're all really useful.
Title: Re: ComplexFresnel Texmap
Post by: RobH2 on 2016-12-19, 00:11:49
Has this been recompiled for Max 2017?
Title: Re: ComplexFresnel Texmap
Post by: romullus on 2016-12-19, 10:15:48
https://www.sigershop.eu/free-3ds-max-plugins/sigertexmaps-complexfresnel/

Quote
25.04.2016 – v1.0.5
* Added support for 3ds Max 2017.
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2017-04-13, 06:16:56
Updated plugins:
ComplexFresnel
ThinFilm
SigerNoise
SigerScratches
-- Added support for 3ds Max 2018
https://www.sigershop.eu/free-3ds-max-plugins/ (https://www.sigershop.eu/free-3ds-max-plugins/)
Title: Re: ComplexFresnel Texmap
Post by: pokoy on 2017-04-13, 10:49:02
Many thanks for the quick update to 2018!
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2018-03-25, 17:24:23
ComplexFresnel plugin updated to v.1.0.8
- Added support for 3ds Max 2019.
Compatible with Max 2017 - 2019
For Max 2013 - 2016 use v.1.0.7

https://www.sigerstudio.eu/sigertexmaps-complexfresnel/
Title: Re: ComplexFresnel Texmap
Post by: pokoy on 2018-03-25, 19:14:38
Again, thanks for the quick recompile!
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2018-11-12, 22:33:28
Updated free plugins SigerNoise (ProSimplex and ProVoronoi), SigerScratches to version 1.0.5
* Added compatibility with 3ds Max 2019

https://www.sigerstudio.eu/sigertexmaps-sigernoise/
https://www.sigerstudio.eu/sigertexmaps-sigerscratches/
Title: Re: ComplexFresnel Texmap
Post by: Siger on 2019-03-31, 22:05:57
Updated free plugin ComplexFresnel
* Added compatibility with 3ds Max 2020
https://www.sigerstudio.eu/sigertexmaps-complexfresnel/ (https://www.sigerstudio.eu/sigertexmaps-complexfresnel/)