Hi,
We contacted with ChaosGroup regarding this issue. There are very technical details involved, but i will try to explain it:
The problem is the number of intersectable primitives generated in the scene. These primitives take memory and may slow the rendering process.
Basically the number of prmitives created in a scene is: number of instances * number of voxels of the geometry.
A voxel is a subdivision of the geometry, created to optimize the raytracing process.
When using meshes in Forest, it creates a single voxel per instance. Instead, for proxies the number of voxels is defined in the .vrmesh file, and cannot be changed.
In this scene, each proxy has 182 voxels. With about 360k items in the scene, that generates a lot of intersectable primitives, which causes the memory peaks.
As said in our previous posts, we suggest to use meshes with Forest. But if you want to use proxies, the workaround is to reduce the number of voxels in the proxy file.
It can be done using the following command:
ply2vrmesh.exe <source proxy> <target proxy> -mergeVoxels -facesPerVoxel 300000
You can find the ply2vrmesh.exe tool at C:\Program Files\Chaos Group\V-Ray\3ds Max 20NN\bin.
Doing that, the number of voxels in the .vrmesh is reduced from 182 voxels down to 14.
You should adjust the latest parameter (facesPerVoxel), depending of the number of faces in the geometry.
I did some tests:
- Forest using original proxy: 45 Gbytes RAM.
- ChaosScatter using original proxy: 45 Gbytes.
- Forest using reduced proxy: 7 Gbytes.
I've not tried ChaosScatter with the reduced proxy, but i guess the result will be similar to Forest.
Please note i don't know what is the method of V-Ray to define the number of voxels when creating a proxy, and what is the best workflow to optimize that.
Same for technical details regarding the rendering process. You should ask directly to ChaosGroup to get more information.
I hope that helps.
Update: this issue is solved checking 'Optimize for instancing', when you generate the proxy, as shown in the attached image.
If your proxies were not generated using this option, the only way is to reduce the number of voxels, using 'ply2vrmesh' as described above.