Page 2 of 4

Posted: Thu Sep 04, 2008 8:13 am
by Woodie
Big Fan wrote:@BbB
sorry I cant fix it with that info.
can I have a screen capture of the error and last line number from the Blender console please or better yet the .blend of the simple scene with the script settings saved as well.

some 98 people have already downloaded this and no one says anything about it if they have it too which is not very helpful to me or to others to say the least.

< shakes head - thinks why bother >
I think it is to early. I spotted that late evening yesterday, and can't wait to get out of work. And just like Kram said. People tend to comment when they have something to complain about, but not so much about: " Oh yeah. It works great". Personally I thank you for all the effort in updating the script.

Posted: Thu Sep 04, 2008 9:45 am
by Big Fan
@woodie (AND KRAM)

its worrying from my perspective cos I respect BbB's ability.
if he says he cant get anything out of it in a simple scene there is obviously something seriously wrong there.

I expect there to be issues but not working at all is not what I like to hear.
I dont like the idea a whole lot of people downloaded and continue to download something that doesnt work and are now may be silently pissed off(?). :oops:

If its fundamentally broken I'm going to have to apologise to the community and take it down until its fixed.

Posted: Thu Sep 04, 2008 11:24 am
by BbB
Sorry for the delay. I'll post the scene (minus textures) tomorrow for you to have a look at (no access to it right now). The mistake is no doubt mine. But nonetheless quite keen to make it work at this end. Haven't been indigoing for ages.

Posted: Thu Sep 04, 2008 1:05 pm
by Woodie
OK. I give it a test run and here are my remarks.
1. On initial (blender) scene script is crashing indigo (both console and GUI)
2. I discovered that the problem was with textures. By default material in your scrip have separated uvs for albedo and bump. Fixing that to generic uv fixed the problem.
3. During Export of a bit more complex scenes I experience export problem that crashes blendigo - from console:

"exporting mesh "Mesh_Curve"
Traceback (most recent call last):
File "<string>", line 3961, in buttonEvt
File "<string>", line 3191, in exportStil
File "<string>", line 3129, in export
File "<string>", line 2601, in exportMesh
File "<string>", line 2532, in exportMesh
ValueError: object "Mesh_Curve" not found"

That's all I found so far.

Posted: Thu Sep 04, 2008 2:43 pm
by Big Fan
Thats probably enough for now :)

ok thanks I'm not quite sure what you mean about the uv but I thought of this...

The map uvsets, although each named differently as albedo,bump,displacement etc now, reference the same set of uv's = index 0 in the <embedded> part.
Eventually I will make it so they can appropriately reference multiple sets index 0,1,2,3..
Indeed ATM if you make a second uvset in F9 and use say the bump texture (with the same unwrap) and name that '1' in F9 ansd F5 you should see that there is a reference to set 1 in the <embedded> part of the .igs, ie. bump index =1 and not =0, and a whole second set of uv's = 1 and tris, written below set uv =0 and tris.
anyone reading -this isnt finished pending a change to embedded2 format so dont try to use it - just use the one base set

Perhaps the difficulty you have found is you have cross contaminated uvset names stored in your .blend by using old and now new blendigo versions sequentially.
'uv' as a common uvset name is gone with this version of the script but if you hand edit the .igs so that all say 'uv' (as you did in your fix) as per old it will work.
Dont forget this is my particular solution and people may not like it :wink:
You only get to play with my toys here :P remember..

As a possible solution try 'updating' or 'resetting' the UI to make sure all of the uvset names in the texture fields you see are respectively albedo,bump,displacement etc and not saying 'uv' anywhere.
You should not need to enter or change anything auto filled in for you - just unwrap and load the correct tex image.
Mixing 'uv' in with 'albedo' for example will not work.
HTH
If not let me know 8)

here is a snip of sample code showing the intended results:

Code: Select all

	<material>
		<name>Material</name>
		<phong>
			<exponent>
				<constant>500</constant>
			</exponent>
			<ior>1.3</ior>
			<texture>
				<path>testscenes\checker.jpg</path>
				<uv_set>albedo</uv_set>
				<exponent>2.200000</exponent>
				<a>0</a>
				<b>1</b>
				<c>0</c>
			</texture>
			<diffuse_albedo>
				<texture>
					<texture_index>0</texture_index>
				</texture>
			</diffuse_albedo>

			<texture>
				<path>testscenes\checker.jpg</path>
				<uv_set>bump</uv_set>
				<exponent>1.000000</exponent>
				<a>0</a>
				<b>0.001</b>
				<c>0</c>
			</texture>
			<bump>
				<texture>
					<texture_index>1</texture_index>
				</texture>
			</bump>

			<texture>
				<path>testscenes\checker.jpg</path>
				<uv_set>exponent</uv_set>
				<exponent>1.000000</exponent>
				<a>0</a>
				<b>10000</b>
				<c>1</c>
			</texture>
			<exponent>
				<texture>
					<texture_index>2</texture_index>
				</texture>
			</exponent>

			<texture>
				<path>testscenes\checker.jpg</path>
				<uv_set>displacement</uv_set>
				<exponent>2.200000</exponent>
				<a>0</a>
				<b>0.01</b>
				<c>0</c>
			</texture>
			<displacement>
				<texture>
					<texture_index>3</texture_index>
				</texture>
			</displacement>

			<layer>0</layer>
			<base_emission>
				<constant>
					<rgb>
						<rgb>8e+007 8e+007 8e+007</rgb>
						<gamma>1</gamma>
					</rgb>
				</constant>
			</base_emission>
			<texture>
				<uv_set>emission</uv_set>
				<path>testscenes\checker.jpg</path>
				<exponent>2.2</exponent>
			</texture>
			<emission>
				<texture>
					<texture_index>4</texture_index>
				</texture>
			</emission>

		</phong>
	</material>

	<mesh>
		<name>Cube</name>
		<normal_smoothing>false</normal_smoothing>
		<merge_vertices_with_same_pos_and_normal>false</merge_vertices_with_same_pos_and_normal>
		<embedded>
			<expose_uv_set>
				<index>0</index>
				<name>albedo</name>
			</expose_uv_set>
			<expose_uv_set>
				<index>0</index>
				<name>bump</name>
			</expose_uv_set>
			<expose_uv_set>
				<index>0</index>
				<name>exponent</name>
			</expose_uv_set>
			<expose_uv_set>
				<index>0</index>
				<name>displacement</name>
			</expose_uv_set>
			<expose_uv_set>
				<index>0</index>
				<name>emission</name>
			</expose_uv_set>


hmmm..curves and text objects might give trouble - I don't remember testing those...oh well..cant get everything :oops:

If it is 'not found' possibly the issue is it was converted to a mesh and the datablock name and object name are now different.
If that is the case, as a work around for the moment, and to test this idea, you could try changing the ME name, to be the same as the original OB name in the blender link and materials panel F9.

Update

Posted: Thu Sep 04, 2008 6:32 pm
by airxart
My test scene consists of a plane emitter, imported svg text converted to a mesh inside a cube.
Indigo 1.1.9, blendigo_v1.1t9_SW.py(edited) :shock:

To get the previews to work I had to change some lines.
# Preview menu by BF and Davec
PreviewScene = Draw.Menu("Preview scene:%t|sphere%x0|cube%x1|monkey%x2|matdb%x3", evtNoEvt, xd(0,1)+wd(1)-75, y+31, 75, 18, PreviewScene.val, "select a preview scene") #BF
PreviewName = "previewmaterial" #DaveC
if PreviewScene.val == 0:
matPreviewFile = "IMPsphere.igs" ### not *.xml
if PreviewScene.val == 1:
matPreviewFile = "IMPcube.igs"
if PreviewScene.val == 2:
matPreviewFile = "IMPmonkey.igs"
if PreviewScene.val == 3:
matPreviewFile = "IMPmatdb.igs"



def exportMatPreview(mat):
global indigopath
print("\nINDIGO MATERIAL PREVIEW EXPORT\n")
time1 = Blender.sys.time()
filename = os.path.join(indigopath, "previews", matPreviewFile) ### not BLpreviews
filepath = Blender.sys.dirname(filename)
matsfn = os.path.join(indigopath, "previews", "previewmats.xml") # DaveC ### not BLpreviews
relmatsfn = relpath(filepath, matsfn)
includelist = []
if not(os.path.exists(filename)): # if not found try alternative old ".xml" file extension
print 'no preview file found "%s"'%(filename)


Globals had the : mat PreviewFile = ImpSphere.xml
I left this alone. Not sure if it should read ImpSphere.igs ## ?


I rendered the test scene using blendigo 1.1.7 just fine.
Then rendered it using blendigo_v1.1t9_SW.py

The problem I ran into was the imported svg, convert curve to mesh.
I had to enable the Mesh subdivision button. Once I did that it worked fine.
I selected IES1.ies photometric. Used console & used GUI.
Both worked. :lol:

Posted: Thu Sep 04, 2008 7:03 pm
by Big Fan
ok pleased you got it working - well done!

as I said I didnt include my previews in the .zip - they are different and sit in a folder called BLpreviews ( to distinguish it from the Skindigo set if you also have that ) and are .xml rather than .igs
.xml came first in indigo history
you should be fine just renaming to .igs although you need to be aware that the code in there is legacy format.
the previews will need to be updated as well which is why I havent supplied them for this experiment :roll:

blendigo 1.1.7 and this version just keep crashing my indigo

Posted: Thu Sep 04, 2008 7:04 pm
by trivita
i got indigo 1.1.9
and blendigo 1.1.7 kept crashing it (right before 'initial warming up', i can't figure out why, coz SkIndigo works fine)
now , no luck for this new version :cry:
this below is the simplest test scene generated by 1.1t9_SW. (with only a cube in it)

big thanks to the author

Code: Select all

<?xml version="1.0" encoding="utf-8"?>

<scene>
	<renderer_settings>
		<width>800</width>
		<height>600</height>
		<large_mutation_prob>0.4</large_mutation_prob>
		<max_change>0.01</max_change>
		<max_num_consec_rejections>1000</max_num_consec_rejections>
		<max_depth>10000</max_depth>
		<aperture_diffraction>false</aperture_diffraction>
		<super_sample_factor>2</super_sample_factor>
		<downsize_filter>
			<mn_cubic>
				<ring>0.333000004292</ring>
				<blur>0.333000004292</blur>
			</mn_cubic>
		</downsize_filter>
		<splat_filter>
			<mn_cubic>
				<ring>0.333000004292</ring>
				<blur>0.333000004292</blur>
			</mn_cubic>
		</splat_filter>
		<ray_origin_nudge_distance>0.00010000000149</ray_origin_nudge_distance>
		<metropolis>true</metropolis>
		<bidirectional>false</bidirectional>
		<hybrid>false</hybrid>
		<bih_tri_threshold>1000000</bih_tri_threshold>
		<num_threads>1</num_threads>
		<auto_choose_num_threads>true</auto_choose_num_threads>
		<frame_upload_period>60</frame_upload_period>
		<halt_time>-1</halt_time>
		<halt_samples_per_pixel>-1</halt_samples_per_pixel>
		<display_period>60.0</display_period>
		<image_save_period>300</image_save_period>
		<cache_trees>false</cache_trees>
		<logging>true</logging>
		<watermark>false</watermark>
		<info_overlay>false</info_overlay>
		<save_untonemapped_exr>false</save_untonemapped_exr>
		<save_tonemapped_exr>false</save_tonemapped_exr>
		<save_igi>false</save_igi>
		<render_foreground_alpha>false</render_foreground_alpha>
	</renderer_settings>

	<tonemapping>
		<reinhard>
			<pre_scale>1</pre_scale>
			<post_scale>1</post_scale>
			<burn>10</burn>
		</reinhard>
	</tonemapping>

	<camera>
		<pos>7.481132 -6.507640 5.343665</pos>
		<up>-0.317370 0.312469 0.895343</up>
		<forwards>-0.654862 0.610666 -0.445245</forwards>
		<exposure_duration>0.008000</exposure_duration>
		<aperture_radius>0.006383</aperture_radius>
		<focus_distance>2.000000</focus_distance>
		<aspect_ratio>1.33333</aspect_ratio>
		<sensor_width>0.036000</sensor_width>
		<lens_sensor_dist>0.039375</lens_sensor_dist>
		<white_balance>E</white_balance>
		<lens_shift_right_distance>0.000000</lens_shift_right_distance>
		<lens_shift_up_distance>0.000000</lens_shift_up_distance>
		<aperture_shape>
			<circular></circular>
		</aperture_shape>
	</camera>

	<material>
		<name>Default</name>
		<diffuse>
			<albedo>
				<constant>
					<rgb>
						<rgb>1 1 1</rgb>
						<gamma>2.2</gamma>
					</rgb>
				</constant>
			</albedo>
		</diffuse>
	</material>

	<material>
		<name>null</name>
		<null_material/>
	</material>

	<material>
		<name>Material</name>
		<oren_nayar>
			<albedo>
				<constant>
					<rgb>
						<rgb>0.8 0.8 0.8</rgb>
						<gamma>2.2</gamma>
					</rgb>
				</constant>
			</albedo>
			<sigma>
				<constant>0.5</constant>
			</sigma>
		</oren_nayar>
	</material>

	<mesh>
		<name>Cube</name>
		<normal_smoothing>false</normal_smoothing>
		<merge_vertices_with_same_pos_and_normal>false</merge_vertices_with_same_pos_and_normal>
		<embedded>
			<vertex pos="1.000000 1.000000 -1.000000" normal="0.000000 0.000000 -1.000000" />
			<vertex pos="1.000000 -1.000000 -1.000000" normal="0.000000 0.000000 -1.000000" />
			<vertex pos="-1.000000 -1.000000 -1.000000" normal="0.000000 0.000000 -1.000000" />
			<vertex pos="-1.000000 1.000000 -1.000000" normal="0.000000 0.000000 -1.000000" />
			<vertex pos="1.000000 0.999999 1.000000" normal="0.000000 0.000000 1.000000" />
			<vertex pos="-1.000000 1.000000 1.000000" normal="0.000000 0.000000 1.000000" />
			<vertex pos="-1.000000 -1.000000 1.000000" normal="0.000000 0.000000 1.000000" />
			<vertex pos="0.999999 -1.000001 1.000000" normal="0.000000 0.000000 1.000000" />
			<vertex pos="1.000000 1.000000 -1.000000" normal="1.000000 -0.000000 0.000000" />
			<vertex pos="1.000000 0.999999 1.000000" normal="1.000000 -0.000000 0.000000" />
			<vertex pos="0.999999 -1.000001 1.000000" normal="1.000000 -0.000000 0.000000" />
			<vertex pos="1.000000 -1.000000 -1.000000" normal="1.000000 -0.000000 0.000000" />
			<vertex pos="1.000000 -1.000000 -1.000000" normal="-0.000000 -1.000000 -0.000000" />
			<vertex pos="0.999999 -1.000001 1.000000" normal="-0.000000 -1.000000 -0.000000" />
			<vertex pos="-1.000000 -1.000000 1.000000" normal="-0.000000 -1.000000 -0.000000" />
			<vertex pos="-1.000000 -1.000000 -1.000000" normal="-0.000000 -1.000000 -0.000000" />
			<vertex pos="-1.000000 -1.000000 -1.000000" normal="-1.000000 0.000000 -0.000000" />
			<vertex pos="-1.000000 -1.000000 1.000000" normal="-1.000000 0.000000 -0.000000" />
			<vertex pos="-1.000000 1.000000 1.000000" normal="-1.000000 0.000000 -0.000000" />
			<vertex pos="-1.000000 1.000000 -1.000000" normal="-1.000000 0.000000 -0.000000" />
			<vertex pos="1.000000 0.999999 1.000000" normal="0.000000 1.000000 0.000000" />
			<vertex pos="1.000000 1.000000 -1.000000" normal="0.000000 1.000000 0.000000" />
			<vertex pos="-1.000000 1.000000 -1.000000" normal="0.000000 1.000000 0.000000" />
			<vertex pos="-1.000000 1.000000 1.000000" normal="0.000000 1.000000 0.000000" />
			<triangle_set>
				<material_name>Material</material_name>
				<tri>0 1 2</tri>
				<tri>2 3 0</tri>
				<tri>4 5 6</tri>
				<tri>6 7 4</tri>
				<tri>8 9 10</tri>
				<tri>10 11 8</tri>
				<tri>12 13 14</tri>
				<tri>14 15 12</tri>
				<tri>16 17 18</tri>
				<tri>18 19 16</tri>
				<tri>20 21 22</tri>
				<tri>22 23 20</tri>
			</triangle_set>
		</embedded>
	</mesh>

	<!-- Cube -->
	<model>
		<pos>0.000000 0.000000 0.000000</pos>
		<scale>1</scale>
		<rotation>
			<matrix>
				1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 
			</matrix>
		</rotation>
		<mesh_name>Cube</mesh_name>
	</model>

</scene>

Posted: Thu Sep 04, 2008 7:25 pm
by Big Fan
ok well for a start I am not the author of 1.1.7
secondly you should always match indigo/blendigo versions.
thirdly there have been some issues with scripts because of the major change in code format so be patient with authors who are doing their best - believe it or not.
I'll look at your code -it may be my fault or it might be Indigo

Posted: Thu Sep 04, 2008 7:26 pm
by trivita
thanks, wow, you are like a bay watcher
i've got the patience

Posted: Thu Sep 04, 2008 7:37 pm
by Big Fan
ok the problem is that you dont have a light source in your scene.
I suppose you are new to this so I will tell you to get you started off you need to put a blender 'sun' in that simple scene.(only the sun works out of all blender lights). other light sources can be made by identifying a mesh as an 'emitter' in the material menu or more recently materials can be 'emissive'
usually indigo gives a gentler exception than crashing for no light source - there is a wee bug in there for ono to sort out

to get an introduction to blendigo/indigo please read the documentation wiki for 1.0.9 in the tutorial section - find it from the the menu under the site banner header

it is mostly complete but up to date docs have been an ongoing issue for us
- and before you complain I put the last lot together - and I will probably end up updating them for 1.1.9 as well :roll:
I am everywhere but thinly, be still more patient

Posted: Thu Sep 04, 2008 7:49 pm
by BbB
Hi BigFan,
I just PMed you the vexing scene.
I assume it's me doing something wrong but I can't find what it is for the life of me.
Something else I noticed: I used a scene originally built for Vray, which means it had Blender lights all over the place. I removed these now but whenever your script is loaded and you select a Blender light it all goes completely crazy chucking out python errors after python errors and the only way to stop it is to pull the plug (literally).

Posted: Thu Sep 04, 2008 7:54 pm
by Big Fan
ok thanks,
the lights issue sounds entertaining :? :D

Posted: Thu Sep 04, 2008 8:06 pm
by BbB
Oh by the way, I'm still using Blender 246 while you're already upgraded. Could that be a problem?

Posted: Thu Sep 04, 2008 8:45 pm
by Big Fan
right well here is you first issue BbB "texture slots".
because I changed this stuff around in a stroke of mad genius to suit myself your existing scene (I guess?) isnt set up to use my texture slots method.

below is the issue graphically -
you can see the uvsets are a mix of 'UVTex' and the new 'displacement'
and the texture slots are all labelled 'Tex'
this wont work :?

if you recreate the set up anew the second pic shows how it should look
- lets say you had no textures at all loaded to begin with
first step-
select the albedo and bump green squares and hit the 'populate' button
by magic the appropriate tex slots will be filled mapped and labelled correctly in Blender
next flip over to each of your material textures and load the images you want associated with the unwrap
finally flit back to the blendigo UI and hit the 'update' button
magically all the slots will have the right path inserted
thats it you are ready to render

it is ok to have bump or bump.001 or bump.999 but it must be a 'bump' in the bump slot
I hope that makes sense the way I have explained it
I will make a flash tut if necessary but I am only sharing this script as a temp measure so I dont want people to stress out about it.
there is no requirement to use it if it isnt suitable

I really hope this method is ok with people
obviously it is better to have a fresh scene rather than redo one
Blender version shouldnt make a difference -2.46 is fine AFAIK