Blender Exporter for Indigo06 v. 63beta4
Blender Exporter for Indigo06 v. 63beta4
Hello All,
Well, I thought to start a new thread for this one.
In fact I found that there where still two important things missing in the previous version. First there was the issue of mixing light sources that wasn't possible without post production of the exported xml materials. Notably the <gain> tag for meshlights. Second, if an infinite ground plane is created the 'Default' material used for that is rgb(1,1,1) arbitrairely.
This version of the export script tries to give a solution for both inconveniencies. Since pictures tell more, certainly here I suppose , than many words, here two examples.
All settings default, using Background with color value rgb(0.1, 0.1, 0.1), LFactor 200.0 and material emit 0.9
All settings same as above, only with default sunsky
What can I say more then that I hope you all like it and click the following link to grab it. And, oh, don't forget to read the readme.txt included..
Updated date 19 january 2007
Exporter for Indigo 0.6 v. 63beta4
Greetings from sunny Amsterdam,
Jan
Well, I thought to start a new thread for this one.
In fact I found that there where still two important things missing in the previous version. First there was the issue of mixing light sources that wasn't possible without post production of the exported xml materials. Notably the <gain> tag for meshlights. Second, if an infinite ground plane is created the 'Default' material used for that is rgb(1,1,1) arbitrairely.
This version of the export script tries to give a solution for both inconveniencies. Since pictures tell more, certainly here I suppose , than many words, here two examples.
All settings default, using Background with color value rgb(0.1, 0.1, 0.1), LFactor 200.0 and material emit 0.9
All settings same as above, only with default sunsky
What can I say more then that I hope you all like it and click the following link to grab it. And, oh, don't forget to read the readme.txt included..
Updated date 19 january 2007
Exporter for Indigo 0.6 v. 63beta4
Greetings from sunny Amsterdam,
Jan
Last edited by Jananton on Sat Jan 20, 2007 11:53 am, edited 2 times in total.
Excellent work. Worked right out of the box I still can't seem to combine a simple emitter mesh with sunlight
Can you add a button to allow the user to select indigo's priority for low, below normal and normal?
Thanks for your hard work
PS. I really mean the thankyou. You've made Indigo so much easier to use. Just click a button and not have to leave blender! Brilliant
I hope all of you developers get together soon cos us blender users are in for a real treat for Indigo v0.7
Can you add a button to allow the user to select indigo's priority for low, below normal and normal?
Thanks for your hard work
PS. I really mean the thankyou. You've made Indigo so much easier to use. Just click a button and not have to leave blender! Brilliant
I hope all of you developers get together soon cos us blender users are in for a real treat for Indigo v0.7
The hardest part of BEING yourself is FINDING yourself in the first place...
http://thebigdavec.googlepages.com
http://thebigdavec.googlepages.com
Well, don't get carried away too much , in fact those where there already in u3dreal's version 62beta1. I have refined some of the settings, mainly the one for the shutter speed. I have thought to only allow real shutter speeds as well as apertures or f-stops, but that would of course make it more difficult for non photographers out here, so I thought the better of it...afecelis wrote:wow! you included the shutter, f-stop and filmiso options!!! wow wow wow! me happy, this is great for linear tonemapping!
Greetings from uncloudy Amsterdam,
Jan
Hmm, combining meshlight with either sunsky or background only works well in linear tonemapping. If you select that you'll find a button LFactor, that allows you to give a multiply factor for the <gain> tag of all meshlights you use. Any difference between several lights can be obtained by changing the emit value of the blender materials attached.DaveC wrote:Excellent work. Worked right out of the box I still can't seem to combine a simple emitter mesh with sunlight
Can you add a button to allow the user to select indigo's priority for low, below normal and normal?
Have a look in the readme.txt, it's all explained there as well...
Hmm, isn't belownormal as it is set to now not low enough priority
Greetings from clear skies Amsterdam,
Jan
Yes it is. Just a thought to give end users the choice quickly and easily, only if it is easy for you to implement.Jananton wrote: Hmm, isn't belownormal as it is set to now not low enough priority
On a side note, I've just discovered that turning the emit AND ambient up on a material causes it to emit strong light even in broad daylight! Well, it seems to work.
The hardest part of BEING yourself is FINDING yourself in the first place...
http://thebigdavec.googlepages.com
http://thebigdavec.googlepages.com
Hi Janaton
Nice to see great progresses in blender exporter
One thing i like to point on is that the gain of blackbody emitters is strongly dependent on the temperature value. So if you have found a balance between sunlight and a blackbody emitter with 5000K you will be completely out of balance if you change blackbody to 4000K. For this we had a correction factor that depends on temperature and is defined by the "Stefan-Boltzmann Law":
1/5.6704E-8*pow(T,4)
With this formula you are mostly independent on temperature and don't need to screw your "MlightFactor.val" when blackbody temperature has changed.
Following was my posted code in "Blender2indigo 0.62beta1" thread:
Nice to see great progresses in blender exporter
One thing i like to point on is that the gain of blackbody emitters is strongly dependent on the temperature value. So if you have found a balance between sunlight and a blackbody emitter with 5000K you will be completely out of balance if you change blackbody to 4000K. For this we had a correction factor that depends on temperature and is defined by the "Stefan-Boltzmann Law":
1/5.6704E-8*pow(T,4)
With this formula you are mostly independent on temperature and don't need to screw your "MlightFactor.val" when blackbody temperature has changed.
Following was my posted code in "Blender2indigo 0.62beta1" thread:
Code: Select all
emesh = Blender.Mesh.Get(meshname)
faces = emesh.faces
farea = 0.0
amulti = 1.0
for face in faces:
farea += face.area
if farea > 0:
amulti = 1/farea
amulti *= 1e9 # sky-light compensation (because sky-gain currently dont work)
str += "\t\t<spectrum>\n"
if (mat0.translucency > 0):
str += "\t\t\t<peak>\n"
str += "\t\t\t\t<peak_min>%.4g</peak_min>\n" %(mat0.translucency*1000)
str += "\t\t\t\t<peak_width>%.4g</peak_width>\n" %(mat0.amb*1000)
str += "\t\t\t\t<base_value>0</base_value>\n"
str += "\t\t\t\t<peak_value>%.4g</peak_value>\n" %(mat0.emit*amulti)
str += "\t\t\t</peak>\n"
elif (mat0.translucency == 0 and mat0.amb > 0):
str += "\t\t\t<blackbody>\n"
str += "\t\t\t\t<temperature>%.0f</temperature>\n" %(mat0.amb*10000)
str += "\t\t\t\t<gain>%.10f</gain>\n" %(mat0.emit*100*amulti/(5.6705e-8*pow(mat0.amb*10000, 4)))
str += "\t\t\t</blackbody>\n"
elif (mat0.translucency == 0 and mat0.amb == 0):
str += "\t\t\t<rgb>\n"
gain = mat0.emit*amulti
str += "\t\t\t\t<rgb>%.3f %.3f %.3f</rgb>\n" %(mat0.R*gain, mat0.G*gain, mat0.B*gain)
str += "\t\t\t</rgb>\n"
str += "\t\t</spectrum>\n"
Well, actually I did my tests with 3200K since most old fashioned household lamps emit that or lower. I used the 62beta1 as a starting point, so I presume u3dreal hadn't implemented this yet since it isn't in the code as you noticed. Didn't you see the colour temperature difference in the second example I postedzuegs wrote:Hi Janaton
Nice to see great progresses in blender exporter
One thing i like to point on is that the gain of blackbody emitters is strongly dependent on the temperature value. So if you have found a balance between sunlight and a blackbody emitter with 5000K you will be completely out of balance if you change blackbody to 4000K. For this we had a correction factor that depends on temperature and is defined by the "Stefan-Boltzmann Law":
1/5.6704E-8*pow(T,4)
With this formula you are mostly independent on temperature and don't need to screw your "MlightFactor.val" when blackbody temperature has changed.
This seems obviously easily implemented so consider it done.
Btw, just out of curiosity, where does the const value 5.6705e come from in the <gain> tag, and looking at the code, the same question goes for amulti *= 1e9 for sky light compensation.
Greetings from nighttime Amsterdam,
Jan
Hi Jananton,
Yes u3dreal dropped it in his version as he rewrote the blackbody part. But I think it should be in to simplify blackbody handling .
The value 5.6705e-8 is the "Stefan-Boltzmann constant". Check out http://en.wikipedia.org/wiki/Stefan-Boltzmann_law
The "amulti *= 1e9" is just the factor i used for balancing meshemitters and sunlights similar to your user variable "MlightFactor.val".
Yes u3dreal dropped it in his version as he rewrote the blackbody part. But I think it should be in to simplify blackbody handling .
The value 5.6705e-8 is the "Stefan-Boltzmann constant". Check out http://en.wikipedia.org/wiki/Stefan-Boltzmann_law
The "amulti *= 1e9" is just the factor i used for balancing meshemitters and sunlights similar to your user variable "MlightFactor.val".
Ok, I've dropped it in as follows:zuegs wrote:Hi Jananton,
Yes u3dreal dropped it in his version as he rewrote the blackbody part. But I think it should be in to simplify blackbody handling .
The value 5.6705e-8 is the "Stefan-Boltzmann constant". Check out http://en.wikipedia.org/wiki/Stefan-Boltzmann_law
The "amulti *= 1e9" is just the factor i used for balancing meshemitters and sunlights similar to your user variable "MlightFactor.val".
Code: Select all
elif (mat0.translucency == 0 and mat0.amb > 0):
str += "\t\t\t<blackbody>\n"
str += "\t\t\t\t<temperature>%.0f</temperature>\n" %(mat0.amb*10000)
str += "\t\t\t\t<gain>%.10f</gain>\n" %(mat0.emit*10*amulti*MlightFactor.val/(5.6705e-8*pow(mat0.amb*10000, 4)))
str += "\t\t\t</blackbody>\n"
Now if I can only get more numbers behind the decimal point in SkyGain...
Greetings from nighttime Amsterdam,
Jan
Really, that's an eyeopener...zuegs wrote:SkyGain is deactivated in v0.6 and v0.7t1
For we need a global gain for all other lights as yours "MlightFactor.val"
Greetings from nighttime Switzerland
So that button could be commented out for now in the script, hmmm...
Oh, well, it's a pitty of all that post production in the past, but now I know why there wasn't any real difference.
And all the time I thought it was me...
Greetings from swinging Amsterdam,
Jan
Who is online
Users browsing this forum: No registered users and 74 guests