tomaya
Hi everyone.

I've been playing with the scatter and point node to instance geometry feathers on a wing but haven't been able to control their Id and scale through the vertex colors for some reason. Could anyone give me a light on this?

I've added this code in the point node to try to control them:

objectIndex through weight:
"if($CR==1)

$WEIGHT=2;

if($CG==1)

$WEIGHT=1;

if($CB==1)

$WEIGHT=0;"


scale through radius:


"if($CR==1)

$R=1;

if($CG==1)

$R=1.6;

if($CB==1)

$R=0.3;"


Also, is it possible to have the feathers aim in the normals direction and also have some randomness driven by a texture?


Thanks a bunch


Tomas




Reply 0 0
pshipkov
Check the attached file - you made two small mistakes.
The point node requires something to be connected to the outGeometry attribute.
Inside the point node the weights expression was not setting properly the W wariable but some WEIGHTS one.

Reply 0 0
tomaya
Thanks peter!
Reply 0 0
cwisbg
Hello, I have been getting into soup for the first time and have managed to string together what I need for the scatter to instancing similar to the files above.

I want to be able to drive the scale of the instances with the black and white values of the vertex or texture color  but am not sure how to pull this off. Would anyone be able to steer me in the right direction?
Reply 0 0
cwisbg
after a little experimenting if I plug the out color of a pointOnMeshInfo node (the red channel set in the node) into the scale it works! but now my random scale doesn't. 

Originally the scale was being driven though the radius and I had though I could just add the Red color to this but it didnt work. 

in the point node

// POINT RADIUS

$R=$CR+rand(-0.5,5);

Since that didnt work I tried this, after connecting the color to the scale with the same result. 

// POINT COLOR (RGBA)

$R=$CR+rand(-0.5,5);

$G=$CG;

$B=$CB;

$A=$ALPHA;


Ill keep digging but if anyone could point out the error in my ways I would appreciate it, thanks! 

Reply 0 0
cwisbg
I tried for a while today and was still unable to get the connections right. 

Would someone mind taking a look at my test file and helping me out getting the color vertex and texture map to drive the radius/scale of the instances.

Right now every time I enable the vertex color or texture to control the distribution of the scatter node the instances disappear. 

EDIT- They were dssapearing because the color was turned off in the point node, forgot that one. 
Reply 0 0
plarson

To use the closest vertex colors you will want Colors checked in the pointsOnMeshInfo. Also the instancer scale requires a vector, the Point's rgbaPP can be used with a rgbaToColorAndAlpha. Here's the scene with those changes. ( mb scatterToInstacne_TEST_vtx_.mb      )

When it comes to scattered points getting the surface's closest color from a texture. I'm not sure about the ideal way, but this works. ( mb scatterToInstacne_TEST_texture.mb      )
Reply 0 0
cwisbg
I cant get those scenes to open. What version of maya are you using? I only have 2014.

and thank you very much for taking the time to help me out!




Reply 0 0
pshipkov
Attached you the files in .ma file format.

Make sure "ignore version" is turned on in the "file open" settings.
If something still does not go through open the files with text editor and change 2015 to 2014 in the file heather.
Reply 0 0
Reply