Jump to content

kill particles


roughsporty

Recommended Posts

I have a huge particle simulation and therefor I render it out to bgeo and seed variations with the wedge rope. I though it would be great

to kill every particles which is out of the camera view. My camera is not animated and has a resolution of 800x600. I have to group

those particles with a group node and then kill that stuff but I have no idea which expression I should use to find those particles?

Link to comment
Share on other sites

I think I loosely remember a nice example from someone around here, and what they did was something clever like this:

- Create a UV Texture SOP to apply the UV attribute to geometry using Camera projection (from the UVTexture SOP use the option Perspective from Camera...I know you probably knew this but it might help someone else)

- Now, just delete those particles with a uv[0] or uv[1] attribute value below 0 or above 1 (i.e. particles that are outside the camera projection, so their UV attribute is not between 0 and 1)

- Do the victory dance B)

There are a lot of smart people around here. I get surprised almost every day. I´m just a replicant (damn you, Voight-Kampff)

Hope this helps.

Link to comment
Share on other sites

I guess thsi is possible in houdini.

Create a geometry that has a shape of your camera view then kill anything outside of the geometry.

Very possible indeed, but it is computationally more expensive to group by object than it is to delete based on a uvw attribute (the w will allow you to clip in depth) - with very large particle counts grouping by object is slow. I generally create a camera that is parented to my view camera and offset it in z a little bit so I have a bit of overshoot when uv's are projected. You can get similar behaviour using the "w", but not quite the same.

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