I know that this issue is a long time concern on various forums, so here is my solution.
Pros : really fast, works with Pflow or any other particle system (TP, krakatoa PRTs), no scripting…
(I first tried replacing particles at render time by scripting, worked, but script loops comes very slow from 50 000 particles, +15min, and no way to multithread maxscripts)
Cons : quite expensive… you’ll need Thinkox’s Frost and R&D Group’s Multiscatter (or VrayScatter) licenses, several steps involved
I don’t have mush time to start expensive explanations, but here is the basic steps (don’t worry, sample scene following…) : 1. Generate your particles using your favorite system, no need to generate or display geometry 2. Mesh them with Thinkbox Frost : 1 paticle = 1 plane, so each plane got his UV (important for the following), keep scale and orientation 3. Now scatter your Vray Proxies using Frost mesh as distribution source,
well configured it will place 1 instance by plane (thanks to UVs) and keep orientation and scaling too 4. For total control of the materials I had to duplicate the setup, I found no way to pass mat ID throught the pipe
(but you can still use MultiScatter functionality for randomization) 4. Hit Render !
And the beauty of the thing is that everything happens on at render time, you can play with viewport/render ratios as usual !
This setup supports :
- Position
- Orientation
- Scale
- Material
- Birth/Death
Here is 1 million (and five) teapots, look at render time :
And the sample scene :
Hope you’ll find it usefull, and post your thoughts and results !
I wonder, does it really take Vray Proxies ? Usually if you use a Vray Proxy like this it will just take the viewport mesh of the proxy.
I see in your screenshot that those teapot are represented as whole mesh. I ´m curious what happens if you take a vray proxy that does not show
all polys in the preview mesh ?
I ´m still skeptical
Try the following. Export a Teapot as Vray Proxy but in the export dialog turn down the “Faces as preview option” to something like 50
so the teapot, when imported does not show all faces (just in case you´re proxy at the moment does show all faces).
Than scatter those teapot again and see if it renders the viewport mesh or really the proxy.
As just said… just give it a try.
Open my scene and see.
This setup is based on MultiScatter, which is actually made to make full use of Vray-Proxies.
Maybe you missed some point, I don’t feed PFlow with proxies, MultiScatter does the job at render time.
Otherwise, I did not manage to render such massive count of particle in just 1min.
I ´m sorry I don´t have the tools to test your scene.
Well I don´t say it´s impossible. I´m just sceptical as it can easily happen that it will just take the viewport mesh.
You´re using the Frost Mesher and with your setup it´s not easily to say that is actually works.
Btw. It´s easy for Vray to render some million instances that are not Vraymeshes within a minute.
so I made a basic setup to show the problematic.
I used a Cloud Particle system in this case. If you look at the first image you´ll see the particle system as well as
two proxies. One with full viewport mesh and the other with a limited amount of polys on export. In the second image you see the rendering
using the first proxy as instance. It looks fine expect the normals (wich are not to recognize in your image). One could think it ´s using
the vray proxy, but it isn´t .. it just uses the viewport mesh as instance. You can clearly see this in the third image where I used
the second teapot as instance.
As I said I don´t say it can´t work. But I made the experience that unless as plugin or tool can explicitly work with Vray Proxies, it usually
will just take the viewport mesh for rendering. Now I don´t know Frost and from your setup it ´s hard judge as Vray with the default
values will export a Teapot as whole mesh.
1. Pflow generates particles positions, orientations, scales, and so on (only particles, no geometry or even proxies)
2. Frost takes those particles and place 1 standard plane mesh per particle, according to it’s various properties.
Resulting in a big mesh where each quad (two tris) represent a particle and has a correct UV for latter proxy distribution
3. Multiscatter now works just as in normal situation, it distributes Vray Proxies on a source mesh, just what it is build for.
In that case on the Frost generated mesh.
The trick is to use UVs generated with Frost to place only one proxy in the center of each quad.
Oh now I get it, sorry To do this you don´t need frost.
You can use a standard Max Mesher object instead and within Multiscatter (well I only have vray scatter but i guess it´s similar)
set the distribution to regular pattern/square and it will place one proxy in the middle of each plane within the mesher object.
You can use a standard Max Mesher object instead
Right, that’s what I tied in the first place, but it crashed every time I tried
I think Frost has way better memory management, it 's activelly developped.
set the distribution to regular pattern/square
That’s what I called “well configured” in my first post.
Actually you’ll have to set the scale mutl to 1 too, tick “affect transform”, “affect scale” and “afect Z scale” with both ratios set to 1.
I know it’s an old post but I downloaded the scene file and I have Frost and I got a temporary license of multiscatter just to try this but my render time is way longer than what jop got in the screenshot. It’s more around 25 minutes. Could it be related to the new version of vray?
VRayInstancer!!! :o I didn’t know about that! thanks Vlado I’ll give it a try. I just ordered Forest Pack Pro… maybe I should have wait… too late! Anyway I’m sure Forest Pack will be useful too one day… I hope…
Ok I just tried to pick a PRT loader as a source for the VRayInstancer but it doesn’t work… So it works only with pflow. I can use a PRT birth but pflow is so slow with millions of particles… My particles are animated (I’m doing a collapsing sand castle) and with pflow (with only a prt birth and prt update) when i change the time slider, I see “pflow Update 0%” at the bottom and it’s taking forever to update for obscure reasons. The PRT loader by itself loads a instantly when changing frame.
That would be awesome if we could pick a PRT loader instead (and read data from magma). I’m talking about that with Bobo about that at the same time on the Thinkbox forum. You should team up one day, aren’t you both from Sofia?
I dream of Bobo and Vlado teaming up to create a new 3D software that would do everything without plugin just like Houdini!
It’s possible of course, so long as there’s an API for us to hook into.
I’m talking about that with Bobo about that at the same time on the Thinkbox forum. You should team up one day, aren’t you both from Sofia?We are both from Bulgaria
I dream of Bobo and Vlado teaming up to create a new 3D software that would do everything without plugin just like Houdini! :)Well, even if we start today, it would take 15 years to get there
Yes John! It seems like the only solution right now for my situation (instancing millions of object on PRT loader. The other solutions are almost there and will probably do the trick in a few months I guess. Or Bobo add the ability for Frost to pass instances to vray or Vlado add the ability to the VRayInstancer to pick PRT. We can maybe use pflow and cache before using VRayInstancer it but it add an extra very long step.
Here is a quote from Bobo: “Also, we exposed a PRT I/O API for anyone who would like to write a V-Ray scatter that uses PRT data as distribution guide, but I don’t think anyone had done that yet. So far only FumeFX 4 has added support for that API, but that is unrelated to your case.”
Just an update to say finally Forest Pack Pro is not a solution either. When I scatter my forestPack instances on Frost, that one has to create 1 plane for each particles and that’s the deal breaker. Frost is then exploding the ram and the render never starts when I have a millions teapots instanced for example.
So multiscatter is not working, forest pack neither.
My only hope is that Frost can pass instances to vray or the vray instancer can pick PRT particles. Then I would be able to import millions of particles grain sims from Houdini and render them with vray inside of max. Until then I guess I have to learn Mantra and make my render in Houdini…