you could have an object check where it is in space and if out of a certain threshold, poof! ![]()
The problem with this script in PF method is that it makes u create a huge amount of dummy objects (in our case, we need 80000) and this will slowdown performance in max. Basically u need to create the exact number of dummys u will be using to control the vrayproxies.
80000 dummies = 80000 vrayproxies.
Even if u use point dummys, viewports freeze and 3dsmax is likely to crash.
The render goes without a hassle, because vrayproxies don’t take much memory as u know, but moving around the scene is a pain.
Yup - maybe best off making a few different pflow sources so you don’t have the same load all at one stage.
There is a specific max object that takes care of baking the PFlow system (or specific event of) into a mesh.
Under compound objects, pick the Mesher.
Align it with your PFLOW emitter/icon (even if emitting particles from objects: this is important.), then under the mesher properties, pick the pflow icon (for which you have set the display of particles to NONE, to save on resources).
It will create a proper mesh of your PFlow system.
If you set the viewport to bounding box visualisation, you might even save more resources in case the polycount is extremely high.
Then is just a case of exporting the mesher object to a vray mesh.
Of course, make sure you split your pflow system into as many events as you find suitable (say, split the trees generation in four or five events, and mesh each one separately).
With this technique i managed to export to vraymeshes some 200k 3d pebbles, 50k pine needles, and 10k 3d leaves, as static objecs.
The mesher, though, supports animations, as well, or so it seems.
You’d have to write a script to load a different vraymesh per frame on the proxy, though.
re,
Lele
I prepared a set of three tiny scripts that apply particle transforms to vray proxies.
EDIT: they can be found here
The first “Tags” the source proxy (say, the mother tree) with a custom property.
The second, a script operator that goes within the PF tree checks the scene for two things:
A) if a vrayproxy object with a custom tag is present
B) if there are enough instances of that object to use one per emitted particle (it dumbly checks for the default birth operator name: $Birth01, or whatever the name is, for the moment. so go in and change it if you need something else)
In case A is false (no vray proxy in the scene with a custom tag) it creates a proxy and pops a file requester dialog to choose the associated vray mesh.
In case B is false, it will take whatever the result of A (either a tagged proxy made by hand, or a custom, new proxy) and instances it as many times as there are particles (total number of emitted, not particles present at the current frame)
The thrid script goes in the PF per-step update
This is the one responsible for the transfer of the transform matrix from the particles to the vray proxies.
I couldn’t check moblur, as i am stuck with 1.47.03, but given the premises (TM updated at each RENDER integration step), it should work nicely.
Bear in mind that at the moment proxies will NOT change their mesh on a per frame/per interation step basis.
It will still plant all the trees you want…
Have fun,
Lele
Thanks for your tips and your scripts, Lele! ![]()
your a legend lele!
How many legends around, jacksc! :lol:
lmao, too kind chris! ![]()
Legendary neer-do-well, that i am ![]()
I’m going to try the script myself soon btw, i wonder how it will cope with a few hundred thousand blades of grass…
Lele