Page 1 of 1

New code, old code... Where's the trigger ?

Posted: Mon Dec 22, 2008 1:31 am
by CTZn
and what are their respective names by the way ?

I'm exporting one single mesh with a phong material applied, the phong definition is - supposedly - in old format. I open the scene in a text editor and start pruning "_spectrum" etc trying to conform to the manual.

But Indigo is rejecting <diffuse_albedo> for phong in first instance:

Code: Select all

<material>

	<name>phong1SG</name>

	<phong>

		<diffuse_albedo>
			<constant>
				<rgb>
					<rgb>0.5 0.5 0.5</rgb>
					<gamma>2.200000048</gamma>
				</rgb>
			</constant>
		</diffuse_albedo>

		<ior>2.4</ior>

		<exponent>2500</exponent>

		<!--specular_reflectivity>
			<constant>
				<rgb>
					<rgb>0.4127000332 0.4600000143 0.456633842</rgb>
					<gamma>2.200000048</gamma>
				</rgb>
			</constant>
		</specular_reflectivity-->

	</phong>

</material>

Code: Select all

SceneLoaderExcep: Found unexpected element 'diffuse_albedo' in element 'phong'.
I came to the conclusion I wasn't successfull in trigging the v2 interpreter in first instance, how could I ? Could this assumption be correct anyway ?

Posted: Mon Dec 22, 2008 1:36 am
by fused
<exponent> must have a wavelength independent child element.

<exponent><constant>1223.42</constant></exponent>

Posted: Mon Dec 22, 2008 1:38 am
by CTZn
Okay, I reconize my mistake :)

Thanks a lot for pointing out, fused !