Game Development Community

T3D 1.1 Beta 2 - Precipitation with Dedicated server causes FPS to drastically drop

by David McDonald · in Torque 3D Professional · 08/22/2010 (1:55 pm) · 3 replies

Build: 1.1 Beta 2

Platform: Windows 7 home premium 64bit

Target: Client connecting to dedicated server (Both remotely and also on same machine)

Issues: In the editor (playing directly from there) adding in precipitation only slightly affects the FPS, when running the same in Dedicated server mode FPS drops to 2 or less, effectively freezing the client.

Steps to repeat:

Have a level and place precipitation in it
Connect to a dedicated server and use it to create the precipitation. We do this as follows from the dedicated server:

function heavyRainWeather()
{
    // Clear and Create the precipitation object
    $AyrSthPrecip.delete();
    $AyrSthLightning.delete();
    
    $AyrSthPrecip = new Precipitation(rain)
    {  
             canSaveDynamicFields = "1";  
             position = "-389.274 514.971 54.6187";  
             rotation = "1 0 0 0";  
             scale = "1 1 1";  
             nameTag = "rain";  
             dataBlock = "HeavyRain";  
             minSpeed = "1.5";  
             maxSpeed = "2";  
             minMass = "0.75";  
             maxMass = "0.85";  
             maxTurbulence = "0.1";  
             turbulenceSpeed = "0.2";  
             rotateWithCamVel = "1";  
             useTurbulence = "0";  
             numDrops = "8192";  
             boxWidth = "200";  
             boxHeight = "100";  
             doCollision = "1";
             splashSize="0.15";
             dropSize="0.2";
   };
    
   // Change paramaters for a cloudy day
   AlbaSky.skyBrightness=15;
   AlbaSky.castShadows=0;
   AlbaSky.brightness=0.4;
   AlbaSky.nightCubemap="";
   AlbaSky.nightColor="0.03 0.03 0.03 1";
   AlbaSky.moonEnabled="0";
   AlbaSky.nightFogColor="0.03 0.03 0.03 1";
   AlbaSky.applyChanges();  
   
   Clouds1.baseColor="0.5 0.5 0.5 1";
   Clouds1.coverage=1;  
   Clouds1.windSpeed=0.3;
   Clouds1.height=4;
   Clouds1.applyChanges();
   
   theLevelInfo.fogColor="0.4 0.4 0.4 1";
   theLevelInfo.fogDensity=0.003;
   theLevelInfo.fogDensityOffset=50;
   theLevelInfo.applyChanges();  
}

No link to console log as nothing of any use appeared there.

#1
08/23/2010 (9:08 pm)
After a little more investigation:

It appears the issue is with rivers of any decent length. We have some long ones in our level and when removed a dedicated server/client arrangement works fine.
When they are in, adding precipitation causes FPS to drop to 1-2.

I've removed the rivers and then added a shorter one in and the problem is gone.
#2
08/23/2010 (9:29 pm)
Dave, was it river "length" or river "number of nodes" which seemed to be the cause? And if noes, how many?
I ... vaugely ... allegedly ... remember someone posting issues over river node counts in a previous T3D version
Always handy to have info/guide/warning on things to avoid/be aware of.
#3
08/23/2010 (9:49 pm)
Good point Steve. I am pretty sure it will be number of nodes but will test when I am back near my dev machine.

Our dev doing the world building mentioned to me that there seemed a limit on the river and road node numbers now (in beta 2) so he pushed them to that limit and then started a second road/river as a continuation (The decal roads don't seem to cause the issue though)

The longest river section I can see in the mis file has 46 nodes.

I'll do a little more trial and error testing tonight.