RickWork Posted March 9, 2006 Share Posted March 9, 2006 I'm wondering if anyone can share their workflow when writing out and reading back in .bgeo sequences. I normally write out a lot of bgeo sequences and read them back in to keep my scene interactive. You might say I'm addicted to geo ropping. I got tired of trying to remember or hunt the down the file name I wrote out to reference back in via the file sop so I went the chs() route in my file sop to reference the geo out rop file name in my sopnet. (All of that sounds funny.) I got tired of that quite quikly as well as I had to hit the reload button in every object network I have this setup. Finally I went the route of setting up various geo rops in /out/ with channel references in my sopnets. I have a post render script on each rop that opparm's the reload button on the file sop that's referencing them. The name of the output.bgeo has some bits from the scene name (shot,version, etc) as well as the sop path as this helps me identify it in the shell if I ever need to. I thought I was clever when I setup this procedural geo rop/file sop system. That was until I decided to save my scene with a new version (shot_012_something_v01 to v02.) As you can guess, all of my file sops are now pointing to invalid geometry since my .bgeo sequence is looking for v01. Now I have to either break my channel reference or recook the geo rops to make everything match. Not soo clever after all. So, what's your workflow? Cheers, /Rick Quote Link to comment Share on other sites More sharing options...
edward Posted March 9, 2006 Share Posted March 9, 2006 I don't have any workflow but how about creating a SOP HDA that uniquely identifies your sequence ... something like saving out your sequence to $HIP/geo/`chs("soppath")`.$F4.bgeo. If you want to be more extensible use $HIP/geo/$TAG/`chs("soppath")`.$F4.bgeo where $TAG is some unique name that you specify from the top-level of your HDA. So you have a SOP HDA which contains a ROP File Output connected to the subnet's input for saving out your sequence and a File SOP (with display/render flags enabled) which reads it back in. At the top level, you have a button that says "Cache" which will run "unix mkdir -p" to first make sure the directory exists and saves it out. Maybe a button that also erases it. Now that I think of it, I kinda like the "tag" parameter idea. This way, you can put down an instance of your HDA, type in a tag and automatically reuse a saved out sequence without the need for caching. Quote Link to comment Share on other sites More sharing options...
deecue Posted March 9, 2006 Share Posted March 9, 2006 hey rick, the two things i thought of based on the current workflow you have now is... one: instead of using an incremental versioning system, you have a current version (the shot file) with past hips containing versioned file names.. kind of how the backup system works as of now with file saving.. two: create shot and version number envars.. when you decide to update your file, output version numbers, update the envars as well (or create a simple command script to automate it so that it does all three at once..) Then your file output names, opparm post scripts and file nodes will all be updated using the shot/version envars.. then again.. edwards solution is pretty nifty i must say Quote Link to comment Share on other sites More sharing options...
RickWork Posted March 9, 2006 Author Share Posted March 9, 2006 Cheers Edward and Dave, I too like Edward's approach. 1 question though: Say I a bunch of these SOP HDA inside 5 or 6 objects and I want to cook all of them to reflect some changes. I do like having my rops in /out so I can run hrender from the command line. How would I go abouts referencing these SOP HDA's in /out/? Or do I just need to do this via hscript? Thanks! Quote Link to comment Share on other sites More sharing options...
michael Posted March 9, 2006 Share Posted March 9, 2006 you could build a driver in /out that looks for all the HDAs and runs them.... Quote Link to comment Share on other sites More sharing options...
RickWork Posted March 9, 2006 Author Share Posted March 9, 2006 you could build a driver in /out that looks for all the HDAs and runs them.... 25501[/snapback] Would this driver be an otl or a hdk driver? I thought about creating an otl but I would need to have a rop inside to create a subnet and then choose make digital asset, unless of course I'm missing something here. Normally if I need an otl that runs a script, I just collapse a Null into a subnet and make an otl from that but of course there isn't a null in rops. Quote Link to comment Share on other sites More sharing options...
edward Posted March 9, 2006 Share Posted March 9, 2006 You could write a script binded to a F-key that pushes all the buttons. Quote Link to comment Share on other sites More sharing options...
RickWork Posted March 9, 2006 Author Share Posted March 9, 2006 You could write a script binded to a F-key that pushes all the buttons. 25504[/snapback] yeah I suppose that'll work if I can remember all my hotkeys Ideally, I would have a ROP with a parameter pane where I have options like, cook all Sources, Cook all Finals, Cook only bundles, etc. I guess I can make a shell rop an otl and do all this. The shell rop will just be the placeholder so I can make an otl in /out. Thanks! /Rick Quote Link to comment Share on other sites More sharing options...
SpencerL Posted March 22, 2006 Share Posted March 22, 2006 I have a post render script on each rop that opparm's the reload button on the file sop that's referencing them. Hey, Sorry guys for having to dumb down this thread but I am actually trying to write a post render script in the same way where it refreshes the file sop. Unfortuantely I am completely new to using hscript so would you mind telling me what that script looks like? I am currently doing something like `opparm -r file3 reload (1)`, but obviously the syntax is wrong. Any help would be great. Thanks - Spencer Quote Link to comment Share on other sites More sharing options...
RickWork Posted March 22, 2006 Author Share Posted March 22, 2006 Hey, Unfortuantely I am completely new to using hscript so would you mind telling me what that script looks like? I am currently doing something like `opparm -r file3 reload (1)`, but obviously the syntax is wrong. Any help would be great. Hi Spencer, Try opparm -C /path/to/my/operator paramName value I think, if you don't supply the full path to the sop you will have to "opcf" to the path of the sop first. I'm not 100% sure though. So you could probably do somethiong like: opcf /path/to/myoperator; oppparm -C SopName parameter value Example: opcf /obj/model; opparm -C file1 reload 1 In my case, I have a script that does this: set OP_NAME = "/obj/myObject/GeoCacher" opparm -C $OP_NAME cache_reload 1 Quote Link to comment Share on other sites More sharing options...
SpencerL Posted March 22, 2006 Share Posted March 22, 2006 Thanks Rick! That did the trick. I really appreciate it. -Spencer Quote Link to comment Share on other sites More sharing options...
RickWork Posted March 22, 2006 Author Share Posted March 22, 2006 Hello, So I finally got to creating this Geo Cache otl. I have attached it if anyone wants to give it a go. Sorry I didn't have a chance to offer a useful helpfile yet only a lame description of one of the parameters. In the next version, I'll add the option to delete old cache files. Here's a basic feature list: - Embed a tag into file name. Choose from various tags. - Choose how file name is constructed - Choose where file is written. (default is $JOB/Geo/GEO_CACHE/) - Allow bypass of cache - A cache Bundle is created by default. Override is available - Logging to op comments, allow override. - Logging to otl parameter There are a bunch of invisible parameters that I will expose in the next version. In case you want to peek I'm using hscript for the basic stuff and I'm using a couple of custom expressions for some of the logic. Let me know if you have any problems or suggestions. Thanks to everyone for their help. Cheers, /Rick Mill_GeoCache_v01.2.tar.gz Quote Link to comment Share on other sites More sharing options...
RickWork Posted March 22, 2006 Author Share Posted March 22, 2006 I corrected the file in the previous post but I can't delete this post. 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.