Jump to content

trail particle based on velocity


cgcris

Recommended Posts

Hi guys,

 

Can't seem to find a way to read attributes in the trail sop. In a vopsop I've a created a "vel" float, based on a fit of the length of velocity. 

 

I wanted to now use this value to determine the lenght of the trail. The faster they go, the longer the trail.

 

Since the context is different, I've tried using the point expression: point ("../attribvop1", "$PT", "vel", 0). However this is doesn't work.

 

How do would you "call" the attribute on the "Trail Length" box?. 

Edited by cgcris
Link to comment
Share on other sites

I believe you simply can't read such attributes using the `Trail` node. Someone correct me if I'm wrong but I think of the `Trail` node as being the equivalent of a `TimeShift` put into a `ForEach` node. In other words, it doesn't model the trail by reading out some attributes but by querying your particles at different points in time.

 

Which is probably what you want! If your end goal is to achieve a motion blur effect, that's perfect. For the same `Trail Length` and `Trail Increment` values, this will result in short trails for slow particles, and longer ones for the fastests. This allows to nicely model the shutter angle of the camera—which is usually set to 180º, or 0.5 frame. And this is exactly what is being done in the `Fluid Source` node, under the `Motion Blur` tab for the scalar volumes. Check inside the asset for an example on how to implement it.

Link to comment
Share on other sites

Hi Christopher,

 

Thanks for the reply my friend!.

 

As you say it's not possible to use attributes on the Trail node, I wish there was a way Houdini would let you know. 

 

You are right! the trail sop, actually scales the length by velocity by default. Not sure why I thought it didn't ;).

 

By the way, are you moving from rigging to Houdini??

 

Thanks!!

Cris

Link to comment
Share on other sites

I also often wondered why some nodes allow accessing attributes while others not. Sometimes it makes sense because some nodes most likely don't iterate over the points but other times... I couldn't tell. When the documentation lists local variables as `$PT`, then it's a sign that the node supports attributes but I've seen nodes where `$PT` was available without it being documented. I think that it would be better if the documentation added a flag for each node to let us know if attributes are accessible or not.

 
At the end of the day, it simply depends on how the node has been implemented. For example the node `PolyWire` can use the point attribute `width` if present but this feature is not available for the node `Wireframe` which performs a very similar operation than `PolyWire`. Things seems to be a bit inconsistent at times.
 
As for rigging, let's say that I'm looking forward to new challenges and I really enjoy learning FXs so far, so let's see where this takes me! :)
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...