On 31/08/2016 at 06:10, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 14+
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
---------
Hello,
I am trying to create a shader that renders a vertex map according to its weights, similar to the C4D Vertex Map shader.
In the output of the shader, I am stuck on how to apply the vertex map weights to the shader.
Here is some code:
if (cd->vd)
{
RayObject* link = cd->vd->op->link; // get the object to which the shader is applied
const SReal *weights;
for (BaseTag* baseTag = link->GetFirstTag(); baseTag; baseTag = baseTag->GetNext())
{
if (!baseTag->IsInstanceOf(Tvertexmap)) continue;
VertexMapTag *vmapTag = (VertexMapTag * )baseTag;
weights = vmapTag ->GetDataAddressR(); // successfully got the weights of the vertex map
// ..................... how to render these weights????
}
}
Any help would be greatly appreciated.