Jump to content

Is there some Variance op?


Recommended Posts

Hi.

I'm trying to understand POPs after Thinking particles and pflow) And what i hope to find in Houdini is some Value Variance op, especially for vectors.

Let's say i want to set velocity of the particles to [0,1,0] with a bit of random deviation of the direction in radians or degrees, where 180 degrees will mean hemisphere distribution.

But as far as i cant find built-in solution i use VOP POP, where i mix cross(normalize(initial_vec), normalize (random_vec)) and initial_vec with mix factor from 0 to 1 and then multiply by length (initial_vec).

But Mix VOP is using linear interpolation and to make it accurate i have to add a bit more math.

Is there more simple solution (possibly built-in)?

Thanks in advance.

Link to comment
Share on other sites

What I've done before in this situation is to rotate the vector so that it points along one of the base axes. Then randomly rotate it, and rotate it back with the same amount you used to get it axis aligned.

Link to comment
Share on other sites

Is there more simple solution (possibly built-in)?

May be mountain sop, also there are various noising vops one could use.

EDIT : if it is only initial velocity you want to vary, there is variance parameter in source pop under attributes.

post-6162-133836137437_thumb.jpg

Edited by vectorblur
Link to comment
Share on other sites

May be mountain sop, also there are various noising vops one could use.

EDIT : if it is only initial velocity you want to vary, there is variance parameter in source pop under attributes.

Thanks. I used velocity only as example, i know there is variance parameter in Source POP and i'm surprised there is no such one in many other nodes

Mountain is using noise, but i'm aiming to do (actually did - a couple posts ago)) is make variance node where i could define vector (let it be velocity) == [0,1,0] and variance == 90, apply it only to newborn particles and get rising reversed cone of particles with 90 deegrees angle in its peak:

m_20120530-wk7x-26kb.jpg

Oh, and one more question. I discovered that almost every POP operates on the whole bunch of particles. i cannot activate it per particle. And if i want to apply force only on birth i need to group newborns and operate on this group? So POP nodes are performed mostly through groups, not attribs of the particle (and attribs used to group).

Am i right?

Thanks one more time.

Edited by bloomendale
Link to comment
Share on other sites

(actually did - a couple posts ago)) is make variance node where i could define vector (let it be velocity) == [0,1,0] and variance == 90, apply it only to newborn particles and get rising reversed cone of particles with 90 deegrees angle in its peak:

m_20120530-wk7x-26kb.jpg

That's Cool.

Oh, and one more question. I discovered that almost every POP operates on the whole bunch of particles. i cannot activate it per particle. And if i want to apply force only on birth i need to group newborns and operate on this group?

Am i right?

AFAIK, Right, one feature of the group pop which was not obvious to me initially, was that one can get particles to group from any where in the simulation, They don't have to be always part of incoming stream.

So POP nodes are performed mostly through groups, not attribs of the particle (and attribs used to group).

For applying operations on per particle basis based on attribute ,there are local variables to use and i am sure you already know it.

Cheers!!

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...