[Bf-funboard] some pipeline related requests

Thomas Volkmann lists at thomasvolkmann.com
Wed Aug 27 13:39:36 CEST 2014


And additional question: how would I access the different passes to save them as
separate images?
(The question of how to change the renderoutput and save between rendering the
layers still remains)....

Still some pitfalls on the way :)





> Thomas Volkmann <lists at thomasvolkmann.com> hat am 26. August 2014 um 08:50
> geschrieben:
>
>
> This is going into the right direction, but with render_pre and render_post I
> can't get inbetween the rendering of the different layers to set the
> outputname
> and it seems that the save-image is only called once after all layers are
> done.
> So to me it looks like this:
>
> render_pre(change ouputname)
> rendering layer1
> rendering layer2
> rendering layer3
> save image
> render_post(restore ouputname)
>
> change frame
>
> render_pre(change ouputname)
> rendering layer1
> .
> .
>
> Whereas I would need it to be like this:
>
> render_pre(change ouputname)
> rendering layer1
> save image
> render_pre(change ouputname)
> rendering layer2
> save image
> render_pre(change ouputname)
> rendering layer2
> save image
> render_post(restore ouputname)
>
> change frame
> .
> .
> .
>
> I hope that makes sense....
>
>
>
> > Campbell Barton <ideasman42 at gmail.com> hat am 26. August 2014 um 03:37
> > geschrieben:
> >
> >
> > While its possible to replace the render operator with your own one
> > (you'd want to do that for the UI and the KeyBinding), Seems like you
> > migh be better off to do this a different way. - Using a pre-render
> > callback for example.
> >
> > def scene_path_cb(scene): scene.render.filepath = "my_path_override"
> >
> > bpy.app.handlers.render_pre.append(scene_path_cb)
> >
> > The downside with this is it will save the change to disk, so you
> > might want to ass a post-render callback which restores the filepath
> > so as not to annoy users.
> >
> > # store original_path in `scene_path_cb`
> > def scene_path_restore_cb(scene): scene.render.filepath = original_path
> > bpy.app.handlers.render_post.append(scene_path_restore_cb)
> >
> >
> > On Mon, Aug 25, 2014 at 7:19 PM, Thomas Volkmann
> > <lists at thomasvolkmann.com> wrote:
> > > Another thing that just struck me:
> > > is it possible to override the 'Animation' button with a custom command?
> > > Because it is nice that I can have that background-script for modifiyng
> > > the
> > > filename when rendering on the farm, but when someone decides to render
> > > some
> > > parts locally the files will be named different than the renderings from
> > > the
> > > farm.
> > >
> > > And maybe as a basic thought:
> > > Atm you can render multiple layers only when you render to multilayer-exr.
> > > Otherwise the images overwrite each other, or you have to use a hack
> > > (srcipt/nodesetup as mentioned before) to make it work.
> > > Is that really a desired behaviour?
> > >
> > >
> > >> Thomas Volkmann <lists at thomasvolkmann.com> hat am 25. August 2014 um
> > >> 10:40
> > >> geschrieben:
> > >>
> > >>
> > >> Nice!!
> > >> Exactly what I'm looking for. Now it should be easy enough to get this
> > >> implemented (even for me).
> > >>
> > >> Thanks,
> > >> Thomas
> > >>
> > >>
> > >> > Campbell Barton <ideasman42 at gmail.com> hat am 25. August 2014 um 10:19
> > >> > geschrieben:
> > >> >
> > >> >
> > >> > On Mon, Aug 25, 2014 at 5:47 PM, Thomas Volkmann
> > >> > <lists at thomasvolkmann.com> wrote:
> > >> > > Hi,
> > >> > > thanks for the answers! Python would be my weapon of choice, although
> > >> > > I
> > >> > > don’t
> > >> > > see how I would be able to add a commandline flag to the Blender
> > >> > > executable
> > >> > > then. Maybe I should go into more detail about what I want to do. It
> > >> > > all
> > >> > > comes
> > >> > > down to try to integrate Blender into our RoyalRender renderfarm. I
> > >> > > found
> > >> > > this
> > >> > > script ( https://github.com/CallistoVFX/RoyalRender_Blender_Submitter
> > >> > > <https://github.com/CallistoVFX/RoyalRender_Blender_Submitter> )
> > >> > > which
> > >> > > is
> > >> > > working for us, except that we are not able to specify which layers
> > >> > > we
> > >> > > want
> > >> > > to
> > >> > > render. The RoyalRender submitter would let you select which
> > >> > > Scene/layers
> > >> > > to
> > >> > > submit and create a renderjob for each one. Meaning it would create a
> > >> > > commandline for each job that gets send to the clients. Ideally I
> > >> > > would
> > >> > > like
> > >> > > it
> > >> > > to look like this:
> > >> > >
> > >> > > blender.exe -b "foo.blend" -S <SCENE> -L <LAYER> -o <OUTPUTNAME> -x 1
> > >> > > -t 0
> > >> > > -s 1
> > >> > > -e 5 -a
> > >> > >
> > >> > > Except for the layers everything is working fine. I would love if the
> > >> > > resulting
> > >> > > files would be named like:
> > >> > >
> > >> > > <OUTPUTNAME>.<LAYERNAME>.<PASS>.#####.<EXT>
> > >> > >
> > >> > > As you specify an outputname for every scene anyway it is not
> > >> > > neccessary
> > >> > > to
> > >> > > have
> > >> > > <SCENENAME> in the filename. I would suggest to have Blender add
> > >> > > LAYERNAME
> > >> > > and
> > >> > > PASS automatically to the filename, so the user has not to worry
> > >> > > about
> > >> > > it.
> > >> > >
> > >> > > So, the main task for this would be, to add the commandline flag to
> > >> > > the
> > >> > > blenderexecutable and have blender add layer- and passname to the
> > >> > > fileoutput
> > >> > > (if
> > >> > > not multilayer-exr). I don’t think that can be done via an addon, can
> > >> > > it?
> > >> >
> > >> > You can do this, see the `background_job.py` template that comes with
> > >> > Blender (access from text editor templates menu).
> > >> >
> > >> > A different example script to render FBX files:
> > >> > https://github.com/ideasman42/pyfbx_render
> > >> >
> > >> > > 2.
> > >> > > If we are using the extracted blender (not the installer), the
> > >> > > BLENDER_SYSTEM
> > >> > > paths are not used (only USER and LOCAL), and we can modify these
> > >> > > variables
> > >> > > to
> > >> > > point to our shared config-location. Do I get that right? (I’ll give
> > >> > > it
> > >> > > a
> > >> > > try
> > >> > > anyway ;) )
> > >> >
> > >> > Yep, it should work fine.
> > >> >
> > >> > > But it would be really really nice if it was possible to add custom
> > >> > > locations
> > >> > > (plural). Maybe you have a set of project related
> > >> > > scripts/tools/settings
> > >> > > that
> > >> > > you want to store with the project and not load it when working on
> > >> > > other
> > >> > > projects. You would launch blender then with a commandlineflag to
> > >> > > point
> > >> > > to
> > >> > > the
> > >> > > workgroup (using the XSI term for the config/plugin location) you
> > >> > > want
> > >> > > to
> > >> > > connect to. As I see it, this is not possible at the moment.
> > >> >
> > >> > its possible, you can for example use Python to manipulate addon path,
> > >> > so you can have an on-load callback which re-configures Blender when
> > >> > loading a new blend file.
> > >> >
> > >> > But this is getting a bit outside what we support out of the box, your
> > >> > getting into customizing the default application which is OK, but the
> > >> > more you want to make Blender work differently, to the defaults the
> > >> > more work you give yourself.
> > >> >
> > >> > >From what you are saying, its probably easiest to just have some
> > >> > different blender launchers for different projects (if you really need
> > >> > them to have entirely different configurations, keymaps, addons,
> > >> > preferences... etc).
> > >> >
> > >> > > cheers,
> > >> > > Thomas
> > >> > >
> > >> > >
> > >> > >
> > >> > >> Campbell Barton <ideasman42 at gmail.com> hat am 25. August 2014 um
> > >> > >> 04:25
> > >> > >> geschrieben:
> > >> > >>
> > >> > >>
> > >> > >> Quick reply, I think Bassam covered this mostly, but here goes...
> > >> > >>
> > >> > >> 1 & 1.a: Use Python, I know this may sound like some cop-out answer,
> > >> > >> but if you really want fine grained control about rendering
> > >> > >> different
> > >> > >> layers to different locations... you can get this with quite a
> > >> > >> simple
> > >> > >> script, Also these kinds of issues tend to be less obvious & generic
> > >> > >> then you might initially think (how to handle animations,
> > >> > >> overwriting
> > >> > >> options, color management.... ) its all possible, but with Python
> > >> > >> you
> > >> > >> can fine tune this stuff, probably the script will be <25 lines and
> > >> > >> not hard to write.
> > >> > >>
> > >> > >> I would go as far as to say - if you want to have configurable
> > >> > >> render
> > >> > >> farm, its mandatory to have some kind of Python initialization
> > >> > >> script,
> > >> > >> which handles any number of details - check for missing textures,
> > >> > >> baked caches... check output paths on compositor nodes etc...
> > >> > >>
> > >> > >>
> > >> > >> 2. Yes, see "Environment Variables:" section in "blender --help"
> > >> > >>
> > >> > >>
> > >> > >> On Thu, Aug 14, 2014 at 10:07 PM, Thomas Volkmann
> > >> > >> <lists at thomasvolkmann.com> wrote:
> > >> > >> > Hi,
> > >> > >> >
> > >> > >> > while checking how Blender could fit into our pipeline, I ran into
> > >> > >> > some
> > >> > >> > issues
> > >> > >> > that maybe someone finds worth fixing/implementing.
> > >> > >> > First a short list, and description further down:
> > >> > >> >
> > >> > >> > 1.: render renderlayers (and passes) to separate files
> > >> > >> > 1.a: commandline flag to chose which renderlayer to render
> > >> > >> > 2: additional location(s) for Configuration and Data files
> > >> > >> >
> > >> > >> > It's pretty much self explanatory, but nevertheless some words of
> > >> > >> > explanation:
> > >> > >> >
> > >> > >> > 1: When more layers are selected and I have an outputformat other
> > >> > >> > than
> > >> > >> > multilayer-exr, they will overwrite each other and only the last
> > >> > >> > rendered
> > >> > >> > layer
> > >> > >> > survives.
> > >> > >> > Possible solution could be to either hardcoded the layername to
> > >> > >> > the
> > >> > >> > outputname,
> > >> > >> > or allow the usage of tokens (<Scene>.<Layer>.<Pass>).
> > >> > >> > I have a thread on blenderartists with more datail if needed:
> > >> > >> > http://blenderartists.org/forum/showthread.php?346014-rendering-layers-to-files
> > >> > >> >
> > >> > >> > 1.a: When it is possible to render layers separately, there should
> > >> > >> > also
> > >> > >> > be a
> > >> > >> > commandline flag for it (where "-o" should override the eventually
> > >> > >> > hardcoded
> > >> > >> > name).
> > >> > >> > This would be mandatory for proper renderfarm integration.
> > >> > >> >
> > >> > >> > 2: I think it would be good to be able to add custom locations for
> > >> > >> > Config&Data
> > >> > >> > files. I'll quote my blenderartists post
> > >> > >> > <http://blenderartists.org/forum/showthread.php?346023-Additional-Configuration-amp-Data-Paths>
> > >> > >> > here:
> > >> > >> > is it possible to have more locations for configuration and data
> > >> > >> > files
> > >> > >> > than
> > >> > >> > SYSTEM, LOCAL and USER?
> > >> > >> > http://wiki.blender.org/index.php/Doc:2.6/Manual/Introduction/Installing_Blender/DirectoryLayout
> > >> > >> > I would like to have one place (or more) on the server for
> > >> > >> > additional
> > >> > >> > settings,plugins,addons, whatever.
> > >> > >> > SYSTEM doesn't work, because all users shall run Blender from the
> > >> > >> > network.
> > >> > >> > USER doesn't work, because either I would have to deploy the stuff
> > >> > >> > for
> > >> > >> > every
> > >> > >> > user, or every user has to go with the same setup
> > >> > >> > LOCAL would work, but I would need to install stuff for each
> > >> > >> > separate
> > >> > >> > version or
> > >> > >> > build.
> > >> > >> >
> > >> > >> > That's basically it.
> > >> > >> > Any thoughts/questions/advice?
> > >> > >> >
> > >> > >> > Thanks,
> > >> > >> > Thomas
> > >> > >> > _______________________________________________
> > >> > >> > Bf-funboard mailing list
> > >> > >> > Bf-funboard at blender.org
> > >> > >> > http://lists.blender.org/mailman/listinfo/bf-funboard
> > >> > >>
> > >> > >>
> > >> > >>
> > >> > >> --
> > >> > >> - Campbell
> > >> > >>
> > >> > > _______________________________________________
> > >> > > Bf-funboard mailing list
> > >> > > Bf-funboard at blender.org
> > >> > > http://lists.blender.org/mailman/listinfo/bf-funboard
> > >> >
> > >> >
> > >> >
> > >> > --
> > >> > - Campbell
> > >> >
> > >> _______________________________________________
> > >> Bf-funboard mailing list
> > >> Bf-funboard at blender.org
> > >> http://lists.blender.org/mailman/listinfo/bf-funboard
> > > _______________________________________________
> > > Bf-funboard mailing list
> > > Bf-funboard at blender.org
> > > http://lists.blender.org/mailman/listinfo/bf-funboard
> >
> >
> >
> > --
> > - Campbell
> >
> _______________________________________________
> Bf-funboard mailing list
> Bf-funboard at blender.org
> http://lists.blender.org/mailman/listinfo/bf-funboard


More information about the Bf-funboard mailing list