Has the lm.txt method of LOD been replaced?

Smileyman

Socialist Serenade
As the title suggests, I'm wondering if the lm.txt method of controlling the use of LOD on scenery objects has been updated/replaced.

With my recently released tunnel, I used the track-lod-tree container to control the levels of detail, but now I'm working on some static scenery items, so I'm using the lm.txt method.
Problem is, CM is coming up with a warning about it not having attachment points or animation.

I know that it's only a warning, and that it should still work ok in-game, but that's not the point.
I just want to know whether I'm using an old technique (in which case, I'd prefer to use the correct method), or whether it's an error in CM that N3V haven't fixed.

Cheers guys,
Brian.
 
LM.txt is only for Rolling stock or objects that are animated, there is a different lod system for assets. The LM method is not resource friendly when used for static items apparently.

For something basic like a house config in its most basic form, note you have no control over the distance lod cuts in depends on the in game settings for scenery detail.

Code:
mesh-detail-level-count                 3

mesh-table
{
  default
  {
    mesh                                "house.IM"
    auto-create                         1
    lod-level                           0
  }
  
  lod1
  {
    mesh                                "lod1.IM"
    auto-create                         1
    lod-level                           1
  }
  
  lod2
  {
    mesh                                "lod2.IM"
    auto-create                         1
    lod-level                           2
  }
}

A spline in its most basic form, the distance is user configurable for splines.
Code:
mesh-table
{
  default
  {
    mesh                                "default.im"
  }
  
  low_lod
  {
    mesh                                "lod1.im"
  }
  
  preview-mesh
  {
    mesh                                "default.im"
    auto-create                         1
  }
}

track
{
  mesh-length                           1.5
  adjust-cross-section-to-ground        0
  
  track-lod-tree
  {
    lod-distance                        200
    
    high-detail
    {
      mesh                              "default"
    }
    
    low-detail
    {
      mesh                              "low_lod"
    }
  }
}

Both can get more complicated depending on the complexity of the item.

It's all in the wiki which is the best place to start, if I remember the wiki examples are at the complicated end of the spectrum my examples are at the bare minimum end, which to be honest is all that's needed for simple items. Anything under 500 polys won't need lod, there are some people creating configs with blank entries, presumably to conform to the wiki examples, which don't do anything and are not needed! And will probably end up as errors somewhere down the line.

I tend to use the simplest method that works!
 
Thanks guys.
Having been away for so long, it's hard to know what's changed drastically, and what's been tweaked.

I did start at the wiki, as I always do, but I find it such a mess.
And it's not that I don't like wikis, because I've used them for years, and a lot of them are well organised, but the Trainz one just seems to be almost an afterthought, and never followed through.
Really needs tearing down, and starting again, with a better design.

After I made my original post, I found a thread from about a year ago that touched on the subject of mesh table lods, and that with them, we have no control over the transition distance like we do with splines.
Not too happy about that, and neither were the people in that thread, but I'll wait and see how it performs before knocking it.

Thanks for the info, links and examples.
You've saved me a lot of time that I can now spend in Max.

Appreciate it.
Brian.
 
As the TrainzWiki says:

LOD on Moving or Animated Objects

This technique mainly applies to KIND Traincar and KIND Bogey assets, however all types of animated or regularly moving objects have a few things in common:
They are not good candidates for mesh stitching. If Trainz is aware that an asset instance will be moving or animated, it will render directly rather than attempting to stitch the meshes.

  • They are typically high-polygon.
  • They are often comprised of several components using Attachment Points.
  • They typically have a higher performance cost that the base mesh would imply (additional animation costs, attachment costs, scripting costs, physics costs, etc.)
For these types of asset, the LM.txt file style of LOD should be used. This style of LOD outright prevents the mesh stitching optimisation and is also more expensive to load and maintain than other styles of LOD, thus it should only be used in the conditions described above. Regular scenery meshes should never use this technique.
This style of LOD explicitly supports animation and attachment points, including providing controls to hide attachments in lower-detail variants.
LM.txt files are a drop-in replacement for the regular IM files. In cases where this form of LOD is acceptable, you can simply substitute the "xxx.im" reference in the asset's config.txt file for an "xxx.lm" reference (note that there is no trailing ".txt" in a resource reference.) On disk, you will include a single "xxx.lm.txt" file which will then reference multiple "xxx-n.im" files.

This below is mainly directed at animated scenery items or scenery items which could take advantage of an animation when these are not often used in game in the same scene on the screen, which a creator could animate to use a LM text file for a better text distance referenced change of LODs by the creator. Meaning, say, if you create a moving animated crane, moving animated forklift or something like the build in animated saw mill, airport, oilfield etc., one can use a LM text file to nominate and control the distance (actually it is the screen percentage of the asset being seen in the PoV on your screen) where a LOD transition should occur. So, if a creator is "sneaky" and wants to take advantage of "animated assets" like animated scenery assets indeed can (see above), all a creator has to do is to place a small animation on his/her animated creation to be able to use a LM text file for a better visual way of a LOD change in game. I said "sneaky" and mean, to be used only minimally so for certain assets in Trainz, not by suddenly having an animation on every scenery items one creates, just to be able to use a LM text file for LODs on it.

I probably get shot down for even daring to suggest the above, as N3V's James Moody did to me in the past when I suggested something similar in the forum. But bear with me, some scenery objects need animation to look good in game, as they move around and do their animated routine and as logic dictates, these are special items in game beside looking good too. Meaning, say you create an animated saw mill, you probably only use such in game in one scene only, which one can see on the screen at a given time. So this would be probably only one, two or possibly three or so of such different animated scenery objects visually being seen on screen at a given time.

Say, as example, an animated railway station, which will only be seen every 10 km or so, where these are normally placed on a given track, animated round houses/turn tables, animated airports, animated oilfields and animated factories and so on. Which will visually enrich Trainz tremendously. Which are also only placed few and far between on one's route but not willy nilly everywhere. A user building his/her route in Trainz surely would not place too many of such animated objects into the same scene visible on screen. If such user does indeed place many of such animated objects close to each other to be seen on a single screen, well, said user will very soon find out this is no good by having stuttering or even stopping of the game and if smart and savvy, will reduce such animated items to be seen at the same time in that scene for getting a better performance of Trainz.

By having locomotives, bogies and rolling stock also in the same scene/screen, this would be normal and nothing one can do about that. Yet, as said, having the odd 2-3 or so other animated scenery objects there too, should IMHO not introduce such a huge strain on performance, to bring Trainz to its knees. Unless the coders of TANE don't know how to fix and eliminate other performance robbing issues in the code, instead on clamping down so hard on these poor little few animated scenery objects in a given scene on the screen.

Shees... other games have many animated cars, tanks, army vehicles, animated people, animated animals, animated scenery objects, flowing animated rivers and animated waterfalls, animated birds flying about, animated crumbling buildings, animated crumbling tanks when hit, vehicles, ground with big holes in it when hit etc., lighting bolts, arrows, other missiles shooting and flying all over the place in fights in certain games, all at the same time with all or most of the afore mentioned animations working and to be seen in it too. Some of these games are already a few years old and these games DO NOT have any serious performance issues to run these games and show all these mentioned animations very nicely.

One might ask the question, WHY is TANE or any other Trainz version so different to other games? Is it perhaps not having good and smart programmers doing the coding for Tane and Trainz? I am not saying that this is so BUT one is still wondering why these stark differences in viewing pleasure are between Trainz and other games. Again, why this is so DIFFERENT with Trainz/TANE when compared to some or even many other games?

As a side note, I wonder if one could get an AURAN/N3V created buildin airfield or any such other heavy animated buildin scenery item with lots of attachment points attaching many different meshes for that scenery item into TANE, how may errors and warnings would that item suddenly show in TANE and possibly not getting commited. Like too many polygons/triangles, having to use LODs on the attached meshes and so on, we mere mortal creators are seeing when trying to get a reasonable scenery item with attachment points attached meshes into TANE's CM, Yet, that same AURAN/N3V buildin item is oblivious to all errors and warning we creators would get if creating the same object and hence can merrily function error free and thus be seen in TANE. As this is surpressed in their code to show errors.

Is it again, one rule for them and another, a much stricter rule for us content creators?

My observations only.

VinnyBarb
 
...
I did start at the wiki, as I always do, but I find it such a mess.
And it's not that I don't like wikis, because I've used them for years, and a lot of them are well organised, but the Trainz one just seems to be almost an afterthought, and never followed through.
Really needs tearing down, and starting again, with a better design.
...

Yeah, well we've complained about that as well. PEV did import the entire Content Creator's Guide into the N3V WiKi but those pages are not supported by N3V. They are still useful but many pages will be dated. The WiKi is supposed to reflect the current version of Trainz so at present it's a mix of TS12 and T:ANE.

There is a sort of Table of Contents for Content Creation but there are many loose pages without links to them and that is the problem. The search engine does work and I use it frequently. The term I search for most often is "LOD". :o

I keep links to pages I frequent and especially to pages like the base KIND page. That page, via links, will take you to the relevant config container pages. If you use AssetX then there are links within that program that will give hints for tags and hotlinks to relevant WiKi pages.

The WiKi pages are community supported so anyone with a Trainz account can create and edit pages.

A useful page is the Special Pages (within the Toolbox at lower left). It will show you a list of new pages and recent changes. That's worth looking at every week or so.

There is the WiKiBooks Trainz that Frank (FBartus) puts a lot of effort into. The WiKiBooks is more feature rich but a pain to write for.
 
@Vinny: That's an interesting little "cheat", to use a small, hidden animation to allow the use of lm.txt.
I think you're right that sometimes there's one rule for them, and one rule for us.

What backs that up is recently, in another thread, it was pointed out that the method of using identical meshes for the two highest LOD levels is frowned upon by N3V, but it turns out they used that technique themselves for built-in content like trees in TS12.
Now they're having to fix them, causing objects to "pop" way too early, and if the mesh-detail-level-count tag isn't updated when fixing the assets, there's an empty spot in the lod levels which causes the object to disappear at certain distances (which apparently is also visible in some of the "fixed" assets in TS12.

What I think I'm going to do is build and test the asset using the lm.txt method, and ignore the warning until it's finished.
Then, when I've got the distances worked out so the transitions take place at the correct distances, I'll write those numbers down and store them somewhere safe, and then before release, change over to the mesh table lod method.
At least then, if people complain that the object is popping in an ugly way, I can tell them it's not my fault, and as soon as we're given more control over the transition of static objects, I'll upload a fixed version.

Until then, it's a limitation of the Trainz engine, and not down to us.

@Paul: Yeah, I do have the wiki link on my browser toolbar, but I guess it's not really enough.
I'll have to make it a folder instead, and place specific links in there, whenever I find something worth keeping.

With all this talk from N3V about supporting the content creator more from now on, it's time they started again with the Wiki, or even got rid of it, and had an official site with all the relevant information for supported versions of Trainz.
Or if they have want to stick with the Wiki, appoint 2 or 3 people to go through it and delete/improve/add as needed, so that it had a more user-friendly look, and no out-dated information.

I'd be prepared to be one of them, even though I'd be re-learning a lot of it, and would require a lot of info from the community.
But I'm a designer, so at least I know it would look good. :)

And keep battling in the Trainz Dev forums guys.
I notice Andi doing his best to show Chris where the procedural track is lacking at the moment, and Chris doesn't seem to want to hear some of it, but at least they're trying.
Can only be good, right?

Thanks again for the input.
As always, it's appreciated.

Brian.
 
...
What backs that up is recently, in another thread, it was pointed out that the method of using identical meshes for the two highest LOD levels is frowned upon by N3V, ...

If you do that in T:ANE you get the 20% reduction error - not a warning. I tested that scenario yesterday.

With all this talk from N3V about supporting the content creator more from now on, it's time they started again with the Wiki, or even got rid of it, and had an official site with all the relevant information for supported versions of Trainz.
Or if they have want to stick with the Wiki, appoint 2 or 3 people to go through it and delete/improve/add as needed, so that it had a more user-friendly look, and no out-dated information.

There are a few that do that, including myself, but the problem is having the information in the first place. Hence the continued questions about tags for procedural track.

One of the Kickstarter stretch goals was more support for content creators and documentation. From memory the vote attracted about 2%. So when Trainz users complain there is no updated content on the DLS then they only have themselves to blame. When I voted for that particular goal I knew I was voting for a lost cause. :(
 
If you do that in T:ANE you get the 20% reduction error - not a warning. I tested that scenario yesterday.
Yeah, so I've heard.
That's why they're having to go back and sort out some of the content they "fixed" for TS12, where they themselves used the exact method they told everyone not to use, so that it will work in T:ANE. :)

There are a few that do that, including myself, but the problem is having the information in the first place. Hence the continued questions about tags for procedural track.
Exactly!
My recent tunnel caused me a lot of problems, for what should be such a simple thing to build.
Some of it was because the changes that took place in my absence, but a lot of it was trying to figure out how the pieces were supposed to be positioned in Max.
Although there are probably rare examples where tunnels need a different entrance and exit, for most cases it would seem to make more sense to have Trainz use the same mesh for both, so only one need be supplied.

And for the positioning, why the entrance and the tunnel mesh can't be both position at origin in x and y, and the length of both given via tags in the config, I just don't know.
That's all the information needed for the game to work out exactly where things should be placed in the spline.
There seems to be a lot of dodgy legacy design in Trainz, which makes the need for information all the more important.

One of the Kickstarter stretch goals was more support for content creators and documentation. From memory the vote attracted about 2%. So when Trainz users complain there is no updated content on the DLS then they only have themselves to blame. When I voted for that particular goal I knew I was voting for a lost cause. :(
I noticed in another thread, someone said the same thing (it may have been you), and that the majority were obviously going to vote for all the big features instead.

For a company as small as N3V, and a game like T:ANE that's never going to take advantage of it's new features without brand new content, I'm surprised support and documentation was in the voting list.
It should have been a necessity, and money should have been set aside for that before anything else.
Problem is, they've always got by without having to invest hardly anything in this area in the past, with info being shared on the forums between creators.
In fact, if I remember correctly, that very last official CCG was community written (TRS2006?).

Some of the examples on the Wiki are a good start, but once again, I get the feeling that it's not going to be followed through.

As long as the lack of official information doesn't get too frustrating for me, I'll crack on....for now. :)

Brian.
 
Bash things together until they work! :hehe:

The lack of official documentation is a real pain, we'll get there over time however. The community will pick things up, and hopefully produce better content in the long run.

Should we have to go it alone? No. Hopefully we will receive the information we need as time goes on so we can get the very best out of T:ANE from a visual and performance perspective. Content creation may become more complicated in the process, so let's just see it as a challenge to step up to.

Jack
 
One of the Kickstarter stretch goals was more support for content creators and documentation. From memory the vote attracted about 2%. So when Trainz users complain there is no updated content on the DLS then they only have themselves to blame. When I voted for that particular goal I knew I was voting for a lost cause. :(

Given the way things have panned out after the KickStarter, it looks like content creators are getting the attention now, regardless of the stretch goals. Not saying that is a bad thing :)

Can I congratulate you on being the only representative volunteer. I suspect the other members of the Trainz Dev forum may be feeling less charitable about being unpaid tech support for N3V.
 
...

Can I congratulate you on being the only representative volunteer. I suspect the other members of the Trainz Dev forum may be feeling less charitable about being unpaid tech support for N3V.
Or, the only village idiot. :confused:

The TrainzDev forum started with some vigour and there have been some really interesting posts. However, we need some fixes from N3V.

I think they are currently focussed on the Mac version which, no doubt, will be music to your ears. :D Even I think it is about time.

For Smileyman: I cannot but agree with everything you said.
 
Back
Top