.
  • Crossfade LOD Transitions for Clutter Effects

    Making good level of detail ( LOD ) even for a professional artist can be hard work. You’ve got to try and make each LOD transition look very similar to the previous LOD transition while taking into account the distance at which that LOD will be shown on the screen.

    The standard LOD system in Trainz simply swaps one mesh for another at certain transition points.

    With the standard Trainz LOD system you couldn't normally be as aggressive with the distances mentioned above, as the change would be too noticeable given the changes in the meshes. For the TRS18 clutter effect, we offer new crossfade LOD transitions which mask any obvious mesh swaps by fading one mesh into the other over a certain distance.



    Please note that this technique is only for the new m.clutter material, and not for general scenery LODs.

    For more information, please visit our blog post here.


    For more information on future Trainz development be sure to keep up-to-date at http://trainzportal.com or see all the articles and have your say forums.
    Comments 14 Comments
    1. Dinorius_Redundicus's Avatar
      Dinorius_Redundicus -
      I'm having a bit of trouble with the terminology being used. The article talks about materials in terms of polygon count. How can a material have polygons? I thought PBR was all about giving the impression of polygons and physical volume but using only 2D texture materials. As an eminent Queenslander once said "please explain".
    1. Shortline2's Avatar
      Shortline2 -
      That looks nice, if you can make it work on railroad tracks as well it would be even better ;-)

      Linda
    1. n3vpolsen's Avatar
      n3vpolsen -
      Quote Originally Posted by Dinorius_Redundicus View Post
      I'm having a bit of trouble with the terminology being used. The article talks about materials in terms of polygon count. How can a material have polygons? I thought PBR was all about giving the impression of polygons and physical volume but using only 2D texture materials. As an eminent Queenslander once said "please explain".
      PBR (Physically Based Rendering) isn't about physical volume, that would be height maps / parallax effects. PBR uses emissive, roughness, ambient occlusion and metallic textures (all in one texture in our engine) to give a visual result based on lighting.

      Height maps are used in parallax effects to give the perception of depth on (well "into") a polygon surface.

      Regarding the reference to Materials in this crossfade blog, we are saying (with LOD0) one mesh or one part of the mesh will be UV'd with Material A and this part is made up of 500 polys. Another mesh or other part of the mesh will be UV'd with Material B and this part is made up of 100 polys. The meshes or parts of the mesh (however you decided to model your asset) must have 2 materials in LOD0 so the 500 polys with Material A can start off opaque and start to fade out as the 100 polys with Material B starts to fade in to create that smooth blend. It's also worth noting that you are only exporting 1 file from your modelling software, for example lod0.fbx which will contain all the polys and materials (500-A + 100-B)
    1. Dinorius_Redundicus's Avatar
      Dinorius_Redundicus -
      Thanks for the high level overview. Remember that many in your audience are non-professional modellers, stuck in our old creation methods, maybe even still struggling to master them. I’m sure a lot of us are hearing about these new methods for the first time and at a rate of about one per week. It’s easy to get lost in the unfamiliar jargon and details. Seeing the big picture helps.
    1. martinvk's Avatar
      martinvk -
      Hope to see this extended to other materials as soon(tm) as possible. Once other objects get this smooth transition effect, I think the immersive experience will go up by several notches. Bravo
    1. PerRock's Avatar
      PerRock -
      Digging that new UI ... but I'm sure there are others here who hate it.
    1. Dinorius_Redundicus's Avatar
      Dinorius_Redundicus -
      @n3vpolsen. I re-read your explanation a few times now, but I still don't get why the high- and low-poly incarnations of LOD0 need different materials.

      It's the meshes that are cross-fading (right?), so wouldn't the transition look smoother if both meshes used exactly the same material as they cross-fade? Or are the materials A and B actually the same in appearance, but just given different names because the game has no other way to distinguish the high-poly mesh from its low-poly counterpart?
    1. EverTrainz's Avatar
      EverTrainz -
      LOD transitions don't seem as bothersome to me unless it's modeled grass/shrub meshes (covered by this Dev Diary) or track. Considering how frequently track is used, and how high the polygon count can reach, LOD is used rigorously, but the same amount of "rigor" is conveyed to our eyes as the LOD jumps between levels.

      Therefore, I think crossfading should be implemented on track spline assets, perhaps in a manner that makes it easier on the creators of pre-existing track.
    1. pdkoester's Avatar
      pdkoester -
      I think we are all going to miss the old popcorn effects, and need to learn to get accustomed to the new style.
    1. WindWalkr's Avatar
      WindWalkr -
      Quote Originally Posted by Dinorius_Redundicus View Post
      It's the meshes that are cross-fading (right?), so wouldn't the transition look smoother if both meshes used exactly the same material as they cross-fade? Or are the materials A and B actually the same in appearance, but just given different names because the game has no other way to distinguish the high-poly mesh from its low-poly counterpart?
      The fade parameters are material attributes, so to have one set of polygons "fading in" while another set is "fading out" they must belong to different materials. We expect that the materials will likely be equivalent in all other ways.

      chris
    1. WindWalkr's Avatar
      WindWalkr -
      Therefore, I think crossfading should be implemented on track spline assets, perhaps in a manner that makes it easier on the creators of pre-existing track.


      We continue to investigate improved techniques in all aspects of the product, however I should stress that the technique discussed here actually INCREASES the polygon count and overdraw ratios of the high LOD models, so may not be appropriate for models which have very high polygon counts or which regularly occupy large parts of the screen. Additionally, different hardware has different performance outcomes with this material, meaning that this technique may need to be restricted to parts of the scene which can reasonably be turned off where it causes performance problems. This is true of clutter- turning it off causes you to lose some nice visuals, but won't ruin the gameplay. It's not true of track or other major parts of the scene.

      It unfortunately isn't a case of "this looks great, let's use it on everything".

      chris
    1. Scitimar's Avatar
      Scitimar -
      Quote Originally Posted by WindWalkr View Post
      The fade parameters are material attributes, so to have one set of polygons "fading in" while another set is "fading out" they must belong to different materials. We expect that the materials will likely be equivalent in all other ways.

      chris
      Is height and/or normal usable in the material ?
    1. WindWalkr's Avatar
      WindWalkr -
      Quote Originally Posted by Scitimar View Post
      Is height and/or normal usable in the material ?
      Height, as in parallax displacement, is not present in this material.

      The material does use a normal map and PBR parameters.

      chris
    1. Scitimar's Avatar
      Scitimar -
      Quote Originally Posted by WindWalkr View Post
      Height, as in parallax displacement, is not present in this material.

      The material does use a normal map and PBR parameters.

      chris
      Thank You, and that looks quite good.