Motion blur and Alembic via a Scene Reader node in an overloaded GafferScene node

584 views
Skip to first unread message

Sam Hodge

unread,
Feb 6, 2018, 8:18:23 PM2/6/18
to gaffer-dev
OK

So for giggles yesterday I tried hooking up a large scene to gaffer using some asset path indirection via a custom node.

The custom node gets paths for a bunch of alembic files and hangs them together with a bunch of group nodes and passes them to the output context.

But when I render I get no motion blur.

I can double check the number of samples in the Alembic file but even when I wind the shutter out to 360 degrees I get no motion blur.

It seems that motion blur is all turned on with the standard settings, I might narrow down my scene to one polymesh and read the .ass file and see if I can see what the issue is

I am working with Arnold 5.0.2.3 and gaffer 0.42.0.0

Any hints for a curious Aussie?

Sam

Sam Hodge

unread,
Feb 6, 2018, 10:05:36 PM2/6/18
to gaffer-dev
Sorry guys it seems that interactive renders never have motion blur

now I wonder if we can get motion blur from alembic files with a value for velocity or v to make a motion block by goin a little bit in the oppsite direction for shutter open and a little bit in the direction of v for shutter close?

In the shot that I rendered there is a number of effects Alembic caches with topology variance and they are not looking so hot in gaffer at the moment.

Sam

Daniel Dresser

unread,
Feb 7, 2018, 2:51:04 AM2/7/18
to gaffer-dev
Yeah, no motion blur in interactive renders currently - I should look into whether this would be hard to fix sometime, I've had some test scenes recently where not having it was bugging me.

As for using velocity to make a motion block - yes, that should definitely work.  We have a little node for converting velocity primvars into motion that's been around a long time, but I think it's currently part of ImageEngine's WIP toolset, rather than something that has been released with Gaffer.

But anyway, now that we've got OSLObject for doing primVar manipulation, this should be a fairly easy thing to fit together as little Gaffer box anyway.  I'll try hacking up something quick tomorrow morning if you haven't figured it out by then.

dan...@image-engine.com

unread,
Feb 7, 2018, 3:18:11 PM2/7/18
to gaffer-dev
Here's a little setup that you can paste into Gaffer.  It sets up a box that moves with an expression by rounding the frame to an integer, as an example of something without blur.  I then set up a primvar named "v" on this cube, and then put it through a little box I hacked up named "ApplyVelocityBlur", which converts this "v" primvar into motion using OSLObject, by comparing the current time to the nearest frame.  ( You can see the movement if you ctrl click on the current frame indicator at the bottom of Gaffer window and drag to a non-integer frame ). This should create proper motion blur from the "v" primvar.

--------------------------


import Gaffer
import GafferOSL
import GafferScene
import IECore
import imath

Gaffer.Metadata.registerNodeValue( parent, "serialiser:milestoneVersion", 0, persistent=False )
Gaffer.Metadata.registerNodeValue( parent, "serialiser:majorVersion", 43, persistent=False )
Gaffer.Metadata.registerNodeValue( parent, "serialiser:minorVersion", 0, persistent=False )
Gaffer.Metadata.registerNodeValue( parent, "serialiser:patchVersion", 0, persistent=False )

__children = {}

__children["Cube"] = GafferScene.Cube( "Cube" )
parent.addChild( __children["Cube"] )
__children["Expression"] = Gaffer.Expression( "Expression" )
parent.addChild( __children["Expression"] )
__children["Expression"]["__out"].addChild( Gaffer.FloatPlug( "p0", direction = Gaffer.Plug.Direction.Out, defaultValue = 0.0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["PrimitiveVariables"] = GafferScene.PrimitiveVariables( "PrimitiveVariables" )
parent.addChild( __children["PrimitiveVariables"] )
parent.addChild( __children["PrimitiveVariables"] )
__children["PrimitiveVariables"]["primitiveVariables"].addChild( Gaffer.CompoundDataPlug.MemberPlug( "member1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["PrimitiveVariables"]["primitiveVariables"]["member1"].addChild( Gaffer.StringPlug( "name", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["PrimitiveVariables"]["primitiveVariables"]["member1"].addChild( Gaffer.V3fPlug( "value", defaultValue = imath.V3f( 0, 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, interpretation = IECore.GeometricData.Interpretation.Vector ) )
__children["PrimitiveVariables"]["primitiveVariables"]["member1"].addChild( Gaffer.BoolPlug( "enabled", defaultValue = True, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ResamplePrimitiveVariables"] = GafferScene.ResamplePrimitiveVariables( "ResamplePrimitiveVariables" )
parent.addChild( __children["ResamplePrimitiveVariables"] )
__children["PathFilter"] = GafferScene.PathFilter( "PathFilter" )
parent.addChild( __children["PathFilter"] )
__children["ApplyVelocityBlur"] = Gaffer.Box( "ApplyVelocityBlur" )
parent.addChild( __children["ApplyVelocityBlur"] )
__children["ApplyVelocityBlur"].addChild( GafferOSL.OSLObject( "OSLObject" ) )
__children["ApplyVelocityBlur"].addChild( GafferScene.ScenePlug( "in", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ApplyVelocityBlur"].addChild( GafferScene.FilterPlug( "filter", defaultValue = 0, minValue = 0, maxValue = 7, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ApplyVelocityBlur"].addChild( GafferOSL.OSLCode( "OSLCode" ) )
__children["ApplyVelocityBlur"]["OSLCode"]["parameters"].addChild( Gaffer.FloatPlug( "frame", defaultValue = 0.0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ApplyVelocityBlur"]["OSLCode"]["out"].addChild( Gaffer.V3fPlug( "out", direction = Gaffer.Plug.Direction.Out, defaultValue = imath.V3f( 0, 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, interpretation = IECore.GeometricData.Interpretation.Point ) )
__children["ApplyVelocityBlur"].addChild( GafferOSL.OSLShader( "OutObject" ) )
__children["ApplyVelocityBlur"]["OutObject"].loadShader( "ObjectProcessing/OutObject" )
__children["ApplyVelocityBlur"].addChild( GafferOSL.OSLShader( "OutPoint" ) )
__children["ApplyVelocityBlur"]["OutPoint"].loadShader( "ObjectProcessing/OutPoint", keepExistingValues=True )
__children["ApplyVelocityBlur"].addChild( Gaffer.Expression( "Expression1" ) )
__children["ApplyVelocityBlur"]["Expression1"]["__out"].addChild( Gaffer.FloatPlug( "p0", direction = Gaffer.Plug.Direction.Out, defaultValue = 0.0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ApplyVelocityBlur"].addChild( Gaffer.BoxIn( "BoxIn" ) )
__children["ApplyVelocityBlur"]["BoxIn"].addChild( GafferScene.ScenePlug( "__in", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ApplyVelocityBlur"]["BoxIn"].addChild( GafferScene.ScenePlug( "out", direction = Gaffer.Plug.Direction.Out, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ApplyVelocityBlur"].addChild( Gaffer.BoxIn( "BoxIn1" ) )
__children["ApplyVelocityBlur"]["BoxIn1"].addChild( GafferScene.FilterPlug( "__in", defaultValue = 0, minValue = 0, maxValue = 7, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ApplyVelocityBlur"]["BoxIn1"].addChild( GafferScene.FilterPlug( "out", direction = Gaffer.Plug.Direction.Out, defaultValue = 0, minValue = 0, maxValue = 7, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ApplyVelocityBlur"].addChild( GafferScene.SceneSwitch( "SceneSwitch" ) )
__children["ApplyVelocityBlur"].addChild( Gaffer.BoolPlug( "enabled", defaultValue = True, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ApplyVelocityBlur"].addChild( Gaffer.BoxOut( "BoxOut" ) )
__children["ApplyVelocityBlur"]["BoxOut"].addChild( GafferScene.ScenePlug( "in", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ApplyVelocityBlur"]["BoxOut"].addChild( GafferScene.ScenePlug( "__out", direction = Gaffer.Plug.Direction.Out, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ApplyVelocityBlur"].addChild( GafferScene.ScenePlug( "out", direction = Gaffer.Plug.Direction.Out, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Cube"]["transform"]["translate"]["x"].setInput( __children["Expression"]["__out"]["p0"] )
__children["PrimitiveVariables"]["in"].setInput( __children["Cube"]["out"] )
__children["PrimitiveVariables"]["filter"].setInput( __children["PathFilter"]["out"] )
__children["PrimitiveVariables"]["primitiveVariables"]["member1"]["name"].setValue( 'v' )
__children["PrimitiveVariables"]["primitiveVariables"]["member1"]["value"].setValue( imath.V3f( 1, 0, 0 ) )
__children["ResamplePrimitiveVariables"]["in"].setInput( __children["PrimitiveVariables"]["out"] )
__children["ResamplePrimitiveVariables"]["filter"].setInput( __children["PathFilter"]["out"] )
__children["ResamplePrimitiveVariables"]["names"].setValue( 'v' )
__children["PathFilter"]["paths"].setValue( IECore.StringVectorData( [ '/cube' ] ) )
__children["ApplyVelocityBlur"]["OSLObject"]["in"].setInput( __children["ApplyVelocityBlur"]["BoxIn"]["out"] )
__children["ApplyVelocityBlur"]["OSLObject"]["filter"].setInput( __children["ApplyVelocityBlur"]["BoxIn1"]["out"] )
__children["ApplyVelocityBlur"]["OSLObject"]["shader"].setInput( __children["ApplyVelocityBlur"]["OutObject"]["out"] )
__children["ApplyVelocityBlur"]["in"].setInput( __children["ResamplePrimitiveVariables"]["out"] )
__children["ApplyVelocityBlur"]["filter"].setInput( __children["PathFilter"]["out"] )
__children["ApplyVelocityBlur"]["OSLCode"]["type"].setValue( 'osl:shader' )
__children["ApplyVelocityBlur"]["OSLCode"]["parameters"]["frame"].setInput( __children["ApplyVelocityBlur"]["Expression1"]["__out"]["p0"] )
__children["ApplyVelocityBlur"]["OSLCode"]["code"].setValue( 'vector velocity;\ngetattribute( "v", velocity );\n\nout = P + velocity * ( frame - round( frame ) );' )
__children["ApplyVelocityBlur"]["OutObject"]["parameters"]["in0"].setInput( __children["ApplyVelocityBlur"]["OutPoint"]["out"]["primitiveVariable"] )
__children["ApplyVelocityBlur"]["OutPoint"]["parameters"]["value"].setInput( __children["ApplyVelocityBlur"]["OSLCode"]["out"]["out"] )
__children["ApplyVelocityBlur"]["BoxIn"]["__in"].setInput( __children["ApplyVelocityBlur"]["in"] )
__children["ApplyVelocityBlur"]["BoxIn"]["out"].setInput( __children["ApplyVelocityBlur"]["BoxIn"]["__in"] )
__children["ApplyVelocityBlur"]["BoxIn1"]["name"].setValue( 'filter' )
__children["ApplyVelocityBlur"]["BoxIn1"]["__in"].setInput( __children["ApplyVelocityBlur"]["filter"] )
__children["ApplyVelocityBlur"]["BoxIn1"]["out"].setInput( __children["ApplyVelocityBlur"]["BoxIn1"]["__in"] )
__children["ApplyVelocityBlur"]["SceneSwitch"]["enabled"].setInput( __children["ApplyVelocityBlur"]["enabled"] )
__children["ApplyVelocityBlur"]["SceneSwitch"]["in"]["in0"].setInput( __children["ApplyVelocityBlur"]["BoxIn"]["out"] )
__children["ApplyVelocityBlur"]["SceneSwitch"]["in"]["in1"].setInput( __children["ApplyVelocityBlur"]["OSLObject"]["out"] )
__children["ApplyVelocityBlur"]["SceneSwitch"]["index"].setValue( 1 )
__children["ApplyVelocityBlur"]["BoxOut"]["in"].setInput( __children["ApplyVelocityBlur"]["SceneSwitch"]["out"] )
__children["ApplyVelocityBlur"]["BoxOut"]["__out"].setInput( __children["ApplyVelocityBlur"]["BoxOut"]["in"] )
__children["ApplyVelocityBlur"]["out"].setInput( __children["ApplyVelocityBlur"]["BoxOut"]["__out"] )
__children["Expression"]["__engine"].setValue( 'OSL' )
__children["Expression"]["__expression"].setValue( 'parent.__out.p0 = round( context("frame", 0.0) );' )
__children["ApplyVelocityBlur"]["Expression1"]["__engine"].setValue( 'OSL' )
__children["ApplyVelocityBlur"]["Expression1"]["__expression"].setValue( 'parent.__out.p0 = context( "frame", 0.0 );' )


del __children

Sam Hodge

unread,
Feb 7, 2018, 6:40:15 PM2/7/18
to gaffer-dev
Dan,

What an awesome thing to be able to make a block of P from v using OSL, pretty neat!.

But it doesnt seem to be working with the alembic file I have which certainly does have a meaningful value for v well at least when it is rendered with an Arnold procedural in HtoA.

Is there some sort of trick to get v to turn up in context when using a scenereader?

It seems that this sort of functionaltiy should be "out of the box" rather than a bunch of scripty nodes, velocity motion blur seems to be a pretty normal thing to want to do.

I can send an example velocity motion blurred changing topology example if that would help.

Anyway thanks a lot for the network box approach.

Sam

dan...@image-engine.com

unread,
Feb 7, 2018, 6:47:45 PM2/7/18
to gaffer-dev
> I can send an example velocity motion blurred changing topology example if that would help.

Yeah, I would expect this to work, if you've got a simple example handy, I can definitely take a look.

> It seems that this sort of functionaltiy should be "out of the box" rather than a bunch of scripty nodes, velocity motion blur seems to be a pretty normal thing to want to do.

Agreed.  We do have a node to do this at ImageEngine, but it's got some overly complicated stuff for dealing with rotation and acceleration, and we weren't sure all this complication belonged in the standard version. But yes, we should sort this out and release a node with Gaffer.

Sam Hodge

unread,
Feb 7, 2018, 7:09:23 PM2/7/18
to gaffer-dev
ALthough I can get the box to work I cannot get my shattering glass to work I will make a velocity motion blurred cube that works with another Arnold procedural and attach to this thread.

Sam Hodge

unread,
Feb 7, 2018, 7:26:15 PM2/7/18
to gaffer-dev
Please find a velocity cube that renders blurred in Arnold
velocity_cube.abc

Sam Hodge

unread,
Feb 7, 2018, 7:34:29 PM2/7/18
to gaffer-dev
note that this does not have changing topology but I cannot get motion blur out of it in gaffer 0.42.0.0

dan...@image-engine.com

unread,
Feb 7, 2018, 7:50:53 PM2/7/18
to gaffer-dev
Based on an initial investigation, it looks like you've found some sort of bug in our Alembic support - for some reason, it isn't loading the velocity primvar ( if I check your velocity_cube example in the scene inspector, the only primvar I get is P ).  I've confirmed that the velocity is present when loaded in Houdini.  I'll take a look at our loading code and report back.

Sam Hodge

unread,
Feb 7, 2018, 7:58:33 PM2/7/18
to gaffer-dev
this source code might help:


ps.getVelocitiesProperty().valid()

Alembic::Abc::V3fArraySamplePtr velptr = sample.getVelocities();

v is a sort of intrinsic when it comes to Alembic

Sam

dan...@image-engine.com

unread,
Feb 7, 2018, 10:01:59 PM2/7/18
to gaffer-dev
Ah, yeah, I was expecting velocity to come through like an arbitrary primVar, I hadn't realized it was something special.

Looks like we had already supported velocities for points, but had neglected it for meshes and curves.  I've PR'ed a fix here:

As for a VelocityBlur node - what's your opinion on the feature set you would expect for a built in node for applying velocity blur?  Would you expect features like acceleration and using an angular velocity to construct a rotating reference frame, or do you think it makes sense to keep things simple out of the box, and just support one velocity primVar that just gets added to P?



PS: I see now that I broke serialization on that ApplyVelocityBlur box when I stripped it down to fit in an email, so if you actually want to use it as a workaround, I should send it to you properly.

Sam Hodge

unread,
Feb 8, 2018, 1:46:51 AM2/8/18
to gaffer-dev
Thanks Dan,

I am only a padawan, I dont know how to build Gaffer from source, I am on the release cycle, get tarball, put it in a place, bootstrap my environment variables and sit back and use the tools.

Do you have tutorials about the toolchain to build Gaffer from source?

I have done other bit and pieces of build effort like USD, Alembic etc, but the whole Cortex, IECore, has me a little frightened.

But I have a great motivation to be able to level up and build this thing.

Where should I start?

Sam

John Haddon

unread,
Feb 8, 2018, 5:49:01 AM2/8/18
to gaffe...@googlegroups.com
On 8 February 2018 at 06:46, Sam Hodge <sam....@gmail.com> wrote:

I have done other bit and pieces of build effort like USD, Alembic etc, but the whole Cortex, IECore, has me a little frightened.

For sure, building all Gaffer's dependencies is daunting. That's why we host the complete build recipe for every single dependency on GitHub :

Even so, those builds take time, so we also provide binary packages of the resulting builds. Here's the latest one :


Where should I start?

With the build instructions :

That should get you going with your own Gaffer builds, albeit using a precompiled Cortex. Once you're up and running with that, we can talk about how to add a custom Cortex build too...

Cheers...
John


Sam Hodge

unread,
Feb 8, 2018, 7:57:29 PM2/8/18
to gaffer-dev
Thanks John

Ten minutes later after tricking the Qt and the inherit environment for the wacky setup I have on this computer, I was able build gaffer, I will know more once it is done.

There was nothing to be afraid of the dependencies make it 

Actually I started typing too early , when you python version doesnt survive a popen you get the wrong python version, this time hopefully it gets to the end and runs completely.

Should this really be a subprocess?

Sam

Sam Hodge

unread,
Feb 8, 2018, 9:25:07 PM2/8/18
to gaffer-dev
and then the party ended

(12:51:57) Sam Hodge (TD Adelaide): [samh@bladerunner gaffer-master]$ LD_LIBRARY_PATH=../gafferDependencies-0.44.0.0-linux/lib/ ../gafferDependencies-0.44.0.0-linux/bin/oslc -I./shaders -o /home/samh/dev/gaffer-build/0.44.0/gafferDependencies-0.44.0.0-linux/shaders/Surface/Constant.oso shaders/Surface/Constant.osl
../gafferDependencies-0.44.0.0-linux/bin/oslc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ../gafferDependencies-0.44.0.0-linux/lib/liboslcomp.so)
../gafferDependencies-0.44.0.0-linux/bin/oslc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ../gafferDependencies-0.44.0.0-linux/lib/libOpenImageIO.so.1.7)
../gafferDependencies-0.44.0.0-linux/bin/oslc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ../gafferDependencies-0.44.0.0-linux/lib/libboost_thread.so.1.61.0)
../gafferDependencies-0.44.0.0-linux/bin/oslc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ../gafferDependencies-0.44.0.0-linux/lib/libboost_regex.so.1.61.0)
../gafferDependencies-0.44.0.0-linux/bin/oslc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ../gafferDependencies-0.44.0.0-linux/lib/libboost_filesystem.so.1.61.0)
../gafferDependencies-0.44.0.0-linux/bin/oslc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ../gafferDependencies-0.44.0.0-linux/lib/libboost_wave.so.1.61.0)
../gafferDependencies-0.44.0.0-linux/bin/oslc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ../gafferDependencies-0.44.0.0-linux/lib/libboost_serialization.so.1.61.0)
../gafferDependencies-0.44.0.0-linux/bin/oslc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ../gafferDependencies-0.44.0.0-linux/lib/libIex-2_2.so.12)
../gafferDependencies-0.44.0.0-linux/bin/oslc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ../gafferDependencies-0.44.0.0-linux/lib/libIlmImf-2_2.so.22)
../gafferDependencies-0.44.0.0-linux/bin/oslc: /lib64/libz.so.1: version `ZLIB_1.2.3.4' not found (required by ../gafferDependencies-0.44.0.0-linux/lib/libpng16.so.16)
../gafferDependencies-0.44.0.0-linux/bin/oslc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ../gafferDependencies-0.44.0.0-linux/lib/libpng16.so.16)
../gafferDependencies-0.44.0.0-linux/bin/oslc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ../gafferDependencies-0.44.0.0-linux/lib/libjpeg.so.62)
../gafferDependencies-0.44.0.0-linux/bin/oslc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ../gafferDependencies-0.44.0.0-linux/lib/libtiff.so.3)
../gafferDependencies-0.44.0.0-linux/bin/oslc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ../gafferDependencies-0.44.0.0-linux/lib/libOpenColorIO.so.1)
../gafferDependencies-0.44.0.0-linux/bin/oslc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ../gafferDependencies-0.44.0.0-linux/lib/libfreetype.so.6)

 samh@bladerunner ~/dev/gaffer-build/0.44.0/gaffer-master/ strings /lib64/libc.so.6 | grep GLIBC
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_PRIVATE


So Centos 6_2 is not on the happy camper list.

Sam Hodge

unread,
Feb 8, 2018, 11:57:34 PM2/8/18
to gaffer-dev
So I have resorted to building the dependencies on my machine from source including bzip2 from a tar ball with a patch to the Makefile so the symbols in compress.o and libbz2.o in libbz2 are relocatable in Boost and gave boost a tuneup to look at this .a file with the marvelous relocatable symbols.

Like they say if you want to compile an apple pie from scratch first you must compile the universe.

currently stuck on tbb with

make[1]: *** [x86_rtm_rw_mutex.o] Error 1


Sam

dan...@image-engine.com

unread,
Feb 9, 2018, 1:17:09 AM2/9/18
to gaffer-dev
Ouch, that sounds a bit nasty.  I think John will have some better advice, but I hope this isn't going to dead end on you.  I seem to recall some dependencies could get pretty nasty if you're trying to get something like recent OSL to work with old GCC.

A bit more context surrounding that error would probably help though - looks like a link error?  Is it a missing symbol or something?

John Haddon

unread,
Feb 9, 2018, 5:09:30 AM2/9/18
to gaffe...@googlegroups.com
On 9 February 2018 at 02:25, Sam Hodge <sam....@gmail.com> wrote:

../gafferDependencies-0.44.0.0-linux/bin/oslc: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ../gafferDependencies-0.44.0.0-linux/lib/liboslcomp.so)
 
So Centos 6_2 is not on the happy camper list.

Ugh. So, I recently updated the standard build setup for VFXPlatform 2018, it being 2018 and all. The 0.44 dependencies package is the first thing to come out of this new build setup, which is why that isn't working for you, but the previous build did. VFXPlatform 2018 requires the distro running the software to provide a minimum of glibc 2.17, and allows the platform the software is built on to go up to glibc 2.17, but no further. I used CentOS 7 (glibc 2.17) for the build, which is kosher, and you look to have CentOS 6 (glibc 2.12), which doesn't meet the requirements for VFXPlatform 2018.

I don't think there's much point being dogmatic about this though. As long as I can get GCC 6.3.1 installed on CentOS 6 I'll just switch back to making the builds with that. I no longer have access to a Cent6 machine, but it's about time I learnt about this new fangled Docker thingo anyway, so the exact same build can be repeated by anyone, anywhere. I think it'll be more productive to solve that problem than it will to wrangle your specific build issues with the dependencies. Sounds OK?

Cheers...
John

 

Sam Hodge

unread,
Feb 10, 2018, 11:10:19 PM2/10/18
to gaffer-dev
That is being very flexible John.

I hope it doesnt waste too many hours of your time.

I think you will like docker.

Sam

Sam Hodge

unread,
Feb 10, 2018, 11:17:47 PM2/10/18
to gaffer-dev
I also ran into problems with assembly instructions missing when using -mrtm for one of the low level things like blosc.

Given you are using a gcc 4.8.5 in my case it assumes that you have the rtm assembly instructions but the glibc or kernel was too old, I used some good old hacks to patch the config file feeding into the makefile

but I think as you dive deeper doing perverse things on CentOS 6 becomes hard.

Sam Hodge

unread,
Feb 11, 2018, 4:08:06 PM2/11/18
to gaffer-dev


On Thursday, February 8, 2018 at 1:31:59 PM UTC+10:30, dan...@image-engine.com wrote:

As for a VelocityBlur node - what's your opinion on the feature set you would expect for a built in node for applying velocity blur?  Would you expect features like acceleration and using an angular velocity to construct a rotating reference frame, or do you think it makes sense to keep things simple out of the box, and just support one velocity primVar that just gets added to P

I would expect just ot have a primvar added to P, that seems to be the only thing that is simple enough and intuitive to use, the angular use case seems that it could be clumsy, because you would need to specify the velocity on the entire object, and then it is more like transform blur, rather than deformation blur.

I am  not a fan of velocity based blur, but if you have varying topology it is the simplest solution.

Sam  

john haddon

unread,
Feb 15, 2018, 5:58:55 AM2/15/18
to gaffer-dev
I don't think there's much point being dogmatic about this though. As long as I can get GCC 6.3.1 installed on CentOS 6 I'll just switch back to making the builds with that...
 
Hi Sam,
I've updated the latest dependencies packages with builds made on CentOS 6 :


Let me know if that does the trick for you. I'll also try to get a full build of Gaffer 0.44 itself out over the next few days...
Cheers...
John

Sam Hodge

unread,
Feb 17, 2018, 6:49:22 PM2/17/18
to gaffer-dev
Sorry for the late reply I will try this tomorrow if my schedule is not too busy.

Thanks again
Sam

Sam Hodge

unread,
Feb 19, 2018, 12:56:04 AM2/19/18
to gaffer-dev
I got around to getting the packages online, but in the process I deleted my hacked SCons file, so it might take more time than I have available today to reinstate those simple hacks.

The inital problem was based around how the Qt is verified to be version 5, it simply tries to use the system headers, rather than BUILD_DIR/include, well that is what happened last time.

And if I recall correctly it found the system Python 2.6 rather than BUILD_DIR Python.

I will give it 40 minutes now and see where I get to.

Sam

Sam Hodge

unread,
Feb 19, 2018, 2:22:34 AM2/19/18
to gaffer-dev
Looks like it worked:

[samh@bladerunner gaffer-0.44.0.0]$ cd lib/
[samh@bladerunner lib]$ ll
total 7888
-rwxr-xr-x 1 samh games  522110 Feb 19 17:18 libGafferAppleseed.so
-rwxr-xr-x 1 samh games  218617 Feb 19 17:33 libGafferArnoldUI.so
-rwxr-xr-x 1 samh games  226916 Feb 19 16:44 libGafferBindings.so
-rwxr-xr-x 1 samh games  549518 Feb 19 17:08 libGafferCortex.so
-rwxr-xr-x 1 samh games  237462 Feb 19 16:53 libGafferDispatch.so
-rwxr-xr-x 1 samh games 1709156 Feb 19 17:07 libGafferImage.so
-rwxr-xr-x 1 samh games  241548 Feb 19 17:16 libGafferImageUI.so
-rwxr-xr-x 1 samh games  779504 Feb 19 17:33 libGafferOSL.so
-rwxr-xr-x 1 samh games 2265587 Feb 19 17:07 libGafferScene.so
-rwxr-xr-x 1 samh games  198056 Feb 19 17:07 libGafferSceneTest.so
-rwxr-xr-x 1 samh games  956220 Feb 19 17:20 libGafferSceneUI.so
-rwxr-xr-x 1 samh games 1945707 Feb 19 16:42 libGaffer.so
-rwxr-xr-x 1 samh games  304049 Feb 19 17:10 libGafferTest.so
-rwxr-xr-x 1 samh games 1474600 Feb 19 17:16 libGafferUI.so
-rwxr-xr-x 1 samh games 3697313 Feb 19 17:13 libGafferVDB.so
-rwxr-xr-x 1 samh games  406977 Feb 19 17:33 libGafferVDBUI.so

Now I just need to work out how to package it so it will run.

Sam Hodge

unread,
Feb 19, 2018, 3:01:21 AM2/19/18
to gaffer-dev
Well initially I forgot about my ARNOLD_ROOT option, so I got a 0.44.0.0 without Arnold, but another small build, install and copy to final resting place and I think we are all good, thanks for a  solid build solution.

Sam

John Haddon

unread,
Jun 8, 2018, 11:22:25 AM6/8/18
to gaffe...@googlegroups.com
Hi Sam,
I'm afraid that maintaining the CentOS 6 build setup has become a big enough burden that I'm struggling to justify the time it takes, so for the upcoming release of version 0.47 I've switched to building on CentOS 7. If you'd like to chip in with a CentOS 6 build setup for GafferHQ/build
then I'll do my best to help you, but I don't think it's really something I can maintain single-handedly any more...
Cheers...
John


--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
John Haddon - R&D Programmer
Image Engine
studio: +1 (604) 874-5634 | jo...@image-engine.com | www.image-engine.com



15 West 5th Avenue, Vancouver, BC, V5Y 1H4, Canada

If you are not the intended recipient, disclosure, copying, distribution and use of this email is prohibited. Please notify us immediately and delete this email from your systems. You may contact us at in...@image-engine.com if you do not wish to receive further commercial electronic messages. We may still send you messages for which we do not require consent.

Sachin Shrestha

unread,
Aug 7, 2018, 12:00:02 PM8/7/18
to gaffer-dev
Hi Sam,

Since I'm trying to build gaffer on CentOS 6.4, I was wondering if you could share any notes on the final changes you had to do at your end to the build scripts? I'm on gcc 4.8.2 (without c++11) so I had disabled that in the boost build script while building the dependencies but did you have do anything additional to get the entire build to work in your environment? My dependencies build is still going on after I disabled c++11 support so I don't know if anything else will fail ahead.

Cheers,
Sachin

John Haddon

unread,
Aug 7, 2018, 12:05:19 PM8/7/18
to gaffe...@googlegroups.com
Hi Sachin,

I'm afraid you'll get nowhere without C++11 support - this has been a VFXPlatform requirement since 2016. In the Docker example I linked to on the other thread, you can see that on CentOS6 you can install GCC 6.3.1 as follows :

```
yum install centos-release-scl
yum install devtoolset-6
scl enable devtoolset-6
```

I strongly recommend you start with that - I don't think you'll get far without it...

Cheers...
John


--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sachin Shrestha

unread,
Aug 7, 2018, 1:01:02 PM8/7/18
to gaffe...@googlegroups.com
Hi John,

Thanks for the heads-up. I thought as much that this may end up being a problem. Will follow the docker steps.

Cheers,
Sachin
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
John Haddon - R&D Programmer
Image Engine
studio: +1 (604) 874-5634 | jo...@image-engine.com | www.image-engine.com



15 West 5th Avenue, Vancouver, BC, V5Y 1H4, Canada

If you are not the intended recipient, disclosure, copying, distribution and use of this email is prohibited. Please notify us immediately and delete this email from your systems. You may contact us at in...@image-engine.com if you do not wish to receive further commercial electronic messages. We may still send you messages for which we do not require consent.

--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.

Abel Vargas

unread,
Apr 12, 2023, 6:31:44 PM4/12/23
to gaffer-dev
Hey there,

So I've been digging around the threads to find a solution to Houdini Curves (fur) with the velocity attribute in Gaffer.

I'm using this setup and it does work but the motion blur is stronger than the geometry underneath it. I read on another thread that it could be a difference between velocity being per frame or per second which makes sense. So my question is, do I need to go back to Houdini and export velocity in a different manner or is there a variation of this piece of OSL code I could try? P + velocity * ( frame - round( frame ) )

I tried multiplying or dividing but on a naive approach. Honestly I'm not 100% sure what this process is really doing :)

Any tips?

Thank you!

Abel

Daniel Dresser

unread,
Apr 12, 2023, 7:35:09 PM4/12/23
to gaffer-dev
How much stronger is your motion blur ( is it actually 24X )?

If it's velocity being stored in units/sec instead of units/frame, then that should just be a matter of using `newP = P + velocity / framesPerSecond * ( frame - round( frame ) )`.

If it's not that simple then it could be about the velocity being in the wrong coordinate system.  Are there scaled transforms in the scene?  Is the fur under a transform that is moving?  ... if so, the simple approach would expect the velocity primvar to be relative to the object origin, but sometimes it gets written relative to world space.

-Daniel

Abel Vargas

unread,
Apr 14, 2023, 4:02:47 AM4/14/23
to gaffe...@googlegroups.com
Hey, I'll try this approach! The way it is, it definitely looks wrong but it's not a crazy amount of wrong.

There is scaling to adjust for the unit size difference from Houdini, so it's multiplied by 100. Other than that no other transforms. I'll take a look at how the primvar is being written and change to object origin in case it's in world space :)

Thank you!

Abel

--
You received this message because you are subscribed to a topic in the Google Groups "gaffer-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gaffer-dev/uxJlfyU0NVU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gaffer-dev/efc721ba-bd28-4d7c-8bdf-6e244e5b1e90n%40googlegroups.com.

Abel Vargas

unread,
Apr 19, 2023, 6:50:53 PM4/19/23
to gaffer-dev
Hey there,

So here's where I'm at.

1 - The motion blur coming from the velocity is definitely working on the fur but it's turning the fur into a small cloud around the character.
2 - I tried /24 to see if the size was related to velocity being per second or per frame. This does gives me a good result which seems pretty accurate.
3 - I tried applying the velocity both before and after scaling the fur by 100 to match the body (one comes from Houdini and the other from Maya). Same result. Which I hope eliminates the world space vs object origin.

Having said that, I still have a frame over frame difference. The creature we are working on has long fur but also very short fur on some areas and when there's a more sudden movement on it's run cycle, the short fur may disappear. This doesn't happen while rendering without motion blur or on the houdini render (that uses the same alembic cache for sim)

I'm not sure where to look for. It seems like substeps are the same as well :/

Any ideas?

Thank you

Abel

Daniel Dresser

unread,
Apr 19, 2023, 7:24:49 PM4/19/23
to gaffer-dev
Hmm, there are an awful lot of things that can go wrong when mixing velocity based blur and interpolation based blur ( I'm guessing the skin is using frame interpolation, not velocity blur? ). But if your data is looking correct in Houdini, we should be able to match that ( assuming it's not just a difference in shading or something that causes the issue to not be obvious in Houdini ).

My first step when debugging this sort of thing is to try and locate the exact instant it is happening - the most likely explanation for issues that only show up when rendering with blur is that things are in the wrong places at times that aren't whole frames.

In Gaffer, you can use the standard Ctrl-Click and drag virtual slider interaction on the time in the bottom right - this is an easy way to set the current frame to a non-integer frame number - you can try using that in the viewport to inspect where everything is at the shutter open and shutter close time - hopefully your misalignment will be visible there ( if everything is in the correct position at shutter open and shutter close, and still motion blur renders wrong, then something weirder is happening ).

The next step depends on what you see at shutter open/close.  There's probably a way to inspect other times in Houdini as well, so you could inspect where Houdini thinks things are at shutter open/close time to compare - perhaps that will reveal the discrepancy. Off the top of my head - I know some packages augment velocity blur with an acceleration primvar as well - is Houdini doing that?

To be honest, for something that is as closely connected as a character skin and fur, I'm rather dubious of using different methods for motion blur - you can probably make it work, but it is likely to continue to cause problems, because the match will never be 100% exact. Why do you need to use velocity blur on the hair? I wouldn't expect the hair point count to be changing dynamically ... unless your character is in the middle of being set on fire or something, in which case, OK, yeah, you've got a hard FX shot.  If it's not an option to use interpolation blur on the hair, and you aren't too picky about the shape of the motion blur, one option would be to remove all interpolation blur from the skin, and apply velocity blur on the skin - the blur won't be as good, but then you could at least get an exact match to the hair motion.

-Daniel
Reply all
Reply to author
Forward
0 new messages