[TP] Make fill volume particles to stick to animated object

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 10 October 2012   #1
[TP] Make fill volume particles to stick to animated object

Hi,

Does any of you guys, have any idea how to make volume particles to stick to their original position when they got born and set initial position with Volume Position helper?

To clarify:
1. There is an animated object which I fill with particles by setting their position using Volume Position helper.
2.If I set the position when particles get born, the particles don't follow the object. On the other hand if I set the position every frame, the position changes in random fashion. I want them to travel with the object in the relative the same position like the object travels.

I did solve the issue by using just vector math based on 26 nodes, as I couldn't figure out faster way like Node Matrix->Particle Matrix connection, but I can't believe there is no easier way. TP (and Max) is not my main tool, so could anyone please shed some light on the topic? Does it really have to be solved by hand? I can't believe I can't just get Volume Position not to random seed every frame and evaluate before object transformations and inherit it afterwards.
__________________
Beauty Pass - 3D apps vendors' jest of a lifetime - most of the time it has nothing to do with beauty, and it isn't a pass anyway.

Last edited by benio33 : 10 October 2012 at 07:36 AM.
 
Old 10 October 2012   #2
Originally Posted by benio33: Hi,

Does any of you guys, have any idea how to make volume particles to stick to their original position when they got born and set initial position with Volume Position helper?

To clarify:
1. There is an animated object which I fill with particles by setting their position using Volume Position helper.
2.If I set the position when particles get born, the particles don't follow the object. On the other hand if I set the position every frame, the position changes in random fashion. I want them to travel with the object in the relative the same position like the object travels.

I did solve the issue by using jest vector math based on 26 nodes, as I couldn't figure out faster way like Node Matrix->Particle Matrix connection, but I can't believe there is no easier way. TP (and Max) is not my main tool, so could anyone please shed some light on the topic? Does it really have to be solved by hand? I can't believe I can't just get Volume Position not to random seed every frame and evaluate after object transformations.


Hi.
If you're talking about animated object (flying spinning cube) then just use PAttach to attach particles to animated particle.

If you're talking about deforming object (ie walking human) then i'd fill it with particles, export as objects, skin wrap them to deforming object, bring them back to tp via O2P node for example.
 
Old 10 October 2012   #3
Hey 3ak, could you elaborate on the spinning cube method using PAttach dynamic operator? I just can't se to which particles should I attach my particles? The aprticles inside the object are the ones I can't get to move with my object, so they will be useless as the guides :(

ps. I can't use backed particles and skin them as they should die meantime killed by interacting objects, so it won't solve my problem :(
__________________
Beauty Pass - 3D apps vendors' jest of a lifetime - most of the time it has nothing to do with beauty, and it isn't a pass anyway.
 
Old 10 October 2012   #4
Originally Posted by benio33: Hey 3ak, could you elaborate on the spinning cube method using PAttach dynamic operator? I just can't se to which particles should I attach my particles? The aprticles inside the object are the ones I can't get to move with my object, so they will be useless as the guides :(

ps. I can't use backed particles and skin them as they should die meantime killed by interacting objects, so it won't solve my problem :(


Here is example scene with attached particles to animated (not deforming!) object:
https://dl.dropbox.com/u/46208032/3...8max2010%29.max

As for backed particles. If you need your particles just to follow object and just die if they are interacting with some other particles/ objects/ conditions, then you actually CAN skin wrap them :
Let's say you have amodel of walking human. And you need to populate its volume with particles, force them to be inside deforming model and kill any particle as soon it intersects with some other mesh.
To do it you populate heman model with particles, bake them, skin wrap and animate. Import them back in tp as particles via O2P for example (with object to particle mode on - it will transfer animation from object to particle).
Then check for intersections and just kill or change group if needed.
 
Old 10 October 2012   #5
Ohhhhh! Damn! Sooo simple! Totally forgot about converting object to particle and use the particle object as the guide!!! I kept using Node helper for it and had to convert alignment matrix to vector math and it took me 26 nodes for such simple task as PAttach did with one connection. You're awesome! Thanks a lot Even though it doesn't work for deforming object good to know it is not that complicated to do as I did with equations

Thank you once again - exactly what I needed - works like charm!
__________________
Beauty Pass - 3D apps vendors' jest of a lifetime - most of the time it has nothing to do with beauty, and it isn't a pass anyway.
 
Old 10 October 2012   #6
You're welcome.
 
Old 12 December 2012   #7
Originally Posted by 3ak: Here is example scene with attached particles to animated (not deforming!) object:
https://dl.dropbox.com/u/46208032/3...8max2010%29.max

As for backed particles. If you need your particles just to follow object and just die if they are interacting with some other particles/ objects/ conditions, then you actually CAN skin wrap them :
Let's say you have amodel of walking human. And you need to populate its volume with particles, force them to be inside deforming model and kill any particle as soon it intersects with some other mesh.
To do it you populate heman model with particles, bake them, skin wrap and animate. Import them back in tp as particles via O2P for example (with object to particle mode on - it will transfer animation from object to particle).
Then check for intersections and just kill or change group if needed.


Hey, 3ak, I could now use your tip on skinwrapping the baked particles, if you could help me on that one. I was about to pm you, but someone else could benefit on that too, so I'll ask here. I did cache the TP particles, and try to skinwrap them, but the transformations are not inherited. Could you show me how you set up scene that it works for you? Simple situaltion - a bunch of particles, lets say filling up a sphere, cache the particles, then skinwrap them to the same sphere and deform the sphere (scale up for example). Doesn't work in my case :(

edit1: The problem appears when importing back the skinned objects to TP system. When changing objects position using skin wrap modifier its pivot point doesn't transform with the mesh. The thing is O2P operator works on th pivot point, therefore from the TP point of view the objects stay in place :(( ... I guess skin wrapping particles wont work here :(

I could export particles to Maya and do the skinning there (works no problem on particles), but I really hope I could do it all in Max.
__________________
Beauty Pass - 3D apps vendors' jest of a lifetime - most of the time it has nothing to do with beauty, and it isn't a pass anyway.

Last edited by benio33 : 12 December 2012 at 11:22 AM.
 
Old 12 December 2012   #8
Hi.
I didn't talk about using cached particles in skin wrap - i think it's impossible cause for 3ds max tp particles don't have shape (mesh object) and they are not objects. So you have to export them as objects (don't forget to assign some shape - StdShape node) using Export or ParticleToObj node. Then having this bunch of objects you skinwrap them to control object, modify, animate, whatever..and import them through Obj2Particle back to tp.

If you have Krakatoa then you can use nice Krakatoa SkinWrap (way better then standard skinwrap IMO) - fill animated/deforming object with particles in tp, export them as PRT, load through PRT Loader, skinWrap, deform and load back in tp - tp5 has even importPrt node.

And even more!)
I didn't test it a lot but it seems to work and you can try:
Fill object with particles (grp1), make sure they don't have any velocity or forces applied, assign simple shapes, turn on "Groups as objects" - this way 3ds max will see group of particles as one object with mesh (name it grp1Obj). Apply skinwrap mod (krakatoa version is better), choose control object, deform.
Shapes of particles of grp1 will be deformed while particles are on there initial positions.
Then we create exact same amount of particles as in grp1 and place them in grp2. Place them at the same positions as grp1 in initial frame.
Then you need something on grp1Obj to stick your grp2 particles to inherit animation.
Try using vertices - at particle born find closest vertex of grp1Obj for every particle in grp, store it in Memory node and then every frame its position and apply it to corresponding particle.
It will shift your particle to closest vertex. You can almost avoid it using very small shapes for grp1 or calculate average position of several vertices - let's say you assigned triangles as shape to grp1. Then loop through vertices of grp1Obj object, calculate average pos for every 3 vertices and apply to particle from grp2.

This way you don't even need to cache or export your particles.

EDIT:
Here is the example on latter case - you should have krakatoa and tp5 to open it.
https://dl.dropbox.com/u/46208032/3...kinWrap_tp5.max

Last edited by 3ak : 12 December 2012 at 12:35 PM.
 
Old 12 December 2012   #9
Hey 3ak, I did write "cached particles", and I did cache them, but I also exported them to meshes just like you said. What I did is - I exported the particles just as you said as a bunch of objects with standard shape (sphere), then skin warped them, and everything looked promissing because the spheres were skinned properly, but when putting them back to TP this is where the problem appeared. The objects pivot stayed still in one spot, and only the mesh got deformed. O2P operator uses the pivot point for Obj2Particle conversion and THIS is the part that didn't work for me.

The file you attached doesn't work for me as I'm missing 3 nodes - Object, GeomParticle, and GeomVertex. I believe these are TP5 nodes, and only TP4 on board here :( I will try to recreate what you said now. Nevertheless, this kinda sucks I can't use stardard mesh modifiers directly on particles - these are just points in space just like mesh vertexes for God's sake - should work seemlessly.
__________________
Beauty Pass - 3D apps vendors' jest of a lifetime - most of the time it has nothing to do with beauty, and it isn't a pass anyway.
 
Old 12 December 2012   #10
Ok. here is workaround:
fill the volume, bake particles (i used triangles as shapes). deform with skinwrap.
Import back as particles - they will have animated shape in local space with untouched pivot (as you said). Create for one more particle for every imported one and set its pos querying 0th face pos via Surface position node.
https://dl.dropbox.com/u/46208032/3..._workaround.max

pts1 - for baking
pts2 - for importing
pts3 - particles that follow deformed mesh.

Maybe too many particles but it works (and in tp4 too)
 
Old 12 December 2012   #11
Originally Posted by 3ak: Ok. here is workaround:
fill the volume, bake particles (i used triangles as shapes). deform with skinwrap.
Import back as particles - they will have animated shape in local space with untouched pivot (as you said). Create for one more particle for every imported one and set its pos querying 0th face pos via Surface position node.
https://dl.dropbox.com/u/46208032/3..._workaround.max

pts1 - for baking
pts2 - for importing
pts3 - particles that follow deformed mesh.

Maybe too many particles but it works (and in tp4 too)


Excellent - works The idea is very good. The only thing which won't let me sleep well tonight is that if we're soooooo close to it why do we need to export the particles to objs? Do you think there is a way in TP to instance shape of an object, deform it right away ... this part works well, but now get their vertex id 0 position and attach a particle of a different group to it? ... maybe separate TP system? ... I'll try to do it. Thanks, 3ak. Your help is priceless!

Edit: TADAAA!!! Works without exporting on 2 separate TP systems!!!

I will share file in a sec. THAAAAAANK you 3ak! You are the best!

Edit2: Here's the file:

File "3ak_help_much_appreciated.max"

I guess something's wrong with the vertex Ids though ... some vertex jittering appeared. I will investigate i though.

Edit3: Hell knows why it acts like that ... I gave it size 0 and the problem's gone )
__________________
Beauty Pass - 3D apps vendors' jest of a lifetime - most of the time it has nothing to do with beauty, and it isn't a pass anyway.

Last edited by benio33 : 12 December 2012 at 04:02 PM.
 
Old 12 December 2012   #12
Originally Posted by benio33: Excellent - works The idea is very good. The only thing which won't let me sleep well tonight is that if we're soooooo close to it why do we need to export the particles to objs? Do you think there is a way in TP to instance shape of an object, deform it right away ... this part works well, but now get their vertex id 0 position and attach a particle of a different group to it? ... maybe separate TP system? ... I'll try to do it. Thanks, 3ak. Your help is priceless!

Edit: TADAAA!!! Works without exporting on 2 separate TP systems!!!

I will share file in a sec. THAAAAAANK you 3ak! You are the best!

Edit2: Here's the file:

File "3ak_help_much_appreciated.max"

I guess something's wrong with the vertex Ids though ... some vertex jittering appeared. I will investigate i though.

Edit3: Hell knows why it acts like that ... I gave it size 0 and the problem's gone )


Yes, nice)
I used the same approach in file with tp5 and krakatoa mod - only with 1 tp system. one group for using as mesh (through Group as object mode) and second group to read it back through Node (or new geometry subset of nodes in tp5) node as mesh.

If you have scripting experience you can add some scripted nodes to query geometry - tp5 has something similar built-in but not tp4. It will be slower than in code, but quite easy to implement.
 
Old 12 December 2012   #13
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 02:37 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.