Jump to content

Get particles nearest to camera


Recommended Posts

What is the best way that I can group/ split particles that are nearest to the camera (to a distance) and have it isolated from the other particles, other than selecting and checking manually each and every particle?

I asked as I am doing sparks in which some of the sparks/ particles got real close to the camera which results them in being very big

Link to comment
Share on other sites

You could just parent a box or cone to the camera. Then use it to create a group for particles that fall within that boundary/area. Apply a @pscale multiplier to the particles that reside within that group to keep them from getting too large.

@pscale *=0.5;

 

Link to comment
Share on other sites

You can use the uv texture SOP to project uv's from your camera.  The Z component of the uv will be the particle's distance from your camera.

You can then use that in an attribute create SOP, wrangle, etc. when creating pscale so that the particles are larger when further from the camera.

pscale_from_camera_distance_v1.gif.7e3cd9097c430bf50d7c13ba12647ee8.gif

You can also use these uvs to group or delete particles which are too close or far from your camera or outside the frustum.

pscale_from_camera_distance.v1.hipnc

Edited by jkunz07
  • Like 2
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...