Jump to content
substep

command line cache .sim

Recommended Posts

Hi There, How Can I cache out .sim files of a dopnet through the command line?

I tried searching, but most is for rendering through command

Thanks!

Share this post


Link to post
Share on other sites

Do you really need to cache the .sim file? Is there a reason you don't want to bring your geo/sim into sops and use a rop output driver?

Share this post


Link to post
Share on other sites

I know what you mean, but this is just to quickly get an alembic file into maya, and still have the .sim on hand to cache everything out later. it probably seems strange ;), and I can do it from within houdini obviously, But I wanted to compare sim times through command I suppose and have that available to me.

Edited by substep

Share this post


Link to post
Share on other sites

Can't you just make a dynamics rop and execute it from the command line?

hscript myfile.hip

render -V /out/dynamicsrop

Share this post


Link to post
Share on other sites

Thanks! I get unable to open file: ip error. any ideas? sorry for being so thick

nevermind, I got it working. Many thanks!

Edited by substep

Share this post


Link to post
Share on other sites

well, it's working, but isn't saving the .sim file correctly. I'm using $SF in the filename, but it seems to not like it. how can I fix that, and still cache substeps?

Thanks!

Share this post


Link to post
Share on other sites

you´re not using Apprentice, or Apprentice HD, are you?

Share this post


Link to post
Share on other sites

you´re not using Apprentice, or Apprentice HD, are you?

No, but good thinking!

Share this post


Link to post
Share on other sites

You may want to use $ST (simulation time) instead of $SF (simulation timestep number).

Edited by jkunz07

Share this post


Link to post
Share on other sites

ahh I feel really stupid. many thanks! next beer's on me

Edited by substep

Share this post


Link to post
Share on other sites

ok wait, no. lol. $ST doesn't seem to work either. I can see it trying to write the file without the variable, replacing it with every frame. It does however work when I turn on "explicit cache" on the dopnet. But then it's wasting time writing both files, deleting one, writing both files, deleting one, etc, etc

Edited by substep

Share this post


Link to post
Share on other sites

If your sim timescale is 1.0, try $FF?

If it's not, you can maybe eval some combination of $FF and timescale.

Share this post


Link to post
Share on other sites

this kinda works, as the dynamics ROP accepts $FF as a variable, but it's not saving the substeps. It's frame for frame. If you look at how the DOPnet saves substepped .sim files - if you have 4 substeps, then frame one will have 4 .sim files named <filename>_1, _2, _3, _4. since it's using $ST.

I'm still somewhat green to all this, so I obviously really don't understand, but could someone clear up why a "Dynamics" ROP that saves out .sim files won't save substeps?

I suppose I could set my substeps to 1, and my simscale to .25. save out 4x as many frames, then read that back into a dopnet set to 4 substeps, and 1 sim scale...?

maybe there's a better way?

If I tag a file node onto the end of my network inside my DOPnet, can I cook that from the command line somehow?

Edited by substep

Share this post


Link to post
Share on other sites
Guest mantragora

Kids, kids. Do I really have to fix everything for you ;)

Append fileDOP at the end of you sim network, set it to "Write" and use "$ST.sim" in it. And then add dynamics ROP in OUT and remember to turn on "Initialize Simulation OPs". Set its path to something that doesn't overwrite the name of fileDOP path (don't even use $F in it, let it write to the same file in each frame, call it "forceCook.sim" or something like that). Now try to call your ROP. It should force the network to cook and with it the fileDOP to write each substep.

Edited by mantragora

Share this post


Link to post
Share on other sites

haha, thanks! is this not still writing two .sim files to disk though?

I just gave it a shot, and I get the same results as I did just turning on explicit cache on the dopnet, and letting the dynamics ROP error out writing over the same file since $SF didn't work in the dynamics ROP. So it still seems to be writing two .sim files to disk at once. if you stop the sim while the temp .sim file is being written, it's still the same file size as the wanted .sim files with or without $SF in the filename.

please correct me if I've misunderstood ;)

it seems nice being able to run 4 bullet sims from the command line though, processors are maxed, and no gui. I guess we'll see how this goes.

Edited by substep

Share this post


Link to post
Share on other sites
Guest mantragora

So set your ROP path to reference path parm of the fileDOP and set fileDOp to "No Operation", than ROP will save correctly and you will get one file saved only by it at a substep.

Edited by mantragora

Share this post


Link to post
Share on other sites

I was really hoping this was gonna work. But the "render" never starts, it just hangs. I did notice though when referencing the path of the file dop into the dynamics rop, that it didnt turn green. maybe it doesn't accept reference?

edit: actually, it started after about 3 minutes. but it's only writing every odd frame. hmmm ? I believe I have two substeps on this sim.

I did notice though, that by using the file dop, or explicit cache on the dopnet, and writing over the same file in the dynamics rop, it only writes the temp .sim file every frame, not every substep. So I guess that's a little better than what I originally thought.

Edited by substep

Share this post


Link to post
Share on other sites
Guest mantragora

I was really hoping this was gonna work. But the "render" never starts, it just hangs. I did notice though when referencing the path of the file dop into the dynamics rop, that it didnt turn green. maybe it doesn't accept reference?

As long as it works color doesn't matter. So does it work for you or do I have to attach example file?

In my previous message I accidentally used $SF in fileDOP and that's why I though that it stopped working :). After setting fileDOP to $ST, ROP again started to save the correct files again.

Edited by mantragora

Share this post


Link to post
Share on other sites

Yes, and example would be nice. As $SF in the file dop referenced into the dynamics rop only writes odd frames (1, 3, 5, etc), and using $ST in the file dop referenced into the dynamics rop gives me horribly misnumbered .sim files. I can only assume I'm doing something wrong, but everything your saying is clear as day to me.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×