Game Development Community

Can someone explain why this is happening and how to fix it?

by Michael Bolland · in Torque 3D Beginner · 08/22/2013 (4:15 am) · 22 replies

Hi please check the below video!

I don't understand why I am having this stuttering when moving my player forward, but left to right is fine. Also I don't understand why it wouldn't do it in flycam and why removing the forest resolves it.

My forest file is only 2mb which is well below the size I have had in previous maps



Also i have some weirdness on the roads flickering - any ideas?

(Torque 3D 3.0 MIT)
Page «Previous 1 2
#1
08/22/2013 (6:08 am)
1. you view distance is way too far(set it to something lower or get a better machine)
2. when view distance is too long the machine has to crunch more objects and do more calculations.

3. The flickering is when new objects(and canvas and sky and etc.) come into the line of view and starts getting rendered. It means that when you move around some will leave and other enter.

If you ever have played lotro you would see the same as one moves forward.

That is my best suggestion here and now.

Edit:

Also check out the trees' LOD

Edit Edit:

Yeps set the view distance down and/or make the LOD of the tress lower.

Edit Edit Edit:

left to right means nothing, as you are still within the rendered view distance, but when you move forward new things(trees that will have to be rendered and if too many then this happens) will enter you view sphere(view distance) and that will look like flickering if too many and too far away.

Edit edit edit edit:

I use fog to blur out far away view, that makes it look much better. You can also adjust the density and color of the fog to match your environment.

Edit edit edit edit edit:

Also make sure that the alpha channel view distance in terrain settings is not too high.

Phff! that's it I guess. Happy tweaking :o)
#2
08/22/2013 (8:39 am)
Thanks! I just tried visible distance of 10000 but it still seems the same. Also it might be worth noting it doesn't do this in FlyCam in the editor - which has the same visible distance i think? Seems more related to my character moving forward/backward/strafing and the trees somehow?
#3
08/22/2013 (8:42 am)
well I recognize the trees.... so I know the LOD settings are set for 256 or 300 for LOD_0/ 128 or 100 for LOD_1/ and 64 or so for LOD_3 and the trees should go to billboard at 50 or so. Now this is generally speaking of course.

What are your machine specs? I am not seeing that many trees at all and I would really think you would be getting much better performance than you are.

Ron
#4
08/22/2013 (8:50 am)
Hey Ron!

My pc is a 3.2ghz phenom dual core II with 4gb of ddr3 ram and an ati 6870 1gb ddr5

The performance is great normally and I'm unsure why it's happening as I have another map that has a 5MB forest file and it doesn't do this
#5
08/22/2013 (8:51 am)
His performance seems to be fine if he looks around, only when he moves forward it lags, so it may have to be something to do with new things getting loaded or fade out that is causing the lags.
#6
08/22/2013 (9:28 am)
yep its something weird with this map that fixes itself when i remove the forest

its so confusing
#7
08/22/2013 (9:29 am)
well the machine specs are just fine. Heck it's practically a mirror of the system I used to create the trees and I ran WAY more trees and stuff than this scene seems to have. I guess I would need to see the level and see what the heck is going on. Don't suppose you can zip it up and put it on DropBox or something?

Ron
#8
08/22/2013 (9:35 am)
Quote:so it may have to be something to do with new things getting loaded or fade out that is causing the lags.

I second that. Your view settings are on "10000"?! Why don't you set that to something like 2-5000 instead(or lower the view distance in the Alpha channel)? That will ease the load on you machine ;o)

Oh and use that fog also. I know this will break the beautiful view, but trust me 10000 in view distance is a lot. I mean I can almost see what texture you are using on these mountains and that means your terrain alpha view channel is almost for certain set high to.

That above or opt for zoning instead. Your view distance and world is way too huge.

I have a I5 3.3 with 8 gig ram + 1 gig ram Ati 6790 and it actually do crash sometimes if I set the view to 10000 in a huge world with plenty of trees and highly detailed texture as well as ground plant etc.

You machine won't do it with only 4 gig of ram, sorry to say it, but that is also why even MMO games and huge world load the worlds in chunks. One it saves memory, two it gives players with average machines a good user experience as well.
#9
08/22/2013 (9:40 am)
my view settings arent on 10000 - it was on 2000 and you said increase it so i did!
#10
08/22/2013 (9:45 am)
Actually guys, I think it's the shadow settings being set too high, which is used by the forest objects.

@Michael - Do you have the shadow/lightmap size set to 2048px? If so, try lowering it to 1024 instead. You won't see much detail loss and your performance increase will be dramatic.
#11
08/22/2013 (9:48 am)
Quote:you view distance is way too far(set it to something lower or get a better machine)


Well then their is something wrong with these trees for sure.

Then set it to 2000 again, try to use fog(in distance 1000).

How big is your world? Also if Ron could have a look at it. It is hard to say when we are not having our hands at it :o)
#12
08/22/2013 (9:49 am)
@Dan

thanks is that texSize under Advanced Lighting in ScatterSky?

Currently texSize is 512

In my terrain:
baseTexSize is 1024
lightmapSize is 256
#13
08/22/2013 (9:53 am)
@Dwarf ok set it back! Fog is densityoffset of 700 and atmosphereheight of 800

My world is pretty huge - 2048 with squaresize 10
#14
08/22/2013 (9:56 am)
go to terrain editor, click on terrain painter, now in the right side different textures can be seen, double click on one of them and you should see diffuse, detail and normal. Under detail you see distance. Try something like 125. What is the current value?

Edit: well that is pretty big...
#15
08/22/2013 (10:02 am)
350 size and 5000 distance for macro the detail is distance 40 and 4 size
#16
08/22/2013 (10:28 am)
@Michael - Sorry, I meant the lightmap size inside the terrain object.

new TerrainBlock(mesasTerrain) {
      terrainFile = "levels/Mesas.ter";
      castShadows = "1";
      squareSize = "4";
      baseTexSize = "1024";
      lightMapSize = "1024";
      screenError = "8";
      position = "0 0 0";
      rotation = "1 0 0 0";
      canSave = "1";
      canSaveDynamicFields = "1";

Edit: Oh, don't worry. That's just for the terrain shadows. Silly me (it's 3:30am here).
#17
08/22/2013 (10:52 am)
castShadows = "1";
         squareSize = "10";
         baseTexSize = "1024";
         lightMapSize = "256";
         screenError = "16";
         position = "0 0 0";
         rotation = "1 0 0 0";
#18
08/22/2013 (11:58 am)
Well i'm trying to find out more about this with a profiler in debug mode but for some reason I can't get into the mission with a debug build

I get this:

https://dl.dropboxusercontent.com/u/25535993/mincoord.png
and here's hte call stack - seems to be during the forest preparation code

https://dl.dropboxusercontent.com/u/25535993/callstack.png
#19
08/22/2013 (12:21 pm)
Quote:My world is pretty huge - 2048 with squaresize 10

2048 x 2048 with squaresisize 10 correct?

Well if you have such a huge world and have trees spread all over then you might wanna see this thread:
Occlusion Volumes

After reading that you should know what you are up against and what you should consider doing.

You current setup is going to be problematic. Think about it, how many objects the engine needs to render as the player moves around. If all the world terrain needs vegetation and forest then it becomes very ugly(witout any kind of zoning etc.).





#20
08/22/2013 (1:21 pm)
doesnt the view distance keep that down though?
Page «Previous 1 2