Converting your RGB colour To NK

General questions about Indigo, the scene format, rendering etc...
tinman999
Posts: 23
Joined: Tue Apr 17, 2007 1:29 pm
Location: UK
Contact:

Post by tinman999 » Thu May 10, 2007 6:54 am

I only known two formula they required either assuming the extinction coefficient is zero (second number), the formula I used or the refraction index = 1 (first number). when you change the ordering (i.e second number becoming first and first number becoming second) you probbaly get totally different colour

tinman999
Posts: 23
Joined: Tue Apr 17, 2007 1:29 pm
Location: UK
Contact:

Post by tinman999 » Thu May 10, 2007 10:02 am

Kram1032 wrote:could you add a reversed version?
I'd like to use nk-ish things with SSS or difuse (which actually should be possible by using Exp 0-1) or st. like that :D

AND it would be great, if you'd add the IoR, too.

Those balls look great, already!
As requested :D

http://www.renderlight.co.uk/files/rgbtonk.exe

just drag and drop *.nk or *.ior file anywhere inside the app's window and copy the result rgb colour. It should read *.nk, *.ior with measurement in electron volt (1), micrometre (2) and nanometre(4)

Image
result RGB colour used in specular or diffuse component

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Post by Zom-B » Thu May 10, 2007 5:12 pm

tinman999 wrote:just drag and drop *.nk or *.ior file anywhere inside the app's window and copy the result rgb colour. It should read *.nk, *.ior with measurement in electron volt (1), micrometre (2) and nanometre(4)
Hey dude, the drag & drop Stuff doesn't work for me :?
You are linking to the same file like in your first post, both are the same size...
did you perhaps just post the wrong link for your updated version?

I used v3.9.3 of the needed FreeImage.dll

A scrollbar for the NK output Window would be nice, perhaps a simple "save to nk" dialog too... and finally some fresnel settings :P

BTW: nice renderer you are working on :wink:

BTW2: where to get some example .ior files to test your converter
polygonmanufaktur.de

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Fri May 11, 2007 1:17 am

looks cool :)
You somewhat seem to have troubles with linking, right? :P

tinman999
Posts: 23
Joined: Tue Apr 17, 2007 1:29 pm
Location: UK
Contact:

Post by tinman999 » Fri May 11, 2007 2:15 am

ZomB wrote:
tinman999 wrote:just drag and drop *.nk or *.ior file anywhere inside the app's window and copy the result rgb colour. It should read *.nk, *.ior with measurement in electron volt (1), micrometre (2) and nanometre(4)
Hey dude, the drag & drop Stuff doesn't work for me :?
You are linking to the same file like in your first post, both are the same size...
did you perhaps just post the wrong link for your updated version?

I used v3.9.3 of the needed FreeImage.dll

A scrollbar for the NK output Window would be nice, perhaps a simple "save to nk" dialog too... and finally some fresnel settings :P

BTW: nice renderer you are working on :wink:

BTW2: where to get some example .ior files to test your converter

As requested :D

To Absorption: Convert nk/ior file to rgb absorption coefficient unit is m^-1

To Reflection: Convert nk/ior file to rgb reflection use in diffuse/specular

To RGB: Convert rgb to nk/ior

Image
http://www.renderlight.co.uk/files/rna.zip


Do my convertor used freeimage?

About the fresnel thing I'm not quiet sure, you need to explain more

some transparent ior files for the absorption conversion
http://www.richardosborn.com/maxwell/Ga ... _ext_1.zip

.ior (maxwell) = .nk (indigo) same format different extension

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Fri May 11, 2007 10:47 am

Yes I couldn't launch it because of freeImage.dll missing... I haven't tried the link provided by ZomB.
obsolete asset

tinman999
Posts: 23
Joined: Tue Apr 17, 2007 1:29 pm
Location: UK
Contact:

Post by tinman999 » Fri May 11, 2007 11:56 am

OK uploaded new file with all references to freeimage.dll removed, so you won't need it

http://www.renderlight.co.uk/files/rna.zip

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Sat May 12, 2007 5:22 am

It's working, thanks :)
obsolete asset

tinman999
Posts: 23
Joined: Tue Apr 17, 2007 1:29 pm
Location: UK
Contact:

Post by tinman999 » Thu May 17, 2007 2:06 am

here is a new version that fixed some problem for non english based windows. Also the reflection calculation used have been change

Image
http://www.renderlight.co.uk/files/newrna.zip

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Post by Zom-B » Thu May 17, 2007 6:05 am

hey tineman, nice work on this tool :)

I still got some questions:

what exactly Degree is for, it seem not to have any functionality atm.
the ior is alway 0.1xxx, it also can't be altered ?!
why are the absorbation Numers so high, a rgb of 1 1 1 is already a full absorbation in indigo.

The rgb values for Indigo may be higher than 1, but you got the full spectrum using from 0 to 1.


The fresnel effect I was talking about can only be seen in Indigo using NK materials.
Especially the (empty) Void.nk (see posted picture of the black sphere, no reflection at the middle, raising to the sides).

I'm finaly have no real clue how this whole nk stuff works, but being able to do own (colored) nk files with this fresnel effect like void.nk got would be cool!
polygonmanufaktur.de

User avatar
patricks
Posts: 23
Joined: Sun Jun 25, 2006 8:45 am

Post by patricks » Thu May 17, 2007 7:25 am

Hi ZomB

To your question about degree ..... this is useful to get the specular color from the complex ior or nk data depending on viewing angle ( in degree)
metals have different colors depending on viewing angle , normally the dominant colors is at 0 degree viewing angle and most of the time at 90 degree viewing angle the color is white ( but not always .... sometimes you have at 90 to 80 degree another "dominant color " different then white or the color at 0 degree viewing angle )
this is one of the reasons why complex ior data are used because of the varying colors ......

the Fresnel effect depend on the IOR value and is most noticeable between IOR greater then 1.000 and lower then 3.000. With higher IOR values the Fresnel effect get less noticeable ( also increasing roughness value makes Fresnel effect less noticeable )
So if you want Fresnel effect , you only have to give an appropriate IOR value because Fresnel is calculated on IOR value .

i hope this can help you

i also agree with you about the High absorption values .... i think it would be better if the program could give a value in the 1.00 rang and a multiplier for absorption strength ...

this program is very useful and i was waiting for somthing like this long time ago 8)

great work tinman :!:

Greetings Patrick

tinman999
Posts: 23
Joined: Tue Apr 17, 2007 1:29 pm
Location: UK
Contact:

Post by tinman999 » Thu May 17, 2007 7:46 am

ZomB wrote: what exactly Degree is for, it seem not to have any functionality atm.
the ior is alway 0.1xxx, it also can't be altered ?!
why are the absorbation Numers so high, a rgb of 1 1 1 is already a full absorbation in indigo.
To Reflection = To reflectance I've mispell it

The reflectance computation basically used the fresnel equation, in the old version the reflectance return is the reflectance at normal incidence. The purpose of the degree field is to able you to calculated the reflectance at other angle (this was a request). Note reflectance is always 1 at all wavelength at 90degree no matter what the ior is. the average ior displays the average of the ior (the 1st column of numbers in the nk file) from 380nm~780nm. You have to enter a value for the degree first then click on the to reflection button

afaik absorption can be between 0 to infinity because the rule work like this IOut = IIn*exp(-distance*absorption). Indigo's manual has stated the value should be greater or equal to zero. There is no upper limit
ZomB wrote: The rgb values for Indigo may be higher than 1, but you got the full spectrum using from 0 to 1.
reflectance is always between 0 to 1 (indigo's manual has stated that) , value greater than 1 for reflectance doesn't make sense because you can't reflect more energy than you have for input.
ZomB wrote: The fresnel effect I was talking about can only be seen in Indigo using NK materials.
Especially the (empty) Void.nk (see posted picture of the black sphere, no reflection at the middle, raising to the sides).
Don't make sense to me, the fresnel effect is all done within indigo so all you need is to supply the necessay data nk or rgb value depends on the version of indigo. FYI void.nk is just ior 1 for all wavelength and if you just put <0, 0, 0> in the rgb value and convert to nk, save this and replace this for void.nk you should produce the same result as using void.nk in your scene. Any rgb data convert to nk is all you need and indigo will take care of the fresnel effect

User avatar
patricks
Posts: 23
Joined: Sun Jun 25, 2006 8:45 am

Post by patricks » Thu May 17, 2007 8:05 am

Hi again ZomB

if i understand right .... you want to have the Fresnel effect when creating your own nk data with this program ... right ?
If i understand right you would need to sett a low color intensity in the RGB values and then the program would calculate the nk data with probably also a low IOR value that would produce the Fresnel effect ( you would need to do some test and error ...)
i am not sure but give it a try ... ( i am not sure how Indigo handles IOR and Fresnel and the options the user have to control it )

Greetings Patrick

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Thu May 17, 2007 4:20 pm

IoR -> 1-infinite
absobtion -> 0-infinite
There shouldn't be a probem...

If you change the IoR, the mat doesn't look right, anymore, as well as if you change the absorbtion.

[dunno, if that was your probblem]

I hope, Indigo spports dieletic .nk s soon :D

tinman999
Posts: 23
Joined: Tue Apr 17, 2007 1:29 pm
Location: UK
Contact:

Post by tinman999 » Fri May 18, 2007 3:50 am


Post Reply
55 posts

Who is online

Users browsing this forum: No registered users and 35 guests