BlenderToIndigo: Yet another Blender to Indigo exporter
BlenderToIndigo: Yet another Blender to Indigo exporter
Hi blender/indigo folks
In other threads I already declared that I wanted to contribute to the blender to indigo exporter. What kept me back was the lack of version control or other kinds of cooperative tools. Another thing was that I didn't like the way the original exporter was written: a lot of global variables, hardcoded gui stuff, no object oriented design, hardcoded export code, kinky python/math expressions, etc.
When Wedge declared on thread http://www2.indigorenderer.com/joomla/f ... php?t=1817 that he is no longer able to invest time in the exporter, I saw my chance to jump in. I decided to do a complete rewrite of the exporter. After a week working on it I dare to present it on this forum. Most of the changes are under the hood (actually there is hardly anything left from the original code). I opted for an object oriented design, both in the exporter code and gui code. The benefits of this is to make it easier in the long term to support different Indigo version with the same script (e.g. subclassing old exporter classes and only overloading the things that changed). At this point only Indigo 0.8 stable is supported, however.
Another problem with the old version is the very complicated material exporting. How a Blender material is mapped to an Indigo material and its properties was done based with hackish rules (like "if alpha<1 then use a uniform spectrum and a rgb spectrum otherwise"). This is very difficult for the code mainainers and I think not very user friendly too. Moreover, when additional Indigo material types or medium options would be added, it would be increasingly difficult to add these in the exporter without breaking something. I choose a different approach that was already suggested in the code of the old exporter: the name of the material defines the type (diffuse, phong, specular). The settings of the material and medium can also be defined with strings: the names of the textures in the material. See further for the manual, which should make things more clear if this sounds mysterious.
Another feature of this new version is that you can export the material code to a Blender buffer and edit it in Blender. After editing it is possible to export your scene with this edited materials. This way you can store custom Indigo material settings within your Blender file and keep these for future exports.
I chose to create a page on the Blender wiki for hosting the script an a manual (under construction): http://wiki.blender.org/index.php/BlenderToIndigo
The current version of this script (2.43 at the time of this writing) is still beta and not thouroughly tested, but I invite you to test it.
Please reply in this thread if things don't work as expected, if things are unclear, if you have patches or other ideas. I'm happy to help.
(I should get some sleep now)
In other threads I already declared that I wanted to contribute to the blender to indigo exporter. What kept me back was the lack of version control or other kinds of cooperative tools. Another thing was that I didn't like the way the original exporter was written: a lot of global variables, hardcoded gui stuff, no object oriented design, hardcoded export code, kinky python/math expressions, etc.
When Wedge declared on thread http://www2.indigorenderer.com/joomla/f ... php?t=1817 that he is no longer able to invest time in the exporter, I saw my chance to jump in. I decided to do a complete rewrite of the exporter. After a week working on it I dare to present it on this forum. Most of the changes are under the hood (actually there is hardly anything left from the original code). I opted for an object oriented design, both in the exporter code and gui code. The benefits of this is to make it easier in the long term to support different Indigo version with the same script (e.g. subclassing old exporter classes and only overloading the things that changed). At this point only Indigo 0.8 stable is supported, however.
Another problem with the old version is the very complicated material exporting. How a Blender material is mapped to an Indigo material and its properties was done based with hackish rules (like "if alpha<1 then use a uniform spectrum and a rgb spectrum otherwise"). This is very difficult for the code mainainers and I think not very user friendly too. Moreover, when additional Indigo material types or medium options would be added, it would be increasingly difficult to add these in the exporter without breaking something. I choose a different approach that was already suggested in the code of the old exporter: the name of the material defines the type (diffuse, phong, specular). The settings of the material and medium can also be defined with strings: the names of the textures in the material. See further for the manual, which should make things more clear if this sounds mysterious.
Another feature of this new version is that you can export the material code to a Blender buffer and edit it in Blender. After editing it is possible to export your scene with this edited materials. This way you can store custom Indigo material settings within your Blender file and keep these for future exports.
I chose to create a page on the Blender wiki for hosting the script an a manual (under construction): http://wiki.blender.org/index.php/BlenderToIndigo
The current version of this script (2.43 at the time of this writing) is still beta and not thouroughly tested, but I invite you to test it.
Please reply in this thread if things don't work as expected, if things are unclear, if you have patches or other ideas. I'm happy to help.
(I should get some sleep now)
Last edited by soxofaan on Wed May 30, 2007 1:10 am, edited 1 time in total.
hi soxofaan,
very nice coding... i see you are a real master of python
I've done years of OO coding but never used python before. The indigo exporter and blendigo are my first steps in python and i'am still learning all this nice tricky language features
. Your code shows me what's possible with tha "snake"... very NICE 
very nice coding... i see you are a real master of python


I've done years of OO coding but never used python before. The indigo exporter and blendigo are my first steps in python and i'am still learning all this nice tricky language features



Re: Yet another Blender to Indigo exporter
The "2.43" has nothing to do with the blenderversion, you use, I guess, but if so, you should try 2.44soxofaan wrote:The current version of this script (2.43 at the time of this writing) is still beta and not thouroughly tested, but I invite you to test it.

This looks very promissing, indeed

you have 2 options:Olis wrote:This looks promising. I looked at the wiki page, and it looks like the setting for where the focus should be is missing. Or is it something you set in blender?
- you can use the autofocus feature of Indigo: enable the "autofocus" button
- if the "autofocus" button is disabled, you can set the focus disance by hand, or with 2 extra buttons: getting the focusdistance from the camera settings in blender or getting the focusdistance to the blender cursor
Re: Yet another Blender to Indigo exporter
2.43 is the current version of the exporter, it has nothing to do with the blender version (I test it mainly in blender 2.43 however).Kram1032 wrote:The "2.43" has nothing to do with the blenderversion, you use, I guess, but if so, you should try 2.44soxofaan wrote:The current version of this script (2.43 at the time of this writing) is still beta and not thouroughly tested, but I invite you to test it.
This looks very promissing, indeed
It's indeed a coincidence: the old exporter was at version 1.42 or something, I started versioning the rewrite of the exporter from 2.0 and now I'm at 2.43.
thanks
I doubt it's a good idea to use Blender's SSS settings for Indigo SSS settings. Blender's SSS is "fake" (but fast) and uses a totaly different technique than the "real" SSS of Indigo. Consequently the SSS settings can't be mapped 1 to 1.Kram1032 wrote:I see...
But with 2.43, it's not a simple to set up SSS as with 2.44, there is that additional Tab
That's the whole idea after my approach: it's to difficult (for both the exporter developers and the users) to do an understandable mapping from blender material settings to indigo material/medium settings. That's why I take a different route with the weird texturename stuff.
However, the exporter is designed that way that it could be possible to implement different blender-material-to-indigo-material-filters within the same script. So it could be an option how you translate your Blender scene to a Indigo scene.
hum... I think, it's very simple:
activate SSS
use only ONE setting: the amount of blur.
this can be used between 0.01 and 1000, which should be enough.
Blur settings define the colour and if all the sliders are simmilar, it's getting exported as uniform
Only all those extra options are kinda hard to find...
greystein and such...
activate SSS
use only ONE setting: the amount of blur.
this can be used between 0.01 and 1000, which should be enough.
Blur settings define the colour and if all the sliders are simmilar, it's getting exported as uniform

Only all those extra options are kinda hard to find...
greystein and such...
- joegiampaoli
- Posts: 837
- Joined: Thu Oct 05, 2006 7:12 am
- Location: San Miguel de Allende-MEXICO
- Contact:
new version
I posted a new version (version 2.52) of the BlenderToIndigo exporter script to http://wiki.blender.org/index.php/BlenderToIndigo . The documentation is not updated yet at the moment of this writing. I'll do it when I have some time.
Changes:
Changes:
- added support for mesh modifiers (like mirror and subsurf),
- added support for DupliVerts, Duplifaces, DupliFrames, DupliGroups
- added support for Curve objecs, Surf Objects, MBall objects
- changed spectrum handling
- The green balls are 'DupliVerted' sphere primitives
- the orange drops are 'DupliVerted' meshes with subsurf subdivision
- the gold 3-shaped objects are 'Dupliverted' curves with a bevOb profile
- the blue things are 'DupliFramed' nurbs surfaces
- the glass things are 'DupliFramed' meshes with subsurf subdivision
- the lighting is done by 4 'DupliVerted' rectangular lights, (see the highlights in the green spheres
- Attachments
-
- im1180440231.png (214.56 KiB) Viewed 14540 times
Who is online
Users browsing this forum: No registered users and 3 guests