Reqiest║Metal temperature

Feature requests, bug reports and related discussion
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 » Thu Dec 17, 2009 11:36 pm

haha ^^
indigo is awesome. beat that maxwell!

Code: Select all

    <material>
        <name>0_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>
                    <uniform>
                        <value>1.000000</value>
                    </uniform>
                </constant>
            </base_emission>
            <layer>0</layer>
            <texture>
                <uv_set>default</uv_set>
                <path>C:\Users\Yves\Desktop\spectrum.png</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>
edit: hehe i know this is not how a normal lamp emission spectrum would look like but i only have paint ^^
Attachments
spectral shader emitter.png
spectral shader emitter.png (480.09 KiB) Viewed 1840 times
spectrum.png
spectrum.png (1.44 KiB) Viewed 1840 times

User avatar
pixie
Indigo 100
Posts: 2332
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
3D Software: Cinema 4D
Contact:

Re: Reqiest║Metal temperature

Post by pixie » Thu Dec 17, 2009 11:46 pm

OMG Fused, what have you done!!!? :shock: :shock:

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 » Thu Dec 17, 2009 11:52 pm

i just reproduced something in ISL that you could just do with a tabulated spectrum. what a waste of time lol

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 » Fri Dec 18, 2009 12:10 am

high pressure sodium lamp:

real:
Image
indigo:
hps.png
hps.png (299.17 KiB) Viewed 1834 times
purespider kindly helped me out with photoshop :)

Image
Attachments
spectrum.png
spectrum.png (2.82 KiB) Viewed 1840 times

User avatar
lycium
Posts: 1216
Joined: Wed Sep 12, 2007 7:46 am
Location: Leipzig, Germany
Contact:

Re: Reqiest║Metal temperature

Post by lycium » Fri Dec 18, 2009 12:14 am

ahhh, that wonderful warm glow of an HPS lamp 8)

cool stuff!

User avatar
pixie
Indigo 100
Posts: 2332
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 12:37 am

fused wrote:i just reproduced something in ISL that you could just do with a tabulated spectrum. what a waste of time lol
Anytime soon I won't have any more time to waste... :( Life was so much fun while poking with numbers back and forth, messing on raw xml... those days are gone now, and whose the blame? Yours fused, yours! You wicked!

User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Re: Reqiest║Metal temperature

Post by dougal2 » Fri Dec 18, 2009 4:02 am

I lifted all the measured spectra as used in the LuxRender source and included them as presets in my working copy of blendigo. I had to do some basic linear-interpolation on the data to fit it to the 400-700nm range, but it seems to look reasonably accurate.

I will have to do some careful reading in order to establish whether the CCL3-by licensed spectrum data can be included in the GPL exporter and released.
Attachments
blue-led.jpg
Blue LED
blue-led.jpg (23.98 KiB) Viewed 1789 times
low-pressure-sodium.png
Low Pressure Sodium (Yellow street-light)
low-pressure-sodium.png (362.95 KiB) Viewed 1791 times
high-pressure-sodium.png
High Pressure Sodium ('White' street-light)
high-pressure-sodium.png (456.11 KiB) Viewed 1794 times

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 5:57 am

:shock: impressive :shock:

I don'tunderstand exactly how it works but congrats all. Could it be mix with ies?

User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Re: Reqiest║Metal temperature

Post by dougal2 » Fri Dec 18, 2009 6:10 am

Jambert wrote::shock: impressive :shock:

I don'tunderstand exactly how it works but congrats all. Could it be mix with ies?
Yes, they can be used with IES. The way I've implemented it is as an alternative to RGB or Blackbody for the emission spectrum. (Basically, a load of named presets for regular-tabulated data).

User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Re: Reqiest║Metal temperature

Post by dougal2 » Fri Dec 18, 2009 6:12 am

dougal2 wrote:I will have to do some careful reading in order to establish whether the CCL3-by licensed spectrum data can be included in the GPL exporter and released.
As far as I now understand, this is permissible - unless anyone would like to correct me, these presets will be included in Blendigo after 2.2 stable.

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 6:17 am

realy good to know, thx

(still don't understand everything because of my poooooor english :lol: )

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: Reqiest║Metal temperature

Post by OnoSendai » Fri Dec 18, 2009 10:01 am

dougal2 wrote:
dougal2 wrote:I will have to do some careful reading in order to establish whether the CCL3-by licensed spectrum data can be included in the GPL exporter and released.
As far as I now understand, this is permissible - unless anyone would like to correct me, these presets will be included in Blendigo after 2.2 stable.
Wow, cool stuff Doug!

neo0.
Posts: 1784
Joined: Thu Feb 28, 2008 7:11 am
Location: the US of A

Re: Reqiest║Metal temperature

Post by neo0. » Fri Dec 18, 2009 1:00 pm

gagar wrote:
neo0. wrote:Well.. to be honest, Im kind of confused when it comes to this.. is light temp (in kelvins) equate to the same colors as metal temperature? Obviously, it would vary with different metals, but maybe it is similar for a few?
There is no such thing as "metal temperature" in the way you are using the term.

When you heat a metal, or another material, it emits a black body spectrum ("light temperature"), which depends on the temperature.

Now, if you excite a metal atom, it will emit a photon at a characteristic wavelength upon relaxation. C.f. http://www.meta-synthesis.com/webbook/1 ... photo.html
That's the effect you see in sodium-vapour lamps (street lamps) and in fireworks.

So, as Lyc mentioned, you just need to find the emission spectrum for the metal you want, and use it.
But aren't the various components in fireworks heated to the same temp in spite of their different composition? So the same temp produces a different color?

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

Re: Reqiest║Metal temperature

Post by CTZn » Fri Dec 18, 2009 1:12 pm

Combustion and heating are two distinct processes, in the former case I think that metallic ions are in cause for the hue (also the reacting materials are transformed).

Wow fused, I was expecting some more code to achieve this, pretty amazing !

That should be documented as an ISL technique before it fades into oblivion. It's nice, simple and usefull.

All your fault again, neo0. :twisted: ;)
obsolete asset

neo0.
Posts: 1784
Joined: Thu Feb 28, 2008 7:11 am
Location: the US of A

Re: Reqiest║Metal temperature

Post by neo0. » Fri Dec 18, 2009 1:50 pm

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. :)

Post Reply
55 posts

Who is online

Users browsing this forum: No registered users and 36 guests