Smoke performance problems...

Im using the “Example Vehicles” scripts as groundwork for my physics but whenever I try to use the smoke-effects i get a serious performance drop.
I go from 100fps to about 25-30!

Heres the code involved

// This is in FixedUpdate

for(w in wheels)
	{		
		//rotate wheel
		w.rotation += wheelRPM / 60.0 * 360.0* Time.fixedDeltaTime;
		w.rotation = Mathf.Repeat(w.rotation, 360.0);		
		w.graphic.localRotation= Quaternion.Euler( w.rotation, w.maxSteerAngle*steer, 0.0 ) * w.originalRotation;

		//check if wheel is on ground
		if(w.coll.isGrounded)
			onGround=true;
		
		var hit : WheelHit;
		var c : WheelCollider;
		c = w.coll;
		if(c.GetGroundHit(hit))
		{
			//if the wheel touches the ground, adjust graphical wheel position to reflect springs
			w.graphic.localPosition.y-=Vector3.Dot(w.graphic.position-hit.point,transform.up)-w.coll.radius;
			
			//create dust on ground if appropiate
			if(rigidbody.velocity.x > 5)
			{
				groundDustEffect.position=hit.point;
				groundDustEffect.particleEmitter.worldVelocity=rigidbody.velocity*0.5;
				groundDustEffect.particleEmitter.minEmission=1;
				groundDustEffect.particleEmitter.maxEmission=1.5;
				groundDustEffect.particleEmitter.Emit();								
			}
		}

	}

Anyone have any tips&tricks to save some performance here?

Best Regards

What’s the hardware? If low-end, maybe fewer particles would help?

Thats the problem…
Im using the new iMac 24" with 2.8GHz and 2 Gb memory

Just a basic terrain and a car

Are you measuring performance in the editor? Editor caps and quantizes the frame rate, so it’s a poor indicator for performance. Try seeing what difference it makes in the standalone player.

Well, I measure it in editor yes…
But the game starts to stutter, a lot! So I dont think its just because of the fps counter…

Ok, tried a standalone build and its not much better… :frowning:

Get 280+ fps without smoke and around 40 with the smoke turned on
Something is really not right here…

Any ideas? Anyone using particleeffects in a cargame who can point me in the right direction??

Can you post a web-player. We might be able to spot the problem offhand.

d.

Ok, here goes :smile:

http://www.frikkinsoft.eu/Unity/Jeeping.html
In the webplayer I could only see the difference when going fullscreen though…
Wierd…

just jumping in here - are you using the jeep from the vehicles example? that thing is not realtime friendly - way too many materials polys if i recall - i’d definitly use a different vehicle model if that’s the case ; )

I have a “old” iMac 24’’ 2,16 GHz and I get 80-160 fps in full screen

On a C2D MacBook Pro I get ~100 FPS avg.

Welcome to the underclocked HD2600 XT and its drivers! Unfortunately, multiplicative effects don’t seem to be its strong point. Nor anti-aliasing. Or anything except being DX10-compliant, really. I’m just glad I got the 20" iMac so the card doesn’t have to fill as many pixels.