Trying to maximise number of figures in a Scene
richardandtracy
Posts: 7,114
I wonder if anyone might be able to help me with some advice.
I'm planning to do a banquet scene with up to 43 figures in the scene and I'd rather like to render it in my 12Gb RTX3060 GPU in one go.
Using one figure and doing 42 instances of that figure is one, not too good, way of doing it. Instead, I am planning on using G8F and G8M roughly 1:1 ratio at base resolution as these figures have the smallest number of facets (about 17,000). The biggest texture I'm using is 512x512px, with any parts of the body hidden by clothes being untextured, and I think I may remove eye textures as not needed. Where possible all the men are going to share the same textures, with different base colours and the women will use the same textures except makeup. The clothes are mostly G1 or G2 fitted by Autofit with either no texture or a texture of 256px square as they seem to have the fewest facets. With 2 characters, the rendering VRAM increases by 0.2Gb (100Mb/character), indicating I might be able to get up to 45 people with this level of optimisation into the GPU, BUT..
The hair is my problem. I have mostly G8F hair, all of which seem to have many more facets than the base figure. Some have as low as 24,000 facets, others up to 1.1 million, averaging 160-200k facets. And some (presumably SBH) have 0, but up to 4 million vertices.
Can I ask, do the SBH hairs occupy more VRAM than polygonal hair, or do the extra vertices counteract the saving in facets?
I wish I could instance the hair, but it won't work. I'm trying to avoid doing multiple renders and stitching in post, as the scene is relatively low light and long shadows will play an important part in the render.
Any ideas will be appreciated as to low polygon hairs & optimisation methods I've not mentioned. I could instance a number of male guests & put them further down the table on the other side. That would save VRAM. Probably. That sort of idea is welcome.
Regards,
Richard

Comments
Strand-based/dForce hair with 0 divisions and the Iray UberHair shader should be fairly efficient on memory. You can also reduce the number of hairs and increase their thickness for more distant figures.
I'll give it a try, thanks Richard.
Three and half years ago I did a 26 clothed characters Scene, in order to test my gear. (96 Gb RAM and 3090 24 Gb VRAM).
I used Scene Optimizer to reduce the texture maps size.
I didn't hide or delete any polygon
Rendered the image as big as possible in 16 x 9 format (10000 x 5625 pixels ).I remember more than 12 hours rendering.
My advice is to upgrade to a bigger Graphic Card and add RAM to your machine.
Slowing down your CPU's clock speed while rendering will save electricity, money and noise without (or so less) affect rendering time.
Wish you a nice day and good luck!
Rosseliani
https://www.daz3d.com/gallery/user/5207251866353664#gallery=newest&page=1&image=1219583
Dress and pose your figures at the table where you want them to sit. Hide everything in the scene except the figure. Add a camera pointing at the figure, set it for a square format and render it as a .png without a background, save it and use it on a plane as a Billboard. It will take time doing them all but if you can you might only have to do the ones farthest from the camera you are using for the scene. I have done this in scenes before although only with one or two of the farthest figures in the scene.
Interesting ideas, thanks. My PC has 64Gb RAM, which should be adequate if I get everything in the GPU. I'm not getting a bigger/faster PC. This is more powerful than any 2 CAD workstations put together where I work, and we do serious 3d modelling day in and day out. Interesting idea about billboards. Will try that if the optimization doesn't work. Many thanks for the input. Regards, Richard
May i ask why you must render it in one go? Given that you work in a 3D computing environment I'm intrigued. At face value it seems no different than challenging yourself to do 1000 push ups in one go i.e you will gain personal development in optimisation techniques, but in terms of actual practicality its just not how these things are done in a professional workflow, which I am certain you are well aware - so as I say, I'm intrigued as to why you even want to do this mammoth task, Im 100% not being facetious, I really want to kinow... ...I think our collective skillset is generated and pushed forward, amongst other things, by said interest in other people's challenges, so please enlighten me?
Why render in one go..? Good question. There are a few things that go towards my attempt to do this:
Regards,
Richard
making them all props uses a lot less RAM
do fitted, dforced clothing first
delete any polygons hidden under clothing, I have a set of prop people I reuse
on hair, try moulded hair
for example
https://www.daz3d.com/Effigy-Hair-Models-for-Genesis-81-Females
https://www.daz3d.com/effigy-hair-models-for-genesis-81-male
that is hair that is a single mesh shaped anound the head with normal mapping for strands
or the character's head moulded into hair and a texture added using LIE
you don't need strands or transmapped strips from a distance
I hadn't thought about deleting polys under clothing & making the people into props - thanks for the suggestion . It's something I will keep as a reserve if this doesn't work. I have 64Gb in the machine, I think the 12Gb VRAM will be the limiting factor. But, I can easily be wrong.
Regards,
Richard
Thanks. I will have a look. I'd not really thought of Lo-Pi. Are they OK at a range of 300-400cm (10-12ft)?
Regards,
Richard.
Hmm. Not sure about moulded hair. However, you have triggered an idea, where I write a little decimator type routine where it goes through a few passes and sees if the deviation from previous profile is less than a user decided amount and merges adjacent facets if yes. It's something I've thought about intermittently for a while. May be worth doing now.
Regards
Richard
well that's just some in the shop, I make my own moulded hair by adding a 3D skin in Zbrush and Zprojecting onto a subdivided version of it to add displacement I can make into a normal map
done this for some DAZ strandbased hairs to use in Filament
I was actially being dubious about moulded hair in general rather than the way of generation (which I can't actually replicate without being competent with a good modeller) - I was thinking of the type of hair found in Poser 3/4 and the 'Barbie Princess & the Pauper' animated movie (sorry to inflict that on you, it was my youngest daughter's favourite filem when 5 & 6yo, but it stuck in my mind that the hair could easily have been from Poser/DS). I think that is what made me a bit nervous about it, there's a danger it looks toon-ish and could easily look over hair lacquered.
Regards,
Richard
richardandtracy
with the Efigy hair, I don't use the shiny stone shader, just something more hairlike
probably best to re-UV map it so a hair shader goes in the correct directions but not really bothered for distant figures, just looks like pinned up plaited/braided hair to me
I actually got them for Filament
cannot find a render right now and computer is busy doing something
those lowpoly figures don't have any more realistic hairs by looks
https://www.daz3d.com/lm-lowpi-lowpoly-figure
but yeah, if you dislike the Princess and the Pauper look, you probably wouldn't like these hairs either
Thanks for looking at the idea. I think I'll try my decimator type program - won't be quick to do, but will have a bash with it and maybe try things after that. I have more time than money at the moment. And not that much time, but that's by-the-by.
Regards,
Richard
When I do a crowd scene I use regular Genesis figures (G2M and G3F in the example below). The only image maps I keep are the ones for the face (minus bump and normal maps), for the rest of the body I use solid colours which match the face's skin tone. Things like gloves and stockings, if you need them, can be done by just colouring the hands and legs. I use just one skin for all the men and one for all the women. For hair, where I can, I use older Genesis 1 & 2 styles which are often lower in polys, I use the Resource Saver Shaders for Iray to recolour the hair. Clothes are coloured with solid colours instead of image maps - essentially I try to use as few images as possible, because (in my experience) too many images will kill your scene far quicker than polys will. I hide parts of the body that are inside clothes, but I'm not sure how much difference that makes.
The most important technique is instancing. You say "using one figure and doing 42 instances of that figure is one, not too good, way of doing it," and that's true - it would look terrible. But it really be so bad to use 21 figures and instance each of them once? You'd halve the number of polys at a stroke. The watching crowd in the above scene is made of just six men and six women, instanced up into a crowd of 100 or so. The repitition is noticable when you look for it, but I still think it's pretty good.
Here's another example from my depth canvas tutorial. The people watching the show are each instanced one or two times, it's dark, they're far away, you don't see it. I've also instanced anything else that I can - for example, there's only one table & table lamp in the scene, the rest are all instances.
Their faces are not very good, but there are a lot of examples that you can look at in the LowPi forum thread to judge their suitability.
Thanks @chris-2599934. The first image really shows the possibilities. I was looking at instancing the people, and having 21 different ones could well be fine, especially if I can have no repeats in shot. Most of the women's clothes will be largely untextured, being shiny silk/lurex type stuff. Going for a single, or two, female skin textures should work. The men, will be easier as they need to be wearing tuxedos, so will be pretty uniform anyway. The second image is close in general to the idea I'm aiming for - except a long banquet table with 21 people down each side and one at the head. The light level is actually higher in my current trial renders of the room, trying to avoid fireflys due to low light levels.
@barbult, I've looked at the LoPi people promos and compared the range. I don't think they'll be up to it, the light level is high enough to see the issues at the ranges they'll be seen at. Shame really.
Regards,
Richard
I've done the all props thing. It's rather effective if you know you won't need to modify their poses. I even added the "Covert figure to prop" action to my scripts menu for faster acces.
Yes, all Iray gets is the final shape - it wouldn't know what to do with rigging or morphing data. That is part of why working memory taken by a scene does not correlate with the memory needed to render.