I've been working on my first cgfx shader to help previewing blended materials in Maya.
It is very similar to the one you can find in this tutorial (UDK) : http://eat3d.com/free/vertex_painting
Basically 2 texture inputs with their normal maps LERPed together with an inverted heightmap used as a blend mask to spice things up.
Vertex colors need to be RGBA. The alpha channel of the vertex colors is used to blend the textures together while the RGB channels can be used to either paint color variation on your meshes or bake AO,GI etc...
I've been building this mainly for CE3 usage since it pretty much has the same setup as the one you can find in the SDK.
Its still not finished yet considering that I'm planning to sync the results in maya with CE3 so that the results translate seamlessly.
On the other hand the UI for the shader isn't very organized yet but it should be very straight forward.
I'm also planning to add support for the following features :
- Detail Normal maps (added in v0.3)
- Specularity (added in v0.3)
- Offset bump mapping
- Image based reflections
- IBL (added in v0.3)
v0.1 : https://dl.dropbox.com/u/53969153/Texturing_Workflow/BlendMasked_vertexcolor_shader_Maya_v0.1.zip
v0.2 : https://dl.dropbox.com/u/53969153/Shaders/vertex_blend_03_colors_CE3.zip
Change log :
-Synced Blend Factor and Falloff values with CE3 blendlayer shader.
v0.3 : https://dl.dropbox.com/u/53969153/Shaders/Cryengine3_VertexBlend_Maya1Light.zip
Change log :
- Rewrote the code from scratch replacing all existing shaderFX generated code.
- Added blinn-phong specular support, with gloss and specular multiplier. The specular map is stored in alpha channel of diffuse.
- Added texture tiling for Diffuse, Normals, Blend Mask, and Detail map
- Added IBL/Cubemap support
- Added option to multiply diffuse color onto the diffuse textures(see "Color Diffuse Textures") & option to multiply vertex colors to diffuse textures;
- Added detail bump mapping(work in progress)