Jump to content

Can't see attributes in Point Instance rendering?


Recommended Posts

I am successfully getting Point instancing to work, using the instance POP and turning on the "Point Instancing" toggle on the object. I have a test grid of particles with random instance objects. Where I'm stuck is getting other attributes to be seen by the shader.

I added a integer point attribute to my pop network called rcolor. The value of rcolor is int(rand($ID)*3). I have a simple shader that uses rcolor as in input to the switch VOP so that diffuse will be one of 3 constant colors.

Even though the each point has a random rcolor attribute value of 0,1, or 2 ( I can see them in the spreadsheet ), the point instanced object renders only in rcolor 0, the default value. If I change the default value of the parameter, it renders in that color. "Use input if not bound" is definitely checked. It seems the shader just can't see the rcolor attribute set in the POP network.

I tried applying the shader at the object level and with material nodes on both the object with POP network and on the objects that are being instanced as well, no joy.

I'm sure this is something that can be done and I am missing a step somewhere. Thanks in advance for any help!

Link to comment
Share on other sites

hey man

i didn't try exactly what u did, but the concept is universal.

so what u need to do when sending data from ur POP object to your shader:

under the material sop - tick - "override local variables",

make sure the attribute ur overriding is set to "points"

specify the parameter ur exporting from sops is included there and that the values have been declared ie $CR $CG $CB etc

post-585-1213081168_thumb.png

post-585-1213080999.png

post-585-1213080980_thumb.png

post-585-1213081109_thumb.png

this is where u substitute ur own values or parameters, i also used a super material CHOP to test this, so i needed to use my Cd in the diff parameter.

I also tested it using the instancing parameter at geo level and it seemed fine.

hope this helps

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...