Creating a Scene with multiple figures - How can I Reduce Usage ?

HyeVltg3HyeVltg3 Posts: 87
edited October 2021 in Daz Studio Discussion

I was not initially monitoring my RAM usage as this has never been an issue for my PC use. I was not aware I was already passing my highscore of ~80% usage, 97% working this project.

I am working a Daz Scene with about 13 figures. All Base G8F and Character morph applied on all characters and all are Visible OFF so I can work on 1 at a time.

I wanted to create a lineup or different characters. Last night I hit 97% loading unhiding the 3rd character into the scene! (so only 3 of 13 Visible in viewport) and Windows BSOD'd when I turned on Iray Preview, it did not even finish before I got the "Not enough resources" BSOD.

Should I upgrade RAM or are there tricks one should use to reduce mem usage when building large scenes ?

Specs: AMD 3950X, 32GB RAM, RTX 3080 x2

Post edited by HyeVltg3 on

Comments

  • MattymanxMattymanx Posts: 6,904

    I have 5 products here in the Daz3D store that are geared towards reducing vram usage. 

    https://www.daz3d.com/resource-saver-shaders-collection-for-iray

    https://www.daz3d.com/mmx-resource-saver-shaders-collection-2-for-iray

    https://www.daz3d.com/mmx-resource-saver-shaders-collection-3-for-iray_Mattymanx

    https://www.daz3d.com/mmx-resource-saver-shaders-collection-4-for-iray

    https://www.daz3d.com/mmx-resource-saver-shaders-collection-5-for-iray

    Currently they are not on sale but, if you can be patient, I will have a November release, at which time my entire store will be on sale again so anything older than 60 days will go on sale.  So the first 4 RSSC sets should be on sale.

     

    A note about the first set:  There is a lot of info on the promos for the very first set.  This was made when we had Daz Studio 4.10.  As of 4.11, we got a newer version of Iray that has since then, handeled image useage better.  So in the promos, where it states that Iray will load the same image for every suface its applied to is no longer true.  In fact it now only loads the same image once, reducing vram use.  So if you were to use the hair shaders from the second set on all 13 of your characters, then Iray will only load in those textures once, and only your trans maps will be extra.

     

    Another thing you can do is reduce texture sizes where needed.  See image sizes promo in the first set listed.

     

    Recently while making a new product, I noticed a big difference between how much VRAM textures use when using 64bit, 32bit, 24bit, and 8bit PNGs. There is also a notable difference in file size on the HDD. Between 32bit and 24bit, my 2048px textures used 104mb of vram (32bit) and 68mb of vram (24bit) with no difference in quality. Values here are what DS reports in the log when rendering with Iray.

  • charlescharles Posts: 846
    edited October 2021

    What you'll need to do is share as many texture files between all your characters as possible. If you can remove Normal maps and share specular, gloss and any other textures you can. If you can share the base color textures among as many as possible that would be ideal.  Do the same thing for hair and clothes that would be best too. If that's not enough reduce your compression in Rendeirng->Advanced. If that's not enough then check the hair and clothing for ones with extremly high polycount, if you identify those maybe see if there is lower poly version to use. If that's still not enough, or an alternate to last one, check all the characters subdivision, reduce it to 1 or 2. Check extremly high polycount items and see if they are in HD resolution and if you can switch them to Base resolution. Good luck.

     

    Post edited by charles on
  • PerttiAPerttiA Posts: 10,024
    edited October 2021

    If the characters are wearing clothes, you can hide the bodyparts covered by the clothes (or otherwise not visible)

    Oh, and upgrading to 64GB is not a bad idea.

    Post edited by PerttiA on
  • charlescharles Posts: 846
    edited October 2021

    PerttiA said:

    If the characters are wearing clothes, you can hide the bodyparts covered by the clothes (or otherwise not visible)

     Correct, but don't just hide it by clicking on the eyeball icon, that will distort any clothes they are wearing and screw up smoothing. Instead click on the limb or body part (multi select for large groups like feeds, legs) and set in the Parameters Tab "Visible in Render" to OFF. But I'm not 100% sure this will prevent the textures still going to the GPU. It's a trick used mainly to remove poke-throughs.

    Post edited by charles on
  • margravemargrave Posts: 1,822
    edited October 2021

    HyeVltg3 said:

    I was not initially monitoring my RAM usage as this has never been an issue for my PC use. I was not aware I was already passing my highscore of ~80% usage, 97% working this project.

    I am working a Daz Scene with about 13 figures. All Base G8F and Character morph applied on all characters and all are Visible OFF so I can work on 1 at a time.

    I wanted to create a lineup or different characters. Last night I hit 97% loading unhiding the 3rd character into the scene! (so only 3 of 13 Visible in viewport) and Windows BSOD'd when I turned on Iray Preview, it did not even finish before I got the "Not enough resources" BSOD.

    Should I upgrade RAM or are there tricks one should use to reduce mem usage when building large scenes ?

    Specs: AMD 3950X, 32GB RAM, RTX 3080 x2

    First of all, don't work on a scene with 13 characters. That's madness. Work on each character in isolation and then save them as character/pose presets or merge them in as scene subsets.

    Now, as for how to fit 13 figures into one scene for your final render:

    • Pose a figure and set it to base resolution.
    • Convert that figure's clothing/hair to props (Edit -> Figure -> Rigging -> Convert Figure to Prop) piece by piece. You can delete the eyebrows.
    • Unparent all of them from the figure, convert the figure itself to a prop, and then reparent them. (If you leave them attached, they'll all be deleted.)
    • Apply a smoothing modifier to the clothing to remove pokethrough.
    • (Optional) Take the hair into Blender and decimate it repeatedly to cut down on the polygon count.
    • Use V3Digitime's Scene Optimizer product to reduce the textures to 1K or lower.

    Congratulations! You can now put dozens of figures into your scenes with minimal memory loss. Just remember to use copious depth of field to hide the lo-rez figures.

    Post edited by margrave on
  • PerttiAPerttiA Posts: 10,024

    charles said:

    PerttiA said:

    If the characters are wearing clothes, you can hide the bodyparts covered by the clothes (or otherwise not visible)

     Correct, but don't just hide it by clicking on the eyeball icon, that will distort any clothes they are wearing and screw up smoothing. Instead click on the limb or body part (multi select for large groups like feeds, legs) and set in the Parameters Tab "Visible in Render" to OFF. But I'm not 100% sure this will prevent the textures still going to the GPU. It's a trick used mainly to remove poke-throughs.

    I have used hiding bodyparts with the eyeball quite often and haven't noticed any distortion on the clothes, and my characters are always heavily morphed. 

  • margravemargrave Posts: 1,822
    edited October 2021

    PerttiA said:

    If the characters are wearing clothes, you can hide the bodyparts covered by the clothes (or otherwise not visible)

    Oh, and upgrading to 64GB is not a bad idea.

    The base figures only have 16k polygons, which is absolutely nothing for a modern system. Hiding a few dozen polygons won't do anything. Daz's incredible lag/memory drain comes from the property hierarchy that's required to morph/pose them. If you strip that out by converting them to props, they load pretty much instantly with minimal overhead.

    Post edited by margrave on
  • charlescharles Posts: 846
    edited October 2021

    PerttiA said:

    charles said:

    PerttiA said:

    If the characters are wearing clothes, you can hide the bodyparts covered by the clothes (or otherwise not visible)

     Correct, but don't just hide it by clicking on the eyeball icon, that will distort any clothes they are wearing and screw up smoothing. Instead click on the limb or body part (multi select for large groups like feeds, legs) and set in the Parameters Tab "Visible in Render" to OFF. But I'm not 100% sure this will prevent the textures still going to the GPU. It's a trick used mainly to remove poke-throughs.

    I have used hiding bodyparts with the eyeball quite often and haven't noticed any distortion on the clothes, and my characters are always heavily morphed. 

    It's not the morph, but the joint reference you lose by eyeballing out. Turning off Visible in Render is the correct method. In any case neirther of these really save texture loading to GPU.

    Daz5 could probably use occlusion settings, that would go a long long way helping people with lower memory get renders done.

     

    Post edited by charles on
  • margrave said:

    HyeVltg3 said:

    I was not initially monitoring my RAM usage as this has never been an issue for my PC use. I was not aware I was already passing my highscore of ~80% usage, 97% working this project.

    I am working a Daz Scene with about 13 figures. All Base G8F and Character morph applied on all characters and all are Visible OFF so I can work on 1 at a time.

    I wanted to create a lineup or different characters. Last night I hit 97% loading unhiding the 3rd character into the scene! (so only 3 of 13 Visible in viewport) and Windows BSOD'd when I turned on Iray Preview, it did not even finish before I got the "Not enough resources" BSOD.

    Should I upgrade RAM or are there tricks one should use to reduce mem usage when building large scenes ?

    Specs: AMD 3950X, 32GB RAM, RTX 3080 x2

    First of all, don't work on a scene with 13 characters. That's madness. Work on each character in isolation and then save them as character/pose presets or merge them in as scene subsets.

    Now, as for how to fit 13 figures into one scene for your final render:

    • Pose a figure and set it to base resolution.
    • Convert that figure's clothing/hair to props (Edit -> Figure -> Rigging -> Convert Figure to Prop) piece by piece. You can delete the eyebrows.
    • Unparent all of them from the figure, convert the figure itself to a prop, and then reparent them. (If you leave them attached, they'll all be deleted.)

    http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/nodes/convert_figure_to_props/start

    • Apply a smoothing modifier to the clothing to remove pokethrough.
    • (Optional) Take the hair into Blender and decimate it repeatedly to cut down on the polygon count.
    • Use V3Digitime's Scene Optimizer product to reduce the textures to 1K or lower.

    Congratulations! You can now put dozens of figures into your scenes with minimal memory loss. Just remember to use copious depth of field to hide the lo-rez figures.

  • Thank you for all the tips. Just reading through it all and will apply it over the weekend. Thanks!

  • The Vertex DoctorThe Vertex Doctor Posts: 198
    edited February 2022

    I posted this on another thread.

    Here's how I fit multiple figures into a render using my lowly RTX 2070 Super.

    I use Gigapixel AI to reduce texture sizes by half, with no other changes in the Gigapixel AI program, on characters, clothing, props, and scenes. Because, honestly, when reducing a 4096x4096 to 2048x2048 and sometimes lower, I don't see a difference in a 1080p render. Save your original textures if you like, I never do as I never render over 1080p. If I ever have to, which I doubt, I will just pull the textures out of the library I have stored on an external backup drive. Some may call me crazy but I have two 8TB external drives with my current runtime I synch, swapping out once a month to the other, and two 8TB externals in the closet with just the runtime textures folder on it with the original textures. Given that I have been using DAZ for over 10 years and have a large collection of purchased from multiple sites, including some that no longer exist plus a lot of custom built content making my library over 4TB currently, it is a NECESSITY.

    I use render SubD on figures as low as I can without changing the rendered look. This usually means 1-2 unless using an HD morph.

    I Use Decimator to bring down mesh complexity until JUST above where it's noticeable.

    For background characters I decimate a little more as well as removing all normal maps and bump maps. I also use the same body texture on all of them just with different surface settings to alter skin tones.

    For main characters, I remove normal maps and bump maps IF it's not noticeable, like not doing a close up.

    I hide all body parts under clothes using Charles' statement of turning off Visible in Render. I also remove textures from surfaces that aren't seen. If the legs and feet and toenails are completely hidden by jeans and shoes, I remove all the leg textures on all surface including normals, bump, etc.

    I hide the mouth interiors and depending on whether the character is facing toward or away from the camera I may hide the eyes. (And remove the textures.)

    I remove lashes on background characters and use a texture eyebrow on them instead of a mesh one.

    I use "section plane cameras" I have set up to cut out all geometry outside the camera's field of view while turning clip lights on or off and adjusting the environment intensity depending on what I need for a scene.

    EDIT: I may add more as I remember LOL

    Post edited by The Vertex Doctor on
  • The Vertex Doctor said:

    I posted this on another thread.

    Here's how I fit multiple figures into a render using my lowly RTX 2070 Super.

    I use Gigapixel AI to reduce texture sizes by half, with no other changes in the Gigapixel AI program, on characters, clothing, props, and scenes. Because, honestly, when reducing a 4096x4096 to 2048x2048 and sometimes lower, I don't see a difference in a 1080p render. Save your original textures if you like, I never do as I never render over 1080p. If I ever have to, which I doubt, I will just pull the textures out of the library I have stored on an external backup drive. Some may call me crazy but I have two 8TB external drives with my current runtime I synch, swapping out once a month to the other, and two 8TB externals in the closet with just the runtime textures folder on it with the original textures. Given that I have been using DAZ for over 10 years and have a large collection of purchased from multiple sites, including some that no longer exist plus a lot of custom built content making my library over 4TB currently, it is a NECESSITY.

    I use render SubD on figures as low as I can without changing the rendered look. This usually means 2-3 unless using an HD morph.

    I Use Decimator to bring down mesh complexity until JUST above where it's noticeable.

    For background characters I decimate a little more as well as removing all normal maps and bump maps. I also use the same body texture on all of them just with different surface settings to alter skin tones.

    For main characters, I remove normal maps and bump maps IF it's not noticeable, like not doing a close up.

    I hide all body parts under clothes using Charles' statement of turning off Visible in Render. I also remove textures from surfaces that aren't seen. If the legs and feet and toenails are completely hidden by jeans and shoes, I remove all the leg textures on all surface including normals, bump, etc.

    I hide the mouth interiors and depending on whether the character is facing toward or away from the camera I may hide the eyes. (And remove the textures.)

    I remove lashes on background characters and use a texture eyebrow on them instead of a mesh one.

    I use "section plane cameras" I have set up to cut out all geometry outside the camera's field of view while turning clip lights on or off and adjusting the environment intensity depending on what I need for a scene.


    EDIT: I may add more as I remember LOL

    just passing by, can't read taupe on black very well.

  • nicsttnicstt Posts: 11,715

    Use the same skin textures on all characters further from the camera. You can consider very, very slightly adjusting the color amount of the various settings; SSS for example.

    Use the same hair on further ones, and adjust the style and colour.

    This is more effective than reducing texture sizes, although that can help too.

    Render in parts and composite - removing some characters, remember that this will affect shadows and reflections.

  • Catherine3678ab said:

    just passing by, can't read taupe on black very well.

    Didn't notice, sorry I use dark mode due to my aged eyes and I guess copying and pasting from the other thread did that as I see it light grey on black. 

  • ScoopeyScoopey Posts: 190

    With large scenes or even small ones with limited resources (my laptop is getting old and no money to buy a new one), I split the scene.
    In the one attached there are 13 G8 characters altogether. The scene was complete but then I only rendered 3 or 4 characters at a time.

    The lead character at the front is the key and needs to be in more than one scene. Theres a little bit if cheating as you can see the bottom of the legs and thererefore shadows.
    If you have strong shadow say running down the left hand side, then you would render that side in pairs of characters so that when you merge the scene in photoshop the ones casting a shadow on the other characters are the ones placed on the higher layers.
    Its annoying to do a scene with many passes but sometimes its the only way!

     

    ZodiacTeam.jpg
    1280 x 720 - 962K
Sign In or Register to comment.