This is what it prints out
matrixEyeToworld =
[[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]
[b]This is the initial pointing vector[/b]
[0, 0, 1]
This is the pointing vector transformed by inMatrix
[0, 0, 1]
[b]This is the pointing vector transformed by W2E[/b]
[0, 0, 1]
This is the initial surfNorm
[0.145138, -0.165942, 0.975397]
[b]This is the surfNorm transformed by E2W[/b]
[0.145138, -0.165942, 0.975397]
This is the surfNorm transformed by inMatrix
[0.145138, -0.165942, 0.975397]
[b]this is the scalarNormal [/b]
0.975397
This is the resultColor
[0.975397, 0.975397, 0.975397]
inMatrix =
[[0.920478, -0.017604
The eyeToWorld and worldToEye are all identity matrices???????
This is how I declare the attributes
CODE
aInMatrix = nMAttr.create("inMatrix", "inm", MFnMatrixAttribute::kFloat, &stat);
McheckErr( stat, "cannot create inMatrix attribute" );
nMAttr.setKeyable(false);
nMAttr.setStorable(false);
nMAttr.setReadable(false);
nMAttr.setWritable(true);
nMAttr.setConnectable(true);
nMAttr.setHidden(true);
aMatrixEyeToWorld = nMAttr.create("matrixEyeToWorld", "etw", MFnMatrixAttribute::kFloat, &stat);
McheckErr( stat, "cannot create eyeToWorldMatrix attribute" );
nMAttr.setKeyable(false);
nMAttr.setStorable(false);
nMAttr.setReadable(true);
nMAttr.setWritable(false);
nMAttr.setConnectable(true);
nMAttr.setHidden(true);
aMatrixWorldToEye = nMAttr.create("matrixWorldToEye", "wte", MFnMatrixAttribute::kFloat, &stat);
McheckErr( stat, "cannot create worldToEyeMatrix attribute" );
nMAttr.setKeyable(false);
nMAttr.setStorable(false);
nMAttr.setReadable(true);
nMAttr.setWritable(false);
nMAttr.setConnectable(true);
nMAttr.setHidden(true);
aPointCamera = nAttr.createPoint( "pointCamera", "p", &stat);
McheckErr( stat, "cannot create pointCamera attribute" );
nAttr.setStorable(false);
nAttr.setHidden(true);
nAttr.setReadable(true);
nAttr.setWritable(true);
aNormalCamera = nAttr.createPoint( "normalCamera", "n", &stat);
McheckErr( stat, "cannot create normalCamera attribute" );
nAttr.setStorable(false);
nAttr.setHidden(true);
nAttr.setReadable(true);
nAttr.setWritable(true);
What I am missing?