Splines that appear/disappear with view-distance change

Lataxe

Member
I've been making trackside grass additions to various routes as this seems to add a lot of "realism" to them, because of the increase in the 3D look over the 2D look of mere textures. There are a lot of good grass splines about but many have the annoying habit of flickering on only when they come within a certain (quite close) visual range. Many FMA grass splines do this, as do the otherwise very attractive Forest series. Various JVC grass splines don't have this annoying habit.

Looking at the config file of these splines, there seems to be data that is telling the splines something about how they should behave or appear at certain draw-distances. I don't have the technical understanding of the nomenclature or values used but was hoping that someone out there could inform me how I might amend some of these values to prevent the "appear only when close" behaviour.

The splines of interest tend to be mostly Build 2.9 or above. If someone is willing to educate me (or point me to a webpage that will do so) concerning the "when/how to appear" values, I would be grateful. If there is such a lad (or lass) perhaps I could post a more detailed request containing the extracts of the config files of interest?

Lataxe
 
There is a tag in the config called lod-distance which controls the distance at which the high detail version of the spline changes to low detail..

Mr R,

Thanks for your quick reply.

I'd guessed that the lod-distance parts of the config file would have some effect on the draw distance.

The JVC grass file that seems visually stable at different view distances has these entries in the config file for the lod distance :

******************
track-lod-tree
{
lod-distance 250

high-detail
{
lod-distance 200

high-detail
{
lod-distance 30

high-detail
{
mesh "trackside_lo"
subdivisions 1
}

low-detail
{
mesh "trackside_lo"
subdivisions 1
}
}

low-detail
{
mesh "trackside_lo"
subdivisions 1
}
}

low-detail
{
mesh "trackside_lo"
}
}
}
************************
The Forest Grass file that has a flicker off/on effect as view distance is changed has these entries:
**********************

track-lod-tree
{
lod-distance 50

high-detail
{
subdivisions 1
lod-distance 10

high-detail
{
mesh "lod-0"
}

low-detail
{
mesh "lod-1"
}
}

low-detail
{
lod-distance 150

high-detail
{
mesh "lod-2"
}

low-detail
{
lod-distance 1000

high-detail
{
mesh "lod-3"
}

low-detail
{
}
}
}
}
}
************
Although the two files have some similarities, there seems to be a variation about how the low and high detail lod meshes are expressed and given values.

If I wanted to make the Forest Grass spline behave flicker-free in the way that the JVC grass behaves, which entries would need to be changed in the Forest Grass file and to what values to match those of the JVC Grass file?

Any advice and/or explanations will be gratefully received.

Lataxe
 
I don't know exactly, but you could experiment with it by multiplying each lod-distance value by a factor (e.g. 5) and see what it looks like in the game. The aim would be to settle on the smallest factor that makes the spline behave satisfactorily.

Realize that this would be a solution local to your computer only.


.
 
I don't know exactly, but you could experiment with it by multiplying each lod-distance value by a factor (e.g. 5) and see what it looks like in the game. The aim would be to settle on the smallest factor that makes the spline behave satisfactorily.

Realize that this would be a solution local to your computer only..

Mr R,

Thanks for your reply. Yes. experimentation seems the best method so this is what I'll do.

I realise that any changes will be to my copy of the spline only and so will appear only in my local route on my personal computer. This would be an issue were I ever to want to post a route to Trainz DLS but sadly I decided some time ago that all of the kerfuffle and feather-ruffle that seems to arise with copyright and re-use of assets sensitivities means that any route I made & posted would only cause controversy.

My routes often consist of a core of someone else's original route, heavily modified with replacements/additions then extended to 4 or 5X the size using a similar "geography". In addition, they tend to contain bits of payware and non-DLS items from sometimes obscure places; or with copyright notices demanding they don't get disseminated without permission. Then there are the many items I end up modifying (like the flickering grasses) that would require a cloned version of someone else's item to be posted, which would also mean feather-ruffle or tedious tracking down of original authors for permission to re-use. I find that all that puts a severe limitation on the prospect of successfully posting a route to the DLS.

But I digress. (I admit to being exasperated by what I often find the strange "schizophrenic" attitude of many content creators - "Here's my stuff for free except it isn't 'cos you can only use it like I say, in a severely limited fashion").

I'll post any findings concerning alterations to the lod distance values that I may find to prevent the on/off flicker with draw distance. Some might find such tweaks useful for their own purposes.

I'm guessing but, is this change to visibility with draw-distance introduced by spline makers to cater to low-power computers - i.e. to reduce the load on their graphics-drawing? It seems an odd thing to have in a scenery item as it severely reduces the feeling of realism to have things suddenly disappear when they get a certain distance away from one's viewpoint.

Lataxe
 
Mr R,


...I'm guessing but, is this change to visibility with draw-distance introduced by spline makers to cater to low-power computers - i.e. to reduce the load on their graphics-drawing? It seems an odd thing to have in a scenery item as it severely reduces the feeling of realism to have things suddenly disappear when they get a certain distance away from one's viewpoint.

Lataxe

It benefits all computers, but especially the low spec ones. LOD is a common system in computer games and is designed to accommodate high detail at close range but displaying progressively lower detail as the viewing distance increases. If done well, the transitions in detail are hard to spot, but if done badly, the player sees very obvious jumps between LOD states. Objects of Kind:scenery have LOD transition distances determined by the game engine in response to the overall complexity of the scene at the time. Spline objects are different. Their transition distances are pre-determined by the creator (by way of the config). So if the transitions in a spline are ugly, jarring and obvious, then I'd say it's mostly down to the creator's bad choices.

.
 
Last edited:
If I wanted to make the Forest Grass spline behave flicker-free in the way that the JVC grass behaves, which entries would need to be changed in the Forest Grass file and to what values to match those of the JVC Grass file?

If you look at the last low-detail section, you'll see that no mesh is being called out, so nothing will be rendered at that lod. You might try copying the high-detail mesh ("lod-3") to that section and see if that helps.

Something like:
high-detail
{
mesh "lod-3"
}

low-detail
{
mesh "lod-3"
}
}
}
}
}
************


Curtis
 
After a bit of experimentation, I ended up altering some values in the Forest Grass spline config files as follows:

OLD VALUES
track-lod-tree
{
lod-distance 50

high-detail
{
subdivisions 1
lod-distance 10

high-detail
{
mesh "lod-0"
}

low-detail
{
mesh "lod-1"
}
}

low-detail
{
lod-distance 150

****************

NEW VALUES

track-lod-tree
{
lod-distance 250

high-detail
{
subdivisions 1
lod-distance 150

high-detail
{
mesh "lod-0"
}

low-detail
{
mesh "lod-1"
}
}

low-detail
{
lod-distance 300

************

I left the lod-3 values (and everything else) in the config file unchanged.

These changed values stop the change from one lod- to another lod- until the grass is much farther away, which effectively reduces the flicker on/off effect to an unnoticeable level.

The structure and lod-n values for all Forest Grass splines seem to be identical, so any config file can be changed in this way.

I have a fairly high spec computer (SSD, big graphics card, fast over-clocked processor etc.) so these changes don't seem to affect the frame rate when I have a lot of these grasses trackside and the train is moving along at normal speeds. I suspect that the greater amount of detail drawn out to longer view distances might impact on lower-spec computers though ..... but those who might want to use these (and other) good quality splines might nevertheless want to experiment to see if they too can get rid of the on/off flicker effect without impacting their frame rates.

Lataxe
 
I have the same problem with Forest Grass and Sam Track. Splines show only right in front of the camera. However this randomly affects different splines each time I start the game and never a spline that is within viewing distance initially when I start the game. Any idea what causes this?
 
At a guess, I think it might be something to do with how the program puts the initially visible assets into a cache memory, but as you move to different parts of the layout, it needs to spend time loading the newly visible assets before they can be displayed. Having trainz on SSD instead of disc drives helps speed things up, and high end video cards have a big effect too.
 
Thanks for the reply. I don't think that's the issue. My new computer is a lot faster than the old one, still the issue seems to have worsened. I noticed that actually only the middle section of the splines are missing. They reappear in the far distance, so maybe an issue with the medium-detail lod (I don't know anything about this)... I'm gonna try to amend the config as described above tomorrow and see if that helps...
 
Back
Top