What triggers Autofit?

barbultbarbult Posts: 24,750
edited December 1969 in The Commons

When you have a figure loaded and drag a wardrobe item onto that figure and select "fit to", what determines whether the autofit dialog is displayed? I got curious about this, because there is an error in the current version of Genesis MFD Expansion 1 that causes the autofit dialog to be displayed, even when the items are fit to Genesis. Is there something in the wardrobe item's DUF file that says what figure it is made for?

Comments

  • Lissa_xyzLissa_xyz Posts: 6,116
    edited December 1969

    I actually don't think it's a bug. Even though it says Gen1 MFD, it fits to V4 without trigging the autofit dialog. It's the only GenMFD product that does it, too, so it may just be a mistake in what was packed?

  • barbultbarbult Posts: 24,750
    edited December 1969

    Yes, I know it is a bug. There is a Mantis bug report on it. DAZ is working on fixing it. But it made me wonder what it is that causes autofit to pop up or not. What did they do wrong in the latest released MFD Expansion 1 product files to cause this bug? I'd like to learn and understand how it works "under the hood".

  • RenpatsuRenpatsu Posts: 828
    edited December 1969

    Didn't look into the technical setup of the files, but I think it may have something to do with the "preferred_base" in the "presentation" section of a dsf file. It seems like it is used to determine whether AutoFit gets triggered or not - depending on which item you want to conform it to. At least the advise from Spooky to Canary3D on "fixing" this may imply that.

    https://bugs.daz3d.com/view.php?id=50577

    Take this with a grain of salt. I didn't experiment with this myself, just throwing a pointer around ;)

  • barbultbarbult Posts: 24,750
    edited December 1969

    Renpatsu said:
    Didn't look into the technical setup of the files, but I think it may have something to do with the "preferred_base" in the "presentation" section of a dsf file. It seems like it is used to determine whether AutoFit gets triggered or not - depending on which item you want to conform it to. At least the advise from Spooky to Canary3D on "fixing" this may imply that.

    https://bugs.daz3d.com/view.php?id=50577

    Take this with a grain of salt. I didn't experiment with this myself, just throwing a pointer around ;)


    Thank you for your clues. I did some experimentation. The buggy overskirt dsf contains "auto_fit_base" and "preferred_base". I don't see either of those lines in a few other Genesis wardrobe files that I examined. If I remove those two lines from the overskirt file, autofit doesn't pop up anymore when I fit overskirt to Genesis. Autofit still pops up when fitting it to G2F. (That is correct behavior). I haven't invested in G2F/V6/Gia wardrobe items, so I only had basic wear to look at. The G2F basic wear items do have both "auto_fit_base" and "preferred_base". So either it is a new thing for G2F or a new thing for DS in general, and not in the older wardrobe items I looked at. It will be interesting to see how DAZ fixes the problem.
  • KatteyKattey Posts: 2,899
    edited December 1969

    Autofit still pops up when fitting it to G2F. (That is correct behavior).

    This is because G2F has the line "auto_fit_base" (line 43399) but Genesis itself doesn't, so if clothes don't have it either, I guess autofit doesn't trigger.
  • barbultbarbult Posts: 24,750
    edited December 1969

    Kattey said:
    Autofit still pops up when fitting it to G2F. (That is correct behavior).

    This is because G2F has the line "auto_fit_base" (line 43399) but Genesis itself doesn't, so if clothes don't have it either, I guess autofit doesn't trigger.
    Kattey, you seem to know a lot about these things! Did you figure this all out on your own? Can you tell me more about auto_fit_base and preferred_base and what they should be set to in clothing items? Should they only be in clothing for G2?
  • KatteyKattey Posts: 2,899
    edited July 2013

    barbult said:
    Kattey said:
    Autofit still pops up when fitting it to G2F. (That is correct behavior).

    This is because G2F has the line "auto_fit_base" (line 43399) but Genesis itself doesn't, so if clothes don't have it either, I guess autofit doesn't trigger.

    Can you tell me more about auto_fit_base and preferred_base and what they should be set to in clothing items? Should they only be in clothing for G2?
    I found this line in base G2F dsf file (see above), not in clothes. I think this line became strictly necessary when DS 4.6 started to do TriAx to TriAx autofitting, because before only Genesis had clones and there was no need to distinguish between various TriAx figures.
    In G2F the line itself looks like
    "auto_fit_base" : "/Genesis 2/Female"
    This little "/Genesis 2/Female" path coincides the end of main folder data/DAZ 3D/Genesis 2/Female where all other G2F stuff is located - there are folders for morphs, folders for autofit clones, folder for projection templates and everything else. So I think if you want to add the similar line into you figure, this little path should point on a similar main folder within data/DAZ 3D

    Oh, and if you wish to add a similar line to Genesis, the previous line should get a comma (,) at the end because only the last line in the block can be comma-free

    I don't think the clothes need that line, unless you autofit _to_ them, for which I never saw a need to. I also don't know about preferred base - I'd think it is just what autofit would try to use if nothing is yet selected, but I don't know for sure.

    And yes, sadly I couldn't find much information about such things, so I had to do manual block-by-block and later line-by-line comparison. Maybe other people have links to some documentation?

    Post edited by Kattey on
  • barbultbarbult Posts: 24,750
    edited December 1969

    Kattey, thank you for your insights. I really got a lot from your tutorial on transferring morphs to G2F. Another thing I'd like to learn about is creating Projection Templates. Do you have any tutorials on that topic?

  • KatteyKattey Posts: 2,899
    edited December 1969

    barbult said:
    Kattey, thank you for your insights. I really got a lot from your tutorial on transferring morphs to G2F. Another thing I'd like to learn about is creating Projection Templates. Do you have any tutorials on that topic?

    No, I'm looking for one myself very much :) If you'd find any, send me a PM, ok? I'll do the same.
  • PendraiaPendraia Posts: 3,598
    edited December 1969

    barbult said:
    Kattey, thank you for your insights. I really got a lot from your tutorial on transferring morphs to G2F. Another thing I'd like to learn about is creating Projection Templates. Do you have any tutorials on that topic?

    Hi Barbult....I asked Sickleyield about this via pm recently and she kindly wrote me a tutorial so here it is.

    You’re welcome to share the method if you wish.

    To create a projection template, you must first create a body suit, dress, or other clothing item that fits the body closely but not too closely (ideally it should fit about how you want the clothes to fit). Try to have it be higher poly (or rather, more poly dense) than the base figure for smoothest deformation. DAZ’s native templates are pretty low-poly, which is why they tend not to work as well.

    It can’t have buttons, collars, or other submeshes. That is, it can technically, but they will sometimes cause irregularities in a commercial item. It must cover all the areas you want to be able to rig for. I recommend gloves and shoes separately for morph reasons, but that is up to you. There’s no point in doing platform/high heels or anything that sticks out far from the body because it will not be “read;” the program can only “see” things that are quite close to the body surface in my testing. It will extrapolate the rigging outward when the template is used (I’ve converted an M4 batman cowl with no ear crumping using a “sheer” hood template).

    Import this into Studio as an .obj.

    Rig it to Dawn (or whatever) using Transfer Utility. If you want a good skirt, fix it up with the weight brush (it will need a lot of smoothing in the middle at all rotations) and change both the id and name of the thigh and shin bones to left/right Upper Handle or whatever you choose. You do this in the bone editor. Its icon looks like a bone with a bandaid across it. Right-click with the bone selected and choose edit—rename.

    Save it as a clothing item (not a wearable, use file—-save as—scene assets—figure/prop assets). Note where you save the data files because you have to go get them.

    Now comes the tricky part. Genesis and G2F in their data files have subpaths that go:

    data/daz 3d/genesis or genesis 2/projection templates
    data/daz 3d/genesis or genesis 2/tools/projection templates

    One of these contains the .duf files for projection templates, and one contains the .dsf, uv and morph files. (It doesn’t use the uv, but it requires that it be there for some reason.) Copy your item’s .duf and data files accordingly. You can look at the Genesis or G2 folders for how the structure is usually set up if they don’t release Dawn with any templates.

    Now a quick test with transfer utility and another item should show your template under the Projection Template options.

    The hardest part is morphing. You basically have to create morphs for the “clothing” version that you created, then copy that Morphs folder from the data files into the data files of the projection template. This works with Genesis; I’m still trying to get it to work with Genesis 2. These files will refer to the “clothing” data files rather than the “projection” ones, so you can either release both sets or try to text-edit the projection copy of the morphs in their uncompressed form to not require the clothing data files version.

    I don’t recommend messing with the text if you can get it working the other way. You need a good mastery of Notepad++ and mass-editing text files, and even then, it’s easy to screw up. You need to save the morphs uncompressed if you want to try editing them by hand.


    I included the first line to show that I have permission to post it in a thread as she has told me that I could share it...: )

    @Kattey, would that explain why the clothing for genesis loads as fit to to other triax figures?

  • KatteyKattey Posts: 2,899
    edited July 2013

    Pendraia said:
    @Kattey, would that explain why the clothing for genesis loads as fit to to other triax figures?

    It might be the reason but I think that the problem is a figure itself, not clothes. My theory is that if figure doesn't have that auto_fit_base line TriAx clothes from other figures might not trigger autofit.

    And thank you and SickleYield greatly for the tutorial :)

    Post edited by Kattey on
  • PendraiaPendraia Posts: 3,598
    edited December 1969

    Kattey said:
    Pendraia said:
    @Kattey, would that explain why the clothing for genesis loads as fit to to other triax figures?

    It might be the reason but I think that the problem is a figure itself, not clothes. My theory is that if figure doesn't have that auto_fit_base line TriAx clothes from other figures might not trigger autofit.

    And thank you and SickleYield greatly for the tutorial :)Okay I think what I was seeing might be something different.

    I can tell you though that the figure I was looking at does not contain that line and genesis, gen2f and V4 clothing does trigger autofit. the figure I'm using is to my knowledge a triax figure.

  • barbultbarbult Posts: 24,750
    edited December 1969

    Pendraia, thanks for posting the the tutorial from SickleYield. That sounds complicated!!! Boy, SRMS was sure a bargain, with all the work she must have done to create those projection templates. Have you tried it yet?

  • PendraiaPendraia Posts: 3,598
    edited December 1969

    barbult said:
    Pendraia, thanks for posting the the tutorial from SickleYield. That sounds complicated!!! Boy, SRMS was sure a bargain, with all the work she must have done to create those projection templates. Have you tried it yet?
    I tried it just before and managed to create a body suit template.
    I'm not sure if I'm allowed to post pictures due to the figure I used. Here goes...sorry if its not allowed. Skirt and pants were mapped in the transfer utility using the new body suit template. It's not as hard as it might seem. The tricky part is to get the files into the right spot.

    The duf file goes into the Projection Template folder and the other file goes in the Tool/Projection template

    If you're working with Genesis the files should already been set up. Mine weren't as the model I used didn't have the files set up yet.

    File path should be Data/DAZ 3D/Genesis/Base/Projection Templates or Tools/Projection Templates

    and I saved it as File/save as/support asset/figure prop asset and I selected modifier as the set content type.

    Basically it's the same as when you save an item after using the transfer utility and then you move the files. It saved the morphs and uv sets automatically. The biggest hassle was finding the files.

    pants_pt_bs.png
    600 x 1000 - 236K
  • barbultbarbult Posts: 24,750
    edited December 1969

    When you create the clothing that you want to use as the projection template (first step), do you create that to fit the model or the autofit clone that you will use the projection with? For example, SY created new and better projection templates for autofitting V4 clothes to Genesis. Was the projection template made to fit V4 or Genesis?

  • DZ_jaredDZ_jared Posts: 1,316
    edited December 1969

    There are two scenarios in which auto-fit is triggered. The first is one that most of you will be familiar with. You have a Tri-ax figure like Genesis in the scene and you load a different type of content (like a Poser rigged clothing item). When you fit the Poser rig clothing item to the tri-ax figure Studio knows that they are different types of content and will trigger auto-fit.

    With the introduction of Genesis 2 Female a new scenario was introduced. That is where the preferred base line in the .dsf file comes in. When you load Tri-ax clothing onto a Tri-ax figure Studio will check the preferred base. Currently the only options for the preferred base is either null (Genesis 1 and Genesis 1 clothing items don't have a preferred base line) or Genesis 2 Female. So if there is a mismatch auto-fit is triggered.

    I can't speak to the Gen 1 MFD issue as I haven't tested it myself. If there is a bug open on it then QA will sort that out.

  • barbultbarbult Posts: 24,750
    edited December 1969

    Thank you Jared. It is great to see DAZ participation in the forum and to get an "official" answer to my question.

  • PendraiaPendraia Posts: 3,598
    edited December 1969

    barbult said:
    When you create the clothing that you want to use as the projection template (first step), do you create that to fit the model or the autofit clone that you will use the projection with? For example, SY created new and better projection templates for autofitting V4 clothes to Genesis. Was the projection template made to fit V4 or Genesis?

    Okay...probably blind leading the blind here.

    The bodysuit I used fitted the original figure as I wanted to use the transfer utility to transfer weight mapping for clothing for that figure.

    If I'm understanding correctly the clone lets autofit know the shape of the original clothing fit. The projection template explains what to do with that shape and where you want it to end up.

    Like I said though blind leading the blind it just seems to make sense to me if that's the case hopefully someone who knows more can post.

  • barbultbarbult Posts: 24,750
    edited December 1969

    Pendraia said:
    barbult said:
    When you create the clothing that you want to use as the projection template (first step), do you create that to fit the model or the autofit clone that you will use the projection with? For example, SY created new and better projection templates for autofitting V4 clothes to Genesis. Was the projection template made to fit V4 or Genesis?

    Okay...probably blind leading the blind here.

    The bodysuit I used fitted the original figure as I wanted to use the transfer utility to transfer weight mapping for clothing for that figure.

    If I'm understanding correctly the clone lets autofit know the shape of the original clothing fit. The projection template explains what to do with that shape and where you want it to end up.

    Like I said though blind leading the blind it just seems to make sense to me if that's the case hopefully someone who knows more can post.
    Thanks, Pendraia, that helps, I will blindly follow you...:-)

    On the topic of autofit, I'm having a terrible problem with autofit garments not looking the same once I save them as an asset and reload them - or even after saving them in a scene and reopening the scene. I posted some images here http://www.daz3d.com/forums/discussion/26070/

    Are you having any issues like that? In these examples, I'm autofitting Genesis clothes to G2F, so not even anything exotic like other models. I'm using DAZ provided tools and templates only and it seems broken.

  • PendraiaPendraia Posts: 3,598
    edited July 2013

    barbult said:
    Pendraia said:
    barbult said:
    When you create the clothing that you want to use as the projection template (first step), do you create that to fit the model or the autofit clone that you will use the projection with? For example, SY created new and better projection templates for autofitting V4 clothes to Genesis. Was the projection template made to fit V4 or Genesis?

    Okay...probably blind leading the blind here.

    The bodysuit I used fitted the original figure as I wanted to use the transfer utility to transfer weight mapping for clothing for that figure.

    If I'm understanding correctly the clone lets autofit know the shape of the original clothing fit. The projection template explains what to do with that shape and where you want it to end up.

    Like I said though blind leading the blind it just seems to make sense to me if that's the case hopefully someone who knows more can post.


    Thanks, Pendraia, that helps, I will blindly follow you...:-)

    On the topic of autofit, I'm having a terrible problem with autofit garments not looking the same once I save them as an asset and reload them - or even after saving them in a scene and reopening the scene. I posted some images here http://www.daz3d.com/forums/discussion/26070/

    Are you having any issues like that? In these examples, I'm autofitting Genesis clothes to G2F, so not even anything exotic like other models. I'm using DAZ provided tools and templates only and it seems broken.

    I haven't used gf2 much...I bought and looked at her but haven't really played much with the figure. I'm home sick so I'll go and turn the pc on and see what I find.

    One question are you saving it as a support asset?

    Post edited by Pendraia on
  • PendraiaPendraia Posts: 3,598
    edited December 1969

    I did a quick test using the genesis 50's outfit. Smoothing worked before and after saving on the original object.

    When I reloaded the saved object I noticed it didn't maintain the collision setting as I'd changed it to collide against the blouse but once I reset it to blouse the smoothing worked.

    I'm saving as Support Asset/Figure/Prop

    It doesn't appear to save the original smoothing settings but it did reapply them.

    reloaded_saved_version.png
    600 x 1000 - 276K
    original_autofit_after_saving.png
    600 x 1000 - 276K
  • PendraiaPendraia Posts: 3,598
    edited December 1969

    posed, bumps are caused by blouse.

    reloaded_saved_versionposed2.png
    600 x 1000 - 220K
    reloaded_saved_versionposed.png
    600 x 1000 - 249K
  • barbultbarbult Posts: 24,750
    edited December 1969

    I'm sorry you're sick, Pendraia. Thanks for trying this. Yes, I did save as figure/prop asset. I think the difference between what you tried and what I did is that I changed the smoothing method from generic to base shape matching before saving it as figure/prop asset. (I almost always use base shape matching instead of generic.) You can see in my picture that base shape matching made the sweater hang more loosely and not cling to the breasts as much. After reloading the saved sweater, it said it was base shape matching, but the breast area was all lumpy. It is like the base shape that it is matching is different during autofit and after reloading the saved item. You can see the drastic difference in my pictures. If you have a chance to try this with changing to base shape matching smoothing, I'd like to hear your results.

    2_G2F_autofit_saved_as_asset_and_reused.jpg
    1250 x 1068 - 714K
    1_G2F_autofit_smoothing_changed_to_base_shape.jpg
    1250 x 1068 - 698K
  • PendraiaPendraia Posts: 3,598
    edited December 1969

    barbult said:
    I'm sorry you're sick, Pendraia. Thanks for trying this. Yes, I did save as figure/prop asset. I think the difference between what you tried and what I did is that I changed the smoothing method from generic to base shape matching before saving it as figure/prop asset. (I almost always use base shape matching instead of generic.) You can see in my picture that base shape matching made the sweater hang more loosely and not cling to the breasts as much. After reloading the saved sweater, it said it was base shape matching, but the breast area was all lumpy. It is like the base shape that it is matching is different during autofit and after reloading the saved item. You can see the drastic difference in my pictures. If you have a chance to try this with changing to base shape matching smoothing, I'd like to hear your results.

    Thanks for the thoughts...

    That's interesting, I almost always put it on generic when autofitting. I was quite surprised to see this item had generic initially as most don't. I've found when experimenting in the parameters tab with smoothing that most of the time it gives a better result especially with shoes as it doesn't try to follow the toes so much.

    Couple of questions:

    Do you have the same result with items that start off with base shape as the smoothing type? Do they also have this problem?

    and

    Has the saved file retained your settings? Was it still on base shape when you reloaded the file?

  • PendraiaPendraia Posts: 3,598
    edited July 2013

    Just tested using base shape and I'm getting the same results as you. I'm not sure what's happening there but it's certainly a bit weird. I'd suggest you file a bug report.

    edited to add...tried it without the blouse and I'm definitely getting a better result with generic than base shape, which is what I would expect. I'm not sure that it's actually supposed to be as good as it was initially, if that makes sense.

    Post edited by Pendraia on
  • barbultbarbult Posts: 24,750
    edited December 1969

    I filed a bug report here https://bugs.daz3d.com/view.php?id=50700

  • barbultbarbult Posts: 24,750
    edited December 1969

    Pendraia, to answer your other questions:

    Do you have the same result with items that start off with base shape as the smoothing type? Do they also have this problem? Yes

    and

    Has the saved file retained your settings? Was it still on base shape when you reloaded the file? Yes

  • PendraiaPendraia Posts: 3,598
    edited December 1969

    barbult said:
    Pendraia, to answer your other questions:

    Do you have the same result with items that start off with base shape as the smoothing type? Do they also have this problem? Yes

    and

    Has the saved file retained your settings? Was it still on base shape when you reloaded the file? Yes

    Interesting...thanks for answering! Do you want me to post also?

  • barbultbarbult Posts: 24,750
    edited December 1969

    It would be nice if you added a note to the bug report, so they know that you can duplicate the problem. Thanks.

  • PendraiaPendraia Posts: 3,598
    edited December 1969

    barbult said:
    It would be nice if you added a note to the bug report, so they know that you can duplicate the problem. Thanks.
    okay will do...: )
Sign In or Register to comment.