jim c Posted September 6, 2011 Share Posted September 6, 2011 I wanted to have a scene where a "glass" window explodes outward. I figured out how to break up the window into various sized squares (thanks to Peter Quint!), and got the fracture stuff to work in DOPs. However it's extremely slow to cook per frame. So my question is whether or not that's normal, and are there steps that can be taken to optimize things? In my simulation I've got 2000 groups after the Partition SOP is applied. So I presume this is part of the issue, but I don't see any way around that. In the Fracture Object in the DOPs context, I've got it using implicit boxes for the Collision type. But the volume samples are at 30 X 30 X 30 - does it really have to be that high? Quote Link to comment Share on other sites More sharing options...
Ratman Posted September 6, 2011 Share Posted September 6, 2011 DOP RBD settings 101 for getting stuff to actually finish in this decade: Bring your SDF sizes way down, 8 to 10 cubed can work, if need be, use the offset to bulge your SDFs out slightly. Write out your SDF files for your collisions using "$OBJNAME.simdata", or something along those lines. On the RBD solver, you can bring down Collision Passes and Contact passes to something like 3 and 3, or even 2 and 2. Use RBD Autofreeze, no excuses. You can create and empty data stream for your hit impact data, to group the geo so that it only gets affected by gravity once it has actually been hit. For glass breaking or anything that's exploding and doesn't really need to be hit by a collision object, it's much better to use point velocity in the direction you want things to explode, instead of having something collide with it. Cheers, -Rick Quote Link to comment Share on other sites More sharing options...
jim c Posted September 6, 2011 Author Share Posted September 6, 2011 Write out your SDF files for your collisions using "$OBJNAME.simdata", or something along those lines. How do write out the sdf? Do I just add a file node in the DOP context? If so, what gets attached to it? You can create and empty data stream for your hit impact data, to group the geo so that it only gets affected by gravity once it has actually been hit. Any tips for how to actually do this (this is the first time I've done anything with DOPs). Is there a specific node I need to use? For glass breaking or anything that's exploding and doesn't really need to be hit by a collision object, it's much better to use point velocity in the direction you want things to explode, instead of having something collide with it. Yes this is pretty much exactly what I'd like to do, but I'm not sure how to do this? Would I just add a point attribute for the group of primitives that are going to be affected by the simulation in the SOP context? Would just a Point SOP work and add a Velocity vector? Quote Link to comment Share on other sites More sharing options...
jim c Posted September 6, 2011 Author Share Posted September 6, 2011 How do write out the sdf? Do I just add a file node in the DOP context? If so, what gets attached to it? Never mind - I see this in the "File Mode" section of the docs - I'm pretty sure this is what you're referring to. Quote Link to comment Share on other sites More sharing options...
jim c Posted September 6, 2011 Author Share Posted September 6, 2011 Holy crap no wonder this is so slow - it's generating 131 MB sim files (and that's before the collision). Per the Houdini docs, I turned off the sim compress in the hopes this would speed things up a bit. If it would be useful, I'd be happy to post the hip file. Quote Link to comment Share on other sites More sharing options...
ryew Posted September 7, 2011 Share Posted September 7, 2011 Great workflow reminders and tips, thanks Rick Quote Link to comment Share on other sites More sharing options...
jim c Posted September 7, 2011 Author Share Posted September 7, 2011 (edited) OK so I've tried what you suggested Rick. Unfortunately it's still really slow. Now maybe that's normal when processing several thousand groups? Maybe I can figure out a way to reduce that count. But it sure seems like an awful painful way to work (it's like compiling C++ back in the 90's!). Anyways, thanks for the suggestions, at least I know a little more about how to store out the data. Edited September 7, 2011 by jim c Quote Link to comment Share on other sites More sharing options...
jim c Posted September 7, 2011 Author Share Posted September 7, 2011 Another question - does the DOPs context sometimes get "confused" about what's in it? I tried, in a separate H instance, an experiment with a smaller set of geometry, to blow up the pane using a Fan force. This worked out pretty well once I experimented with the numbers a bit. But when I went back to my original project and tried to put the fan in there , it had no effect! I completely deleted the AutoDop network and rebuilt it again, adding the RBD Glue object gravity and the fan force. But again it had no effect. I tried disconnecting the fan force, and added a ball as an RBD solid and sure enough it broke up the pane. The size of the "pane" that's being blow up are pretty comparable, and it made no different how high I put the fan force numbers. Hopefully tonight I can try and rebuild the whole project?! Not sure what's going on. Quote Link to comment Share on other sites More sharing options...
jim c Posted September 9, 2011 Author Share Posted September 9, 2011 (edited) So after looking into this more, it seems from the Houdini docs that doing a large number of objects (I've been able to reduce to a little less than 900) in the default RBD solver can be very slow and possibly unstable. The preferred way, if possible, is to use the ODE solver. However the examples that I can find show using the ODE solver with uniform pieces of geo, like cubes or spheres. My problem is that while I've got a box shape, they are different sizes and I'm stumped on how to hook up all the different shapes into an RBD Object. i'm posting the project in case that helps. rock-test2.hipnc Edited September 9, 2011 by jim c Quote Link to comment Share on other sites More sharing options...
effectsgeorge Posted September 9, 2011 Share Posted September 9, 2011 for a glass window breaking another way to go about it ..simply have a 2d plane fractured and solve with edges using point velocity for collision. u can extrude the surface of every piece for thickness in sops later after caching the sim.this allows u to go crazy on the number of pieces and the solve is much faster cheers george Quote Link to comment Share on other sites More sharing options...
jim c Posted September 9, 2011 Author Share Posted September 9, 2011 solve with edges using point velocity for collision. Thanks. This was mentioned earlier and I'm not sure how to do the point velocity? I did try adding a point SOP and then added a value in the Velocity field. But that just gave a uniform movement to all the pieces, so clearly I'm misunderstanding how this should work. Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted September 9, 2011 Share Posted September 9, 2011 I think he means something like this setup. 2000 pieces simulated for 40 frames in 5 min. shatteredglass.hipnc Quote Link to comment Share on other sites More sharing options...
jim c Posted September 10, 2011 Author Share Posted September 10, 2011 Erik, thanks for posting. So looking at the file, you're running the simulation on just the individual face for each fragment, then extruding the rest of the faces after the sym calcs, correct? When I try this in Houdini 10, using the RBD solver, it's still very slow to apply *any* change, much less calculate a frame. This leads me to beleive that either I'm doing something wrong in my network, or H10 is *very* slow when dealing with a lots bits of geometry. Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted September 10, 2011 Share Posted September 10, 2011 Yeah thats correct. I can't remember this method being much slower in H10. Quote Link to comment Share on other sites More sharing options...
jim c Posted September 10, 2011 Author Share Posted September 10, 2011 OK thanks. I was able to fiddle with things a bit and get the ODE solver to work. This makes a big difference in speed *but* it reacts *very* differently than the RBD solver does. I used the RBD Point Object to generate a bunch of RBD objects from grid that I had subdivided into small squares. This initially had the effect of adding extra cubes, since each cube was instanced at the point intersection of the squares on the grid. So I took the lazy way out and created a popnet, sourced the grid and set up the source to instance only once (frame 1) and birth a point per primitive right in the center of the face. This works with aligning the cubes correctly but it seems to *radically* change how the simulation runs. Even if I get rid of the various particle attributes (like "v" or "accel") it still makes a big different. So I'm not really sure what on earth I'm doing now I get this nice kind of bulging explosive kind of effect, which is close ot what I wanted. But it's now super smooth so I guess I need to experiment more. Any ideas? Is this the right track? rock-test3.hipnc Quote Link to comment Share on other sites More sharing options...
jim c Posted September 11, 2011 Author Share Posted September 11, 2011 OK I got a little closer, now I can get the fragments to explode nicely on their own. Turned out the way to fix the super smooth bulging was to add a noise field to the fan force. I'd like to have them surrounded by the window "pane" and the building so that they explode out, start to fall and hit the building wall. However when I put in the building (as a static object) it doesn't really work out that well, and the results of the simulation change dramatically. The fragments are being solved via an ODE solver, is that a problem? Some screenshot to demo what I'm referring to: Initial shot Explosion start on frame 4, just the cube fragments being simulated Explosion start on frame 2, cube fragments *AND* building static object being simulated Any ideas what I'm doing wrong or how to fix this would be most appreciated! rock-test3.hipnc 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.