rromulo
23-07-2011 10:57:17
Hi,
I would love to do rain with nxogre but I really don't know what to put exactly in each property once I don't have a parameter.
Its this format right now:
I already change all the variables hundred's times...
But I'm with 3 problems:
1 - I can't do the rain fall more intense.
2 - When particles collide with another, they jump tooooo long.
3 - Later +-25 seconds, appears stacked particles in the air !?
Could someone give an idea...? please
EDIT: 1 - Solved; 2 - Particially solved (but I still don't know exactly why, just changing properties); 3 - The stacked particles in the air don't have influence of gravity, neither any force/weight (as I saw with showall debugger' function), just appear suddenly.
I would love to do rain with nxogre but I really don't know what to put exactly in each property once I don't have a parameter.
Its this format right now:
NxOgre::FluidDescription desc;
desc.mMaxParticles = 60000;
desc.mKernelRadiusMultiplier = 1.0f;
desc.mRestParticlesPerMetre = 0.2;
desc.mMotionLimitMultiplier = 1.0f;
desc.mPacketSizeMultiplier = 8;
desc.mCollisionDistanceMultiplier = 0.1f;
desc.mStiffness = 1;
desc.mViscosity = 6;
desc.mRestDensity = 0.01f;
desc.mDamping = 0.0f;
desc.mFadeInTime = 0.0f;
desc.mRestitutionForStaticShapes = 0.0f;
desc.mRestitutionForDynamicShapes = 0.0f;
desc.mDynamicFrictionForStaticShapes = 0.9f;
desc.mDynamicFrictionForDynamicShapes = 0.9f;
desc.mCollisionResponseCoefficient = 3.0f;
desc.mStaticFrictionForDynamicShapes = 0.9f;
desc.mStaticFrictionForStaticShapes = 0.9f;
desc.mSurfaceTension = 0.3f;
desc.mSimulationMethod = NxOgre::Enums::FluidSimulationMethod_SPH;
desc.mCollisionMethod |= NxOgre::Enums::FluidCollisionMethod_Dynamic;
desc.mCollisionMethod |= NxOgre::Enums::FluidCollisionMethod_Static;
desc.mFlags |= NxOgre::Enums::Fluid:FluidFlags_CollisionTwoWay;
desc.mFlags |= NxOgre::Enums::FluidFlags_Enabled;
desc.mFlags |= NxOgre::Enums::FluidFlags_Hardware;
// with Ogre Particle System
NxOgre::Fluid* mFluid = mRenderSystem->createFluid(desc,"Watermine", Critter::Enums::FluidType_OgreParticle);
Critter::ParticleRenderable* pr = (Critter::ParticleRenderable*)mFluid->getRenderable();
pr->getParticleSystem()->setDefaultDimensions(0.6,2.5);
NxOgre::FluidEmitterDescription edesc;
edesc.mPose.set(953, 450, 2246);
edesc.mPose.set((NxOgre::Quat)Ogre::Quaternion(Degree(90),Ogre::Vector3::UNIT_X));
edesc.mShape = NxOgre::Enums::FluidEmitterShape_Ellipse;
edesc.mParticleLifetime = 25;
edesc.mRate = 2000;
edesc.mFluidSpeed = 100.0f;
edesc.mType = NxOgre::Enums::FluidEmitterType_FlowRate;
edesc.mReplusionCoefficient = 0.0f;
edesc.mDimensionX = 450.00f;
edesc.mDimensionY = 450.00f;
NxOgre::FluidEmitter* mEmitter = mFluid->createEmitter(edesc);
I already change all the variables hundred's times...
But I'm with 3 problems:
1 - I can't do the rain fall more intense.
2 - When particles collide with another, they jump tooooo long.
3 - Later +-25 seconds, appears stacked particles in the air !?
Could someone give an idea...? please
EDIT: 1 - Solved; 2 - Particially solved (but I still don't know exactly why, just changing properties); 3 - The stacked particles in the air don't have influence of gravity, neither any force/weight (as I saw with showall debugger' function), just appear suddenly.