Jump to content

constant partcle size


Augustronic

Recommended Posts

What's the solution to render particles with a constant size? I want them to be one pixel no matter how close.

As of now there is no "real" way of rendering points.. "render as points" actually renders a disc with an absolute size. So the only thing you can do is scale the size of the disc per particle in relation to the camera distance. A relatively cheap way of doing this is to apply an UV texture SOP to the whole thing with projection from the actual camera.. this will give you NDC-coords (z being the distance to the cam).. and then you can scale by the square root or something. This will of course not be terribly fast on large amounts of points, but it works.

Link to comment
Share on other sites

As of now there is no "real" way of rendering points.. "render as points" actually renders a disc with an absolute size. So the only thing you can do is scale the size of the disc per particle in relation to the camera distance. A relatively cheap way of doing this is to apply an UV texture SOP to the whole thing with projection from the actual camera.. this will give you NDC-coords (z being the distance to the cam).. and then you can scale by the square root or something. This will of course not be terribly fast on large amounts of points, but it works.

I thought of this solution, but there certainly will be millions of particles...

Link to comment
Share on other sites

hi,

you can import camera origin to sop and subtract it from particle position apply a multiplier and you'll have a point size relative to camera :)

I thought of this solution, but there certainly will be millions of particles...

Link to comment
Share on other sites

Another method not requiring much is to add a UV Texture and generate uv's from Camera. $MAPW is the distance from camera. ;)

See the attached sample file that previews with Copy SOP and renders from Point SOP using the attribute "pscale" to give you the same result with instanced point spheres.

points_same_size_in_depth.hip

Link to comment
Share on other sites

Another method not requiring much is to add a UV Texture and generate uv's from Camera. $MAPW is the distance from camera. ;)

See the attached sample file that previews with Copy SOP and renders from Point SOP using the attribute "pscale" to give you the same result with instanced point spheres.

This is a nice solution, but if I want to change the size of the points I have to simulate everything over again.

Link to comment
Share on other sites

This is a nice solution, but if I want to change the size of the points I have to simulate everything over again.

Unfortunately this is a known side effect of this very method.

There are some discussions you might want to read up on this topic:

Like:

I guess having a standaline bgeo modifier would also be an option.

Not sure if this here offers this functionality:

http://www.disneyanimation.com/technology/partio.html

However postprocessing a cached bgeo sequence would be a nice option.

If speed and diskspace aren't your concern you can cache as geo and do some perl/python trickery to mod the files.

Servus.

Georg

Edited by rdg
Link to comment
Share on other sites

This is a nice solution, but if I want to change the size of the points I have to simulate everything over again.

no you don't

you just need to import cached geo to SOPs, calculate pscale, export (or render from houdini)

if you use VOPs to get point-camera distance and calculate pscale, this can be quite fast since it can be multithreaded

Link to comment
Share on other sites

no you don't

you just need to import cached geo to SOPs, calculate pscale, export (or render from houdini)

if you use VOPs to get point-camera distance and calculate pscale, this can be quite fast since it can be multithreaded

hey, could you tell me how to do this? Specifically the "calculate pscale" step. I need to be able to tweak my particle scales without having to re simulating everything. Seems like something everyone would have to do when they get to the rendering stage, right?

thanks!

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