Jump to content

finding distance from a given point and camera


bkzed

Recommended Posts

Hi

I am new to Houdini but I have a working knowledge of Maxscript and MEL. I am currently working on a particle system where I need to adjust the each point size based on there distance from the camera, in another words I want my points to decrease or increase there size as I move camera to near or far from them.

any idea?

thx

Link to comment
Share on other sites

Oh, sorry, I see you want to do this with a particle system.

Heres a different file where there is a POPVOP in the particle sytem, creating a pscale attribute based on the distance to the camera.

The popnet`s 2nd input is the point that the distance will be measured from - the camera in this example.

The pscale attribute is built in, so the copy node at the SOP level picks it up automatically without any copy stamping.

pscale_from_camera.hipnc

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