Colladamax and textures


I am a little new to Collada, my team has just decided to use it in our pipeline. I am on the concept and design side.
I have created several animations and graphics that I created before the use of Collada was decided and I am having trouble exporting most of the files out. I suspect that my heavy use of MentalRay and procedural textures is where my problem is coming from.

When I go to export, it will not export any materials at all. I get an error telling me that the “material export failed” and that the material was converted to a generic material.

Really all I am looking for is confirmation that I cannot export procedural textures. The powers that be do not believe when I say the files will have to be reworked and I just want to make sure I am correct.

Thanks for your time

Please give us more information: what OS are you using, what Max Release, what COLLADA Exporter/Importer and what version.

I am on Vista 64, Max 2009, and I have tried using FCollada 3.05b and ColladaMax_0.8.2_x64. I am just trying to export .dae file out of max so our software developers know what they are working with.



Procedural Texture in 3ds Max can implement the interface IHLSLTexmap. A good example is the Marble Map. Marble Map does export its shader code as HLSL, here:

float4 marblefunc(float4 p, float3 norm, float3 eye, float4 uv)
	float3 var;
	float3 pos = * hlsl_size ;
	float3 r = float3(pos.x, pos.y, pos.z);
	var[0] = (pos.x +10000 ) * hlsl_width + 60 * noise (r);
	var[2] = var[0]%17;
	if (var[2]<4)
		r.r = pos.x/70.0f; r.g = pos.y/50.0f;	r.b = pos.z/50.0f;
		var[1] = 0.7f+0.2f*noise(r);
		r.r = pos.x;
		r.g = pos.y;
		r.b = pos.z;
		if ( var[2] <9 )
			if (var[2] >=12)
				var[0] = abs(var[0]-(var[0]/17.0) * 17.0 - 10.5) * 0.1538462;
				var[1] = 0.3 + 0.3*var[0] + 0.8*noise(r);
			var[1] = 0.3f*(1.0f + noise(r));
	float4 c0 = tex2D(MarbleCol1,uv);
	float4 c1 = tex2D(MarbleCol2,uv);
	return (1.0f-var[1])*c0 + var[1]*c1;

HLSL is a valid profile in COLLADA, marble itself can not be represented without an extra tag. I’d suggest to use only Maps that implement IHLSLTexmap or even better to use CGFX or HLSL from the beginning.
Beside that COLLADA specific items both tools currently do not support exporting of HLSL shader code, a fact that we are aware of and will include within the next major release of COLLADAMax.