Indigo 0.7F exporter here! Features added/Comments welcome!

Announcements, requests and support regarding the Blender Indigo export script
uomotubero
Posts: 4
Joined: Mon Sep 11, 2006 7:03 pm

Post by uomotubero » Wed Feb 14, 2007 9:59 pm

I am not able to export the bump value.
even witht "nor:25" in Blender
the <b> is always 0.0001

Image

<material>
<name>Au.nk1</name>

<phong>
<nk_data>nkdata/Au.nk</nk_data>
<exponent>300.000</exponent>
<bump_map>
<uv_set>uv</uv_set>
<path>bump.jpg</path>
<b>0.0001</b>
<exponent>1.000000</exponent>
</bump_map>
</phong>
</material>

Wedge
Posts: 441
Joined: Sun Jan 14, 2007 11:33 am
Location: East Coast, USA

Post by Wedge » Thu Feb 15, 2007 6:29 pm

Greetings!

I don't have any access to linux so I have been waiting to merge these features with the author so that they can be done correctly. I really don't like to post up code I can't test.

Also, this is a low priority addition to the exporter on my list. And with Indigo 07 test 5 I just saw in the forum, this code will have to change now right? (the resume feature) Or not? I have not had much time to look.

Right now I am quite busy with other things but when I get some time with the exporter again I'd like to look at the rotation matrix. I want to try some code to avoid the rotation matrix errors that can still happen. I don't know if I can get anywhere with it and so I haven't started researching yet.

To Uomotubero: The <b> tags are fixed values that must be edited in the xml file, if it is desired to change this from blender I can change it in the next update. This value was noted in the Indigo manual. (0.0001)

Update: I don't want it to sound like I don't care for the launching indigo from blender feature but I figured I should also add that another reason this isn't a high priority is because since Indigo 07 is much more complicated to use through Blender, (We are running out of sliders to assign to :( and the confusion is rising because some sliders don't necessarily make sense to use for values, but have to be used because blender sliders have certain ranges, like a slider from 0.0 to 1.0, to use this we can expand it a little by using a multiplier to the final value) and when you are using Indigo 07 features it is likely you will have to hand edit some parts of the XML file before you launch a render because some of the features have fixed values.

If you know it well enough, I suppose we could try and add this to the exporter. And those with linux can test it out. Do you know which authors wrote this? So we can add the right credits...

After reading the code you posted, what happens when you try to run indigo from blender without the .conf file? Does it throw an error?

Is there an option to start indigo without the belownormal command?
Content contained in my posts is for informational purposes only and is used at your own risk.

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Fri Feb 16, 2007 4:27 am

You may can use blender nodes, to expand the export features...
Otherwise, Is there any way to do something similar to YafRayExport? Just with python?

SreckoM
Posts: 125
Joined: Tue Jan 30, 2007 7:33 pm
Location: home/Serbia/Novi Sad

Post by SreckoM » Fri Feb 16, 2007 6:23 am

Kram1032 wrote:You may can use blender nodes, to expand the export features...
Otherwise, Is there any way to do something similar to YafRayExport? Just with python?
Nope, to do that (something like RCuiz do for PovRay, and now Mental) u need C (and C++) skills, and skills to make patches.

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Fri Feb 16, 2007 8:51 am

And, if you do it in a python scripting window, instead of a blender internal one?
Just, like the Material chooser, which is planned by someone... (I've forgotten, who)
Btw: How does it look like with this Script?

Wedge
Posts: 441
Joined: Sun Jan 14, 2007 11:33 am
Location: East Coast, USA

Post by Wedge » Fri Feb 16, 2007 11:43 am

The developement collaboration thread talks a bit about how things could be done.

I, though, don't have the proper developement programs and the time required to writing C++ or another programming language or even to learn blender nodes. (I have no idea what blender nodes are)

I am also not comfortable with downloading a modified version of blender. I am quite scared that something will change in the way I am used to it already and I might have to learn a new way of using blender itself. (this is only a guess, since I have never downloaded a modified build)

After all, I am a pretty simple person, and to be honest, all of the python code I have written so far was done in notepad. No special programs here.

I wonder if it is possible to: Code a big gui page full of buttons in python and have it open with the blender exporter. This allow users to set up the materials in a non-confusing way. And in blender they only would have to write that this mesh uses this material name. Only the name which would then be grabbed and applied to the mesh, while the actual material features are set up from this gui. (Problem 1: Use a if statement to match the blender material name to the one defined in the gui?) But this is only a thought and I have no idea right now if this is possible. It seems you would have to allow a free input box, for strings to be used, then figure out how to add another box for another material, then erase all of its settings, then add another string box for another material, and right here I am lost...don't know how these boxes could be created for additional materials. (Problem 2: Maybe a drop down list? That can be filled as the user makes materials? How can the material features be saved to this particular material? Maybe create a list somehow with a submit button? Maybe create a big string += style and then split it apart for each material?) And if you define a certain number of boxes, then users will be limited to a certain number of materials. And even all this might be impossible....somehow I think it will end up a mess and so I have not tried.

:)
Content contained in my posts is for informational purposes only and is used at your own risk.

SreckoM
Posts: 125
Joined: Tue Jan 30, 2007 7:33 pm
Location: home/Serbia/Novi Sad

Post by SreckoM » Fri Feb 16, 2007 7:59 pm

Well I duno how u can achive this with python scripts (maybe realy with some dropdown list, which could gather all materials and then u can assign them diff values :?: ) Truly I think that solutions with PyNodes is the best one (easy), and I think that they will be in official release soon.
I'm developing (just started) exporting from B to another rendering engine, and after of some research I think pynode solution is the best right know, for me thou, cause I'm not so good with C and B architecture, and I think this is most flexible variant.
But (as always) it's pretty hard to find good documentation to understand them, and as soon as I put my hands on some docs I'm gona post here of my findings.
For now I know that main work is to write script (node) which will be indigo material after that user can add it as node, assign it to object, and (this is what I couldn't find for now, duno is this possible) gather data with python exporter script. if this is possible main thing is to download build with pynodes patch compiled, write nodes and tada.
But as I said I need more knowledge of this.

Making patch is probably great too, but I don't have skills to do that or time for the exporter I'm doing, maybe someone could contact one of developers for Blender2MentalRay, Blender2PovRay, Blender2Kerkethya to ask for help, about developing this kind of build for indigo.

By the way I found this script on this topic at blenderartist, maybe interesting, duno still in which way this can be used, maybe someone know more: http://blenderartists.org/forum/showthread.php?t=89225

SreckoM
Posts: 125
Joined: Tue Jan 30, 2007 7:33 pm
Location: home/Serbia/Novi Sad

Post by SreckoM » Sat Feb 17, 2007 2:19 am

I found out that this pyNode variant can't be done.
So there are two ways via script (hard to create materilas shaders other then using existing, blender's architecture) and via patch (more c++ skills).

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Sat Feb 17, 2007 4:08 am

@Wedge:
Such a patch, I meant, doesn't mess up ta all! It just adds an entry in drop-down-menu, where you can read "Blender internal" in the Blender render tab.

First entry is "Blender internal"
2nd one is (@ me) "YafRay"
and third would be "Indigo"
Some probably will have "PovRay" too, which I don't really use, yet... Maybe I just have to read some tuts, but I don't check PovRay at all...
(I need a GUI)

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

Post by zuegs » Sat Feb 17, 2007 9:05 pm

@Wedge:

As mentioned in another thread... there is a way to create a material GUI with python.
I'am building a indigo-material-editor proto. It works quite fine, and all indigo-settings get stored within the blender-file. That means, next time you reopen your blender-file all indigo-materials are loaded too. It's just as each blender-material has his indigo-material counterpart.
Here a preview on the "diffuse", "phong", "specular" and "blend" GUIs:
Image

User avatar
joegiampaoli
Posts: 837
Joined: Thu Oct 05, 2006 7:12 am
Location: San Miguel de Allende-MEXICO
Contact:

Post by joegiampaoli » Sat Feb 17, 2007 10:04 pm

:shock: :D :shock: :D :shock:
WOW!!
That's neat!
If you guys can integrate this it would be so wonderful.
Joe Giampaoli
Never tie a ship to a single anchor, nor life to a single hope
My Indigo Gallery

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Sat Feb 17, 2007 11:25 pm

@zuegs:
Kram1032 wrote:And, if you do it in a python scripting window, instead of a blender internal one?
Just, like the Material chooser, which is planned by someone... (I've forgotten, who)
Btw: How does it look like with this Script?
That's what i meant^^ You develop it?
When will the new materials be added?
When will you post the script?

neepneep
Indigo 100
Posts: 413
Joined: Wed Jun 28, 2006 10:21 am

Post by neepneep » Sun Feb 18, 2007 5:06 am

That looks awesome zuegs ! when can it be tested :D :D :D ?

Wedge
Posts: 441
Joined: Sun Jan 14, 2007 11:33 am
Location: East Coast, USA

Post by Wedge » Sun Feb 18, 2007 11:19 am

Zuegs:

Yes thats good stuff Zuegs. I remember this from the developement thread, but I was thinking maybe something went wrong since I haven't heard from you in awhile. (I have been quite busy myself so maybe I missed one of your posts)

I assume this will require a reworked material section in the exporter? Or maybe this section is no longer needed?

Were you able to solve problem 2 I mentioned in my previous post or wasn't it a problem? I can't seem to get my mind to find a solution for adding multiple materials.

I'm thinking now maybe it's possible to add a bunch of dummy materials in blender then count them in python and make them all blank materials with the name used in blender all ready to be set up in the python gui.

I see now I reread your post in the developement section and I described the python gui just like you did it. Must be I have had the idea floating around in my mind since I first saw your post. :)
Content contained in my posts is for informational purposes only and is used at your own risk.

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

Post by zuegs » Sun Feb 18, 2007 12:37 pm

@Wedge:
yeah i was quiet busy and progressed only slowly with this :cry:
I had to completely rework the material export section as we now export the materials from the python GUI.

I'am sorry, i haven't realy understood the problem you mentioned ;) - so let me in place describe shortly how the material-editor works: for each material in blender there's a indigo-material with same name. Whenever you build your scenes you have to create blender-materials as usual but if you don't use blenders-internal-renderer you don't need to setup them. We only need the blender-material-objects as interface for indigo-materials. In the indigo-GUI you then select the material you like to edit from the drop-down-box where all material-names are listed. Below that you then can see current indigo settings for the selected material. Currently I have the GUI for Diffuse, Phong, Blend, Specular+basic-mediums, Glossy-reflection and some basic SSS. Also theres a special material-type for lights. What ever you set in the python-GUI gets stored inside the blender-material-objects with the advantage that all indigo-stuff gets saved inside the ".blend" file. Once you have setup your scene you hit the Render-button as before and the objects, meshes amd materials gets exported to indigos-XML for rendering.

I'am not sure if I have disposed your mentioned problems Wedge but most is ready and working... as mentioned, there are some special materials settings that i haven't yet build the GUI for as phase-functions for SSS and other complex stuff...
Also I'am still looking to solve the ortho-matrix-limitation... i have some ideas but they are quiet heavy to implement :roll:

The changes in exporter are quiet heavy and so there is many rewriten code that carry us back to the discussion of team-development :? So I'am realy SORRY guys but this is once again a "one-man-show-development" :wink: and so it should NOT be assumed to be the successor of the famous Blender-2-indigo-exporter!
It's a new toy, a indigo-material-editor-for-blender-with-indigo-export (i call it Blendigo 8) ) and it will be open-source as all Blender-2-indigo exporters and everyone can copy/paste and modifiy to their needs :roll:

I will start a "Work-in-progress indigo-material-editor-for-blender" thread here soon with a first beta-source for testing-purpose as i'am sure there's still much to do/fusion :oops: ....

Post Reply
223 posts

Who is online

Users browsing this forum: No registered users and 4 guests