martinc
Hello

I downloaded this example:
http://www.petershipkov.com/temp/textureToArray2D.ma.zip

And swapped the vertex-coloured plane for a vertex-coloured sphere. The plane gives an expected grayscale image in the arrayToTexture2d node but the sphere gives a scrambled rgb image. Would anyone have any idea what I'm doing wrong?


Thanks for any help

Cheers,

Martin

(attached: image of node network for plane and sphere, and .ma file) arrayToTexture2d.jpg
Reply 0 0
martinc
I've dug around the forum and found this:

http://soup-dev.websitetoolbox.com/post/ArrayTo2DTexture-trouble-with-complex-uvs-5850697?highlight=arraytotexture2d

I'll keep digging :(
Reply 0 0
pshipkov
hmm, i don't think you need this node in a first place if you are going to do colors. There is a standard node (mrVertexColors) that converts per-point rgba to texture.
Reply 0 0
pshipkov
But i will take a look tonight anyway.
Reply 0 0
martinc
Thanks for looking into this!
Unfortunately, I don't know how to get mrVertexColors to show in hardware in Maya: that's why I was using the arrayToTexture2d node. It's not a render texture :(
Reply 0 0
pshipkov
Ok, i just added ability to pipe RGB data into the arrayToTexture2D node.
Until i release the new update you will be stuck to just 1 "channel" per point.
Reply 0 0
martinc
A single color is all I need as I was attempting the displacement texture driving and getting the same problems as:
http://soup-dev.websitetoolbox.com/post/ArrayTo2DTexture-trouble-with-complex-uvs-5850697?highlight=arraytotexture2d

I did try to separate the actual model so there were no multiple UVs and this output a grayscale texture as expected :).
The output texture seemed rotate in UV space. I will look further on Monday (not near Maya right now :()

Thanks again for the help!

Cheers,

Martin
Reply 0 0
pshipkov
It does not work for you because in your scene you made few mistakes.

First you have to connect point.outSharedMapPP to arrayToTexture2d.inMapPP.
Currently you have point.outMapPP connected to arrayToTexture2d.inMapPP

Then, there is nothing connected to arrayToTexture2d.inWeightPP.
In your point node set the weight expression like this:
$W = $CB; // reads the blue channel from the colors you painted onto the sphere
and enable it.
Then connect point.outWeightPP to arrayToTexture2d.inWeightPP.

Then you have to assign the pasted__lambert shader to the geometry.
Currently it is not.

Set the pSphere1.displayColors to OFF. So you don't get confused with the point colors you painted.

Finally set the viewport to F6 - to actually see the arrayToTexture2D texture displayed in the viewport.

Reply 0 0
martinc
This was the missing part:

point.outSharedMapPP to arrayToTexture2d.inMapPP

Thanks for pointing me in the right direction!
All seems to be working well now.

Cheers,

martin
Reply 0 0
Reply