Jump to content

instancepoint expression


woodenduck

Recommended Posts

Hello,

I am instancing multiple pieces of geometry on to a particle network. I am using a point exp<b></b>ression and instancepoint() in my shader to apply the particles Cd attrib to the instanced geo. My problem comes when the particles die, as the instancepoint references the point number, which causes the geo colour to change. What I really want is an inatanceid() exp<b></b>ression to reference the particles id attribute.

Anyone have any ideas?

Much obliged,

WD

Link to comment
Share on other sites

you can easily get id of the current point by using point expression, then use it for whatever you want

point("/path/to/your/particlegeometry", instancepoint(), "id", 0)[/CODE]

but maybe easier can be to precompute all data like color etc on particles then access them directly with point() expression

like

[CODE]point("/path/to/your/particlegeometry", instancepoint(), "Cd", 0)
point("/path/to/your/particlegeometry", instancepoint(), "Cd", 1)
point("/path/to/your/particlegeometry", instancepoint(), "Cd", 2)[/CODE]

Edited by anim
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...