Daz What are the most common Scene Size bloaters?

Sakrilas

Just Another Member
Game Developer
Oct 26, 2017
359
2,604
I've been working on multiple scenes involving the same single Genesis 8 model and the same props.

The first few scene files were all around 3mb in size (pretty small, and made sense to me.... since there isn't too much going on in the scene).
Then came a fourth file (same location, props and same character in the scene), but when I saved this file it ended up being 12mb in size.

I tried thinking back about the different things I did between scene 3 (last scene with small 3mb size) and scene 4 (larger size, around 12mb). The only changes I could remember were that I added a custom texture and emission settings to a TV prop, and also I added smoothing modifier to a model.

For the sake of experimenting I tried loading scene 4, removing the TV texture and smoothing modifier from the model, then saved it as scene 5, but the size of scene 5 was still over 12 mb.

This got me puzzled.

I would love if some DAZ users here could chime in with theories on what are the actions that drastically increase the size of a scene. (Even though 12mb is still relatively small, I would just love to learn what causes this bloating of the file size)

At this point, the only "scene size bloater" I know is that injecting Morphs that aren't native to the model drastically increases the size. For example, adding and keeping all the clothing morphs from "Fit Control" will increase your scene size by tens of megabytes. That's why I now always make sure to remove any unused Fit Control morph.

Sorry for the rambling... I guess in short, my question is, given 2 scenes with the same props and actors, what are the different DAZ actions that someone could do to one of those scenes that would make the file size much larger than the other scene which was left untouched?
 

Deleted member 1121028

Well-Known Member
Dec 28, 2018
1,716
3,295
While most duf files are plain text files that contains morph/shaders/textures locations, values and so on, they can also be used as container for meshes when they are modified in any way. Could be geometric edits as well as dForce deformation (could be the case for mesh grabber too, I don't remember), otherwise they would have an avalanche of users constantly breaking original assets.
 

TDoddery

Member
Apr 28, 2020
170
160
At the risk of hijacking, what does anyone consider a "normal" size for a .duf scene?

Obviously "it all depends" but say for example a scene with say 2-4 (clothed - lol) characters and a fairly basic environment, my full scene files for that kind of thing are usually between 85 - 130 Mb.
 

Deleted member 1121028

Well-Known Member
Dec 28, 2018
1,716
3,295
At the risk of hijacking, what does anyone consider a "normal" size for a .duf scene?

Obviously "it all depends" but say for example a scene with say 2-4 (clothed - lol) characters and a fairly basic environment, my full scene files for that kind of thing are usually between 85 - 130 Mb.
There is no "normal" size per se.
Duf files are DSON format, it's plain text JSON syntax that contain all the informations Daz need to load your scene. Depending on size and complexity of the scene, let's say it's somewhere 100ko/3Mo of plain text uncompressed.

Now you have altered a mesh on your scene. Daz detect it, and instead of overwritting that mesh, it gonna save it in the Duf file. If the mesh you edited is 150Mo heavy, add those 150Mo to your duf file.

Now let's say it annoys you. Instead of saving that altered mesh in the duf file, you may either want to export and then re-import it as an Obj/Fbx, so now instead of saving your altered mesh in the duf, the duf file will simply point to the location of your imported Obj/Fbx.
 
Last edited:
  • Like
Reactions: 31971207

Sakrilas

Just Another Member
Game Developer
Oct 26, 2017
359
2,604
While most duf files are plain text files that contains morph/shaders/textures locations, values and so on, they can also be used as container for meshes when they are modified in any way. Could be geometric edits as well as dForce deformation (could be the case for mesh grabber too, I don't remember), otherwise they would have an avalanche of users constantly breaking original assets.
Ah! Right! I totally forgot that .duf are just JSON files. Thanks no__name !

I looked into it and noticed that "scene" files are compressed (so you can't really open them), but saving a scene-subset allows me to uncheck "compress file", which then results in the proper raw JSON being saved. Of course, after I looked into it, I deleted it afterwards, since the uncompressed scene file is much more heavy than the uncompressed scene-subset.

By saving a scene subset with everything from my scene into it, I could notice what caused it to increase in size so much. I totally forgot, but I had used the Transfer Utility to do some edits to the hair, this is what caused the bloating.


There is no "normal" size per se.
Duf files are DSON format, it's plain text JSON syntax that contain all the informations Daz need to load your scene. Depending on size and complexity of the scene, let's say it's somewhere 100ko/3Mo of plain text uncompressed.

Now you have altered a mesh on your scene. Daz detect it, and instead of overwritting that mesh, it gonna save it in the Duf file. If the mesh you edited is 150Mo heavy, add those 150Mo to your duf file.

Now let's say it annoys you. Instead of saving that altered mesh in the duf file, you may either want to export and then re-import it as an Obj/Fbx, so now instead of saving your altered mesh in the duf, the duf file will simply point to the location of your imported Obj/Fbx.

I tend to consider ">10mb" scenes as "Large scenes".

Here are scenes involving a lot of props and 3 Genesis 8 characters interacting, and how much they weight.

5x93a.png

5x99.png
1641776597061.png
 

Deleted member 1121028

Well-Known Member
Dec 28, 2018
1,716
3,295
I looked into it and noticed that "scene" files are compressed (so you can't really open them)
You should able to extract with any zip tool (it's a simple zip compression).

I tend to consider ">10mb" scenes as "Large scenes".

Here are scenes involving a lot of props and 3 Genesis 8 characters interacting, and how much they weight.
Well you can't really do that either. It's a crappy exemple but let say I have 500 g8f models. It's 500*2 minimum addtional lines in the duf file (head+body) to parse.
 
  • Star-struck
Reactions: Sakrilas

Sakrilas

Just Another Member
Game Developer
Oct 26, 2017
359
2,604
You should able to extract with any zip tool (it's a simple zip compression).

Ah! That's perfect! Thank you!

I didn't know that "compressed" literally meant zipped. I thought DAZ would have their own compression algorithm going.

Thanks for sharing that!
 

Deleted member 1121028

Well-Known Member
Dec 28, 2018
1,716
3,295
Ah! That's perfect! Thank you!

I didn't know that "compressed" literally meant zipped. I thought DAZ would have their own compression algorithm going.

Thanks for sharing that!
There is barely any encryption in Daz if that what you have in mind.
Except for key thing like subdivided meshes (HDblabla), and that's where Daz criticism should be aimed at.
 

TDoddery

Member
Apr 28, 2020
170
160
Yeah I get the thing about the scene file storing mesh or just pointing to it. I was just curious what sort of file sizes anyone else is used to.

On the DAZ compression/zip. In any case you can actually use DAZ itself to uncompress (decompress?) the .duf file to text, although I can't remember where that function lives in DAZ, I have done it a couple of times.
 

Deleted member 1121028

Well-Known Member
Dec 28, 2018
1,716
3,295
On the DAZ compression/zip. In any case you can actually use DAZ itself to uncompress (decompress?) the .duf file to text, although I can't remember where that function lives in DAZ, I have done it a couple of times.
Not sure I understand.
It's fully built-in.
 
Last edited:

Sakrilas

Just Another Member
Game Developer
Oct 26, 2017
359
2,604
There is barely any encryption in Daz if that what you have in mind.
Nah, what I meant is that I didn't know how DAZ would compress a .duf file to save space.

To be more specific, one time a few months ago I was converting some textures in some third party assets from png to jpg.
And to have everything still work, I wrote a script that would go through the .duf files and replace references to .png for .jpg. My script would rely on the file being uncompressed, since I needed to manipulate the JSON object from the save.

The thing is that whenever a third party product had their assets compressed, I couldn't use my script (since compressed .duf isn't a JSON file anymore).

All I was saying is that you just taught me that whenever I come across a compressed asset I can simply open them in ZIP and "unzip" them. This blew my mind. Thanks for sharing that.
 

Sakrilas

Just Another Member
Game Developer
Oct 26, 2017
359
2,604
Oh I see.
For your script (if it's within Daz) have you tried to use ?
Should be working, either file is zipped or not, far I remember.
Since it was just a simple find and replace operation on those .duf files, I wrote my script using just plain NodeJS.

I wonder if it's worth learning DAZ Script. Have you found it useful? Maybe used it to automate some workflow?
 

Deleted member 1121028

Well-Known Member
Dec 28, 2018
1,716
3,295
I wonder if it's worth learning DAZ Script. Have you found it useful? Maybe used it to automate some workflow?
To be honest not really. In ~2 years I needed a full reset surface one... And I think that's about it. Doesn't mean good scripts haven't be wrote ( , , or 's scripts) nor that I am the worst coder ever (it's true tho). Just I'm not sure it's worth the hassle overall, there is generally way superior software solutions for most of things.
 
Last edited:
  • Like
Reactions: Sakrilas

raMasters

Newbie
Apr 2, 2021
23
48
I save all my characters as base files, and I have some that are 900kb, and others that are 40mb+. The largest right now is 55mb. Morphs are definitely the biggest thing, I think, but my largest file has very few morphs. It does have Orchid wings and a fancy crown, though, so maybe that's it. I've pondered about this myself over the years.
 

Deleted member 1121028

Well-Known Member
Dec 28, 2018
1,716
3,295
I save all my characters as base files, and I have some that are 900kb, and others that are 40mb+. The largest right now is 55mb. Morphs are definitely the biggest thing, I think, but my largest file has very few morphs. It does have Orchid wings and a fancy crown, though, so maybe that's it. I've pondered about this myself over the years.
All that thread for nothing.

1434325674592.jpg
 

raMasters

Newbie
Apr 2, 2021
23
48
Haha, yea, uh, my bad. I'm guilty of having too many tabs open, forgetting about them for a week, then coming back and forgetting to refresh. You were very helpful, thank you.
 

8InchFloppyDick

Member
Game Developer
Apr 4, 2020
134
381
In my experience smoothing morphs such as the ones used to solve the 'dig blouse out from between huge mammaries' problem, are what bloat the size of my scenes. I often see scenes go from 10Mb to 150 Mb with only the application of those morphs.
 

Selek

Member
Aug 1, 2019
119
68
Thanks for this helpful thread. I'm still pretty new to Daz. I'm wondering what the "best practices" are for keeping scene size down, then. As I understand this thread, the .duf file grows to reflect alterations in a mesh, say. So to keep scene sizes down, is it sometimes better to create a new scene rather than altering an existing one?
 

Deleted member 1121028

Well-Known Member
Dec 28, 2018
1,716
3,295
Thanks for this helpful thread. I'm still pretty new to Daz. I'm wondering what the "best practices" are for keeping scene size down, then. As I understand this thread, the .duf file grows to reflect alterations in a mesh, say. So to keep scene sizes down, is it sometimes better to create a new scene rather than altering an existing one?
Most of the time, none at all.

There is few bad practice I can think of, like saving a character as a subsbet with altered mesh. You will bloat your save each time you load it. A bit of common sense to, you modified meshes in that complex scene, went mad with the geometry editor and scene is now 500mo heavy. Instead of saving each shot as a whole new scene, you just save subset of that scene (cameras/poses/lights/whatever) and merge it with your heavy one. Or create a new asset from that heavy edited scene (duf file will now link just to that new asset).

But if you go for that rendering thing; prepare yourself for a lot of disk space, Daz or not it goes up very fast o_O.
 
  • Like
Reactions: Selek