LODS and Draw Distance

Discussion in 'General Discussion' started by slimsymeat, Jul 22, 2016.

  1. slimsymeat

    slimsymeat Registered

    Joined:
    Feb 7, 2013
    Messages:
    86
    Likes Received:
    20
    This was so easy in rfactor to set. Edit the scn or cam files and adjust the lods and draw distance. Why isn't there a slider in the menus or and adjustment in the upgrades. Hardware has got better yet we're stuck with cars and objects popping into view. Is there a way round this?
    Thanks in advance.
     
  2. Euskotracks

    Euskotracks Registered

    Joined:
    Nov 29, 2013
    Messages:
    1,092
    Likes Received:
    191
    I am not sure about what you are trying to claim.

    Despite hardware improvement, the performance today is not better than 5 years ago. Tracks and cars are much more resources demanding. If you run rF1 at full with today's hardware you get hundreds of fps.

    In conclusion, the old techniques for improving performance are still needed today and in the future probably.

    Regarding the way this needs to worked out by modders I do agree that better techniques would be welcome. At least from track modding point of view. I cannot talk for car modding though.

    From my experience, a good draw distance (clip planes) applied to the heaviest objects in terms of performance (file size is a good indicator) can improve performance by 30%.

    The way I do this is tedious and probably not optimum. I start assigning 300 m or so for all the objects in the scn. Afterwords I start increasing this distance to avoid objects popping up while driving. This second part is the tedious one since it requires lots of trial and error in order to get the optimum values for each object. Imagine how many objects are there in a normal track....

    For this rendering technique, I would suggest that some kind of feature to be introduced in dev mode. This would basically render all objects in scene all the time and it would keep the highest distance at which each object is actually visible in screen (let's say by more than X pixels).

    Those values could be assigned as clip planes for the objects. This feature does not need to be running in realtime and I could imagine AI car running like in slow motion. Imagine something opposite to ctrl+x. This could be useful for video editing as well.

    In any case I would suggest a different technique in order to sort visible objects in scene. It would basicallly consist in dividing the track in X segments. For each segment and using a similar technique as the suggested one for actual clip plane definition, the visible objects while driving throughout that segment would be ticked to 1 and 0 for the others. Faster probably than calculating distance every I dont know how many seconds (who knows if for each frame!).

    It should be noted that this techniques may not be good while driving backwards or out of the track. However, I would say that in all those cases you probably had some accident ot an offtrack. Probably in those cases a popping up object is not your worst problem!!

    I hope someone finds this helpful.

    Enviado desde mi ONE A2001 mediante Tapatalk
     
  3. slimsymeat

    slimsymeat Registered

    Joined:
    Feb 7, 2013
    Messages:
    86
    Likes Received:
    20
    Claim?
    I used to run SLI 780ti's now a GTX1080. I get enough FPS to not have pop up. I appreciate it is very tedious when creating a track. Lod in and Out. But there is a multiplier in the cams.cam for the cars. Can this not be linked to the PLR? You can set LOD multiplier for when in the pits.
    Thanks again for the reply.
     
    Last edited by a moderator: Jul 22, 2016
  4. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    The LOD in/out are stored in each individual object's .gmt not the .scn. Perhaps you can change them with gJED? (gJED is very finicky with my computers, so I don't have much experience with it)
     
  5. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,004
    Likes Received:
    1,058
    Are they? Then why is there lines in the SCN saying LODIN and LODOUT?
     
  6. peterchen

    peterchen Registered

    Joined:
    Oct 25, 2011
    Messages:
    2,099
    Likes Received:
    287
    It´s still that easy. But you have to repack the track (car).
    Don´t know why some content-makers don´t make it properly though...
     
  7. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    Hmmm...I'm curious which track you're looking at. Is it maybe a converted track from rF1? Or are you looking at car stuff?

    I'm looking at a track that I've created from scratch, which definitely has LOD's working; which I set up in the Instance panel of the exporter in Max. There is no LODIN or LODOUT in the scene file. Granted, I'm just checking things in the Viewer, which may be different than DevMode or in-game.

    I also have Mores unpacked, and see nothing pertaining to LOD's in the .scn
     
  8. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    The GMTs have LOD in/out, but I think you can still override them in the SCN.
     
  9. Euskotracks

    Euskotracks Registered

    Joined:
    Nov 29, 2013
    Messages:
    1,092
    Likes Received:
    191
    I have never seen clip plane definition within scn for tracks. Nor in rF1 or rF2.

    LOD is level of detail and is only applied to cars at the format LOD in LOD out. With tracks what is visible at different quality settings is done with visgroups.

    Enviado desde mi ONE A2001 mediante Tapatalk
     
  10. WiZPER

    WiZPER Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,517
    Likes Received:
    186
    I've only seen LOD IN/OUT definitions per .GMT in .GEN (car files) - not sure if they would work in .SCN (track files).
     
  11. stonec

    stonec Registered

    Joined:
    Jun 19, 2012
    Messages:
    3,399
    Likes Received:
    1,488
    LODs are per GMT. The global clip plane distance is defined in track SCN for both front view and mirrors:

    View=mainview
    {
    Clear=False
    Color=(0, 0, 0)
    Size=(1.00, 1.00) Center=(0.5, 0.5)
    FOV=(77.75, 60.00)
    ClipPlanes=(0.50, 1500.00)
    View=rearview
    {
    Clear=False
    Color=(0, 0, 0)
    Size=(0.200, 0.100) Center=(0.50, 0.01)
    FOV=(62.5, 62.5)
    ClipPlanes=(0.50, 150.00)
    }
    }

    In my experience tweaking ClipPlanes makes very little difference to FPS, also it looks silly with horizon popping. The only way to improve performance considerably is by adjusting LOD distances for each GMT. Hence it's not useful with in-game sliders, as each GMT has its own clip distance.
     
  12. jpalesi

    jpalesi Registered

    Joined:
    Sep 15, 2011
    Messages:
    366
    Likes Received:
    231
    I can confirm it was possible in rF1, and I'm pretty sure it's still possible in rF2.
     
  13. Emery

    Emery Registered

    Joined:
    Oct 24, 2010
    Messages:
    3,035
    Likes Received:
    1,654
    Believe you can still use LOD on the GMTs in addition to Visgroups, particularly as Visgroups completely remove an object except for visgroup D/E that comes into effect only at Low detail. After all, it's only logical that if LODs work for vehicles, then they should work for other track objects.

    VisGroup Value Description

    A 1 Removed from High detail and lower
    B 2 Removed from Med detail and lower
    C 4 Removed from Low detail
    D 8 High LOD object to be replaced by object tagged 16/E at low detail setting
    E 16 Lower LOD object to replace object tagged 8/D at low detail setting
    F 32 Not visible in the rear view mirror
    G 64 Removed from practice sessions
    H 128 Removed from qualifying sessions
    I 256 Removed from race sessions
    J 512 Removed when night time
    K 1024 Removed when daytime
    L 2048 Only visible when viewed from an active trackside cam
    M 4096 Removed from warmup session (still active?)
     
  14. Euskotracks

    Euskotracks Registered

    Joined:
    Nov 29, 2013
    Messages:
    1,092
    Likes Received:
    191
    The improvement will depend on how much is the actual load with respect to the optimized one. As I said, fine tweaking of a non optimized track can give fps improvements of over 30%. If you reduce global clip plane values of an already optimized track you should get few improvement.

    This tests are performed with only own car on track and using fraps benchmark in a full lap.
    Values are consistent when you repeat tests.

    It should be noted that some vehicles are so poorly optimized that they can affect performance even more than the track itself. Some cars are objects that surpass 10MB combined gmt file size (textures are not so important) which has a big impact when rendering in full detail with multiple cars.

    The techniques for reduction of GPU load are very important and as I said, several improvements could be done so that any modder could easily optimize its content.

    Enviado desde mi ONE A2001 mediante Tapatalk
     
  15. Euskotracks

    Euskotracks Registered

    Joined:
    Nov 29, 2013
    Messages:
    1,092
    Likes Received:
    191
    If someone wants to try how important clip planes are, he may do the following.

    - Extract the track to dev mode structure (use Noel's tool).
    - Open the track with 3dsimed (not sure if it can be done with GJED)
    - zoom out until you can view all the scenery.
    - select all the objects in the scene and pick the option to assign properties massively.
    - adjust clip plane in to 0 and out to 10000. Accept.
    - export the gmt objects to the original folder.
    -edit scn global clip planes on the first lines of the scn files. Use same values as for the objects. In case of multiple layouts beware to do it in all of them or later use the modified one.
    - repack the track with a new version number. Usually only the layout and gmt .MAS files would only need to be redefined.

    If the track you are using is well optimized you will get quite a huge difference fps performance between both versions.

    The just created version will have no objects popping up. If you have a decent card you might run it smoothly!



    I would like also to point out that it is also very important the way terrain is split in different objects.

    I have tested myself that if all terrain is in one object it drops performance to very low values. I would suspect that this technique is also important when packing objects.

    I have optimized my tracks in terms of terrain since it involves few textures and tdf properties are alike. However for objects this is more difficult since there are a lot of them.

    It would be great to have like a compilation process so that the whole scn would be automatically reorganized in optimum objects to maximize performance.

    I know I ask for many things but I certainly believe that all the job done to automatize all this processes is a well invested time since it will benefits the whole community.

    Enviado desde mi ONE A2001 mediante Tapatalk
     
  16. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    I think you're confusing Clip Planes with LOD's. Clip planes are properties of the "camera" (i.e. the View) rather than properties of the objects. While the goal of the two are similar (to limit how much geometry is being drawn onscreen) the function of each is different.

    Clip planes determine the distance from the camera to the geometry (not even the whole object itself, but down to even sub-triangle or "fragment" as it can be called) is rendered. This happens at around the rasterization step of the rendering pipeline (when the 3D geometry is being drawn onscreen as pixels). The LOD's happens much earlier in the pipeline, and determines the distance from the camera that the 3D object as a whole is even being asked to start the process of being converted from 3D data into a pixel onscreen. LODs play a much larger role in optimization than clip planes.

    You're absolutely right about terrain, too. It absolutely 'should' be split into multiple objects. By splitting up the terrain, much less of it is asked by the engine to even start the process of going through the GPU pipeline. For instance, terrain that is behind the rendering 'camera' will not be asked to start the process. However, it is also possible to go too small of chunks as well. It largely depends on the layout of the track.
     
  17. Euskotracks

    Euskotracks Registered

    Joined:
    Nov 29, 2013
    Messages:
    1,092
    Likes Received:
    191
    You are probably right. However, I am using the terminology from 3dsimed which is the program I use for tuning up the rendering distance for each gmt. In 3dsimed this is called clip planes. It is the property at object level and you never get to see the value in the scn. It is included in the gmt. If it can be overridden in the scn using the format suggested some post earlier is unknown for me. In fact I really do not understand the logic of some properties being coded in the gmt and other defined with tags within the scn. It is quite confusing for newbies.

    In BTB, which is the base program for creating my tracks, you can also define it but I can't remember how is the property named. However since other things need to be added in 3dsimed (cornerworkers, trees, ...) I prefer to be leave this task for the end of the project when I am fine with the rest of the things.

    Enviado desde mi ONE A2001 mediante Tapatalk
     
  18. Tuttle

    Tuttle Technical Art Director - Env Lead

    Joined:
    Feb 14, 2012
    Messages:
    2,480
    Likes Received:
    775
    Clipping happens for stuff oustide the range between the Near Clip and Far Clip range. This range is called frustum/culling. LOD out is the max distance you want a specific asset to be rendered, in relationship to your actual position.

    You could tweak (SCN) clipping to avoid far terrains and hills to be culled out before the end of the mesh. You'd need LOD to force specific assets, or part of those assets (details), to be rendered just inside a specific distance from you.
     
  19. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    Really?

    I haven't used simed for a long time, but I remember loading an object, right-clicking and going to properties (I think...), and in the list of object properties (like position, pivot point, etc) was LOD in and LOD out.

    Well judging by the fact hardly anyone seems to use the SCN to set the LODs, I think it's fair to say it's not often needed.
     
  20. WiZPER

    WiZPER Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,517
    Likes Received:
    186
    It would however be VERY useful to have universal customizable clip plane and LOD max value in the graphics settings. Mainly for a fast and easy performance optimization of tracks which basicly have 10000 as LOD for most if not all GMTs (which is crazy!)

    I'm not going to point fingers, but even highly respected modders/groups tend to not care about LODs.
     

Share This Page