Vertex colour as colour component in a material pass

Gormio

29-02-2008 13:09:47

One can make an Ogre material like this one


material mymaterial
{
technique
{
pass
{
ambient vertexcolour
diffuse vertexcolour
specular vertexcolour
emissive vertexcolour
}
}
}


How does one make such an oFusion material that it exports like shown above?

Lioric

29-02-2008 15:32:50

The track vertex color support is in the material, from the first release, but it was disabled because there were several issues when using it with the Ogre engine and OpenGL, some versions of Ogre have this issue and other might not, and it was probably related to the drivers

In any case the option was disabled now as there is not much use of it and you are better using this support via a simple shader

Gormio

03-03-2008 07:35:03

Fair enough. I haven't seen any problems with this kind of materials and I'm already using it here and there. Until now I just edited the material scripts by hand but i was hoping to be able to do it in oFusion since I'm trying to move my material editing there. If this feature will not be re-enabled I guess I will have to edit the materials by hand also in the future.

Lioric

03-03-2008 23:04:04

The issue was the use of "vertex color tracking" in dynamic materials, on some drivers (and in OpenGL) if you set this option and then disable it, the selected color channels (diffuse, ambient, specular, emissive) will mantain the vertex color tracking (even after disabling it), on other cases the setting of this option affected the next pass (in a multipass material) or the previous

It was not an issue if your application simply loads the material and renders it, but it was on dynamic materials environments where the material is changed during the creation while you test different options

After some driver updates (and Ogre engine updates) this was somewhat fixed, but as the fixed function is going to be replaced with the full shader based pipeline (mostly) soon, this was not re enabled

You might have acces to this property via max script, the 'ambientVC', 'diffuseVC' and ''specularVC' properties of a pass material (but they might be disabled)

If you need this support in the material for you projects, open a support ticket and we will do more tests and re enable it if needed