Reqiest║Metal temperature

Feature requests, bug reports and related discussion
User avatar
pixie
Indigo 100
Posts: 2345
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
3D Software: Cinema 4D
Contact:

Re: Reqiest║Metal temperature

Post by pixie » Fri Dec 18, 2009 2:10 pm

Well I picked your material, pick some spectrum images from the posted reference site and done some tests. My first results were that neither IME nor c4d can import the material correctly, my second result after some hardcoded sample is this:
GaPb3D.jpg
GaPB
GaPb3D.jpg (14.7 KiB) Viewed 3880 times
And i Might have been doing it wrong and without meaningful results, at all...

Material: Diazo Metal Halide lamp with Mercury
GaPb.jpg
Spectrum
GaPb.jpg (6.8 KiB) Viewed 3880 times

Code: Select all

<material>
        <name>Spectrum_mid0</name>
        <phong>
            <ior>1.010000</ior>
            <diffuse_albedo>
                <constant>
                    <rgb>
                        <rgb>0.800000 0.800000 0.800000</rgb>
                        <gamma>2.200000</gamma>
                    </rgb>
                </constant>
            </diffuse_albedo>
            <exponent>
                <constant>1000.000000</constant>
            </exponent>
            <base_emission>
                 <constant>
                    <blackbody>
                        <temperature>9000.000000</temperature>
                        <gain>1.000000</gain>
                    </blackbody>
                </constant>
            </base_emission>
            <layer>0</layer>
            <texture>
                <uv_set>default</uv_set>
                <path>GaPb.jpg</path>
                <a>0.0</a>
                <b>1.0</b>
                <c>0.0</c>
                <exponent>1.0</exponent>
            </texture>
            <emission>
                <shader>
                    <shader>
                        <![CDATA[
def Vec3ToReal(vec3 v) real : ((doti(v) + dotj(v) + dotk(v)) / 3.0)
#indigos wl range is 400 - 700 nm. tial & error ftw
def eval(real wavelen, vec3 pos) real: Vec3ToReal(sample2DTextureVec3(0, vec2((wavelen - 400.0) / 300.0, 0.5)))
]]>
</shader>
                </shader>
            </emission>
        </phong>
    </material>

User avatar
Jambert
Indigo 100
Posts: 545
Joined: Wed Jul 30, 2008 10:08 pm
Location: France, Lyon

Re: Reqiest║Metal temperature

Post by Jambert » Fri Dec 18, 2009 8:27 pm

neo0. wrote:Wow, to to be honest the physics of this is a little beyond me.. Im just looking fot a way to make it more artists friendly. :)
+1 :lol:

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

Re: Reqiest║Metal temperature

Post by CTZn » Sat Dec 19, 2009 5:24 am

Mmh, the exposed code is a convenience for all. It just has to be there, all you have to do then is to feed the texture in. Pretty simple or not ?

Just to put an end to my related digression ;) you can see Conical structure nano pattern array (moth-eye structure for anti-reflection) from a manufacturer site. Specially the 'convex pattern' image, even though their physical counterpart outpasses Oren-Nayar own specifications. The reflection graphs down the page are explicit.

*whistling your fav tune*
*cough*
"Micro-facets with ISL"
*whistling stronger*

aka oren-nayarisation ?

;)
obsolete asset

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

Re: Reqiest║Metal temperature

Post by CTZn » Sun Dec 20, 2009 6:07 am

"Micro-facets with ISL"
I guess nudge distance could be an issue.

Here's the scene I did to test the same ramp than you, pixie. The issue with the resulting color is that one must determine the right spectrum range, that's beyond me. I think these pictures are starting below 500nm (according to some comments found in the page). plus, they do not seem to be of a linear scale.

By the way Yves, what is that greyscale image you attached ? Could it be the result of the corrections I'm mentioning ?

So yes it's pinkish... I changed emission gain, and also matched light temperature with camera's. Tweaked layers. Linear TM in order to preserve original tones.
Attachments
mosquiller_00.jpg
MOSQUILLER
mosquiller_00.jpg (161.89 KiB) Viewed 3760 times
obsolete asset

User avatar
PureSpider
Posts: 1459
Joined: Tue Apr 08, 2008 9:37 am
Location: Karlsruhe, BW, Germany
Contact:

Re: Reqiest║Metal temperature

Post by PureSpider » Sun Dec 20, 2009 8:49 am

CTZn wrote:By the way Yves, what is that greyscale image you attached ? Could it be the result of the corrections I'm mentioning ?
His ISL shader is only using the brightness of the "stripes" to determine how much R, G and B is used for the light's color.
I think the correction from exponential -> linear still must be done.
The posted spectra range from 400nm to 700nm (all of them on that specific page).

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

Re: Reqiest║Metal temperature

Post by CTZn » Sun Dec 20, 2009 12:34 pm

Ok, thanks for your answer PureSpider. However I'm still frustrated, probably because I didn't ask the right questions.

A few points:

- the grayscale image posted was flipped horizontally and of a different resolution, could that be justified please ? From what I get the texture sampling function is forcibly returning a color, extracting the luminance is the job of Vec3ToReal.

- I have troubles understanding the logic beneath that term:

Code: Select all

(wavelen - 400.0) / 300.0 
specifically in figuring the values that wavelen is taking ((400-400)/300=0???). I'm not asking at wich wavelenght the visible spectrum is starting at, neither its width... I'm confused :)
obsolete asset

User avatar
PureSpider
Posts: 1459
Joined: Tue Apr 08, 2008 9:37 am
Location: Karlsruhe, BW, Germany
Contact:

Re: Reqiest║Metal temperature

Post by PureSpider » Sun Dec 20, 2009 1:06 pm

CTZn wrote:- the grayscale image posted was flipped horizontally and of a different resolution, could that be justified please ? From what I get the texture sampling function is forcibly returning a color, extracting the luminance is the job of Vec3ToReal.
Don't ask me about that ISL stuff but the image is flipped because RED is at the OPPOSITE side of the light spectrum (at 400nm instead of 700nm or the other way round); same for blue.
CTZn wrote:- I have troubles understanding the logic beneath that term:

Code: Select all

(wavelen - 400.0) / 300.0 
specifically in figuring the values that wavelen is taking ((400-400)/300=0???). I'm not asking at wich wavelenght the visible spectrum is starting at, neither its width... I'm confused :)
(wavelen - 400.0) / 300.0
That term says: "My spectrum is starting at 400nm and is 300nm 'long'; I want to have my position 'on the spectrum' between 0 and 1, so i subtract 400 (to make 0 our starting point instead of 400) and divide that by 300"

Proof:
(400-400)/300 = 0
(550-400)/300 = 0.5
(700-400)/300 = 1

Got everything now? 8)

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: Reqiest║Metal temperature

Post by fused » Sun Dec 20, 2009 2:36 pm

Yes, PureSpider is correct. The emission for each waelenght is indeed read from the greyscale image. Also its flipped horizontally because the original specrum image was (red has a longer wavelenght than blue so it has to be on the right). Alternativley the calculation of the UV to evaluate could be changed to 1.0 - ((wavelen - 400.0) / 300.0).

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

Re: Reqiest║Metal temperature

Post by CTZn » Sun Dec 20, 2009 9:43 pm

Yes I think I got it all now: the formula remaps the wavelength between 0 and 1 to run along the texture, makes sense no doubts :) And, higher wl means lower energies indeed, deceiving how spectrum images are always presented the other way around.

Thanks a lot fused and PureSpider !!!
obsolete asset

User avatar
Polinalkrimizei
Posts: 648
Joined: Sat May 02, 2009 6:59 am

Re: Reqiest║Metal temperature

Post by Polinalkrimizei » Thu Jan 21, 2010 6:35 pm

AWESOME work guys! And thanks for the code fused. Feeding indigo with emission spectra is a very nice feature.
So I obtained some spectra from the internetz, neatimaged and desaturated them, used the code, and got pleaseant results (60W houshold bulb appears warm and energy-saving lamps seem... pale).
I`d like to use this feature to provide some pictures for the thesis of my brother in law, which is about LED's to be used to illuminate streets.
So the idea is to create a testscene with a given set of everyday-materials of colors we know, and light it with different spectra. To see how it affects the colors. I know it does exist already, but not with the spectra of this all-new LED he can provide.
So how do you compare lights? By choosing a "neutral" white balance? I used "E" in my test renders (and linear tonemapping), I know it is not natural, but a "reference light" with rgb 1,1,1 really appears white with this setting.
Thanks for any tips on this!

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: Reqiest║Metal temperature

Post by galinette » Fri Jan 22, 2010 6:38 am

Wow! That use of texture to tabulated data is an impressive feature.

That means, if the angle of incidence was accessible (could be provided to the shader function, or calculated with the normal & light vectors), and if the R and T data of specular materials was "shaderizable", I could implement the "coated glass from spectral angular data" request.

Etienne
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
Polinalkrimizei
Posts: 648
Joined: Sat May 02, 2009 6:59 am

Re: Reqiest║Metal temperature

Post by Polinalkrimizei » Mon Jan 25, 2010 5:48 am

Another white point question:
I made a candle and applied the data from the reference page. But the temperature in K of a candle is so low that I can`t find the "right" white point. The "neutral" point E gives a slightly greenish result on my monitor at least. I expected a more yellow or red look. Can anybody verify that?
Attached are images with whitebalance settings 9300 and E, and one with quick and dirty post-pro to illustrate the look I was after. Sorry the the pics are still noisy, but I don't want to wait another 20hours... damn sss!
Attachments
candle 1 9300.jpg
candle 1 9300.jpg (59.2 KiB) Viewed 3534 times
candle 1 E.jpg
candle 1 E.jpg (58.35 KiB) Viewed 3531 times
candle 1 custom.jpg
candle 1 custom.jpg (63.71 KiB) Viewed 3536 times

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: Reqiest║Metal temperature

Post by galinette » Mon Jan 25, 2010 7:00 am

Just one thing you need to take care of : these spectra pictures does not correspond really to intensity, as there were recorded with a coloured sensor which has a sensitivity dependant on wavelength.

Use the textfiles from this website instead:
http://astro.u-strasbg.fr/~koppen/disch ... drogen.txt

The .txt give position of peaks and the relative peak intensity, which will be much more accurate than the jpeg spectra.

Etienne
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: Reqiest║Metal temperature

Post by galinette » Mon Jan 25, 2010 9:23 pm

Here is an example sodium vapor light material, created from spectral tabulated data (spectrum::regular).

If you like, I may add like 20 vapor light materials with other elements. Then you may also blend them together to make gas mixtures.

When I have time I will also do some spectrally correct fluorescent tubes. These are a bit complicated since they are a superposition of blackbody and peaks.

Etienne
Attachments
light-sodium.jpg
light-sodium.jpg (74.25 KiB) Viewed 3464 times
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: Reqiest║Metal temperature

Post by galinette » Tue Jan 26, 2010 12:27 am

In the site you posted, wavelength scale of the spectra are not linear:
Image

And you need to use their polynomial to convert image x to wavelength:
Image
Image

Etienne
Eclat-Digital Research
http://www.eclat-digital.com

Post Reply
55 posts

Who is online

Users browsing this forum: No registered users and 173 guests