Bernard Posted September 9, 2006 Share Posted September 9, 2006 Hello, I want to emit particles on collision for a cube bouncing on a surface. The simulation of cube and surface are done in DOPs. How can I do this ? thanks, bernard Quote Link to comment Share on other sites More sharing options...
Jason Posted September 10, 2006 Share Posted September 10, 2006 Hi Bernard, There is an example scene in the help somewhere. Search for the dopnumrecords() expression or Impacts subdata info. Quote Link to comment Share on other sites More sharing options...
Bernard Posted September 10, 2006 Author Share Posted September 10, 2006 Hi Bernard,There is an example scene in the help somewhere. Search for the dopnumrecords() expression or Impacts subdata info. Thanks Jason, I did search in the help but Houdini gives an error. (I typed "dopnumrecords()" and "impacts subdata") Is it possible to give me a link or a closer spot where I can find this ? thanks in advance, bernard Quote Link to comment Share on other sites More sharing options...
MIguel P Posted September 10, 2006 Share Posted September 10, 2006 Thanks Jason,I did search in the help but Houdini gives an error. (I typed "dopnumrecords()" and "impacts subdata") Is it possible to give me a link or a closer spot where I can find this ? thanks in advance, bernard I think this is the link: $HFS/demo/helpcards/dop/sopsolver/DOP_EXAMPLE_sopsolver_DentingWithPops.cmd Quote Link to comment Share on other sites More sharing options...
Jason Posted September 10, 2006 Share Posted September 10, 2006 My first quick search for "Impacts" yields links to: dopnumrecords, which has example syntax to extract impacts: hdox://houdini/content/commands/expressions/dopnumrecords.html Dynamics-related expressions.. which directly mention impacts, with links: "You can use the DOPs expression functions to extract impact information as well. See the example files in the online help for Script Solver ("Sum Impacts") and SOP Solver ("Dent with POPs")." hdox://houdini/content/base/dyn_exp.html The "Dent With Pops" example is the link Miguel posted above. PS. Miguel posted a .cmd file, not a webpage. You "source thefile.cmd" in a Houdini textport or File>Run Script on the file and it'll create the example network for you. Quote Link to comment Share on other sites More sharing options...
Bernard Posted September 11, 2006 Author Share Posted September 11, 2006 My first quick search for "Impacts" yields links to:dopnumrecords, which has example syntax to extract impacts: hdox://houdini/content/commands/expressions/dopnumrecords.html Dynamics-related expressions.. which directly mention impacts, with links: "You can use the DOPs expression functions to extract impact information as well. See the example files in the online help for Script Solver ("Sum Impacts") and SOP Solver ("Dent with POPs")." hdox://houdini/content/base/dyn_exp.html The "Dent With Pops" example is the link Miguel posted above. PS. Miguel posted a .cmd file, not a webpage. You "source thefile.cmd" in a Houdini textport or File>Run Script on the file and it'll create the example network for you. Thanks for the info. great! I took the example of the object collision lines. When I take this example and switch the lines SOP with a POPnet SOP, and made a little particle network, the particles are born always (collision stays) I want the particles only to be born on impact of the objects. How can I do this? many thanks, bernard Quote Link to comment Share on other sites More sharing options...
Jason Posted September 11, 2006 Share Posted September 11, 2006 I want the particles only to be born on impact of the objects. How can I do this? So, naturally, you'd have to create a particle source from the impact points, right? Look at the Denting With Pops example, inside the SOP Solver. You'll see that metaballs are being copied to every impact record. If you copy a point (or any geometry whose shape you fancy) to each impact record in the same way, this can be fed into a Source POP in a new POP Network. Voila. You might have to do some creative treatment; for example: before your Source POP, cull out impact points whose impact magnitude is weak. The RBD system causes hundereds of impacts to keep objects apart even when they're just resting on each other so you may want to only extract high-impact collisions. Everything you need is in those examples. Quote Link to comment Share on other sites More sharing options...
SpencerL Posted September 11, 2006 Share Posted September 11, 2006 you could use a number of different dop expressions, such as dopfield( ) in the birth parameter of your popnet. You could use it when the impulse of the impact is greater than a certain value, then birth a specific amount of particles. if(dopfield("../dopnet1", "rbdobject1", "Impacts", "Impacts", 0, "impulse") > 0.5, 100, 0) Quote Link to comment Share on other sites More sharing options...
craig Posted September 12, 2006 Share Posted September 12, 2006 A bit late to the party, but here's an example showing the culling of "less interesting" impacts. ImpactPoints.hip Quote Link to comment Share on other sites More sharing options...
Bernard Posted September 12, 2006 Author Share Posted September 12, 2006 A bit late to the party, but here's an example showing the culling of "less interesting" impacts. Thanks Jason, SpencerL and Craig (for the example scene). What does the expression in AttributeCreate do: opfield("/obj/dopnet1", "rbdobject1", "Impacts", "Impacts", $PT, "impulse")/5000 Is the inpulse divided by 5000 or someting else ? many thanks, bernard Quote Link to comment Share on other sites More sharing options...
grasshopper Posted September 12, 2006 Share Posted September 12, 2006 If you aren't doing so already I highly recommend that you look at what is happening to the data in the DOPs simulation. Set a pane to "Details View" in DOPs and select the rbdobject. If you don't see impact data it's because there isn't any on the frame you are on. Keep playing the simulation until the impact data shows up and select the Impacts subdata (rdbobject1/Impacts/Impacts). For example look at frame 46 where there are 17 impact records. Note how most are small (the impulse setting is low) but that the first (record 0) is very large. The AttributeCreate SOP just accesses this dops impulse data so it can be used in SOPs land. The idea is to measure the impulse values so that high values can act as triggers but low impulse values are ignored. Craig's method returns all of the impact points, examines their impulse values and deletes those that are too small (i.e. not interesting enough to trigger the POPs events). Don't get confused by the division by 5000! It's a convenience step only to get values into a smaller range (e.g 0 to 10 rather than 0 to 50,000). You can do without it but the filter expression in the delete1 SOP would have to read "$IMPULSE < 2500" instead!! Also make sure you open a textport and look at the help for the dopfield and dopnumrecords expressions used by Craig: > exhelp dopfield > exhelp dopnumrecords Cheers, John 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.