etmaxman

hello guys am new here this is my first post and am not sure if I really need soup to achieve this.. 

I want to instance a non-instance-able object for example a field!
I know I can use "use selected as source" and "apply per vertex" but it doesn't seem to work with volume shapes type and the "apply per vertex" option is not available for all fields for example the volume axis.. 

I also need to create the field on the creation of each particle and delete it when the particle dies 

In the video starting form 01:25 is exactly what am trying to do

 

 

thanks guys 

Reply 0 0
pshipkov
Fur such a limited number of particles you can totally do it with a simple mel script running at time change.
In the expression editor go to selectFilter ->by script node name -> type your code there. Set "execute on" time changed.

What you need to do is this:
1. find dynamic fields in the scene and delete them
2. for each particle:
 - create a field and snap it to the particle
 - dynamic link it to the fluid containers you want to influence

Hope that helps.

Otherwise you can use the pointCloudFluidField in SOuP. It will do it in one go.
Reply 1 0
etmaxman

wow... thanks for such a fast replying.. 

would you please give an expression example ?

am not sure how to create a field for each particle or to snap it to each one ?

I've never used the "by script node name" filter and am not sure exactly what it dose 

 

Reply 0 0
pshipkov
Attached you a scene.

Will be sending the bill shortly. ;)
Reply 1 0
etmaxman
hahahaha thanks peter you're the best this was really helpful <3 <3 
 
Reply 0 0
etmaxman

Peter, the scene u provided was really helpful and the code is working great. however, the volume axis doesn't seem to effect any other dynamic objects! :( 

I'm not sure but I think it can't effect other dynamic objects because the code makes every axis live for one frame before it deletes it and create a new one in the new position after the for loop, I think one frame is not enough time for the axis to effect any other dynamic objects in the scene, not really sure :( 

 

here's my scene mb test.001.mb     

Reply 0 0
pshipkov
Just dynamic link the volumeAxisField to any objects in the scene and its "instances" will conform.
Reply 0 0
etmaxman

I did but it didn't work.. 

when I select the object "particle" I want it to be effected with the field all the fields gets highlighted which indicates a connection but nothing is happening 

Reply 0 0
etmaxman
I also did a test and moved the original volume axis to a place where it can effect the particles and it's working fine, but the "instances" doesn't seem to work 
Reply 0 0
pshipkov
There is something going on with your scene.
Wonder if it is an isolated case or we are hitting a new nBug. :)
Will need to check it more carefully.
Reply 1 0
etmaxman
Oh.. okay, you're the expert take your time.. I'll wait :) 
Reply 0 0
etmaxman

are sure it's not the "one frame live axis" thing.. i mean, whenever i keyframe the magnitude of a field i always need 3 frames for it to do the effect, if for example is keyed the magnitude to 10 at frame 1 and to 0 at frame 2 it won't effect anything!

in our case we keep deleting the fields and recreating them each frame.. could it be the reason ?

Reply 0 0
etmaxman

Hello peter, I know it started to get a little annoying but you're the only one I know who can help.. 

I re-checked the original scene you made for me and it looks like the original scene itself is not working... the "instanced" fields has no effect on the fluids.. 

what is happening is that the original field is at the center of the fluid container which make look like the "instances" are working but they don't..!

here is the same scene you made for me with just one thing changed "the position of the original axis field" moved out of the fluid container boundary

ma field_per_particle_Edited.ma       

Reply 0 0
pshipkov
Fact is - nParticles are buggy :)

The problem shows up when fields controlled by one nParticle shape affecting another nParticle shape(s).
Attaching you a scene with the split nParticles converted to standard ones. Everything works fine - standard fields instantiated to points, the scripted workaround i shown you with volumeFields, etc.

nParticles provide some unique and very useful dynamic features, but if you don't need that stuff for real you are better off with the standard Maya particles.
Dynamation, after all these years, is still one of the most stable and predictable particle systems around.

Reply 1 0
etmaxman
oh, now I understand... thanks peter, thanks a lot :) 
Reply 0 0
Reply