-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SceneWriter needs to execute all in one go #870
Comments
Actually, re-reading our various offline discussions, this is titled poorly and I mixed two issues... I'll change this one to be about the SceneWriter execution, and add a new issue for task grouping. |
SceneWriter is actually a single task that depends on its inputs at multiple frames.
|
I can see how bullet point 2 arose from looking back at our offline discussion, but it's not quite accurate... I don't think there's any requirement for an ExecutableNode to include the executionHash() of its input requirements if they don't actually affect the results of the execute() - in fact if they don't affect the result then they shouldn't be included. And since the requirementsPlug() provides arbitrary "just do this first" requirements that don't actually affect anything about how SceneWriter (or anything else for that matter) operates, they shouldn't be included in the executionHash(). What we do need to put in SceneWriter::executionHash() is the filename that we're writing to, and the combined hashes of the entire input scene (which is a ComputeNode rather than a requirement) across the relevant frame range. As we discussed, that might be a bit expensive without a hierarchy hash, so a quick alternative for now might be to hash the address of the input ScenePlug and the entire Context - that should hold up until we introduce more complex despatchers with a memory of what they've done in the past. |
Also, we need to make sure that as a matter of course, all executionHash() implementations start by hashing in the TypeId of the ExecutableNode derived class, to avoid clashes between different types of Executable with otherwise identical inputs. For ComputeNodes this is done automatically by the base class (and all derived class implementations are required to call the base class implementation first). I suggest we adopt that methodology here. |
And just one more thing - I think the "execute all in one go" concept is slightly more complex than what we've discussed. So far we've said that the SceneWriter needs to execute for all frames at once, which is only kind of true. It needs to execute for all frames at once, where the Contexts are otherwise identical. We don't have them yet, but just as we have a SceneContextVariables node to propagate new variables upstream during scene assembly, I intend to have ExecutableContextVariables nodes that propagate variables upstream during execution (they would ask for their requirements in a modified context). So you could branch two such nodes off the bottom of an Executable chain to perform the same sequence of operations in slightly different contexts (so maybe a ribgen, render, quicktime, publish chain would be executed for $pass=="foreground" and $pass=="background"). In such situations we need to batch together all the frames for the foreground pass separately from all the frames for the background pass. Let's make sure we discuss this further to make sure we come up with an API which allows this to happen fairly naturally. |
So, time to discuss this further. We currently have Are you thinking SceneWriter will have it's own plugs for frame range, regardless of the requested Context? Or should it have some way to collect all the relevant Contexts together? Would that be via a plug the Dispatchers recognize? Is it going to need to reimplement Will this require modifying |
I'm not 100% clear on any of this, and you have plenty of experience with the farm dispatching stuff that I don't, so please call me on any of this if it sounds suspect. I'd like to defer the question of whether or not SceneWriter has its own frame range - I believe that is orthogonal to the question of how we implement executing-all-in-one-go, and the answer will come naturally from user requests (or the lack of them). I think ExecutableNodes would force their own frame range onto the Dispatcher by implementing I think As for how
Either way, for our current purposes we need to sort the contexts into groups where each context is identical to the others except for the frame. If we do 1) then One other thing that might be nice to consider - I find it annoying that most ExecutableNodes only ever do one frame at a time, but all are forced to loop over a list of contexts in |
So in trying (and failing) to give
The default implementation of the second form would just call the first form several times, modifying the context each time. I don't think this actually removes the need for |
I like it. What do you think to this as far as naming goes?
One other thing - elsewhere in the API, the public methods don't require a Oh and while we're discussing naming, I think I'd like |
That all sounds fine to me. I'll see how it goes. |
The SceneWriter is an executable which needs to process a group of Tasks at once, regardless of any one context requested, since its writing a single file for the entire frame range.
The text was updated successfully, but these errors were encountered: