Instancing Overhead
![Szark](https://farnsworth-prod.uc.r.appspot.com/forums/uploads/userpics/427/n4611F79F7F74.png)
Ok I know Instancing supposed to reduce Vram and Normal ram but I never realised how little it did so. I am not sure why in this case it should be so and I have never done any comparisons in the past. Case in point I was setting up a scene for someone today and replicated the scene with everything loaded as a mesh/Prop and then made some instancing of selected scene Props that had been Grouped via a Group Null. Copied the mesh position and paste the instance in place, repeated this until the scene was completed and then deleted the meshes that were not instanced.
Resaved, closed DS, reopened, loaded Mesh based File and rendered
Readings from GPU-Z
No Instances
7647 MB Vram
17009 Normal Ram
Closed DS, reopened, loaded the Instanced Scene and rendered
Instances
7324 MB Vram
14800 Normal Ram
Both times I reset GPU-Z and got it at rest readings, slightly lower for the instanced scene uy about 100 mb
Is this normal or is it purely what has been used, content wise?
Comments
Check the "Instancing Optimization" in Render Settings under Optimization. It can be set to "memory," "speed" or "auto."
I don't know what the "auto" setting does - I think it must be a new 4.11 thing - but I recommend setting it to "memory." The "speed" setting tends to have the opposite effect on my machine.
Thx yeah I have it set to Memory all the time.
What is Iray reporting in the Info window in Daz Studio when you go to render?
Keep in mind that what GPU-z is reporting is for everything the card is doing and if you leave render windows open in DS, DS is holding on to extra ram for that too.
To properly compare, you should set instance opt to Speed and check the over all amount of vram use for Geometry and Textures that is being reported by Iray.
Then set it to memory and start a new render to see what the difference is.
The question(s) yet to be asked....What are you instancing? and How many of a particular mesh are you instancing?
For the most part, the savings, ram wise, with instances happens on the working side not as much on the render side. Although, it can still be pretty significant on the render side as well.
It also is an economy of scale, meaning it gets more useful the more of a single mesh that is replicated as opposed to doing a single instance of multiple meshes.
If you're replicating one G3F 250 times, see attached image, you'll see a much bigger savings than if you replicate 125 g3f's each one time.
You'll still save ram on both sides, but the 250 will be significantly higher on both sides.
The attached image only requires ~2GB of system ram while working and the predominance of that is the base g3f and the set.
rendering it's about 60GB.
In a quick test in 4.11, i just loaded a single base g3f,naked no hair, and even with 250 instances, the system ram never exceeded 500MB of system ram while working.
With 50 full meshes, i came up just over 4.3GB of system ram.
I'm not going to try to render that many as i only have 16GB of system ram in this system.
Thanks Drunk Monkey. I think that explains things well enough for me to get why. Yeah I was instancing multiple Grouped objects as opposed to single meshes.