Blender Exporter for Indigo06 v. 63beta4

Announcements, requests and support regarding the Blender Indigo export script
Jananton
Posts: 66
Joined: Sun Dec 31, 2006 12:56 pm
Location: Amsterdam, The Netherlands

Blender Exporter for Indigo06 v. 63beta4

Post by Jananton » Mon Jan 15, 2007 2:26 am

Hello All,

Well, I thought to start a new thread for this one. 8)

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 :wink: , than many words, here two examples.

Image

All settings default, using Background with color value rgb(0.1, 0.1, 0.1), LFactor 200.0 and material emit 0.9


Image

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

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.

User avatar
afecelis
Posts: 749
Joined: Tue Aug 01, 2006 4:14 am
Location: Colombia
3D Software: Blender
Contact:

Post by afecelis » Mon Jan 15, 2007 2:47 am

ahhh! It's gonna be a sunny day indeed! :wink: Great new version, thanks Jan! testing it out immediately.

regards,
Alvaro
AMD Ryzen 7 1800 @3.6ghz, 32GB ddr4 3200 mhz Ram, Nvidia RTX 3060 12GB, Win10, Blender/Sketchup/Modo/Cinema4d

Phil
Posts: 154
Joined: Mon Nov 06, 2006 2:22 am
Location: St. Wendel, Germany

Post by Phil » Mon Jan 15, 2007 3:09 am

Great :D

Regards, Phil

User avatar
afecelis
Posts: 749
Joined: Tue Aug 01, 2006 4:14 am
Location: Colombia
3D Software: Blender
Contact:

Post by afecelis » Mon Jan 15, 2007 3:18 am

wow! you included the shutter, f-stop and filmiso options!!! wow wow wow! :D :D :D me happy, this is great for linear tonemapping!
AMD Ryzen 7 1800 @3.6ghz, 32GB ddr4 3200 mhz Ram, Nvidia RTX 3060 12GB, Win10, Blender/Sketchup/Modo/Cinema4d

User avatar
DaveC
Posts: 596
Joined: Mon Sep 11, 2006 12:20 am
Location: The Tottenham, London, UK
Contact:

Post by DaveC » Mon Jan 15, 2007 3:45 am

Excellent work. Worked right out of the box :D 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 :D

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 :D
I hope all of you developers get together soon cos us blender users are in for a real treat for Indigo v0.7 :D
The hardest part of BEING yourself is FINDING yourself in the first place...
http://thebigdavec.googlepages.com

Jananton
Posts: 66
Joined: Sun Dec 31, 2006 12:56 pm
Location: Amsterdam, The Netherlands

Post by Jananton » Mon Jan 15, 2007 3:54 am

afecelis wrote:wow! you included the shutter, f-stop and filmiso options!!! wow wow wow! :D :D :D me happy, this is great for linear tonemapping!
Well, don't get carried away too much :D , 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... 8)

Greetings from uncloudy Amsterdam,

Jan

Jananton
Posts: 66
Joined: Sun Dec 31, 2006 12:56 pm
Location: Amsterdam, The Netherlands

Post by Jananton » Mon Jan 15, 2007 4:04 am

DaveC wrote:Excellent work. Worked right out of the box :D 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?
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.

Have a look in the readme.txt, it's all explained there as well... 8)

Hmm, isn't belownormal as it is set to now not low enough priority :?:

Greetings from clear skies Amsterdam,

Jan

User avatar
DaveC
Posts: 596
Joined: Mon Sep 11, 2006 12:20 am
Location: The Tottenham, London, UK
Contact:

Post by DaveC » Mon Jan 15, 2007 4:15 am

Jananton wrote: Hmm, isn't belownormal as it is set to now not low enough priority :?:
Yes it is. Just a thought to give end users the choice quickly and easily, only if it is easy for you to implement.

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. :D
The hardest part of BEING yourself is FINDING yourself in the first place...
http://thebigdavec.googlepages.com

zuegs
Posts: 380
Joined: Tue Jun 27, 2006 5:46 pm
Location: switzerland

Post by zuegs » Mon Jan 15, 2007 5:48 am

Hi Janaton
Nice to see great progresses in blender exporter :D
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" 

Jananton
Posts: 66
Joined: Sun Dec 31, 2006 12:56 pm
Location: Amsterdam, The Netherlands

Post by Jananton » Mon Jan 15, 2007 7:05 am

zuegs wrote:Hi Janaton
Nice to see great progresses in blender exporter :D
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.
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 posted :wink:
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

zuegs
Posts: 380
Joined: Tue Jun 27, 2006 5:46 pm
Location: switzerland

Post by zuegs » Mon Jan 15, 2007 7:34 am

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 :wink: .
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".

Jananton
Posts: 66
Joined: Sun Dec 31, 2006 12:56 pm
Location: Amsterdam, The Netherlands

Post by Jananton » Mon Jan 15, 2007 8:16 am

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

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"   
I'm running a test with two renders, all settings the same except for the colour temperature for the meshlight, looks promising indeed. 8)

Now if I can only get more numbers behind the decimal point in SkyGain...

Greetings from nighttime Amsterdam,

Jan

zuegs
Posts: 380
Joined: Tue Jun 27, 2006 5:46 pm
Location: switzerland

Post by zuegs » Mon Jan 15, 2007 8:33 am

SkyGain is deactivated in v0.6 and v0.7t1 :cry:
For we need a global gain for all other lights as yours "MlightFactor.val" :wink:
Greetings from nighttime Switzerland :lol:

Jananton
Posts: 66
Joined: Sun Dec 31, 2006 12:56 pm
Location: Amsterdam, The Netherlands

Post by Jananton » Mon Jan 15, 2007 9:03 am

zuegs wrote:SkyGain is deactivated in v0.6 and v0.7t1 :cry:
For we need a global gain for all other lights as yours "MlightFactor.val" :wink:
Greetings from nighttime Switzerland :lol:
Really, that's an eyeopener... :lol:
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... 8)

Greetings from swinging Amsterdam,

Jan

User avatar
afecelis
Posts: 749
Joined: Tue Aug 01, 2006 4:14 am
Location: Colombia
3D Software: Blender
Contact:

Post by afecelis » Mon Jan 15, 2007 9:43 am

whoa! swinging! :D That doesn't sound like weather much, does it? hehehehehe.

I'm having a ball with the exporter, Jan! :D
AMD Ryzen 7 1800 @3.6ghz, 32GB ddr4 3200 mhz Ram, Nvidia RTX 3060 12GB, Win10, Blender/Sketchup/Modo/Cinema4d

Post Reply
61 posts

Who is online

Users browsing this forum: No registered users and 74 guests