Augustronic Posted October 27, 2010 Share Posted October 27, 2010 (edited) What's the solution to render particles with a constant size? I want them to be one pixel no matter how close. Edited October 27, 2010 by Augustronic Quote Link to comment Share on other sites More sharing options...
Bunkerfritz Posted October 27, 2010 Share Posted October 27, 2010 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. Quote Link to comment Share on other sites More sharing options...
Augustronic Posted October 28, 2010 Author Share Posted October 28, 2010 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... Quote Link to comment Share on other sites More sharing options...
Owl Posted October 28, 2010 Share Posted October 28, 2010 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... Quote Link to comment Share on other sites More sharing options...
old school Posted October 28, 2010 Share Posted October 28, 2010 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 Quote Link to comment Share on other sites More sharing options...
Augustronic Posted October 29, 2010 Author Share Posted October 29, 2010 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. Quote Link to comment Share on other sites More sharing options...
rdg Posted October 29, 2010 Share Posted October 29, 2010 (edited) 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 October 29, 2010 by rdg Quote Link to comment Share on other sites More sharing options...
anim Posted October 29, 2010 Share Posted October 29, 2010 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 Quote Link to comment Share on other sites More sharing options...
rdg Posted October 29, 2010 Share Posted October 29, 2010 no you don't you just need to import cached geo to SOPs, calculate pscale, export (or render from houdini) True, still this will eat a license. Quote Link to comment Share on other sites More sharing options...
dannyODF Posted November 5, 2010 Share Posted November 5, 2010 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! Quote Link to comment Share on other sites More sharing options...
dannyODF Posted November 5, 2010 Share Posted November 5, 2010 figured it out. Adding a point sop after the popnet gives me the control I need Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.