material implementation strategies

We’re using collada as our model format for the time being, and it’s been pretty smooth sailing so far. We’re starting to look at implementing more complex materials now, however, and I’m unsure what the right modeling-program-neutral approach is. What I’ve seen of the material definitions so far seems to be very specific to whatever that particular platform’s material definition looks like. Is there a standardized way to specify diffuse/normal/specular/glow or whatever other maps our game’s going to need?

For the time being we’re planning on allowing a Max user to load a .fx file as a DirectX shader, and fill in the fields. This gets exported as a set of ‘setparam’ tags with a ‘surface’ tag inside… which should be easy enough, but I’d be shocked if Blender exported the same things. We’re fine with making a special case for our preferred software, but is there a platform-neutral approach we can safely use as a fallback?

DCC tool exporters use the common profile (<profile_COMMON>) of effect to describe neutral and inter-operable materials. The common profile has shaders for Lambert, Phong, and Blinn that are used most often for this purpose.

Consider that in your exported content that you provide two (or more) effects: one using the common profile, and one using DXFX. With multi-representation in COLLADA the application that imports your .dae file can decide which profile it understands and use that representation. In your case you would use DirectX .FX while others like Blender might fallback to the common <phong> shader.