Attributes

Hi,
are there any Attributes that I could set/modify with FE that I could use later for rendering? e.g. Vertexcolors, weightmaps whatever.
If so, how would I do that? Or do I have to go the Alembic route? Does anyone care to share an example?

thanks!

Comments

  • EricTEricT Administrator, Moderator, Fabric Employee Posts: 304 admin

    Hi @knekke,

    Currently there is no way to do this. However as you suggested you could use the Max geometry as inputs to a canvas op, set the attributes on the Fabric geometry, then cache out the geometries via Alembic and import them back and use the attributes from the Alembic.

    I've logged an issue for the ability to drive attributes from Canvas operators. It's logged internally as:
    FE-7556 - Ability to set Vertexcolors, weightmaps, or other attributes with Canvas Ops

    You can use the above to reference in the future.

    Eric Thivierge
    Kraken Developer
    Kraken Rigging Framework

  • knekkeknekke Posts: 12

    Thanks @EricT
    Alright, I have set up everything as I think how it should be working (the deformer still needs some love, but I want to check the workflow first).
    I have trouble exporting the Alembic file from inside 3dsMax.
    The resulting .abc archive is not really accessible for loading before I somehow kill the FabricEngine modifier that created it (remove it from the modifier stack, or close the scene).
    Also the .abc doesn't contain all frames but just a part of it (random) which made me think the scene plays back too fast eventually, but I tried with a script to slow down playback speed without getting a better result.
    I really have no idea what is going on here....
    Attached is the canvas file that I used inside 3dsMax, and here is the complete max2016 testscene....

    Any help is much appreciated!!

    btw, I changed the SaveAlembic compound so that it doesn't overwrite/create a file as soon as you open a scene....

  • EricTEricT Administrator, Moderator, Fabric Employee Posts: 304 admin
    edited November 2016

    @knekke

    Have a look at this image. This is how to setup an Alembic export. You test for the first frame and pipe that into the beginWriting port. Then test for the last frame and pipe into the close port of an Alembic Close node. Also it's important to turn on the IsAnimated Boolean ports on the various nodes too.

    I've also attached an updated Max sample scene for you too with a full setup of simulated deformation, setting custom attribute (Float32[]), and writing that out to Alembic. Just type out a path for the alembic file and it'll get written out. I'd suggest doing this on frame 1, stepping through all the frames, then removing the file path once at the last frame.

    Eric Thivierge
    Kraken Developer
    Kraken Rigging Framework

  • knekkeknekke Posts: 12

    @EricT
    That's pretty much what I did, unless I fxxd something up inbetween. I'll check your example scene tomorrow morning and let you know how it goes.
    Thanks!

  • knekkeknekke Posts: 12

    @EricT
    alright, the problem seems to be that playback has to stop exactly on that alembic.close frame. My timeline was longer and I just stopped it when I was past that point, assuming that the alembic file has been closed.

  • knekkeknekke Posts: 12

    @EricT
    also one question that just came up: is subframe calculation possible? Imagine the collider in your scene would move pretty fast, how would you tackle it?

  • EricTEricT Administrator, Moderator, Fabric Employee Posts: 304 admin

    @knekke no it's not currently possible to do sub-frame sampling. I've logged an internal issue that you can use as reference in the future:

    FE-7663 Add Sub-frame Sampling

    Eric Thivierge
    Kraken Developer
    Kraken Rigging Framework

  • knekkeknekke Posts: 12

    @EricT
    another issue. When running your example (and my own stuff) I get an error:

    [Fabric] [FABRIC:MT] Error: AlembicOBooleanArrayProperty.set: Encapsulated AlembicOArrayProperty has invalid POD.
    [Fabric] [FABRIC:MT] KL stack trace:
    [Fabric] [FABRIC:MT] [ST] 1 method.set.L.UO_AlembicOBooleanArrayProperty.R.EA_BO() Alembic.kl:2293
    [Fabric] [FABRIC:MT] [ST] 2 method.writeBooleanArraySample.L.UO_AlembicPropertyWriter.R.VA_BO() AlembicPropertyWriterArrays.kl:25
    [Fabric] [FABRIC:MT] [ST] 3 stub() DFG Node 'StoreArrayProperty_1.writeSampleForValueType':9

    The geometry in the alembic archive seems ok, but I can't access the weights data.

  • EricTEricT Administrator, Moderator, Fabric Employee Posts: 304 admin

    @knekke We just found a bug in one of the presets. I'm fixing now and should be in a daily build shortly. I'll send you a fixed scene shortly.

    Here is ticket ID for you to reference in the future:
    FE-7667 Alembic StorePropertyArray preset is broken

    Eric Thivierge
    Kraken Developer
    Kraken Rigging Framework

Sign In or Register to comment.