The online racing simulator
TEST PATCH 0.6H2 (now H11)
NOTE : FULL VERSION 0.6J IS NOW AVAILABLE!
www.lfs.net/forum/thread/88217


WARNING : THIS IS A TEST

NOTE : THIS DOES NOT CONTAIN NEW TYRE PHYSICS OR ANY NEW CONTENT

PLEASE TEST BEFORE YOU POST

PLEASE AVOID : OFF-TOPIC FEATURE REQUESTS / UNRELATED COMMENTS


Hello Racers, here is a new TEST PATCH : 0.6H11

It contains a good performance increase which is helpful at the new Westhill track.
Also there are more fixes and improvements including support for the Oculus Rift 0.6 runtime.

Entering Rift mode is now very simple : Options... View... 3D button at the top of the screen.
Do not force vertical sync in Rift mode as it would limit frame rate to monitor refresh rate.
SLI in Rift mode will probably cause a stuttering image - please disable SLI.

This test patch IS compatible with version 0.6H
This test patch CAN play replays from version 0.6H

You cannot upload hotlaps made with this test patch because it is only a test patch, not an official patch.

Please keep a backup of your LFS.exe from 0.6H so you can easily go back if there are any problems.


Changes from 0.6H10 to 0.6H11 :

Removed some debug code from the exe
Combined the test patch 0.6H2 to 0.6H6 change logs
More updated translations - thanks again translators


Changes from 0.6H6 to 0.6H10 :

Misc :

One more graphical optimisation for slightly higher frame rate
Z-buffer depth setting can now be changed without restarting LFS
Reduced some of the Z-buffer issues when using a 16 bit Z-buffer

Fixes for Windows 10 :

High CPU/GPU on ALT+TAB from full screen with vsync in Windows 10
Pause when exiting from replay or reaching end of List of Hosts


Changes from 0.6H to 0.6H6 :

Optimisations :

Static vertex buffers reorganised to reduce DirectX instructions
Frames buffered (default 1) to allow next frame to start rendering
More efficient car distance sorting system for sound and graphics
Dynamic vertex buffers now set to use hardware vertex processing
Better frame rate in places where many objects may be visible

Graphics :

Sky texture is now drawn in mirrors
Layout editor object selection buttons are sorted by distance
Mirror now uses 24 bit Z buffer if Z buffer setting is more than 16

Frame rate limitation system :

Frame rate limitation system is now accurate and has better values
New frame info display shows sleep / physics updates / gpu waiting
Now using an event query instead of a lock for input lag prevention
Minimum sleep setting changed to "Sleep every frame" (yes / no)

Misc :

Now using Direct3D 9Ex if available (Windows Vista and later)
Reduced glitch when autocross objects are optimised (e.g. on load)
Reduced min / max values for "Sound lag" setting - default now 0.08
New Audio Option "Sound when window is inactive" (off / on)

3D view modes :

Added a 3D level slider option to adjust monitor-based 3D views
Reduced CPU / GPU usage by sharing scene preparation for both eyes

Oculus Rift :

Now using Oculus SDK version 0.6.0.1 which includes timewarp
You can now enter and leave Rift mode without restarting LFS
Smooth display (if you do not use SLI or force vertical sync)
Monitor window view options : blank / one eye / two eyes

Oculus Rift compatibility mode :

For users who cannot use the Oculus 0.6 runtime, you can still use
the 0.5 runtime. Simply rename the ORDIRECT.dll to some other name
and LFS will then use LFSORDLL.dll instead (extended mode only).

Fixes :

Some buildings at Westhill track were drawn using a slow method
Mouse clipped to window (CTRL+C) now works properly with ALT+TAB
Using mouse wheel to change gear did not work properly at high fps
Layout editor object selection buttons used interface button slots
Crash changing texture resolution with two or more objects selected
Anisotropic filtering did not work on car textures (including skin)


INSTALLATION INSTRUCTIONS :

A FULL version of LFS 0.6H must already be installed


To install the PATCH using the SELF EXTRACTING ARCHIVE :

1) Move or save the patch into your main LFS folder
2) Double click the patch to extract it to that folder
3) When you see "Confirm File Replace" select "Yes to All"
4) Now you can start LFS in the normal way

NOTE : You can see if the patch is correctly installed when you run
the program (LFS.exe). At the bottom of the entry screen : 0.6H11


DOWNLOADS :


NOTE : FULL VERSION 0.6J IS NOW AVAILABLE!
www.lfs.net/forum/thread/88217


PATCH 0.6H TO 0.6H11 (SELF EXTRACTING ARCHIVE) (if you already have 0.6H) :
www.lfs.net/file_lfs.php?name=LFS_PATCH_6H_TO_6H11.exe (1.3 MB)

PATCH 0.6H TO 0.6H11 (ALTERNATIVE ZIP) (if you already have 0.6H) :
www.lfs.net/file_lfs.php?name=LFS_PATCH_6H_TO_6H11.zip (1.5 MB)
Back to business Wink
Runs fine here !

edit:
I still got some weird drop of framerate (using Vsync with a 60Hz monitor) when at some places in WE ...
only noticed with external camera.
Quote :Minimum sleep can now be set to 0 ms (previous minimum was 1)

Maybe you should keep Sleep(1); while LFS is minimized, because it fully utilises one thread when minimized Smile
#4 - nacim
Bug report :
- this barrier object become shiny parts when close to my car. (first 3 screenshots)
- road triangles becomes clearer when my car is on it (Michael Jackson !) (screenshot 4)


EDIT : Personal thoughts, marshals LODs are really too close (screenshot 5)
Attached images
lfs_00000060.png
lfs_00000061.png
lfs_00000062.png
lfs_00000063.png
lfs_00000064.png
Thumbs up
Some map bugs.







#7 - nacim
Lol, nice ones ! I really like the line who just says "F*ck physics, and your car !" Big grin

EDIT : Bug report, with VSync enabled, LFS minimised seems to run with 0ms sleep ,causing my screen head phones to coil whine.
A small suggestion as you are working on it. Can you add a new button for layout makers to dublicate the object into the same position? Like "o" but into the same x/y/z. Maybe "n" (new) ?

Also what about the new .dll? Do we need both of them?

EDIT: Oh and while you right click at the "x/y/z" in multiple objects, it would be nice to be able to set them at that value, cause now it only works in a single object. It's helpful to align them into the same coordinate.
Quote from DANIEL-CRO :
Quote :Minimum sleep can now be set to 0 ms (previous minimum was 1)

Maybe you should keep Sleep(1); while LFS is minimized, because it fully utilises one thread when minimized Smile

When the framerate isn't limited indeed.

And wow.. System memory usage dropped from 900 Mb -> 550 Mb @DX9Ex (when being online with Westhill) ... Nice!
The toilet is black?
Quote from borja_s13 :The toilet is black?
[PIC]

It isn't black at me

EDIT: Im wrong, check my next post.
Attached images
lfs_00000001.jpg
It isn't black for me too.

borja_s13, check your textures mods. Wink
No , for some other users its too.
Enter in shift u mode , its sometimes , not always..
You are right, the toilets have some weird textures only if using Shift+U mode and the car is close to them. Check pictures. For the record, Im always using a pure and clean install of LFS to test these patches, without any mods.
Attached images
1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
Yes , when u are near , in diferent cams ... sometimes it fails..
Thank you for the bug reports and suggestions (e.g. Sleep needed at some times). I confirm I can reproduce the shiny buildings bug, when a car shadow is near some of the buildings or other objects with sky reflections.

One CPU usage / frame rate optimisation I should explain to you. There is a test key (CTRL) for you to see the effect. It is an optimisation for the code when LFS is deciding, each frame, which objects to draw (by checking if their bounding sphere is on the screen). Previously it would visit each object in memory to do this crude elimination but now the centre and radius of each object is stored in a special list so that LFS doesn't have to jump around the memory to get the data. This saves on memory access and is a lot faster in some situations. The situation where it is most helpful is this :

When you are in a place where a lot of objects may be visible from that location but you are looking in a direction where not so many of them are visible. Smile

You can test this effect by holding down CTRL at any time. You should then see a frame rate drop as it uses the old style draw. The optimisation (i.e. when you do not hold CTRL) is most useful in SHIFT+U mode, because there are no draw lists to hide most of the objects (that already avoided the radius check on most objects).
Quote from DarkKostas :A small suggestion as you are working on it. Can you add a new button for layout makers to dublicate the object into the same position? Like "o" but into the same x/y/z. Maybe "n" (new) ?

I think I know what you mean but it is not allowed to have the same objects in the same position. I suppose you mean for concrete objects, you want to create them in that position then move them to a different position? But the way the system works, you can't have the same objects in the same position at any time.

So I'm not sure how to help. Can you describe an example of the situation where it might help?

Do you know the SHIFT+O / SHIFT+M keys to position objects to the nearest metre? I know it's not really what you are talking about, but it helps when objecs are aligned on the metre grid, then you can easily align other objects to the metre grid as well.

Quote from DarkKostas :Also what about the new .dll? Do we need both of them?

LFSORDLL.dll is the Rift DLL for the older Oculus runtime. The old LFS.exe uses that one. The new LFS.exe uses the ORDIRECT.dll to use the Oculus 0.6.0.0 runtime.
Works perfectly fine here. Good news is that introduction of D3D9Ex doesn't seem to cause any trouble with WINE.
Quote from Scawen :

This optimisation makes me goes from 250 to 1499.9 FPS when SHIFT+U at some places, but isn't this a simple Frustrum Culling ? Please don't tell me you succedded to have that much performance without a basic Frustrum Culling ! That would be madness. ^^

If you want to get even more juice, you can check bounding boxes or sphere depending on the object to be even more accurate in which object to draw.
Quote from Scawen :I suppose you mean for concrete objects, you want to create them in that position then move them to a different position? But the way the system works, you can't have the same objects in the same position at any time.

So I'm not sure how to help. Can you describe an example of the situation where it might help?

Do you know the SHIFT+O / SHIFT+M keys to position objects to the nearest metre? I know it's not really what you are talking about, but it helps when objecs are aligned on the metre grid, then you can easily align other objects to the metre grid as well.

I see. It could be useful to align the objects into the same X or Y and Z. So you dublicate it, and move it a meter on the left, then dublicate and move plus one meter on the left again, so they are all the same with same spacing,
instead of having to place the new one and then move it manually into the new position.

I didn't know about SHIFT+O/M, i'll give it a try later.
Quote from Scawen :LFSORDLL.dll is the Rift DLL for the older Oculus runtime. The old LFS.exe uses that one. The new LFS.exe uses the ORDIRECT.dll to use the Oculus 0.6.0.0 runtime.

Thanks for your answers. So i guess people using the new version can just remove the LFSORDLL.dll and keep just the other one Wink Cheers.
Quote from nacim :
Quote from Scawen :

This optimisation makes me goes from 250 to 1499.9 FPS when SHIFT+U at some places, but isn't this a simple Frustrum Culling ? Please don't tell me you succedded to have that much performance without a basic Frustrum Culling ! That would be madness. ^^

No, it's a bit more subtle change:
both code paths (with Ctrl and without) do the same frustum culling with same values and same objects, the difference is only in memory layout. The new optimized code does have pos+radius data for culling outside of object in continuous memory block, so the culling has better cache-hit ratio, than checking the data all over the place scattered inside each object's instance memory. Hmmm.. Scawen used wording "in another list", but I think he meant C++ vector, so the data really are next to each other in memory without the need to do some dereferencing of pointers just to reject object as not visible.

If in the future the amount of objects on map will keep rising, he may very likely gain further performance by using some meta rejections of whole groups, like having some spatial tree (maybe even some dynamic along grid lines, or BSP ones for static objects), or just meta boundary balls containing many smaller objects.

Then again, the last time I did work with 3D programming, having some thousands of tris in the GPU and drawing them in single batch with single material was often as fast as culling them on the CPU... And that was like 10y back. Meanwhile the whole world of 3D engines did change dramatically, with the deferred rendering being now preferred way (didn't even exist back when I was insider), so I may be heavily misguided by my old knowledge.
Although at the base you have some thousands of floats to process, either on CPU or GPU, and some old truths like avoiding cache-misses still apply, as Scawen demonstrated just now. Big grin
You are right, that's a way more subtile change than thought. Thanks for clarification, and you just learn me something (which is totally normal, I'm a newbie in 3D engine developpement). Smile

EDIT : After some thoughts, there is something I want to know : This technique works only for static objects right ? Because dynamics ones need to update their position in the vector and so there is even performance loss or them, right ?
Quote from DarkKostas :

I see. It could be useful to align the objects into the same X or Y and Z. So you dublicate it, and move it a meter on the left, then dublicate and move plus one meter on the left again, so they are all the same with same spacing,
instead of having to place the new one and then move it manually into the new position.

Isn't that possible already?



On the side note, I'd like to be able to select multiple objects more easily. For example you make a rectangle using mouse and all objects that are inside of this rectangle are selected.
This "adds" the current selection into the new position. Your video is a good example though of why i'd like to have something like that. Check your cones? The ain't aligned perfectly.

So if this could be implemented. You would:
1. Add a cone.
2. Dublicate it
3. Hit the X's "^" twice
5. Go back at 2.

That way you can have perfectly aligned cones with same spacing.

Once you're done, you can do as you've done to the video and copy them to another place.
Then as Scawen said, try SHIFT+O to place objects to the nearest metre, that should help a bit.
This thread is closed

TEST PATCH 0.6H2 (now H11)
(391 posts, closed, started )
FGED GREDG RDFGDR GSFDG