Wedge's Indigo/Blender Exporter Developement Logbook

Announcements, requests and support regarding the Blender Indigo export script
Post Reply
13 posts • Page 1 of 1
Wedge
Posts: 441
Joined: Sun Jan 14, 2007 11:33 am
Location: East Coast, USA

Wedge's Indigo/Blender Exporter Developement Logbook

Post by Wedge » Mon Jan 14, 2008 1:21 am

I thought I should write down some information about the developement of exporter for Indigo/Blender. Developement happens in the silence often and sometimes my research/attempts at writing something new, fail.

If progress is made with writing a new feature, usually I do not get excited too quickly until I test it and try to make sure it actually works right. Sometimes the feature will work right 90% of the time and fail only 10% of the time. But failing 10% of the time is not acceptable because that means that some people will not have access to the exporter.

Unfortunately some people might not be able to get the exporter to work across all systems because I only develope this on one 32-bit PC with Windows XP. So when an issue comes up with another OS or computer type, sometimes I am quite helpless. Issues can also come up with different builds of Blender as well. So I make sure and write which Blender version (official build) the exporter was written for. This does not mean it won't work for other builds, but you should expect issues to come up if you use a build that the exporter was not written for.

The version of Indigo is especially important when using an exporter. Each version of the exporter was written for a certain version of Indigo. You should make sure you use the matching Indigo version that your exporter was created for.

If I keep a logbook going now and then maybe it will help bring new and old ideas to the table and can see how something like that might work out. (or not work out)

First up I want to bring to attention my recent post in this forum about Blender 2.5. As far as I can tell by the documentation for Blender, it seems reasonable to believe that exporters written for version 2.45 of Blender will not work for version 2.5. So I am somewhat concerned about this. I think going deep into the exporter at this point might not be a good idea, since when Blender 2.5 comes out, (along with new Blender Python API documents that are very important to developers) there might be better ways to code or newer features to use that allows us access to new items in Blender. This event might cause the updates previously made to be a "waste of time" to code. On the other hand they may be unaffected by the update, so it is just something to think about.

I am somewhat addicted (some of you probably know this) to tearing apart the Blender exporter and rewriting it. So let me talk about some new things I am working on right now.

1. (done, testing) Rewriting mesh export function. This function is basically the most time consuming part of the exporter because it works with your meshes. The bigger your meshes are, the longer it takes to export. Exporting the scene file settings and even your materials is usually done in less than 1 second. Exporting the meshes can take a number of minutes depending on what you are working with, and how fast your computer is.

At this time I have rewritten the mesh function, and from various tests a moment ago, it is now exporting scenes in half the time as the old version. But, while I am feeling somewhat excited there is still work to be down to add texture support. The new mesh function only understands materials. Which brings me to point number 2.

2. (done, testing) Support for multiple materials on one mesh. This is now available with the newly rewritten mesh function. You can apply multiple materials to the same mesh. (by assigning materials to the faces of the mesh) I have included a picture of a simple object to show what I am talking about. There are a few different ways to write this feature and I am currently looking at the best way to do this. (I already wrote it but I am looking for an acceptable compromise between speed and exported file size)

3. (in progress) Support for multiple textures on one mesh. After optimizing point number 2, I'd like to add another new feature, and allow you to put multiple textures on one mesh. As far as I can see this should go smoothly.

Before I finish adding this entry into the log here, I want to add that these features are still in developement and although some of them might be considered done and working, some of them may cause trouble later on by messing up the entire progress of the others. So until my next entry....thanks for reading. :)

Edit: Opps, probably should add the picture I was talking about huh :oops:
Attachments
multiMatTest.jpg
Test with multiple materials
multiMatTest.jpg (60.59 KiB) Viewed 4467 times
Content contained in my posts is for informational purposes only and is used at your own risk.

User avatar
aleksandera
Posts: 380
Joined: Fri Sep 15, 2006 10:49 pm
Location: Slovenia

Post by aleksandera » Mon Jan 14, 2008 12:56 pm

Guess Blender AND Indigo will come out "BIG"
this year. Encouragments from me! Dont wory
abaut the render, others are here who will
make it look great. Hope I'l know how to use
the new features.

Great job!

Regards,

Aleksander

(sorry for my b.a.) :D :D :D

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

Post by Wedge » Wed Jan 16, 2008 11:05 pm

These new features will be done behind the scenes as far as the exporter is concerned. Inside Blender, you can set multiple materials to a mesh and the exporter will export them automatically. Same for textures. I figure the name for the new exporter will be "Hybrid." Anyone want to guess why? :)

The new mesh function is almost finished. I will be taking a look at other functions as well. Rewriting the mesh function has solved a few other problems. So now I have to rework some other areas of the exporter. A weekend release might be possible.

Today I worked on Carmine. (material editor I coded) It comes in handy when I write the exporter and need to test different materials. I spend a lot of time in the scene file so it is handy to copy/paste materials.

So now back to that exporter.....

Update: Finished multi texture support...here is an image to show:
Attachments
multiTexTest.jpg
Test showing multiple textures on a cube
multiTexTest.jpg (116.42 KiB) Viewed 4262 times
Content contained in my posts is for informational purposes only and is used at your own risk.

sk2k
Posts: 35
Joined: Sun Jan 07, 2007 10:26 pm

Post by sk2k » Thu Jan 17, 2008 8:52 pm

Hi,

nice to see that you still working on the exporter. :)

MfG
sk2k

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

Post by Wedge » Fri Jan 18, 2008 9:50 pm

I am now finished with this update of the exporter. Testing appears to be showing me correct results so in a moment I will release this version of the exporter into my main exporter thread. :) Thanks for reading.
Content contained in my posts is for informational purposes only and is used at your own risk.

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

Post by Wedge » Tue Jan 22, 2008 9:56 am

Greetings! Back again with a new feature that I suppose has a bigger use than I originally intended.

Probably around 9 months ago a forum user (oodmb) requested a feature that could shrink a mesh to fit inside of a duplicate. Scaling does not work, so you need to examine the mesh and adjust it carefully. I now have a pretty accurate feature like this coded (but not 100 percent accurate) and my first test was posted in the finished artwork forum. I was not sure where to post it, since it was a benefit for everyone to see a layered skin, but also a benefit to this exporter. (as being a new feature)

Link to skin test: http://www.indigorenderer.com/joomla/fo ... php?t=3459

This test here was rendered at almost 4900 spp at 640x480 resolution. I have used a double layer Blender Suzanne monkey and here are the two materials used: (diffuse transmitter inside a glossy SSS material)

This feature will be added into the exporter very soon..

Code: Select all

	<medium>
		<name>scatter</name>
		<precedence>2</precedence>
		<basic>
			<ior>1.5</ior>
			<cauchy_b_coeff>0</cauchy_b_coeff>
			<absorption_coefficient_spectrum>
				<rgb>
					<rgb>0.1 0.1 0.1</rgb>
					<gamma>2.2</gamma>
				</rgb>
			</absorption_coefficient_spectrum>
			<subsurface_scattering>
				<scattering_coefficient_spectrum>
					<rgb>
						<rgb>10 0 10</rgb>
						<gamma>2.2</gamma>
					</rgb>
				</scattering_coefficient_spectrum>
				<phase_function>
					<uniform/>
				</phase_function>
			</subsurface_scattering>
		</basic>
	</medium>

	<material>
		<name>outer</name>
		<glossy_transparent>
			<exponent>40</exponent>
			<internal_medium_name>scatter</internal_medium_name>
		</glossy_transparent>
	</material>

	<material>
		<name>inner</name>
		<diffuse_transmitter>
			<albedo_spectrum>
				<rgb>
					<rgb>0 1 0</rgb>
					<gamma>2.2</gamma>
				</rgb>
			</albedo_spectrum>
		</diffuse_transmitter>
	</material>
Attachments
SuzanneLayerTest.jpg
Suzanne double layer test
SuzanneLayerTest.jpg (179.23 KiB) Viewed 4084 times
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 » Tue Jan 22, 2008 10:14 am

emerald skin!
Nice :D

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

Post by Wedge » Mon Jan 28, 2008 10:03 pm

Here is a quick post to mention that other object types besides mesh can be exported by the exporter. In the past I have said the exporter supports mesh objects only. This is true and only mesh objects with faces will export. Curves or other objects will not export if they do not have faces. If a mesh does not have faces it will not export.

So for those of you that do not know this, inside Blender you can convert meta, text, or other object types to a mesh type.

Here is a simple test I did: I set up the text and meta ball objects, then they were converted to mesh types and then I set up multiple materials on the text mesh and exported the scene. :)
Attachments
convertedObjectTest.jpg
Test showing meta balls and text object types converted to mesh and then exported and rendered.
convertedObjectTest.jpg (58.43 KiB) Viewed 3978 times
Content contained in my posts is for informational purposes only and is used at your own risk.

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

Post by Wedge » Wed May 07, 2008 3:21 pm

I was thinking about restructuring the hybrid exporter and Carmine. Been thinking that only a few things need to be done to support Indigo v1 stable. Started a todo list a few days ago wondering if I really wanted to go down that road again. Not sure what is at the end of this road but I thought I would post the todo list and see if anyone had any thoughts about it? The idea is to marry Carmine and the exporter...

Code: Select all

The scene file...(somewhere where the materials are normally placed)

	<!--carmine
	!blueBox.phong!
	!greyBox.diffuse!
	carmine-->

Todo list...

----- Exporter -----

-removed animation support
-removed material support
-added Carmine support
-add file browser where needed


----- Carmine -----

-update carmine to indigo 109
-add 4? file browser windows where textures path etc are to be loaded
-remove text boxes from carmine that file browser replaced
-add new menu item feature to carmine to "insert material into main scene file igs" this feature opens file, finds comment, and inserts materials
	(if with save file open and write...else with scene file open and write)
-add new populate materials feature that reads main scene file that has <!--populate with these materials--> comment and puts mats in list box
	(populate by name, so redBall.diffuse adds in a mat called redBall and set to diffuse)
-move link A and link B buttons to under both linked areas
-add update/save feature that allows you to edit a material and save it as same name, cannot edit type but you can edit everything else
This is just a brain dump from me. Sorry if it is not completely understandable. Any thoughts? As you can see this work would be done to bring Carmine and hybrid exporter together. (not only the Blender exporter, other exporters could have Carmine support, see scene file code above) :)
Content contained in my posts is for informational purposes only and is used at your own risk.

BbB
Posts: 1996
Joined: Fri Feb 09, 2007 8:28 am
Location: Berlin
Contact:

Post by BbB » Wed May 07, 2008 5:50 pm

Hey Wedge. Nice to have you back. You don't feel like doing a grand update of Violet, do you? With camera tonemapping, aperture diffraction and the new filters...

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

Post by Wedge » Thu May 08, 2008 10:09 am

My C++ skills are quite rusty. I have not had a reason to write in C++ for quite a few years now. Never looked at Violet's source code. I assumed Violet was dead. :?

Also assumed it died because Gimp or similar photo editors could do what Violet basically did? Forgive me if I am wrong. :roll:
Content contained in my posts is for informational purposes only and is used at your own risk.

User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Post by dougal2 » Thu May 08, 2008 10:39 am

Trouble with violet is that it requires a programmer with expert knowledge in image processing to get any new features added. I guess there aren't too many of those around here. If you guys have thoughts on violet's future, you could start a wishlist in the development forum and maybe someone will step in. I'm afraid it won't be me though, I don't know much more than basic I/O and GUI routines really.

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

Post by Wedge » Tue May 13, 2008 2:53 pm

Well I have performed some work on the programs. But unfortunately I was not able to do all that I wanted to. (and I quickly lost interest) The updated todo list looks like this:

Code: Select all

----- Exporter -----

*removed animation support
*removed material support
*added Carmine note
*added 4 file browsers

----- Carmine -----

*reworked GUI
*added 4 file browsers
*optimized color selection code
*removed color blend feature
*added edit feature that allows user to change material settings (except name and type)*need to add note not to forget to click view before doing edits*
*removed redundant color buttons (now open color panel by clicking on swatch)
*deleted remove material feature because it was possible to remove components of a blend or specular material which will cause errors
-add oren nayar material
-update phong material with specular reflectivity spectrum
All of the stars (*) are done and the hyphens (-) are still left to do.
Content contained in my posts is for informational purposes only and is used at your own risk.

Post Reply
13 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 18 guests