ParticleSkull Posted January 19, 2015 Share Posted January 19, 2015 (edited) Hey guys, It's the first time that i'm trying to save a initial state of my sim. In this case i'm working Grains.What I did was: create my grains from a sphere and simulate it until it set on the ground. Now i need to keep it like this, like a initial state, to work on my real scene.My first idea was to save this grains' specific frame as a bgeo and load it back with a file node but, right now, this loaded grain particles don't interact with the other objects anymore. I think that the problem is on importing this back with a file node. Not sure though. Thx again,EDIT: So in case that anyone else got the same doubt, i've just recorded a tutorial about it: Best,Alvaro Edited January 25, 2015 by ParticleSkull Quote Link to comment Share on other sites More sharing options...
Guest tar Posted January 19, 2015 Share Posted January 19, 2015 Initial States use .Sim files - if you're still on Apprentice then it won't work. Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted January 19, 2015 Author Share Posted January 19, 2015 And there's no workaround for it? I just can't set a initial state with apprentice? Quote Link to comment Share on other sites More sharing options...
Guest tar Posted January 19, 2015 Share Posted January 19, 2015 (edited) Yup - just grab Houdini Indie for $200 and you'll be set. Edit: For future reference - now cross posted on SideFx.com https://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=37323 Edited January 19, 2015 by tar Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted January 20, 2015 Author Share Posted January 20, 2015 Ah yeah, that's me there. It's basically the same post, the only difference is that I said that a friend (which is you) told that it's impossible to create a initial state with apprentice.Thx man,Alvaro Quote Link to comment Share on other sites More sharing options...
pezetko Posted January 20, 2015 Share Posted January 20, 2015 Hi, I don't know if anything changed in H14 but in H13.0.582 you can save init states (sim) files at least for RBD in Apprentice. Just add File DOP at the end of your dop net and set it to the Write mode. Look at attached file. save_init_state.hipnc Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted January 20, 2015 Author Share Posted January 20, 2015 Hey Petr, I have just opened your file and i think i got what's going on there. Altough I couldn't make it work properly.So, there's a node to save the initial state and another one to load the sim back. However it looks like it's saving all the simulation frames so, when i load it back, it's just playing back the whole simulation again (cached this time). Is there a way to load one frame only, in this case the frame 50 where the torus is settled on the floor, and keed it dynamic so it can interact with other objects?Thx man,Alvaro Quote Link to comment Share on other sites More sharing options...
pezetko Posted January 20, 2015 Share Posted January 20, 2015 Yes, the File DOP will save all frames. You will not load it inside DOP network via File SOP, but you will choose one frame, that one you want as initial frame and set path to this frame/file in the Initial State parameter on DOP Network. Then set display flag inside DOP Network above that File SOP so you will not overwrite your initial state. Just quick ask to google gives me link to this tutorial, same workflow for particles: https://www.youtube.com/watch?v=CmE_EXRZ2ck Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted January 20, 2015 Author Share Posted January 20, 2015 Thx Petr, just gave it a try, with no success though.It look's like i'm doing something wrong so i've just recorded a video showing my steps. Have a look on it if you have some time: Best,Alvaro Quote Link to comment Share on other sites More sharing options...
pezetko Posted January 20, 2015 Share Posted January 20, 2015 (edited) Hi, DOPS are little bit different then sops. If the node is in the context it still can be calculated even if it's not in chain. Basically when you disconnected the File DOP, you kept it active, and in Write mode, but it hadn't any input, so when you started new simulation it wrote empty file immediately and overwrote your initial state. Try to disable that File DOP, set it's mode to No Operation or delete it before you leave dopnet to set up Initial State. Edited January 20, 2015 by pezetko Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted January 21, 2015 Author Share Posted January 21, 2015 Great! Now it's working just fine! Thx Petr, now if you don't mind, i would like to go a bit further.I have my initial state, the fragments are on the floor but now I want to add another dynamic object on the scene, to interact with the fragments.Since it's reading the initial state sim file, it look's like that the AutoDopNetwork doesn't recognize new objects. Do you have any idea on how can I work with this?Thx,Alvaro Quote Link to comment Share on other sites More sharing options...
pezetko Posted January 21, 2015 Share Posted January 21, 2015 Nice, Instead of specifying Initial State for whole dop network you can just initialize only some dop object. E.g. in attached file: 1. I created active rbd sphere, make that breakable and simulated. 2. When I was satisfied with the look I save the sim file that way I showed you (with File DOP set to write) (after it's saved I set File DOP to No Operation) 3. Then I decided I want to add Torus into the simulation. I created Torus SOP, made it active RBD with help of Shelf tools. 4. Then I setup File DOP to "Load" mode and set up switch (with $SF==1) that is switching between Initial State and simulated object. That way it can continue from saved state but also interact with new objects. merge_sim_init_files.hipnc Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted January 22, 2015 Author Share Posted January 22, 2015 That's great, it worked perfectly! Thx again Petr, you're awesome Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted January 22, 2015 Author Share Posted January 22, 2015 Hey Petr, I hope you still around.Do you know what the $SF==1 really means? I know that SF stands for Simulation Frame. Altough, why's the == for? Quote Link to comment Share on other sites More sharing options...
pezetko Posted January 22, 2015 Share Posted January 22, 2015 It's expression and measn "equal". It compares current simulation frame value ($SF) with value of 1 and returns 1 if it's equal or 0 otherwise. http://www.sidefx.com/docs/houdini14.0/expressions/_operators Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted January 22, 2015 Author Share Posted January 22, 2015 (edited) Thx again Petr, you're helping understand it a lot.I have also noticed that, when i'm working with a static (and animated) object, i have to add the Switch node between the File node and the Groundplane node.It works just fine like this, but i would like to understand what's going on there.My doubt is why the File node must be switching with the Groundplane node. It's just because it's on top of the chain, maybe? here's an image showing exactly what i'm talking about:https://www.dropbox.com/s/2iq51m0y0bhonbl/switch-node.jpg?dl=0I'll record a tutorial about this technique in case anyone have the same doubt and it'll have a great special thx to you.Best,Alvaro Edited January 22, 2015 by ParticleSkull Quote Link to comment Share on other sites More sharing options...
pezetko Posted January 22, 2015 Share Posted January 22, 2015 Could you upload and example? With that swith you are loading simulation data for that object on the first frame (only for the first rame as it's defined with that expression) and then you let simulation to compute the rest by allowing update object's data (instead of constant fetching saved init state). Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted January 22, 2015 Author Share Posted January 22, 2015 (edited) Yes sure, it's here: https://www.dropbox.com/s/h307mup4cbv29i9/HeavyBakeSim.rar?dl=0 (The initial state file is already inside the sim folder) So, with the $SF==1 the Switch node will first use the File node and, as soon as it goes to frame 2 (which is not == to 1), it keep going with the rest of the sim, ignoring the File node? (just forget about it)EDIT: I've just realised how the Switch node works. So, =Tube and 1=File node. Then, if SF=1 switch to File node. If SF≠1 switch to Tube. Right?Best,Alvaro Edited January 23, 2015 by ParticleSkull Quote Link to comment Share on other sites More sharing options...
pezetko Posted January 23, 2015 Share Posted January 23, 2015 Yes. For your file: I put File Write DOP behind RBD Solver before merge1. Then in File Read DOP I checked Match By Name. That way it doesn't need the switch for Groundplane. See the attached file. HeavyBakeSim.zip Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted January 23, 2015 Author Share Posted January 23, 2015 (edited) Great!! Much easier like this (altough i didn't really got what happened in the Match by Name but, whatever.) Now i'm ready to record the tutorial. Thx Petr! Edited January 23, 2015 by ParticleSkull 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.