Track section length, LOD for a track?

Hi, I'm just curious if track length can have matter on performance and frame rates? Since BTB allows to build very long single tracks and there's anything about LOD setting for the track (road) - does splitting a single track for couple shorter sections bring any advantages? I clearly understand that a terrain can be splitted for parts and this work great when I need to avoid rendering too many terrain's polygons at the same time.
Or, do you know what's the default LOD setting for the road (if any)?
I'd would like you to post about your experiences/ideas here. Thanks!
 
It will set up separate sections if you split it up with the cross section tool by setting different materials for each track piece. But it doesn't set lods. (at least I don't think it does, I have not found anything to set lods on the track, terrain and objects yes, but track no.
If you don't sets lods on a long track, it will load up the whole track regardless of how many pieces it is in.


This is the track instance in the track.scn file
Code:
Instance=t0_s0
{
  MeshFile=t0_s0.gmt CollTarget=True HATTarget=True ShadowReceiver=True
}

Instance=t0_s1
{
  MeshFile=t0_s1.gmt CollTarget=True HATTarget=True ShadowReceiver=True
}

Instance=t0_s2
{
  MeshFile=t0_s2.gmt CollTarget=True HATTarget=True ShadowReceiver=True
}

Instance=t0_s3
{
  MeshFile=t0_s3.gmt CollTarget=True HATTarget=True ShadowReceiver=True
}
You can easily set the lods yourself by editing the track.scn file and add these bits,,
Code:
Instance=t0_s0
{
  MeshFile=t0_s0.gmt CollTarget=True HATTarget=True ShadowReceiver=True LODIn=(0.0) LODOut=(500.0) 
}

Instance=t0_s1
{
  MeshFile=t0_s1.gmt CollTarget=True HATTarget=True ShadowReceiver=True LODIn=(0.0) LODOut=(500.0) 
}

Instance=t0_s2
{
  MeshFile=t0_s2.gmt CollTarget=True HATTarget=True ShadowReceiver=True LODIn=(0.0) LODOut=(500.0) 
}

Instance=t0_s3
{
  MeshFile=t0_s3.gmt CollTarget=True HATTarget=True ShadowReceiver=True LODIn=(0.0) LODOut=(500.0) 
}
*Make sure to not make the lods smaller than what you can see, IE if there is a 1km straight, dont make the lod less than 1000m for the next track piece.
*Make sure the lods are longer than the track piece itself, ie if the track piece is 10m, the lod should be 11m. otherwise the lod wont load up the track piece.
*When breaking the track up with the cross section tool, make sure to have material tab selected, If you don't have material selected, it wont create a separate object. In other words, set a different material for each seperate track piece. You don't have to change the texture, just make sure the checkbox for "set Material" is checked.

**TIP** use search/replace in notepad and replace "HATTarget=True ShadowReceiver=True" with "HATTarget=True ShadowReceiver=True LODIn=(0.0) LODOut=(500.0)"

Here is a demonstration, unrar into gamedata\locations\
http://3rdgearmotorsports.com/files/LodDemonstration.rar

I broke the track up into tiny sections with the cross section tool, then exported it and edited the .scn file and added the lod info into each track piece instance.
Load the track up in rFactor and drive on it, you will see each section pop up as you drive. and have a look at the scn file to see what I did. Also you can tweak the lods yourself, increase them and watch them pop up earlier.

[ED] DOH! I almost forgot the important bit. (the materials) I added it in ^^

[EDD]
I just went through thin process on my Duryea Hillcimb track ( I kept putting it off till now, I have an excuse to do it :D). It was very bad on frames, now its sweet as, ~200-300.

BTW, this process of splitting the track into different materials also works on walls, so now we know this, we can make a wall the entire length and just split it up with materials to make smaller pieces out of it.
 
Thanks mianiak! But it works only in rF (ask Eric Tozer and he will tell you, who I am ;))
For RBR I found only this:
(I made short straight road, split for two cross sections (material change), then added single object with some small LOD)
The file is called "objectlist.ini":
//////////

[OBJECTS]
count=3

[Object_0]
file=t_0_s0_sm0
xform=t_0_s0_sm0r0
cloneCount=1
LODIn=0
LODOut=1160,995
Visible=1
DrawInstanced=0
Moveable=0
ShadowCaster=0
CollisionModel=0

[Object_1]
file=t_0_s1_sm0
xform=t_0_s1_sm0r0
cloneCount=1
LODIn=0
LODOut=1201,415
Visible=1
DrawInstanced=0
Moveable=0
ShadowCaster=0
CollisionModel=0

[Object_2]
file=obj_0_0
xform=obj_0_0r0
cloneCount=1
LODIn=0
LODOut=50
Visible=1
DrawInstanced=1
Moveable=0
ShadowCaster=0
CollisionModel=-1

//// [Object_0] and [Object_1] are for the road. What's strange, a bush (Object_2) has LODOut=50, as I've set in BTB. But the road sections have mysterious numbers... Editing the file and setting e.g. simple LODOut=50 for the road makes it invisible but still driveable... In some moment I saw the second section, but it disapeared again and I did not fly into the air....
If anybody knows what are those numbers?
Also, "DrawInstanced" - what's this for?
 
Yeah, what I explained up there ^^ covers this. By the looks of it, there is not much difference between the 2 games, there is a lod in value and a lod out value.
If the lod value is lower than the length of the track, it wont load up. So if the lod is 50m and the track piece is longer you wont see it. Make the lod out 1m longer than the track piece length.

Draw distance is how far you can see. For an easy way to understand it, it's where the fog of war cuts in. Or Imagen if your surrounded by a bubble and cant see out of that bubble. If the bubble was 100meters, you wont be able to see past 100m, but as you move along and as things enter that 100m radius, it will start to become visible.
But its different to LOD.

[ED] That's the second time you have told me to ask Eric who you are, why don't you just pm me and tell me who you are? it would be easier.
 
Oh, yes! I've read carefully your tips * and you are absolutely right! and it works in that objectlist.ini file. I just did couple experiments :) If I replace these strange values to "normal" ones, they don't seem to work exactly, but with some tries I have what I wanted. If I set LODOut smaller than section (or track) , they sometimes show up, then disapear...
So, i think this could be a solution to save some fps - to render what is needed and not e.g. whole 10km track. Thanks again :)

// new observations below:
Hmm.. It looks that those "strange" numbers indicate exact section lenghts + 1000 m and sometime LODOut can be a bit smaller. It's just the matter to try couple times to get best results, I think.
In the "objectlist.ini" file all objects concerned with track(s) have name "file=t_" and that's it - easy to find /maybe not, if we have many sections/tracks ;) (then come the terrain - ta_ , walls and objects)
Since the LOD settings from BTB work perfect with terrain areas, walls and objects, it's better to leave them as they are saved in exported file.
But I think playing with these settings for roads can help to improve performance even more, especially with long stages with many objects, walls etc.
 
Working out the identity of each .gmt is not that hard, but could be rather tedious. In the Edit/Switch Track window, the first one in the list is t0, then t1 etc. For each of those tracks, you can open the Surfaces window, and the drop down menu on the right shows surfaces s0, s1 etc in order. The menu in the Walls window shows w0, w1 etc. There's no list of surfaces for a wall, but you can find the first surface and use the > button to go to the next one.

The same goes for SObjects, but unfortunately not for Objects.
 
...
But I did notice 1 thing, all the objects and walls, terrain etc had no lods set in the .scn file. So if you have a big track, it will be very important to edit the .scn and add these lods in to everything.
...

I'd better correct you there mianiak, or else people are going to do a whole heap of unnecessary work :eek:. The LODs are actually set INSIDE each GMT file so the LODs you set in BTB for terrain, objects, sobjects and walls definitely do work. Its only for the track surfaces that you need to set LODs in the SCN file :wink:. I'd say the lack of LOD settings for the track GMTs was just an oversight on Piddy's behalf and will hopefully be added in a future update.
 
Thanks for that krunch, I was considering the same thing but have been too busy to look for any info on it, you saved me the trouble of looking it up :) thanks!

I will remove that part from my post so it doesn't cause any unnecessary trouble.
 

Latest News

Online or Offline racing?

  • 100% online racing

    Votes: 72 7.4%
  • 75% online 25% offline

    Votes: 101 10.4%
  • 50% online 50% offline

    Votes: 142 14.6%
  • 25% online 75% offline

    Votes: 267 27.4%
  • 100% offline racing

    Votes: 389 39.9%
  • Something else, explain in comment

    Votes: 4 0.4%
Back
Top