I am jumping right up into the saddle here and hoping that you already know the basics. To start I am going to place five different shapes (cube, sphere, cylinder, torus, and cone) on the work area and center their groups.
I want to scale them differently from each other so I can see them from afar, texture them, and center the component at its lowest point (or face, or just shift the Y for the torus) so they sit flat on the ground.
Now for Grouping. Here is where you create the essence of this magic known as LOD. It all starts with the format of the group name. The name will determine at what distance it will be shown at. I will tell you this now. Most of the problems people have with their models when they use LOD, is when they have a typo in the group name. The format is:
1_0000_<name of group>
The first number denotes the level with 1 being the closest and 10 being the farthest. In my example I am only going to make 5 levels. With most of my other models I have used up to 8. You cannot go beyond 10. Wonder why? It has to do with this screen:
You may have heard complaints from various forums where scenery object does not appear, or disappear, and someone pipes in and talks about setting your Scenery Density to 10... yup, if you set it to 1, only the level 1 grouped components appear (for the near sighted I guess). The Scenery Density setting is an old standby to help video card by stopping them from processing "distant objects". I don't think this is a problem with todays video cards, and its good that this setting is buried under menus. Set it to 10 and forget-about-it.
The second number is the depth (or distance) in meters at which the components under this group should be shown. You must use all four digits, so you need to pad it with zeros.
When grouping the hierarchy will always start with level 1, and place the other groups directly underneath level 1 (notice I am not calling this the "first level", because its not). Also, you need to keep the group name the same as the parent so the game engine can keep their association intact.
You can have Levels within Level however, you must keep the hierarchy intacted. Keep note of how the level 1's are grouped and the distances are are never greater than the parent.
Now I can export the model. Use the 'File > Export' method I mention in the basics. I would avoid using the wizard as it will impose its own LOD hierarchy on the model, and in this case we want to use ours.
Fire up the blueprint editor and make a new Scenery blueprint. Fill in the blanks as needed. Press 'Export'.
Let's pause here and see what happened. Find your new asset (the GeoPcDx not the BIN), and open it with serz.exe of RWTools. You will see the LOD at the very beginning of the file.
Now you know how Railworks reads it. If your model is small enough so it can edited and saved you can play with the values and see what happens (that will be your extra credit). There is nothing more to do now. Place your object in the game and watch.
Notice how the object popped out of existence? that is because the farthest depth my group can show is 50 meters (the 5_0050_Group).
What applications can you use this for? Many. As you get closer to a locomotive handrails can turn from triangles to cylinders. Nuts will only appear on close inspection. Radiator frills could be single faced and textured from a distance, but have awesome detail as you come within range. This last suggestion work well on houses and other static wayside models as well. Doing so will allow them to be cheap poly models for the distance, but rich fuller models for those pass bys from the cab.
No comments:
Post a Comment