IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Particles lose tangental velocity., dynamicFriction / staticFriction not working?
AlgorithmX2
post Jul 29 2009, 06:40 AM
Post #1


Newbie
*

Group: Members
Posts: 2
Joined: 29-July 09
Member No.: 8,909



I'm trying to get a 'proof of concept' for a simple particle system to interact with the environment I've already go set up. everything seemed to be going fairly well.

However I'm trying to create a 'sparks' particle effect, very low particle count, just wanting the particles to bounce around a few times and come to rest. however I can't get the particle to keep any horizontal velocity, they shoot out side ways from the emitter, and hit the ground, and suddenly the are just hopping in place, its the strangest thing I've ever seen.

I was looking at the SDK, and I noticed the restitution / dynamicFriction / staticFriction values in my fluidDesc, however, the friction values which I have set to 0.1 ( all 4 of them ), don't seem to work, the restitution parameters are working like a charm however...

I'm using no particle interaction, in software.

Has anyone else seen this behavior or have any info/explanation on it?

Any ideas?
Go to the top of the page
 
+Quote Post
Mike_S
post Sep 25 2009, 03:49 PM
Post #2


Advanced Member
***

Group: Moderators
Posts: 38
Joined: 16-September 09
Member No.: 9,349



Hmmm, that does sound strange. No, I don't recall seeing that behavior before. How high are the particles hopping? Does the hopping go away if you set the restitution to zero? What time step are you using? Could you post a code sample, or perhaps a Visual Debugger dump file?

Mike

QUOTE (AlgorithmX2 @ Jul 29 2009, 01:40 AM) *
I'm trying to get a 'proof of concept' for a simple particle system to interact with the environment I've already go set up. everything seemed to be going fairly well.

However I'm trying to create a 'sparks' particle effect, very low particle count, just wanting the particles to bounce around a few times and come to rest. however I can't get the particle to keep any horizontal velocity, they shoot out side ways from the emitter, and hit the ground, and suddenly the are just hopping in place, its the strangest thing I've ever seen.

I was looking at the SDK, and I noticed the restitution / dynamicFriction / staticFriction values in my fluidDesc, however, the friction values which I have set to 0.1 ( all 4 of them ), don't seem to work, the restitution parameters are working like a charm however...

I'm using no particle interaction, in software.

Has anyone else seen this behavior or have any info/explanation on it?

Any ideas?

Go to the top of the page
 
+Quote Post
AlgorithmX2
post Nov 7 2009, 09:22 PM
Post #3


Newbie
*

Group: Members
Posts: 2
Joined: 29-July 09
Member No.: 8,909



QUOTE (Mike_S @ Sep 25 2009, 10:49 AM) *
Hmmm, that does sound strange. No, I don't recall seeing that behavior before. How high are the particles hopping? Does the hopping go away if you set the restitution to zero? What time step are you using? Could you post a code sample, or perhaps a Visual Debugger dump file?

Mike


If I set restitution to Zero The particles simply stop, I would expect that they should continue moving horizontally as long as the dynamicFriction / staticFriction are not Zero.

This is the rather simple test scenario I'm experiencing the problem with.

CODE
NxParticleData particles;

//Set structure to pass particles, and receive them after every simulation step    NxParticleData particles;
particles.numParticlesPtr = &gParticleBufferNum;
particles.bufferPos = &gParticleBuffer[0].x;
particles.bufferPosByteStride = sizeof(NxVec3);

for ( int x=0; x<gParticleBufferNum; x++ )
{
    gParticleBuffer[x].x = rand() % 4200 - 2100;
    gParticleBuffer[x].y = 0;
    gParticleBuffer[x].z = rand() % 4200 - 2100;
    gParticleBuffer[x] *= 0.01;
}

//Create Emitter.
NxFluidEmitterDesc emitterDesc;
emitterDesc.setToDefault();
emitterDesc.dimensionX = 0.01;
emitterDesc.dimensionY = 0.01;
emitterDesc.relPose.id();
emitterDesc.relPose.t.z=-32;
emitterDesc.relPose.t.y=-8;
emitterDesc.rate = 12.0;
emitterDesc.repulsionCoefficient=1;
emitterDesc.randomAngle = 1.1f;
emitterDesc.fluidVelocityMagnitude = 32.5f;
emitterDesc.maxParticles = MAX_PARTICLES;
emitterDesc.particleLifetime = 12.0f;
emitterDesc.type = NX_FE_CONSTANT_FLOW_RATE;
emitterDesc.shape = NX_FE_ELLIPSE;

//Create fluid    NxFluidDesc fluidDesc;    fluidDesc.setToDefault();  
NxFluidDesc fluidDesc;
fluidDesc.flags &= ~NX_FF_HARDWARE; // non hardware...
fluidDesc.simulationMethod = NX_F_NO_PARTICLE_INTERACTION;
fluidDesc.maxParticles = MAX_PARTICLES;
fluidDesc.restParticlesPerMeter = 1;
fluidDesc.stiffness = 1;
fluidDesc.viscosity = 1;
fluidDesc.damping=0;
fluidDesc.collisionDistanceMultiplier=1;
fluidDesc.kernelRadiusMultiplier=1;
fluidDesc.restitutionForDynamicShapes=fluidDesc.restitutionForStaticShapes=0.3;
fluidDesc.dynamicFrictionForDynamicShapes=fluidDesc.dynamicFrictionForStaticShap
es=0.1;
fluidDesc.staticFrictionForDynamicShapes=fluidDesc.staticFrictionForStaticShapes
=0.1;
fluidDesc.particlesWriteData = particles;
fluidDesc.emitters.push_back(emitterDesc);
gFluid=gScene->createFluid(fluidDesc);


its almost directly out of the SDK, I didn't get very far because I couldn't get it to behave the way I wanted it to.

I am looking for a simple 'ember' kind of effect where the particles are emitted and bounce around 1-3 times until they settle and go out, however they just kind of 'stop' which looks rather strange.

And here's a tiny video example of what I'm talking about.

Tiny Vidio example

Any Ideas?
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Copyright © 2008 NVIDIA® Corporation.  Terms of Use | Legal Info | Privacy Policy Time is now: 23rd November 2009 - 12:49 PM