evanrudefx Posted September 27, 2017 Share Posted September 27, 2017 Hey!!! I am trying to add smoke to a shattered statue simulation. The falling pieces will emit smoke. I want the geometry to be deleted until the pieces reaches a certain velocity (if (@v.y < ch('threshold'));) , so that the emitter geo wont appear until the geometry is actually moving. That will keep smoke from emitting while the statue isn't falling apart. Finally, I need the geometry to be deleted when it is about to hit the ground, so I guess delete by Y position. I am trying to do this in an attribute wrangle. All the pieces have their own name attribute, piece1, piece2, etc. Here is my logic so far, I just don't know how to right it in vex: if (@v.y < ch('thresholdvelocity')) or (@p.y < ch('thresholdposition') then delete that whole piece. Any help would be appreciated. I am new to vex and I am trying to learn these things on my own, but sometimes I need help : ) Thanks edit: I can't add my original scene, but I made a sample scene. delete_geo.hipnc Quote Link to comment Share on other sites More sharing options...
violalyu Posted September 28, 2017 Share Posted September 28, 2017 Hi Van, I attached a file below that I tweaked a little bit, not sure if this is what you mean, but basically removepoint() / removeprim() is convenient for deleting geo in a wrangle node, you can search in the vex functions or type in this and hit F1 in the textport in wrangle node to view the documentation I bypassed the unpack for now, so they are packed geo and can be manipulated at point level, but if you need them to be unpacked geo, you can add "v" at the transfer attribute input textfield in the unpack node to get the velocity from the packed sim geo. Hope this helps. delete_geo_vl.hipnc 1 1 Quote Link to comment Share on other sites More sharing options...
evanrudefx Posted September 28, 2017 Author Share Posted September 28, 2017 (edited) this is how I was originally doing it, but I found out the problem was with my velocity channel so it was deleting some faces rather than individual chunks. I'll keep this thread updated. edit: I thought this method didn't work because it was deleted faces rather than individual chunks. That was because my velocity channel was "messed" up. Edited September 28, 2017 by ejr32123 Quote Link to comment Share on other sites More sharing options...
evanrudefx Posted September 28, 2017 Author Share Posted September 28, 2017 Nmd, it doesnt work, see. It doenst delete whole chunks tho. It leaves some faces. Quote Link to comment Share on other sites More sharing options...
evanrudefx Posted September 28, 2017 Author Share Posted September 28, 2017 (edited) Here is what I am doing now: if (@P.y < ch('pthreshold') || abs(@v.y) < ch('vthreshold')) removepoint(0,@ptnum); having v.y < "whatever" doesn't work in my case because the pieces have negative velocity. So I get the abs of the @v.y. This seems to be working!!! Edited September 28, 2017 by ejr32123 Quote Link to comment Share on other sites More sharing options...
evanrudefx Posted September 28, 2017 Author Share Posted September 28, 2017 (edited) edit: removed Edited September 28, 2017 by ejr32123 Quote Link to comment Share on other sites More sharing options...
galagast Posted September 28, 2017 Share Posted September 28, 2017 Hi, I looked into your sample file, hopefully the attached hip file is something close to what you were after. Basically, you would need to use length(@v) to get the speed, and not use @v.y You could also remap that to a value or color (for visualization), then use that to control the smoke emission strength. Houdini 16.0.731 Apprentice - delete_geo_v2.zip Quote Link to comment Share on other sites More sharing options...
evanrudefx Posted September 28, 2017 Author Share Posted September 28, 2017 thanks for the replies, I got it working!! 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.