Blackbody data

A forum for exporter development discussion.
Post Reply
1 post • Page 1 of 1
User avatar
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Blackbody data

Post by fused » Mon Mar 22, 2010 12:55 pm


heres a bit of blackbody data generated with indigo, thought it might be useful for some of you.
range is 1000K to 10000K.

an array of 256 xz colour space pairs (y is always 1):

Code: Select all

static float blackbody_xz_table[] = {1.87526f, 0.00836223f, 1.8388f, 0.0100246f, 1.80385f, 0.0119053f, 1.77038f, 0.0140138f, 1.73835f, 0.0163582f, 1.7077f, 0.0189449f, 1.67839f, 0.021779f, 1.65035f, 0.0248639f, 1.62355f, 0.0282019f, 1.59791f, 0.0317938f, 1.5734f, 0.0356392f, 1.54996f, 0.0397367f, 1.52753f, 0.0440839f,1.50608f, 0.0486774f, 1.48556f, 0.053513f, 1.46592f, 0.0585859f, 1.44712f, 0.0638905f, 1.42911f, 0.069421f, 1.41187f, 0.0751707f, 1.39535f, 0.0811331f, 1.37953f, 0.0873008f, 1.36436f, 0.0936665f, 1.34981f, 0.100223f, 1.33586f, 0.106962f, 1.32248f, 0.113877f, 1.30963f, 0.120959f, 1.29731f, 0.128201f, 1.28547f, 0.135595f, 1.2741f, 0.143133f, 1.26318f, 0.150809f, 1.25269f, 0.158614f, 1.2426f, 0.166541f, 1.2329f, 0.174584f, 1.22358f, 0.182735f, 1.21461f, 0.190987f, 1.20597f, 0.199334f, 1.19767f, 0.20777f, 1.18967f, 0.216287f, 1.18197f, 0.224881f, 1.17455f, 0.233545f, 1.16741f, 0.242274f, 1.16052f, 0.251062f, 1.15389f, 0.259904f, 1.14749f, 0.268794f, 1.14132f, 0.277729f, 1.13538f, 0.286703f, 1.12964f, 0.295711f, 1.12411f, 0.30475f, 1.11877f, 0.313816f, 1.11362f, 0.322903f, 1.10865f, 0.332009f,1.10385f, 0.34113f, 1.09921f, 0.350262f, 1.09474f, 0.359402f, 1.09041f, 0.368547f, 1.08624f, 0.377694f, 1.0822f, 0.38684f, 1.0783f, 0.395981f, 1.07454f, 0.405116f, 1.07089f, 0.414242f, 1.06737f, 0.423357f, 1.06397f, 0.432457f, 1.06068f, 0.441542f, 1.0575f, 0.450609f, 1.05442f, 0.459656f, 1.05144f, 0.46868f, 1.04857f, 0.477682f, 1.04578f, 0.486658f, 1.04309f, 0.495607f, 1.04048f, 0.504528f, 1.03796f, 0.513419f, 1.03552f, 0.522279f, 1.03315f, 0.531106f, 1.03087f, 0.5399f, 1.02865f, 0.54866f, 1.02651f, 0.557383f, 1.02444f, 0.56607f, 1.02243f, 0.574719f, 1.02049f, 0.583329f, 1.0186f, 0.5919f, 1.01678f, 0.600431f, 1.01502f, 0.608921f, 1.01331f, 0.617369f, 1.01166f, 0.625775f, 1.01005f, 0.634138f, 1.0085f, 0.642458f, 1.007f, 0.650735f, 1.00555f, 0.658966f, 1.00414f, 0.667153f, 1.00277f, 0.675295f, 1.00145f, 0.683392f, 1.00018f, 0.691443f, 0.998937f, 0.699447f, 0.997738f, 0.707405f, 0.996576f, 0.715317f, 0.995452f, 0.723182f, 0.994363f, 0.731f, 0.993309f, 0.738771f, 0.992288f, 0.746494f, 0.9913f, 0.75417f, 0.990344f, 0.761799f, 0.989418f, 0.76938f, 0.988521f, 0.776913f, 0.987654f, 0.784399f, 0.986814f, 0.791837f, 0.986002f, 0.799228f, 0.985215f, 0.806571f, 0.984454f, 0.813866f, 0.983718f, 0.821114f, 0.983006f, 0.828315f, 0.982317f, 0.835468f, 0.981651f, 0.842573f, 0.981007f, 0.849632f, 0.980384f, 0.856643f, 0.979781f, 0.863607f, 0.979199f, 0.870525f, 0.978637f, 0.877396f, 0.978093f, 0.88422f, 0.977568f, 0.890998f, 0.97706f, 0.897729f, 0.97657f, 0.904415f, 0.976097f, 0.911054f, 0.97564f, 0.917648f, 0.975199f, 0.924197f, 0.974774f, 0.9307f, 0.974363f, 0.937158f, 0.973968f, 0.943571f, 0.973586f, 0.94994f, 0.973218f, 0.956264f, 0.972864f, 0.962543f, 0.972522f, 0.968779f, 0.972194f, 0.974972f, 0.971877f, 0.98112f, 0.971573f, 0.987225f, 0.97128f, 0.993288f, 0.970999f, 0.999307f, 0.970728f, 1.00528f, 0.970468f, 1.01122f, 0.970219f, 1.01711f, 0.969979f, 1.02296f, 0.96975f, 1.02877f, 0.96953f, 1.03454f, 0.969319f, 1.04027f, 0.969117f, 1.04596f, 0.968925f, 1.0516f, 0.96874f, 1.05721f, 0.968564f, 1.06277f, 0.968396f, 1.0683f, 0.968236f, 1.07379f, 0.968084f, 1.07924f, 0.967938f, 1.08465f, 0.967801f, 1.09002f, 0.96767f, 1.09535f, 0.967546f, 1.10064f, 0.967428f, 1.1059f, 0.967317f, 1.11112f, 0.967213f, 1.1163f, 0.967114f, 1.12145f, 0.967022f, 1.12656f, 0.966935f, 1.13163f, 0.966854f, 1.13667f, 0.966778f, 1.14167f, 0.966708f, 1.14663f, 0.966642f, 1.15156f, 0.966582f, 1.15646f, 0.966527f, 1.16131f, 0.966476f, 1.16614f, 0.96643f, 1.17093f, 0.966389f, 1.17569f, 0.966352f, 1.18041f, 0.966319f, 1.1851f, 0.96629f, 1.18976f, 0.966266f, 1.19438f, 0.966245f, 1.19898f, 0.966228f, 1.20353f, 0.966215f, 1.20806f, 0.966205f, 1.21256f, 0.966199f, 1.21702f, 0.966196f, 1.22145f, 0.966197f, 1.22585f, 0.9662f, 1.23022f, 0.966207f, 1.23456f, 0.966217f, 1.23887f, 0.96623f, 1.24315f, 0.966246f, 1.2474f, 0.966264f, 1.25162f, 0.966285f, 1.25581f, 0.966309f, 1.25997f, 0.966336f, 1.2641f, 0.966364f, 1.26821f, 0.966396f, 1.27228f, 0.966429f, 1.27633f, 0.966465f, 1.28035f, 0.966503f, 1.28434f, 0.966543f, 1.2883f, 0.966586f, 1.29224f,0.96663f, 1.29614f, 0.966676f, 1.30003f, 0.966724f, 1.30388f, 0.966774f, 1.30771f, 0.966826f, 1.31151f, 0.96688f, 1.31529f, 0.966935f, 1.31904f, 0.966992f, 1.32277f, 0.96705f, 1.32647f, 0.96711f, 1.33014f, 0.967172f, 1.33379f, 0.967235f, 1.33742f, 0.967299f, 1.34102f, 0.967365f, 1.3446f, 0.967432f, 1.34815f, 0.9675f, 1.35168f, 0.96757f, 1.35518f, 0.967641f, 1.35866f, 0.967712f, 1.36212f, 0.967785f, 1.36556f, 0.96786f, 1.36897f, 0.967935f, 1.37236f, 0.968011f, 1.37573f, 0.968088f, 1.37907f, 0.968166f, 1.38239f, 0.968245f, 1.38569f, 0.968325f, 1.38897f, 0.968406f, 1.39223f, 0.968487f, 1.39546f, 0.96857f, 1.39868f, 0.968653f, 1.40187f, 0.968737f, 1.40504f, 0.968822f, 1.4082f, 0.968907f, 1.41133f, 0.968993f, 1.41444f, 0.969079f, 1.41753f, 0.969167f, 1.4206f, 0.969255f, 1.42365f, 0.969343f, 1.42668f, 0.969432f, 1.42969f, 0.969521f, 1.43268f, 0.969611f, 1.43565f, 0.969702f, 1.43861f, 0.969793f, 1.44154f, 0.969884f, 1.44446f, 0.969976f, 1.44735f, 0.970068f, 1.45023f, 0.970161f, 1.45309f, 0.970254f, 1.45593f, 0.970347f, 1.45876f, 0.970441f, 1.46156f, 0.970535f, 1.46435f, 0.970629f, 1.46712f, 0.970724f, 1.46988f, 0.970819f, 1.47261f, 0.970914f, 1.47533f, 0.971009f, 1.47803f, 0.971105f, 1.48072f, 0.971201f, 1.48339f, 0.971297f, 1.48604f}
an array of 256 rgb triplets:

Code: Select all

static float blackbody_rgb_table[] = {4.53539f, 0.0587323f, 0f, 4.4164f, 0.0941439f, 0f, 4.30222f, 0.128094f, 0f, 4.19272f, 0.16062f, 0f, 4.08775f, 0.191766f, 0f, 3.98715f, 0.22158f, 0f, 3.89074f, 0.250111f, 0f, 3.79836f, 0.277413f, 0f, 3.70983f, 0.303535f, 0f, 3.62497f, 0.32853f, 0f, 3.54362f, 0.35245f, 0f, 3.46561f,0.375343f, 0f, 3.39079f, 0.397257f, 0f, 3.31899f, 0.418239f, 0f, 3.25007f, 0.438332f, 0f, 3.18389f, 0.457581f, 0f, 3.12032f, 0.476026f, 0f, 3.05923f, 0.493705f, 0f, 3.00049f, 0.510655f, 0f, 2.944f, 0.526913f, 0f, 2.88963f, 0.54251f, 0f, 2.8373f, 0.557479f, 0f, 2.7869f, 0.57185f, 0f, 2.73833f, 0.585652f, 0f, 2.69152f, 0.598911f, 0f, 2.64637f, 0.611653f, 0f, 2.60281f, 0.623902f, 0.00369784f, 2.56077f, 0.635682f, 0.0108564f, 2.52018f, 0.647014f, 0.0181938f, 2.48097f, 0.657917f,0.0257009f, 2.44307f, 0.668413f, 0.0333687f, 2.40643f, 0.678519f, 0.0411885f, 2.371f, 0.688253f, 0.0491517f, 2.33671f, 0.697632f, 0.0572501f, 2.30352f, 0.706671f, 0.0654753f, 2.27139f, 0.715385f, 0.0738198f, 2.24026f, 0.723788f, 0.0822757f, 2.2101f, 0.731894f, 0.0908358f, 2.18086f, 0.739716f, 0.099493f, 2.15251f, 0.747265f, 0.10824f, 2.125f, 0.754552f, 0.117071f, 2.09831f, 0.76159f, 0.125979f, 2.07241f, 0.768388f, 0.134957f, 2.04725f, 0.774957f, 0.144001f, 2.02282f, 0.781305f, 0.153103f, 1.99907f, 0.787441f, 0.16226f, 1.976f, 0.793374f, 0.171465f, 1.95356f, 0.799112f, 0.180713f, 1.93175f, 0.804664f, 0.19f, 1.91052f, 0.810035f, 0.199321f, 1.88987f, 0.815233f, 0.208672f, 1.86976f, 0.820265f, 0.218047f, 1.85019f,0.825137f, 0.227444f, 1.83113f, 0.829856f, 0.236858f, 1.81256f, 0.834426f, 0.246286f, 1.79447f, 0.838854f, 0.255724f, 1.77684f, 0.843145f, 0.265168f, 1.75964f,0.847304f, 0.274616f, 1.74288f, 0.851335f, 0.284064f, 1.72653f, 0.855244f, 0.29351f, 1.71058f, 0.859035f, 0.30295f, 1.69502f, 0.862712f, 0.312382f, 1.67982f, 0.866279f, 0.321803f, 1.66499f, 0.869739f, 0.331212f, 1.65051f, 0.873098f, 0.340605f, 1.63637f, 0.876358f, 0.349981f, 1.62255f, 0.879522f, 0.359337f, 1.60905f, 0.882595f, 0.368672f, 1.59586f, 0.885578f, 0.377983f, 1.58297f, 0.888476f, 0.387269f, 1.57036f, 0.89129f, 0.396529f, 1.55803f, 0.894024f, 0.40576f, 1.54597f, 0.896681f, 0.414961f, 1.53418f, 0.899263f, 0.424131f, 1.52264f, 0.901772f, 0.433269f, 1.51135f, 0.904211f, 0.442372f, 1.5003f, 0.906582f, 0.45144f, 1.48948f, 0.908887f, 0.460473f, 1.47889f, 0.911129f, 0.469468f, 1.46852f, 0.913309f, 0.478424f,1.45836f, 0.91543f, 0.487342f, 1.44842f, 0.917493f, 0.49622f, 1.43867f, 0.919499f, 0.505056f, 1.42912f, 0.921452f, 0.513851f, 1.41976f, 0.923352f, 0.522604f, 1.41059f, 0.925201f, 0.531314f, 1.40159f, 0.927f, 0.53998f, 1.39278f, 0.928752f, 0.548602f, 1.38413f, 0.930457f, 0.557179f, 1.37565f, 0.932118f, 0.565711f, 1.36734f, 0.933734f, 0.574198f, 1.35918f, 0.935308f, 0.582638f, 1.35117f, 0.936841f, 0.591032f, 1.34332f, 0.938335f, 0.599378f, 1.33561f, 0.939789f, 0.607678f, 1.32805f, 0.941206f, 0.615931f, 1.32062f, 0.942586f, 0.624135f, 1.31333f, 0.94393f, 0.632292f, 1.30618f, 0.945241f, 0.640401f, 1.29915f, 0.946517f, 0.648461f, 1.29224f, 0.947762f, 0.656473f, 1.28546f, 0.948974f, 0.664436f, 1.2788f, 0.950156f, 0.672351f, 1.27226f, 0.951308f, 0.680217f, 1.26583f, 0.952431f, 0.688034f, 1.25951f, 0.953526f, 0.695803f, 1.25331f, 0.954593f, 0.703522f, 1.2472f, 0.955634f, 0.711193f, 1.2412f, 0.956648f, 0.718814f, 1.23531f, 0.957638f, 0.726387f, 1.22951f,0.958603f, 0.733911f, 1.22381f, 0.959544f, 0.741386f, 1.2182f, 0.960462f, 0.748813f, 1.21269f, 0.961357f, 0.756191f, 1.20726f, 0.96223f, 0.76352f, 1.20193f, 0.963082f, 0.770801f, 1.19668f, 0.963913f, 0.778034f, 1.19152f, 0.964723f, 0.785218f, 1.18643f, 0.965514f, 0.792354f, 1.18143f, 0.966286f, 0.799443f, 1.17651f, 0.967039f, 0.806484f, 1.17167f, 0.967773f, 0.813477f, 1.1669f, 0.96849f, 0.820423f, 1.16221f, 0.969189f, 0.827322f, 1.15759f, 0.969872f, 0.834173f, 1.15304f, 0.970538f, 0.840978f, 1.14856f, 0.971188f, 0.847736f, 1.14415f, 0.971823f, 0.854448f, 1.1398f, 0.972442f, 0.861113f, 1.13552f, 0.973047f, 0.867733f, 1.13131f, 0.973637f, 0.874306f, 1.12716f, 0.974212f, 0.880835f, 1.12307f, 0.974775f, 0.887318f,1.11904f, 0.975323f, 0.893755f, 1.11506f, 0.975859f, 0.900148f, 1.11115f, 0.976382f, 0.906497f, 1.1073f, 0.976893f, 0.912801f, 1.10349f, 0.977391f, 0.919061f, 1.09975f, 0.977878f, 0.925277f, 1.09606f, 0.978353f, 0.931449f, 1.09242f, 0.978817f, 0.937579f, 1.08883f, 0.97927f, 0.943665f, 1.08529f, 0.979712f, 0.949709f, 1.0818f, 0.980144f, 0.95571f, 1.07836f, 0.980566f, 0.961668f, 1.07497f, 0.980977f, 0.967585f, 1.07162f, 0.981379f, 0.97346f, 1.06832f, 0.981772f, 0.979293f, 1.06507f, 0.982155f, 0.985086f, 1.06186f, 0.982529f, 0.990837f, 1.05869f, 0.982894f,0.996548f, 1.05557f, 0.983251f, 1.00222f, 1.05249f, 0.9836f, 1.00785f, 1.04944f, 0.98394f, 1.01344f, 1.04644f, 0.984272f, 1.01899f, 1.04348f, 0.984597f, 1.0245f, 1.04056f, 0.984913f, 1.02998f, 1.03767f, 0.985223f, 1.03541f, 1.03483f, 0.985525f, 1.04081f, 1.03202f, 0.98582f, 1.04616f, 1.02924f, 0.986108f, 1.05148f, 1.02651f, 0.986389f, 1.05677f, 1.0238f, 0.986663f, 1.06201f, 1.02113f, 0.986931f, 1.06722f, 1.0185f, 0.987193f, 1.07239f, 1.0159f, 0.987449f, 1.07753f, 1.01333f, 0.987698f, 1.08263f, 1.01079f, 0.987942f, 1.08769f, 1.00828f, 0.98818f, 1.09272f,1.00581f, 0.988412f, 1.09771f, 1.00336f, 0.988639f, 1.10266f, 1.00095f, 0.98886f, 1.10759f, 0.998564f, 0.989076f, 1.11247f, 0.996207f, 0.989287f, 1.11733f, 0.99388f, 0.989493f, 1.12215f, 0.99158f, 0.989694f, 1.12693f, 0.989308f, 0.98989f, 1.13168f, 0.987062f, 0.990081f, 1.1364f, 0.984844f, 0.990268f, 1.14109f, 0.982651f, 0.990451f, 1.14574f, 0.980485f, 0.990629f, 1.15036f, 0.978344f, 0.990802f, 1.15495f, 0.976228f, 0.990972f, 1.1595f, 0.974136f, 0.991137f, 1.16403f, 0.972069f, 0.991299f, 1.16852f, 0.970025f, 0.991456f, 1.17298f, 0.968005f, 0.99161f, 1.17741f, 0.966007f, 0.991759f, 1.18182f, 0.964033f, 0.991906f, 1.18619f, 0.962081f, 0.992048f, 1.19052f, 0.960151f, 0.992187f, 1.19483f, 0.958242f, 0.992323f, 1.19911f, 0.956355f, 0.992455f, 1.20337f, 0.954489f, 0.992584f, 1.20759f, 0.952643f, 0.99271f, 1.21178f, 0.950818f, 0.992832f, 1.21594f, 0.949013f, 0.992952f, 1.22008f, 0.947227f, 0.993068f, 1.22418f, 0.945461f, 0.993182f, 1.22826f, 0.943714f,0.993293f, 1.23231f, 0.941987f, 0.9934f, 1.23634f, 0.940277f, 0.993505f, 1.24033f, 0.938586f, 0.993608f, 1.2443f, 0.936913f, 0.993707f, 1.24824f, 0.935258f, 0.993804f, 1.25216f, 0.93362f, 0.993899f, 1.25605f, 0.932f, 0.993991f, 1.25991f, 0.930396f, 0.994081f, 1.26375f, 0.92881f, 0.994168f, 1.26756f, 0.927239f, 0.994253f, 1.27134f, 0.925685f, 0.994336f, 1.2751f, 0.924148f, 0.994416f, 1.27884f, 0.922626f, 0.994494f, 1.28255f, 0.92112f, 0.99457f, 1.28623f, 0.919628f, 0.994644f,1.28989f, 0.918152f, 0.994716f, 1.29353f, 0.916692f, 0.994786f, 1.29714f, 0.915245f, 0.994854f, 1.30073f, 0.913814f, 0.99492f, 1.30429f, 0.912396f, 0.994985f, 1.30783f, 0.910993f, 0.995047f, 1.31135f, 0.909604f, 0.995108f, 1.31484f, 0.908229f, 0.995166f, 1.31831f, 0.906867f, 0.995223f, 1.32176f, 0.905518f, 0.995279f, 1.32518f, 0.904183f, 0.995332f, 1.32859f, 0.90286f, 0.995385f, 1.33197f, 0.901551f, 0.995435f, 1.33533f, 0.900254f, 0.995484f, 1.33866f, 0.89897f, 0.995531f, 1.34198f, 0.897698f, 0.995577f, 1.34527f, 0.896438f, 0.995622f, 1.34854f, 0.89519f, 0.995665f, 1.35179f, 0.893954f, 0.995706f, 1.35502f, 0.89273f, 0.995747f, 1.35823f, 0.891517f, 0.995785f, 1.36142f, 0.890315f, 0.995823f, 1.36459f, 0.889125f,0.995859f, 1.36773f, 0.887946f, 0.995894f, 1.37086f, 0.886778f, 0.995928f, 1.37397f, 0.885621f, 0.995961f, 1.37706f, 0.884474f, 0.995992f, 1.38012f, 0.883337f,0.996022f, 1.38317f, 0.882212f, 0.996051f, 1.3862f, 0.881096f, 0.996079f, 1.38921f, 0.879991f, 0.996106f, 1.3922f, 0.878895f, 0.996132f, 1.39517f, 0.87781f, 0.996157f, 1.39813f, 0.876734f, 0.996181f, 1.40106f, 0.875668f, 0.996203f, 1.40398f, 0.874611f, 0.996225f, 1.40688f, 0.873564f, 0.996246f, 1.40976f, 0.872526f, 0.996266f, 1.41262f, 0.871497f, 0.996285f, 1.41546f, 0.870477f, 0.996303f, 1.41829f, 0.869466f, 0.99632f, 1.4211f}
and an image generated frome these values:
blackbody.png (2.52 KiB) Viewed 6862 times

Post Reply
1 post • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest