All posts relating to Maxwell Render 1.x
User avatar
By abgrafx3d
thanks max and hrothgar!
User avatar
By max3d
hrothgar wrote:REM = remark (for later addition), not REMove!

Sorry, quite stupid for a guy who made a living writing batch files :oops:

Anyway the new files which we could add to the max ior database are:

So it are just five. Couldn't check the importance; it's dinner time.
User avatar
By arch4d
really helpful, thanks hrothgar !!!
User avatar
By deesee
awesome hrothgar!!
User avatar
By max3d
After some research I found some of the missing files in hrothgar batch conversion job. Here comes:

Name Symbol Range in NM Description

P_SIAS SiAs 240 840 Silicon Arsenide
STSG0 Si 275 619 Silicon Germanium alloy (strained, 0% Ge)
STSG064 Si0.94Ge0.06 275 619 Silicon Germanium alloy (strained, 6% Ge)
STSG123 Si0.88Ge0.12 275 619 Silicon Germanium alloy (strained, 12% Ge)
STSG169 Si0.83Ge0.17 275 619 Silicon Germanium alloy (strained, 17% Ge)
STSG229 Si0.78Ge0.22 275 619 Silicon Germanium alloy (strained, 22% Ge)

if you guys are interested I can put the whole list here with the extra range info. See next post to understand what it means.

I also found
SIO2_IR Fused Silica IR Grade (SiO2)
User avatar
By max3d
Okay, some info about the complex ior files (which btw in RC4 on my system ended up in the wrong directory: ior)

[edit: this could well be the right one, see PS below post]

Normally when rendering you assume a fixed index of refraction. There are lists for water, glass, diamond etc all over the internet. However in reality IOR is influenced by the actual photons you put through them. The physical explanation has to do with slowing down of photons based on their specific energy and the material (and angle + temperature) involved.

In actual nature it's the reason that we see colour dispersion like in rainbows or prisma's. Not every colour gets the same reflection or refraction going through the material so sometimes we see the original light breaking up in 'rainbow' colours. So to simulate reality we have to account for these differences and that's were this file based IOR (see P.S.) comes in to play. In maxwell that means you select an entry from a database of publically known values and use these in your renderings.

I you wonder what is actually stored there, this is going to be a good read. Otherwise stop here and be happy that you're just interested in visual pleasing pictures.

If you would open a file f.i. H2O.ior (water) you would see a first line like 1 1 1.5 6 90
Lets call these four figures a,b,c en d
a states the measurement unit used 1=Ev 2=Nm 3=Mm 4=Cm. Here we see it uses Ev.
b is the lowest end of the range measured (1.5 Ev)
c is the highest end of the range measured (6 Ev)
d is the highest index of the measurement range and as they start counting at zero we know the total number of measurement points is d+1. (91 in this case)

Ev is even farther from our classic colour notion than nm already is for most people, but simply stated the visible range in Ev is 3.1 to 1.8 and this corresponds roughly to wavelengths 400-700. There is a handy calculator to be found here (do't forget to press enter after putting in the number at the left!!)

After this line a long list of values (d+1 see above) follows with two numbers stating the measured behaviour of this material. The first is the real number and corresponds to what we consider IOR, the second number, the imaginary part roughly indicates the transmittance at that wavelength (to state it in classic render terms it says something about the absorbtion). For a more precise definition of 'roughly' you'll have to read a lot of theses with some complex math which went beyond me and are anyway not interesting for our rendering purposes.

These numbers are normally called n and k, so these files are often referred to as .nk files.

The value for n, the IOR will show some considerable changes over the visible spectrum with some materials. Aluminium for instance varies from about 1,4 to 0,4. See
Water is not sensitive at all as it's IOR only changes from 1.34 to 1.36 over a very wide range. Just checked with three different coloured drinking straws in a glass of water and indeed can't notice it. The tools of a small child can do miracles for science :)

In our H20 case the k values are all zero. Take note howevever that in a lot of metals the colour dependant absorbtion can be quite relevant. A factor two in the visible range for silver f.i.
I'm not sure if maxwell uses the k value for its calculations or is planning to do.

I'm also not completely sure how the interpolation is done in the range of measurements, but I guess they are linear so you can find a value for a specific wavelength by dividing the total range (c-b) by the steps (d+1).

In the list of materials you'll find the same material measured at different temperatures. Although it really makes some difference, on the materials typically used in renderings the effect is very, very small.

to do: a virtual experiment
Like I said I'm not sure if maxwell uses the k value for its calculations or is planning to do, but it's easy to test as soon as the materials work as they should do. The way I should do it is writing a custom IOR file and use that for testing purposes.

This file should look like this:
2 400 650 2 (so nm are used, range is 400-650 and 3 measurements)
1.0 0.0
1.5 2.0
2.0 4.0
after applying it to a block you should see the effect on three differently coloured objects going through the block. In a perfect world the spectrum colour picker would be ready in maxwell, so you choose two extremes and one in the middle. If you stick to real blue and warm reds and something in between you could try the same with RGB. The strong differences in refractions would show if it works at all. The absorbion should be compared. If it's still hard to judge you could rewrite the test file for constant IOR and even higher differences in absorbtion.

I would be very pleased with additional info or corrections on the above. I just made this up researching this stuff for the first time. I'm definitely no expert in this field. It's just meant to be helpful. So please comment.

P.S. I thought about it and maybe this topic has the wrong title. At the moment [rc4] these ior files are in the IOR map, not the complex ior map. This way you can use them in combination with the rest of your material editor and that's exactly what you want. Maybe complex ior (which disables all options) has a completely different purpose.
Last edited by max3d on Thu Jan 19, 2006 1:24 pm, edited 2 times in total.
User avatar
By rivoli
max3d wrote: So please comment.
i just stumbled across this post of yours, i guess i'll be re-reading it just to make sure i didn't miss anything. very interesting reading, especially that last part about writing homemade ior files. thanks for looking into it and sharing your findings with us, i guess i'll start doing some reading on my own now, this stuff looks much more interesting than i thought.
User avatar
By oz42

this may be your first look into complex ior's but your explaination is very clear and uncovers what's going on in those "mystery" files.

It's a shame the RC's are dead (for the moment). I wonder if this system of defining materials will re-surface in future versions?
User avatar
By max3d
While searching the house for my basin of liquid, transparant aluminium to repeat the drinking straw test (somebody must have mislaid my precious stuff 8) ), I realized that the topic title could well be wrong. So I edited my post above with a p.s. and changed the wording of complex ior to 'file based ior'.

Like I explain in the p.s. these files were originally in the complex ior map, but they changed location. This could be on purpose. F.i. if you want to make a realistic ruby or sapphire ring you would have to use Al2O3 as the IOR file. This won't help you however in discriminating between these two materials as you still have to give them their unique colours etc. If you use complex IOR this is (at the moment) impossible.

Only the developers can tell what the meaning of complex ior is and if the files are at their right spot at the moment.
Last edited by max3d on Wed Dec 14, 2005 7:55 pm, edited 1 time in total.
By Dane

A very nice, precise and non-technical description of n and k. Excellent.
And as you said the math behind this is rather complicated ;-)

BR Dane
User avatar
By Kabe
Escellent posting, thanks a lot.

d is the number of measurement points between these two (actually less one; don't know why).
This is probably because d is actually the biggest index.

As the first index is 0, d happens to be the number of values less one.

User avatar
By max3d
You're probably right as it makes sense. I was just second guessing some of this stuff. I'll update the origninal post to keep the relevant info together.

-edit: did so and fixed an another error as well-
To resurrect this ancient thread...

Is there some place I can get better documentation on what the "Measured Data" IOR file can support? I have access to a device that measures LAB values at varying camera angles and would like to convert this into Maxwell shaders.

The data looks something like this:
Code: Select all
 Incidentangle	Receivingangle	Flappingangle	SurfaceRotatingangle	 Light Source/Viewing angle	X_10	Y_10	Z_10	x_10	y_10	 L*	a*	b*	C*ab	h*ab
45	-80	0	0	D65-10	11.43	14.65	37.19	0.1806	0.2316	45.15	-16.62	-35.01	38.76	244.61
45	-77.5	0	0	D65-10	11.92	15.35	37.71	0.1834	0.2362	46.11	-17.26	-34.01	38.14	243.1
45	-75	0	0	D65-10	12.55	16.27	38.31	0.1869	0.2423	47.32	-18.15	-32.67	37.38	240.96
Texture/finish lost in render.


Material preview

Yes, I have set Maxwell for Rhino as Current Rende[…]

Hi, there are two problems in studio - First one t[…]

Hello everybody, we have a problem with the Maxwe[…]