View Full Version : PFlow - using multiple vray proxies
07-25-2011, 09:41 PM
I know there are plenty of ways to bake out your pflow to helpers/lights/vray proxies but all of the methods I've found seem to only deal with instancing 1 object across all particles. I'm looking for a way of taking a group of vray proxies and attaching them to particles (keeping the particles transform/scale/rotation data). I guess I'm after exactly the same behaviour as you get with the shape instance "group members" with "Multi-Shape random order" enabled.
I've thought about side-stepping the issue by using multiple pflows but this might cause me headaches in the long run since I'm using keep apart operators and some other stuff which might not work across multiple flows.
If I was getting really picky I'd want to control how many of each vray proxy object was used like a instance bias or something....but anyway, that's a wish list item.
Can anyone help or point me in the right direction?
07-25-2011, 10:19 PM
07-25-2011, 10:30 PM
How did I miss that one?!
Looks like I could get that to work the way I need.
07-26-2011, 04:55 PM
Ok so I got Bobos script generally working but I can't figure out how to make it do what I need. I'm a scripting noob so I don't know where to start with it.
I've attached an example scene showing what I currently have (using objects instead of vray proxies).
What I need to happen is for the attached objects to be retained through events. At the moment they only get attached to particles in the event the script is in and get left behind as the particles move to the next event. I can put the script into all events I need objects in to get this partly working but the objects randomise which particles they are paired with each new event which is not what I want.
Also, only the amount of objects I have in my initial group is used when attached to particles. I want to generate as many instances of these objects/proxies as I have particles on the fly. I will be using 50,000 particles in my final flow so this could be cumbersome otherwise.
07-26-2011, 05:37 PM
You could try dropping it in the global node and use particleID instead of index.
Be aware when you use find target by time you can get some jumping as pflow will force the particle to be at the target by the specified time. So if the part is still a ways away from the target when it only has 1 frame to reach its destination it will be forced into place.
So the way to solve this issue is to use the vector channel with your find target. This way Find Target know where the particle needs to be at the end of the given time.
Create a Geosphere and match it to the Find Target helper. Switch the Find Target Point to "By Script Vector"
In event001 move the current Position Obj. out into the field to create a new event, move the collision into this new event00x too.
Now in event001 add a new Position Obj, a Script Op, and a Send Out test.
Position Obj will now be Geosphere001
In the Script op you need to grab the current position and write it to the pCont.particleVector channel.
Wire the Send Out to the new event00x
So you have born particles on the target, grabbed there positions, sent them out, now they are position on the start object (the teapot)
07-27-2011, 10:37 AM
I've tried what you suggested and putting the attach objs script into the global event helps a lot. I also tried storing particleVector / finding target by script vectors which was semi-successful.
Since I will never actually be controlling find targets by time (I just used that in the example) but will be controlling find targets by speed the particles shouldn't be forced to pop into place if they don't hit their positions in time.
Anyway, I still have some problems. The objects generally do attach to particles but still get left behind at some points - see the example max file I've attached. I'm not sure why this is happening. I would have thought that with only 3 objects/particles it would be fairly robust. What's it going to be like with 25000 objects!?
Also I still haven't figured out a way of matching the amount of objects attached to the number of particles used. At the moment if I increase the particle count there will only ever be 3 objs attached because that's the amount I created - I need a way to instance these based on the amount of particles.
Maybe I'm going about this all wrong... I need to use high poly object instances (hence wanting to use vray proxies) because we do fly in amongst the particle cloud (as they are finding various targets) and I was struggling to render more than 10k of these using standard shape instances in pflow. Is there a way of using dynamic LOD for object instances?
07-27-2011, 04:40 PM
Ya know, I remember Anselm made a tutorial similar to what you are looking to do. Or at least vray proxies and pflow distribution.
In theory, I say this because I haven't tried it yet, you could group a bunch of vray proxies and use a shape instance by object to pick the different objects. As long as you don't need specific objects tied to specific particles this should work.
07-28-2011, 09:43 AM
Yeah, I've seen that tutorial and the method works fine when you need to use PFlow to scatter objects which will never move but it doesn't work for moving objects.
As far as using shape instance to pick proxies from a group, this won't work (I wish it was that simple!). PFlow meshes down prior to render and so when using vray proxies all you get in the render is the viewport proxy representation as rendered mesh.
I reckon Bobos method would work but I ain't smart enough with the maxscripting to figure it out for my needs.
07-28-2011, 04:22 PM
I will have to run some tests when I get home, I haven't got my dongle err... my vray dongle with me.
I have a couple ideas but I am not sure how it will handle Vray Proxies either. I just started the day so it will be a bit but I will get back to you as this could be interesting.
07-30-2011, 04:59 PM
07-31-2011, 02:42 PM
don't worry about it.
It does seem strange that this is not something other people have done plenty of times before. I wouldn't have thought my need to render 30000 various high resolution models as particles is unique.
Anyway, for the time being I'm using lower resolution objects and for the most part these are ok when liberal amounts of motion blur and depth of field are applied! I might end up using these and just throwing a few high resolution hero models in front of the camera to misdirect the users attention for the final piece unless I can get proxies rendering with some degree of reliability.
08-01-2011, 03:43 PM
I am surprised to to be honest. I have not needed to use vray proxies in this way, it is why I was interested in it.
I had even built a param wired object that get/set the position of the proxy and brought it into a box#3 data op but the damn thing... the spinners fields and object updated with the current data when I moved it by hand but the object failed to move when I linked it to a specific particle, silly crap is ridiculous.
SOoo, I have finalRender too (it is what I prefer to use) and the fr-proxy to TP connection seems to be currently broken for some reason. Leaving a bit pissed and redfaced.
Then I tested Frost using custom geometry... pretty much same issue as pflow it looks for a trimesh.
Well see if something jumps out at me, I'll give it another go.
08-07-2011, 11:20 AM
I've done this previously in a couple of different ways using pflow as a distribution method. Normally what I'd do is bake out all of the particles to nulls with their animation, then use a second script to take a mesh (or a random mesh from a chosen selection) and parent it on to the baked pflow movement null. Are you looking to create animated proxy objects effectively?
08-22-2011, 04:05 PM
^Hey, that's good :)
08-22-2011, 04:05 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.