Adding to Cart…
Licensing Agreement | Terms of Service | Privacy Policy | EULA
© 2024 Daz Productions Inc. All Rights Reserved.You currently have no notifications.
Licensing Agreement | Terms of Service | Privacy Policy | EULA
© 2024 Daz Productions Inc. All Rights Reserved.
Comments
That sounds great.
That is what Thomas is missing to convert the diffeomorphic hair tools to the new hair system, because it can't be accessed via python, so far. So thank you if you take this, let us know of your progress.
That's exactly what stopped me too. Interestingly, the Python API to modify existing curves and points is there already, just not to create new curves and points. I think I've found the class that creates hair curves and am working on exposing it to the Python API. Blender is interesting. DAZ Studio is hard to develop for because there's no documentation. Blender is hard to develop for because while there is documentation and a strong community, it is very large and complex and still has a lot of C code that feels very old. I'm on it, but it will take a little time.
double post deleted
This all sound amazing. It would really be great to be able to load and transfer Daz content to Blender without touching Daz Studio.
Have to thank all people that help to use Daz content in Blender like Thomas and TheMysteryIsThePoint! Thanks again also to Padone to support with his tips.
Yes, I really can't thank either Thomas or Padone enough... this DAZ/Blender sub-community is really a shining spot in what is otherwise darkness for me.
Blender is pure genius. Before you understand the way the build system automatically generates the Python API for you, it is incredibly frustrating. After you understand, it is pure genius.
So, I think I'm about half done... I've added the API call to add a strand with the requested number of points:
PYTHON INTERACTIVE CONSOLE 3.10.12 (main, Jun 21 2023, 01:30:38) [GCC 11.2.1 20220127 (Red Hat 11.2.1-9)]
Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bpy.utils, bgl, gpu, blf, mathutils
Convenience Imports: from mathutils import *; from math import *
Convenience Variables: C = bpy.context, D = bpy.data
>>> curves = D.objects["Curves"]
>>> curves.data.add_curve( 40 )
>>>
and I've found the relevant curve manipulation code in source/blender/blenkernel/intern/curves.cc to do the actual resizing.
Actually getting the code approved and pushed aside, I think I'll have it working soon.
That's wonderful news Donald, thank you for your work and for keeping us up to date with the progress.
Update: I got stuck on how to make a Python API that accepts a two dimensional array, so Hans Goudey put me out of my misery by just doing it himself :) It's already in his personal fork of Blender, if you build Blener from source:
https://projects.blender.org/HooglyBoogly/blender
And the branch name is curves-rna-api
Hans' call is simpler than what I envisioned:
curves.data.add_curves( [ 42, 30, 49 ] )
This call will add 3 curves to the hair curves object, with 42, 30, and 49 points respectively. He correctly reasoned that the call doesn't have to arrange any points because the API to do that part already exists. The added curves have all of their points at (0,0,0) and these points can then be manipulated with the existing Python API. I'm currently re-writing my hair exporter so I have called the new API and it seems to work, but I haven't actually manipulated any of the new points.
I don't know what the timeframe is for this to make it into the main tree and a release.
Thank you Donald for the news, it's good to hear that the task is proceeding fine. There's no rush so I guess we'll wait for the official version to come out.
p.s. I'm not sure it's a good idea to place all the points at zero. I mean the curve has to be interpolated some way and placing all to zero sounds like bad. May be a bunch of lines from zero to infinity and beyond is better LOL. But of course I trust Hans already considered this so I'm probably worrying for nothing.
Hans was a real bro and merged the code into main on the September 23rd, which beat the Bcon3 deadline of the 27th, so it should be in Blender 4.0 which drops on November 7th.
I've already used it extensively and it works perfectly. Hans, and Dalai (who put me into contact with Hans) are both champs.
Open Source For The Win.
Thank you for the news, just tried and seems to work, though I fear 4.0 will be a mess to work with due to the many api changes. Reported to Thomas.
https://bitbucket.org/Diffeomorphic/import_daz/issues/1764/
Oh my, 6 more days to wait :D
I definitely agree. We really need some tutorials for the changed interface and features of Blender 4.0. Nevertheless, these are fantastic news and I'm looking forward to use it. A big thanks for your efforts!
Given that this is maybe not coming out, what do we consider to be the best workflow for animating Daz Figures in Blender with the idea of sending animation back to Daz Studio to collect HD JCMs (which i personally believe are necessary, although others may disagree!).
@lilweep
Sorry for the lack of updates. Because of the day job, I just haven't had much time to work on it.
Where it stands:
The standalone program that one runs instead of DAZ studio works:
Loads .duf scenes.
Has functionality to gather the used assets into a single directory or zip file, and can also load these. It also renames files to be case-sensitive filesystem friendly. Dramatically speeds up load times because it only loads what is actually used, not your whole catalog. There's a small bug sometimes, but there's also a workaround.
Export character to Blender via USDA and merges the rigs. There are 2 bugs left, having to do with wearables, but if you don't need them to clean up and perfect the animation, they won't matter.
Sending back to DAZ is a work in progress. A small script in Blender sends the entire animation for all figures back to Hitvhens, which caches them. Then later, when Blender detects that the frame number has changed, it commands hitches to update the frame by applying all the rotations for the new frame. Blender then asks for all the updated geometry, and updates its proxies (objects with no armature that correspond to the objects imported from Hitchens) that are then rendered. I tested it and it works, even with simulations and such, and I didn't have to write a geometry node, thank god. What doesn't work perfectly yet are the twist bones, and they work differently between Genesis generations. I've worked out the math, but I didn't even bother any more asking DAZ how it works, and that is the greatest hold up.
There's also other miscellaneous stuff in there like exporting strand based hair, diffeo DBZ files, and pushing blender created morphs back to Hitchens (for something so simple, Morph Loader Pro really makes it complicated).
So, it's coming, I just can't say when it'll be ready for the public, and it seems like it's going to work well.
Great news. I would love to see a program that converts Daz characters to native Blender characters with rigs and JMCs. I understand that some things will be complex, like HD morphs and other dependencies like MCMs. For textures, I like to use the basic Daz textures and adjust and enhance them for Cycles. Unfortunately such a program will never exist, but everything that comes near to it is highly welcome.
So far, I stick to Diffeomorphic, which has a huge number of features. Sagan and Hitchens may be very interesting as well.
Thanks to all for their great work. Wish I had more time besides my day job.
Hitchens would be good because you can animate in Blender then bring back to Daz to get theHD morphs or whatever else you need from daz. Then can export as alembic if you need to render elsewhere.
I still stand in awe of the amazing things that Thomas has accomplished with Diffeo. I immediately took a different approach: Don't even try to reverse engineer anything, especially without help from DAZ. Life is too short for that :) Instead, I've learned how to run DS standalone and slap a GUI specific to our needs on top of it so I don't have to worry about HD this, JCMs that...
And since it generally takes longer to render a frame than it does for DS to advance by a frame and apply all the modifiers, transferring the scene from DS to Blender is effectively instantaneous.
And I'm with you; I just wish I had more time... this kind of programming is immensely enjoyable.
Exactly! And I don't have to figure any of that out, with no help from DAZ. I've never actually used Blender's Alembic nor USD export, but I think the best strategy is usually to get out of DS as quickly as possible to avail oneself of other tools that are available.
Note that the initial USD export is just so that you have a rigged character to animate. Hitchens gets the vertex exact geometry from DS for the next frame of an animation while it is rendering the previous via a custom wire protocol, so no more Alembic or even USD after the initial export. It's automatic. You can also ask Hitchens to update the current frame you are on in Blender with HD and JCMs for your reference while animating finer interactions. DS and Blender can be on the same computer or different ones.