Alembic Exporter

245678

Comments

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,204

    you are right lilweep, Alembic and geografts don't work well, I obviously not tried it either by looks

    things I did were obviously not geografted

    just did in Octane and see the issue

  • lilweep said:

    You're a genius.  Im glad you perservered in spite of daz's obscurity.

    Do you know if your alembic exporter works with geografts?

    The official one doesnt export with geograft or geoshell animations (the latter not a big deal of course, but geografts kind of important).

    I noticed there was an update for the official Alembic Exporter recently, but i dont know if they improved anything or was just to be compatible with updates.

    @lilweep OK, so good news and better news.

    A geograft, as far as geometry is concerned, is just another node with facet mesh data. So it gets treated just like any other node. To do this kind of export, I don't have to deal with any of the complexities that Thomas Larssen and Company do. Sure enough, the Daz Importer (at least the version that I have) did the materials pretty well but got confused on the meshes.

    The better news is that I did see that duplication of the geograft node you mentioned. But because of the limitations of Blender's Alembic support, I had already implemented a more convenient way to specify which objects and material zones within objects should be exported. You can just configure it to ignore the duplicate geograft altogether, as in the screenshot, and the plugin will remember it for that scene.

    geograft.png
    1920 x 1080 - 3M
    settings.png
    1172 x 1082 - 44K
  • lilweeplilweep Posts: 2,487

     

    lilweep said:

    You're a genius.  Im glad you perservered in spite of daz's obscurity.

    Do you know if your alembic exporter works with geografts?

    The official one doesnt export with geograft or geoshell animations (the latter not a big deal of course, but geografts kind of important).

    I noticed there was an update for the official Alembic Exporter recently, but i dont know if they improved anything or was just to be compatible with updates.

    @lilweep OK, so good news and better news.

    A geograft, as far as geometry is concerned, is just another node with facet mesh data. So it gets treated just like any other node. To do this kind of export, I don't have to deal with any of the complexities that Thomas Larssen and Company do. Sure enough, the Daz Importer (at least the version that I have) did the materials pretty well but got confused on the meshes.

    The better news is that I did see that duplication of the geograft node you mentioned. But because of the limitations of Blender's Alembic support, I had already implemented a more convenient way to specify which objects and material zones within objects should be exported. You can just configure it to ignore the duplicate geograft altogether, as in the screenshot, and the plugin will remember it for that scene.

    cool, when do you think you'll have it ready?

  • lilweep said:
    cool, when do you think you'll have it ready?

    Other than a few simple bugs that can wait, it works perfectly with 2.80, but all versions after that, there's sometimes a problem with normal smoothing that I need some help understanding. Shouldn't be longer than a week, maybe two.

    Do you want to sign up to be the Guinea Pig? :) I'm really not a good Windows programmer, and there are bound to be problems running it for the first time on a computer other than the one it was compiled on. It's not going to corrupt your files or anything, but it may fail to load, maybe not work on Windows 7, and things like that.

  • TheMysteryIsThePointTheMysteryIsThePoint Posts: 2,946
    edited May 2020

    Woah. I did NOT expect that to work on the first try :) It's been a pretty productive 9/80 weekend so far. I'll provide a link where anyone interested can download the DLL and try it out, later tonight. To import the hair, all you have to do is run a script that the plugin creates. Here, the Blender hair particle system was generated directly from geometry of the dForce hair's mesh data, and is fully tweakable in Blender with the great particle editing (grooming) tools there. Gold knit material conversion by Daz Importer.

    iray.png
    1920 x 1080 - 1M
    cycles.png
    1920 x 1080 - 2M
    Post edited by TheMysteryIsThePoint on
  • TheKDTheKD Posts: 2,691

    Wow, lookin forward to tryin it out :)

  • mindsongmindsong Posts: 1,701

    damn.

    ok, then...

    --ms

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,204

    well that's impressive yes

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,204

    strand hair curves as Unreal Engine grooms would be the icing on the cake kiss

    just saying cheeky

  • It is really aggravating and time consuming to have to guess what the API really means

    Just wanted to throw it out there.  When I've gotten stuck in the past, I've asked on the SDK forums and gotten pretty good responses with example code from the developers: https://www.daz3d.com/forums/categories/daz-sdk-developer-discussion

  • https://drive.google.com/open?id=1rd5wjf58A9E5pQfV2Kp2E7jA6FjcDZGD

    Read the license, it's straight BSD, and copy the DLL to the addons directory. There will be a new option Edit/Alembic Exporter.

    It is best to save the scene file first, so it can better figure out where to put the output directory.

    I think the operation is pretty self explanatory, except for maybe why you might want to ignore surfaces, and what "dynamic" means.

    Once you import an abc file into Blender, you can't do anything in edit mode at all. Something that I found myself often wanting to do was to remove a certain material group from an asset, but that's not possible once in Blender. So the choices are to use the Geometry Edit Tool in Daz, but then the asset is permanently modified. In the tree, you can just tell the exporter to ignore the object altogether, or just one or more of its surfaces.

    "Dynamic" tells the exporter to export the object, or certain surfaces of it, to an obj file, as it exists in the first frame to be exported. This is useful if you want to export certain things as they are in Daz Studio, and simulate other things somewhere else.

    Let me know of any problems, and be nice: I'm not really a competent Windows programmer, I hate Windows more than you can know, and this is the first time that anyone other than myself has even seen it at all, let alone run it on a computer other than the one on which it was developed. I am bound to have made assumptions because of how things are done in POSIX environments. But save the issues below, it seems to work perfectly.

    There are some known issues that I'm working to resolve:

    1) It seems that for animations (2 or more frames), there's a problem with the normals that causes them not to smooth. It doesn't happen when there's just one frame, and I don't yet know whether it is my fault, the Alembic project's fault, or Blender's. I think it might be Blender because a) It didn't happen with 2.80, and b) Blender's Alembic support is kind of janky to begin with.

    2) The only hair that it can convert to a particle system is dForce Classic Long Curly Hair. I can probably add that vendor's other products, of which I believe there are two, because they are probably modeled in a similar way, and the same algorithms will probably work.

    3) The hair conversion currently takes a couple of gigs of RAM to work. I didn't optimize it for space, and that particular hair model is extremely heavy. It turns out that the processing to figure out which vertices/faces are part of what strand is actually immutable, so in the near future I plan to precalculate it.

    4) The "Snapshot" button doesn't do anything yet. I intend for it to be a bridge that automatically transfers the nodes to a running Blender instance without any intermediate file formats.

    5) Sometimes it unnecesarily asks if you want to save the current configuration.

    6) The Ignore/Dynamic checkboxes aren't very smart. There's no checking if you've chosen to ignore all of a nodes surfaces, but not the node itself, and I'm not even sure exactly what will happen in those cases.

    7) The progress indicator doesn't tell you exactly what it's doing. If you requested scaling for Blender/Houdini and also Maya/UE, it'll just export twice without telling you. If you ask for the SubD cage as well, again, it'll just export it again without saying what it is doing.

    8) The converted hair particle system right now will belong to the same node that owned the hair in Daz Studio. This is not acceptable because, when animating, the head can change its orientation relative to the rest of the character. It should be emitted by a skullcap object constrained to follow the head. The hair doesn't seem to simulate correctly yet, but the whole hair system is changing in a few months, anyway. When it does, I will officially not care whether Daz makes dForce SBH available to non-PAs because the gromming tools are pretty cool.

    I'm also trying to think of ways to make re-texturing automatic. I have a script that I run to do that, appending materials from a kind of material repository blend file that I maintain, but it would be cool if I could generate such a script as well.

  • strand hair curves as Unreal Engine grooms would be the icing on the cake kiss

    just saying cheeky

    I have no idea what that means, but after seeing the UE5 demo, I think UE is in my future. We'll have to talk :)

  • It is really aggravating and time consuming to have to guess what the API really means

    Just wanted to throw it out there.  When I've gotten stuck in the past, I've asked on the SDK forums and gotten pretty good responses with example code from the developers: https://www.daz3d.com/forums/categories/daz-sdk-developer-discussion

    Thanks for your input, but most of the times I've posted there, I've ended up having a conversation with myself.

     

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,204

    strand hair curves as Unreal Engine grooms would be the icing on the cake kiss

    just saying cheeky

    I have no idea what that means, but after seeing the UE5 demo, I think UE is in my future. We'll have to talk :)

    https://docs.unrealengine.com/en-US/Engine/HairRendering/QuickStart/index.html

    a bit there, they are abc files from apps like Houdini, C4D and Max 

    I have no idea if DAZ strand hair could be exported that way

  • strand hair curves as Unreal Engine grooms would be the icing on the cake kiss

    just saying cheeky

    I have no idea what that means, but after seeing the UE5 demo, I think UE is in my future. We'll have to talk :)

    https://docs.unrealengine.com/en-US/Engine/HairRendering/QuickStart/index.html

    a bit there, they are abc files from apps like Houdini, C4D and Max 

    I have no idea if DAZ strand hair could be exported that way

    What a terribly interesting read. I'm really going to have to get over my JCM hangup and learn more about UE. Thanks for that.

    But the problem will be getting information about how strand based hair is modeled in Daz Studio. I don't think the SDK has been updated since all that stuff was added, and I have had zero success in the past.

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,204

    strand hair curves as Unreal Engine grooms would be the icing on the cake kiss

    just saying cheeky

    I have no idea what that means, but after seeing the UE5 demo, I think UE is in my future. We'll have to talk :)

    https://docs.unrealengine.com/en-US/Engine/HairRendering/QuickStart/index.html

    a bit there, they are abc files from apps like Houdini, C4D and Max 

    I have no idea if DAZ strand hair could be exported that way

    What a terribly interesting read. I'm really going to have to get over my JCM hangup and learn more about UE. Thanks for that.

    But the problem will be getting information about how strand based hair is modeled in Daz Studio. I don't think the SDK has been updated since all that stuff was added, and I have had zero success in the past.

    do what I do, used dressed DAZ people in clothes and armour that cover the joints devil

    I admittedly don't do the PBR realistic stuff and actually use iClone people in Unreal too

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,204

    BTW this is exactly why I want the game engine renderer mentioned in the other threadcheeky

    because DAZ figures are high quality with joint controlled morphs and very slow to render with iray and crappy joints outside of DAZ studio kiss

    I do so only because DS is so terribly slooooooow laugh

  •  I'm really going to have to get over my JCM hangup and learn more about UE. 

    You can bring JCMs over to Unreal and set them up to get applied as the joints bend.

    http://davidvodhanel.com/daz-to-unreal-jcm-examples/

  •  I'm really going to have to get over my JCM hangup and learn more about UE. 

    You can bring JCMs over to Unreal and set them up to get applied as the joints bend.

    http://davidvodhanel.com/daz-to-unreal-jcm-examples/

    Why did I not suppose there would be a product like this? Thank you very much for this...

  • Two reasons why I will probably not devote any more time to converting Daz Studio hair to Blender: 1) It's better to just do hair in Blender from scratch. It's intuitive and ridiculously flexible, and 2) I don't see being able to figure out how to access the SBH geometry data without some horrible hack.

    This was done without simulating, by animation just three properties.

    What is really lacking, then, is a tool to save the work one did on one hair particle system, and reapply it to a freshly imported bald model.

     

  • mindsongmindsong Posts: 1,701

    are the rest of the non-particle-ish exports with your converter more deterministic/stable?

  • TheMysteryIsThePointTheMysteryIsThePoint Posts: 2,946
    edited May 2020
    mindsong said:

    are the rest of the non-particle-ish exports with your converter more deterministic/stable?

    I'm not sure what you are asking. What is nondeterministicd/unstable? Did you try it and find a bug?

    Post edited by TheMysteryIsThePoint on
  • mindsongmindsong Posts: 1,701

    sorry, no - didn't mean to imply problems at all - I'm wondering if it works well-enough on non-hair-like things - animated figures with poses/morphs. It seems like the hair to particle conversion effort is less 'static' in its essence - poor choice of words on my part.

    So, better said: do animated figures/props with morphs/bones export pretty well at this point?

    (I didn't know it was available to play with yet, so I'll go look for it and get you some feedback!)

    cheers and thanks,

    --ms

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,204

    oh I missed that post that it was up too yes

    will need to look when I get off my ipad and onto my PC

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,204
    edited May 2020

    OMG I have a lot of crap I did not know about on Google drive blush

    it works beautifully BTW heart

    thankyou for this awesome plugin

    now I need to figure out how to set up materials again from scratch  in Blender blush did it long ago and forgotten

    I usually just rely on imported maps the few times I have rendered something, Blender always is a learning curve fo me wink I constantly google every step

    Post edited by WendyLuvsCatz on
  • mindsong said:

    sorry, no - didn't mean to imply problems at all - I'm wondering if it works well-enough on non-hair-like things - animated figures with poses/morphs. It seems like the hair to particle conversion effort is less 'static' in its essence - poor choice of words on my part.

    So, better said: do animated figures/props with morphs/bones export pretty well at this point?

    (I didn't know it was available to play with yet, so I'll go look for it and get you some feedback!)

    cheers and thanks,

    --ms

    Yes, it should export everything EXACTLY how they appear in Daz Studio.

    The particle system it creates is not animated at all, it is converted as it is on the first frame to be converted. Same with the other "dynamic" objects. I called them "dynamic" because the assumption is that they'll be simulated in Blender.

    With the hair, I meant that I did all that work to analyze the mesh and determine the equivalent polylines before I knew how powerful Blender's native hair system was (I know, I know...) and wouldn't have even bothered. For that animation, I didn't even export the hair (dForce Classic Long Hair isn't even supported yet) and just did it in Blender after a friend of mine duplicated several days of my blood, sweat, and tears in abot 20 minutes :)

     

  • OMG I have a lot of crap I did not know about on Google drive blush

    it works beautifully BTW heart

    thankyou for this awesome plugin

    now I need to figure out how to set up materials again from scratch  in Blender blush did it long ago and forgotten

    I usually just rely on imported maps the few times I have rendered something, Blender always is a learning curve fo me wink I constantly google every step

    OK, I can exhale :) It has been about 20 years since I've written anything for Windows and I was concerned that I might have overlooked something about how to link a DLL.

    I'll send you a script I use to re-texture your imports in Blender, so you'll only have to set up materials once. I've gotten good results using the Diffeomorphic Daz Importer for the materials. And also a short script to turn off auto smoothing when you've only imported a single frame.

    There is definitely something going on with normals in the vertex cache Blender uses to support Alembic though. If you import a single frame, the normals are not smoothed, but you can fix it by turning off (?!) auto smoothing. But if you export more than one frame, i.e. if there actually is a vertex cache modifier, the normals are not smoothed and auto smoothing has no effect, on or off. But if you apply the modifier, i.e. remove the vertex cache modifier, the normals instantly smooth out. Pretty sure that's a bug in Blender that I'll have to make  a minimal Alembic file to demonstrate the bug, and report it.

    Thanks for testing it, and any other feedback is appreciated.

     

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,204

    I could always import an obj too and use the materials from that like I do in Octane render enlightened

  • mindsongmindsong Posts: 1,701

    I could always import an obj too and use the materials from that like I do in Octane render enlightened

    that's a clever angle.

  • mindsongmindsong Posts: 1,701
    mindsong said:

    sorry, no - didn't mean to imply problems at all - I'm wondering if it works well-enough on non-hair-like things - animated figures with poses/morphs. It seems like the hair to particle conversion effort is less 'static' in its essence - poor choice of words on my part.

    So, better said: do animated figures/props with morphs/bones export pretty well at this point?

    (I didn't know it was available to play with yet, so I'll go look for it and get you some feedback!)

    cheers and thanks,

    --ms

    Yes, it should export everything EXACTLY how they appear in Daz Studio.

    The particle system it creates is not animated at all, it is converted as it is on the first frame to be converted. Same with the other "dynamic" objects. I called them "dynamic" because the assumption is that they'll be simulated in Blender.

    With the hair, I meant that I did all that work to analyze the mesh and determine the equivalent polylines before I knew how powerful Blender's native hair system was (I know, I know...) and wouldn't have even bothered. For that animation, I didn't even export the hair (dForce Classic Long Hair isn't even supported yet) and just did it in Blender after a friend of mine duplicated several days of my blood, sweat, and tears in abot 20 minutes :)

     

    great, thanks for your work on this and the quick detailed replies - this is far cooler than is appreciated yet - a gem to those who can take advantage of the value.

    (ms looks for the donate button...)

    --ms

Sign In or Register to comment.