cwalrus Posted October 19, 2015 Share Posted October 19, 2015 i've been asked to provide a matte for the static (velocity = 0) particles in my simulation. Sounds simple, but I am stumped! Any help / hip files hugely appreciated! thanks peeps Quote Link to comment Share on other sites More sharing options...
Sankar Kumar Posted October 19, 2015 Share Posted October 19, 2015 (edited) You may delete particles by velocity with delete sop length($VX,$VY,$VZ) > 0 You may also group particles with this expression and assign point color instead of delete particles Edited October 19, 2015 by sankarakumar Quote Link to comment Share on other sites More sharing options...
cwalrus Posted October 19, 2015 Author Share Posted October 19, 2015 Thanks Sankar - but that won't work for me. The particles come to rest when the hit the ground, so if I simply delete all the particles with velocity, they will die before they do anything (and they hit the ground at different times) Also, i need a solution that works in a production setting - i.e. hit the render button once, and then I get one pass of all the particles, and one pass which is just a matte for the static particles. Help! thanks! Quote Link to comment Share on other sites More sharing options...
bluciensky Posted October 19, 2015 Share Posted October 19, 2015 Make AOVs for the one that's 0 length of velocity. So, basically you are just rendering all the particles, but you will always have an AOV that's matte for the zero velocity particles... Quote Link to comment Share on other sites More sharing options...
cwalrus Posted October 19, 2015 Author Share Posted October 19, 2015 (edited) Dude! Blu to the rescue as usual! Thanks man - i had no idea AOV's even exisited. This is great news. Now I've typed in length($VX,$VY,$VZ) = 0 into the VEX Variable field on the AOV / extra image planes and I"m getting nothing. Do i need to 'introduce' the particles velocity somehow, or write different code there? Thanks Sankar as well - going to look into the grouping work around now... Edited October 19, 2015 by cwalrus Quote Link to comment Share on other sites More sharing options...
Sankar Kumar Posted October 19, 2015 Share Posted October 19, 2015 Please check the attachment i created direct and AOV method for particle render you may adjust the velocity expression if needed PARTICLES.hipnc Quote Link to comment Share on other sites More sharing options...
bluciensky Posted October 19, 2015 Share Posted October 19, 2015 You want to make it as an attribute. For example, make an attribute called 'velzero' whatever the length of 0 is red (1,0,0) otherwise blue (0,0,1). You do this on SOP (or shader... up to you) Have this attribute on your shader(using bind, and export it), then put the attribute name on your AOV VEX Variable and channel name(this can be different name). Quote Link to comment Share on other sites More sharing options...
cwalrus Posted October 19, 2015 Author Share Posted October 19, 2015 Holy bat pee so helpful guys - Thanks Sankar- that file explained so much - and It's reallllllly hard to learn that without help from people like you. Blu I'm going to try to do what you suggested also at some point - haven't played with Bind before now... Quote Link to comment Share on other sites More sharing options...
cwalrus Posted October 19, 2015 Author Share Posted October 19, 2015 Hi again guys - Sankar, the DirectRender option works perfectly, but I tried to replicate your other tree- the AOV tree, with no luck. Can you see what I've neglected if you have a second? thank you! CRV050_10.hip.zip Quote Link to comment Share on other sites More sharing options...
Sankar Kumar Posted October 20, 2015 Share Posted October 20, 2015 Hi again guys - Sankar, the DirectRender option works perfectly, but I tried to replicate your other tree- the AOV tree, with no luck. Can you see what I've neglected if you have a second? thank you! You must Assign a shader to the particles, Inside the shader create a parameter node and change the settings as per your attributes (Check the attached images) Then add extra image planes and give the attribute name in mantra Quote Link to comment Share on other sites More sharing options...
cwalrus Posted October 20, 2015 Author Share Posted October 20, 2015 thank you so much! 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.