October 18 - Take a look at the Friday Highlight and discover some awesim discussions! Click me!
October 18, correction: 11AM PDT - Join us for a Guru Garage! Details here.
October 10 - A new The Sims 4 update is ready for you on Xbox One and PlayStation 4! Details here

@SimGuruModSquad 0xDB43E069 DeformerMap resource?

I'd like some information about this resource, .bt file if possible. Thank you!

Comments

  • SimGuruModSquadSimGuruModSquad Posts: 597 SimGuru
    Hello. Deformer maps (Dmaps) are a big-ish topic, I'll start with the basics:

    Dmap resources define a displacement for model vertices when the model is constructed to achieve deformation of the Sim geometry based on user customization. There are many Dmap resources, a particular resource will define a gender/age, region and a morph state (for example "yfBody_Heavy", "yfBody_Fit", "ymFeet_Long", "ymFeet_Short"). Furthermore there are two variations of the resource, one the contains the normal and one that contains the vertex delta - for example, "ymFeet_Short_Normals" (resource db43e069:00000000:c351e7260b39e239) and "ymFeet_Short_Shape" (resource db43e069:00000000:cbe85057a5c4ac2a).

    Within a Dmap resource itself there can be two sets of data defined, one for skin tight geometry and one for "robe" data (i.e. with clothing on). This is because deformation should affect the geometry differently depending on if the geometry is loose clothing as opposed to skin or skintight clothing.

    The 2nd UV set in the CAS part geometry maps to the displacement data encoded in the the Dmap resource which is used to modify the geometry when the Sim is built. Additionally vertex color in the geometry is used to weight between the "skintight" or "robe" data - this allows gradual transition from skintight to clothing.

    The Dmap data is encoded in a pretty custom format (RLE, with skintight and robe data interleaved, data normalized, plus some additional complexity due to optimization). I will work on getting a .bt file for you guys of this resource. Stay tuned.

    Feel free to ask any follow ups!
  • CvilleCville Posts: 10 New Member
    Awesome, thank you so much! I look forward to the .bt file.
  • cmarinetticmarinetti Posts: 120 Member
    @SimGuruModSquad , thank you for the information!

    Am I correct that the deformation map works along with bone morphs for the body morphs (fat, fit, etc.)? I've seen when I remove the second UV data that the body still morphs but there are distortions. On the other hand, hair with no second UV doesn't respond to the body morphs at all, so I'm confused.
    cmarNYC on MTS.
  • suzanne93suzanne93 Posts: 12 New Member
    @SimGuruModSquad , what causes seams to break and does it have any connections with 2nd UV?
  • SimGuruModSquadSimGuruModSquad Posts: 597 SimGuru
    @cmarinetti: Bones have very little impact on deformation, it is primarily dmaps. One exception is that the female breast area does use bones for some of it's deformation. Perhaps that is what you observed having an impact when you removed the 2nd UV.

    @suzanne93: Can you provide more context as to what seams you are referring to and how you are getting them to happen?
  • cmarinetticmarinetti Posts: 120 Member
    I've seen when the stitch data is removed all/most of the seams split. Wish I could post pictures.
    cmarNYC on MTS.
  • pboxpbox Posts: 630 Member
    edited November 2014
    @cmarinetti, PM me at mts and I’ll post pix for you. For science! =D

    (You can also sort-of post pics by posting an URL with spaces in it .. but that would certainly be less stylish)
    Stuff for TS2 · TS3 · TS4
  • suzanne93suzanne93 Posts: 12 New Member
    edited November 2014
    @SimGuruModSquad I've tried dividing shoe mesh so that 2nd UV map stays the same as the original, but seams still break (fat/thin morph small/large foot slider) so I guess that 2nd UV map doesn't have such an impact on seams.
  • pboxpbox Posts: 630 Member
    cmarinetti wrote: »
    I've seen when the stitch data is removed all/most of the seams split. Wish I could post pictures.

    @SimGuruModSquad, here are some pics from @cmarinetti:


    Effect of No UV2:

    62476_141108144140EffectOfNoUV2.jpg


    Effect of UV2 = Zero:

    62474_141108144139-EffectOfUV2isZero.jpg


    Effect of No Stitch:

    62475_141108144139-EffectOfNoStitch.jpg


    Comment from her:
    Here are the pics I'd like to show SimGuruModSquad of my tests of the function of UV2 and other sim deformation data [..] The labels on the pictures are pretty self-explanatory, I hope. If the body morphs aren't being done with bones, I have to suspect the first UV map is also being used for morphs and (maybe) the 2nd UV overrides it. In fact, I ran into an accessory with no 2nd UV which deformed and split its seams with the body sliders.
    Stuff for TS2 · TS3 · TS4
  • cmarinetticmarinetti Posts: 120 Member
    Thanks, pbox! I also should have mentioned the tests were on the top only, the bottom was an unaltered EA bottom.
    cmarNYC on MTS.
  • gsmythegsmythe Posts: 8 New Member
    @SimGuruModSquad, Apologies for the illustrations of what you explained above that were posted by @cmarinetti in some amount of confusion about what you said. Looking forward to further documentation on this.
  • CvilleCville Posts: 10 New Member
    I'm still checking this post daily hoping for that .bt file.... :| Hope you haven't forgot SimGuruModSquad
  • splizzmochsplizzmoch Posts: 62 Member
    I hope Maxis didn't take away @SimGuruModSquad 's coffee maker, I know I would certainly run out of steam if mine went away XD
    Hoping for data on this as well, TYIA
  • SimGuruModSquadSimGuruModSquad Posts: 597 SimGuru
    Haven't forgotten about you guys! Still working on the bt file when I get the chance - sorry for the delay.
  • splizzmochsplizzmoch Posts: 62 Member
    thanks... and do what needs doing first, we can be patient :)
  • SimGuruModSquadSimGuruModSquad Posts: 597 SimGuru
    Appreciate your patience :)

    Attached is a zip containing the .bt file for the deformer map resource. Additionally the zip includes a script file (with extension .sc) that can be run in the 010 Editor to decode the bitmap data to a BMP to better illustrate how the RLE compression and index table optimization works.

    The data format is relatively straight forward, but more complicated than most because of the optional compression - I am pretty sure I've got it right but let me know if something looks wrong. Note that Maxis authored data is generally compressed. And ideally mods are also compressed, but you can create them as fully uncompressed which simplifies the data format but less optimal for the engine to load and use. Generating uncompressed files probably will make things easier at first while you guys are figuring things out.

    Happy dmapping!
  • TokfarbrornTokfarbrorn Posts: 15 New Member
    edited January 2015
    Hi,

    @‌SimGuruModSquad

    I´ve been working with this DMAP resource and I almost got it now. No problems reading the DMAP and looking up the delta´s, I think.
    Got one issue that I can't solve though. If I'm applying the delta values for say "Heavy" to the mesh it deforms most parts the way I expect it too, but some parts, like the belly is "inverted".

    If I pick a vertex on the belly and get the z-delta value for that point on the DMAP it translates into something like "-0.12xx" (in z-axis), that would make the final position of the vertex would be something like "-0.01" (in z-axis). That just seems wrong =)

    Other parts like the butt and the shoulders is ok but the belly, calves, thighs and some parts of the arms are wrong.

    Either Im reading the DMAP wrong or there is some more data needed, in some other resource.

    Thanks for any help you can give me on this.
    Post edited by Tokfarbrorn on
  • TokfarbrornTokfarbrorn Posts: 15 New Member
    Never mind my previous post. Just found that I was using the DMAP´s for sculpts and not the "Body".
  • SimGuruModSquadSimGuruModSquad Posts: 597 SimGuru
    Great, glad you figured it out and are making progress.
  • simmythesimsimmythesim Posts: 153 Member
    edited July 2015
    Appreciate your patience :)

    Attached is a zip containing the .bt file for the deformer map resource. Additionally the zip includes a script file (with extension .sc) that can be run in the 010 Editor to decode the bitmap data to a BMP to better illustrate how the RLE compression and index table optimization works.

    The data format is relatively straight forward, but more complicated than most because of the optional compression - I am pretty sure I've got it right but let me know if something looks wrong. Note that Maxis authored data is generally compressed. And ideally mods are also compressed, but you can create them as fully uncompressed which simplifies the data format but less optimal for the engine to load and use. Generating uncompressed files probably will make things easier at first while you guys are figuring things out.

    Happy dmapping!

    Hey SimGuruModSquad, the DMAP to BMP script doesn't seem to work on the files from the latest patch, it errors out saying "*ERROR Line 12: Variable 'mMaxCol' is undefined. "
  • SimGuruModSquadSimGuruModSquad Posts: 597 SimGuru
    Hi @simmythesim,

    In order to run the .sc file in 010 editor, you need to first run the .bt file on the data to decode it then run the .sc file.

    -SGMS
  • Willy LibertineWilly Libertine Posts: 14 New Member
    edited August 2015
    Hello, I was wondering, what file should I look in my game directory for to find the dmap information? I have the resources, but I don't know what files actually control the Dmaps themselves.
    Post edited by Willy Libertine on
  • SimGuruModSquadSimGuruModSquad Posts: 597 SimGuru
    Hi Willy , sorry I don't quite understand the question. Have you extracted the dmap resources from the package files?
  • Willy LibertineWilly Libertine Posts: 14 New Member
    I have not, nor do I know which Package file they are located in
  • IngeJonesIngeJones Posts: 3,117 Member
    You'll find some in ClientFullBuild0.package
Sign In or Register to comment.
Return to top