Does turning a G8 model into an instance save memory?

So, I want to have about 20 characters. That right there is already alot. So I was thinking if I turned the G8 models into an instance it should save memory right? If not, or it does, is there any other way to save memory other than just downscaling skin and hair textures? 

Comments

  • An instance will use less memory than a second copy of the figure, both in working and rendering. However, do bear in mind that - aside from loccations and overallll scale - the isntance will be identical to the original in every way. If you want to reduce the working memory for having several different versions of the figure then instances won't help, you could convert them to props though which reduces resource use by getting rid of the modifiers - Edit>Figure>Rigging>Convert Figure to Prop.

  • Hiding the body parts hidden by clothing helps reduce space. Never tried instancing, but if it works they would all be the same character. You'd probably be best off combining different renders into a final image in post.

  • DafaDafa Posts: 97

    Hiding the body parts hidden by clothing helps reduce space. Never tried instancing, but if it works they would all be the same character. You'd probably be best off combining different renders into a final image in post.

    How would you delete body parts?

  • marblemarble Posts: 7,449

    Hiding the body parts hidden by clothing helps reduce space. Never tried instancing, but if it works they would all be the same character. You'd probably be best off combining different renders into a final image in post.

    Hiding? I always thought that hiding only prevents render but does not remove anything from VRAM. I think I have asked this before but my memory is poor. 

  • chris-2599934chris-2599934 Posts: 1,765
    edited July 2020
    Dafa said:

    So, I want to have about 20 characters. That right there is already alot. So I was thinking if I turned the G8 models into an instance it should save memory right? If not, or it does, is there any other way to save memory other than just downscaling skin and hair textures? 

    That's not quite how it works.

    You want a crowd of 20 characters, but that's more than your machine can handle. So you create 5 characters, and three instances of each character. The instances will have the same pose and materials as the figure they are based on, but can be positioned, rotated and scaled as you wish. It'll definitely save memory - provided you set Instancing Optimization to "Memory" in your render settings. You'll have to play with the ratio of real characters to instances to get the right balance between the resource consumed and how noticable the duplication is.

    Here is an example. There are just 12 figures in this crowd, but each of them is instanced multiple times.

    Other things you can do - as brimstoneomega says, you can switch off the visibility (not delete) of body parts that are hidden anyway - feet inside shoes, legs inside pants, etc. Just go to the figure in the scene tab and click the eye next to each unwanted bone (if you ctrl-click it'll make all the child bones invisible too).

    I also highly recommend Mattymanx's Resource Saver Shaders Collection for Iray. Even if you don't buy it, go and read through the information in the preview images - there's a ton of information there.

    For my villagers above, I retained the original image maps for their faces and eyes, but whatever other skin is visible is just a plain resource saver shader with the color adjusted to match. There are no image maps used in any of their clothes - just solid colors. It still wasn't a quick image to render, but without instancing and the other dodges it'd be impossible.

    village.jpg
    800 x 1200 - 138K
    Post edited by chris-2599934 on
  • DafaDafa Posts: 97
    marble said:

    Hiding the body parts hidden by clothing helps reduce space. Never tried instancing, but if it works they would all be the same character. You'd probably be best off combining different renders into a final image in post.

    Hiding? I always thought that hiding only prevents render but does not remove anything from VRAM. I think I have asked this before but my memory is poor. 

    I don't think to turn off visibility of objects lowers memory; the objects are still considered while rendering (which sucks because it's "invisible"). 

     

    Dafa said:

    So, I want to have about 20 characters. That right there is already alot. So I was thinking if I turned the G8 models into an instance it should save memory right? If not, or it does, is there any other way to save memory other than just downscaling skin and hair textures? 

    That's not quite how it works.

    You want a crowd of 20 characters, but that's more than your machine can handle. So you create 5 characters, and three instances of each character. The instances will have the same pose and materials as the figure they are based on, but can be positioned, rotated and scaled as you wish. It'll definitely save memory - provided you set Instancing Optimization to "Memory" in your render settings. You'll have to play with the ratio of real characters to instances to get the right balance between the resource consumed and how noticable the duplication is.

    Here is an example. There are just 12 figures in this crowd, but each of them is instanced multiple times.

    Other things you can do - as brimstoneomega says, you can switch off the visibility (not delete) of body parts that are hidden anyway - feet inside shoes, legs inside pants, etc. Just go to the figure in the scene tab and click the eye next to each unwanted bone (if you ctrl-click it'll make all the child bones invisible too).

    I also highly recommend Mattymanx's Resource Saver Shaders Collection for Iray. Even if you don't buy it, go and read through the information in the preview images - there's a ton of information there.

    For my villagers above, I retained the original image maps for their faces and eyes, but whatever other skin is visible is just a plain resource saver shader with the color adjusted to match. There are no image maps used in any of their clothes - just solid colors. It still wasn't a quick image to render, but without instancing and the other dodges it'd be impossible.

    Great info, thanks! I will check out Mattyman's Resource Saver once I get a chance.

  • MoreTNMoreTN Posts: 219

    Would converting characters to Billboards work? Or just buying one of Riversoft's billboard sets?

  • Dafa said:
    marble said:

    Hiding the body parts hidden by clothing helps reduce space. Never tried instancing, but if it works they would all be the same character. You'd probably be best off combining different renders into a final image in post.

    Hiding? I always thought that hiding only prevents render but does not remove anything from VRAM. I think I have asked this before but my memory is poor. 

    I don't think to turn off visibility of objects lowers memory; the objects are still considered while rendering (which sucks because it's "invisible"). 

    Hidden mesh (through none properties) is not sent, invisible mesh (through surface settings) is.

    Dafa said:
    Dafa said:

    So, I want to have about 20 characters. That right there is already alot. So I was thinking if I turned the G8 models into an instance it should save memory right? If not, or it does, is there any other way to save memory other than just downscaling skin and hair textures? 

    That's not quite how it works.

    You want a crowd of 20 characters, but that's more than your machine can handle. So you create 5 characters, and three instances of each character. The instances will have the same pose and materials as the figure they are based on, but can be positioned, rotated and scaled as you wish. It'll definitely save memory - provided you set Instancing Optimization to "Memory" in your render settings. You'll have to play with the ratio of real characters to instances to get the right balance between the resource consumed and how noticable the duplication is.

    Here is an example. There are just 12 figures in this crowd, but each of them is instanced multiple times.

    Other things you can do - as brimstoneomega says, you can switch off the visibility (not delete) of body parts that are hidden anyway - feet inside shoes, legs inside pants, etc. Just go to the figure in the scene tab and click the eye next to each unwanted bone (if you ctrl-click it'll make all the child bones invisible too).

    I also highly recommend Mattymanx's Resource Saver Shaders Collection for Iray. Even if you don't buy it, go and read through the information in the preview images - there's a ton of information there.

    For my villagers above, I retained the original image maps for their faces and eyes, but whatever other skin is visible is just a plain resource saver shader with the color adjusted to match. There are no image maps used in any of their clothes - just solid colors. It still wasn't a quick image to render, but without instancing and the other dodges it'd be impossible.

    Great info, thanks! I will check out Mattyman's Resource Saver once I get a chance.

     

  • 5200north5200north Posts: 249

    chris-2599934 said:

    So, I want to have about 20 characters. That right there is already alot. So I was thinking if I turned the G8 models into an instance it should save memory right? If not, or it does, is there any other way to save memory other than just downscaling skin and hair textures? 

    That's not quite how it works.

    You want a crowd of 20 characters, but that's more than your machine can handle. So you create 5 characters, and three instances of each character. The instances will have the same pose and materials as the figure they are based on, but can be positioned, rotated and scaled as you wish. It'll definitely save memory - provided you set Instancing Optimization to "Memory" in your render settings. You'll have to play with the ratio of real characters to instances to get the right balance between the resource consumed and how noticable the duplication is.

    Here is an example. There are just 12 figures in this crowd, but each of them is instanced multiple times.

    Other things you can do - as brimstoneomega says, you can switch off the visibility (not delete) of body parts that are hidden anyway - feet inside shoes, legs inside pants, etc. Just go to the figure in the scene tab and click the eye next to each unwanted bone (if you ctrl-click it'll make all the child bones invisible too).

    I also highly recommend Mattymanx's Resource Saver Shaders Collection for Iray. Even if you don't buy it, go and read through the information in the preview images - there's a ton of information there.

    For my villagers above, I retained the original image maps for their faces and eyes, but whatever other skin is visible is just a plain resource saver shader with the color adjusted to match. There are no image maps used in any of their clothes - just solid colors. It still wasn't a quick image to render, but without instancing and the other dodges it'd be impossible.

     

    I know i'm late to this discussion, but that crowd scene is amazing. the amout of characters you have in there blows my mind.  

  • richardandtracyrichardandtracy Posts: 4,981
    edited June 2021

    I did a freebie set of poses and to show them all, I loaded in 7 copies of G8F and posed them with each freebie poses. Using the same clothes, same hair, same clothing textures and same skin textures meant that this could be rendered in my 6Gb GPU, where normally I'd expect the limit to be 2-3 + simple background. 

    So, if it's possible, use a limited set of textures for the models and you should be able to get more in shot than expected without instancing the figure.

    Regards,

    Richard.

     

    Sprint_Start_Prep_Thumb.jpg
    300 x 350 - 38K
    Post edited by richardandtracy on
  • chris-2599934chris-2599934 Posts: 1,765

    richardandtracy said:

    I did a freebie set of poses and to show them all, I loaded in 7 copies of G8F and posed them with each freebie poses. Using the same clothes, same hair, same clothing textures and same skin textures meant that this could be rendered in my 6Gb GPU, where normally I'd expect the limit to be 2-3 + simple background. 

     

    I've read conflicting reports as to whether or not this helps, but if it worked for you that's a useful data point.

    I tend to re-use textures in crowd scenes, just for convenience if nothing else. Every one of the villagers in my crowd uses the same textures (well, the men use one, the women another). I just use the images for the various face textures, the rest of the body is just plain solid colour - getting them to match well is fiddly, which is one reason why I only do it once!

    Using the same skin for everyone doesn't mean they have to look identical - use different shape morphs and different hairstyles for your base figures and they'll look different enough. If you like, you can go the extra mile by varying the y scale of your instances by +/- 10% to give them some added variation in height.

     

Sign In or Register to comment.