The online racing simulator
TEST PATCH 0.6H2 (now H11)
(391 posts, closed, started )
Some map bugs (part 2)













valiugera : Shadows glich can't be considered as bugs, that's just the way vertex shadows works.
Hopefully, Scawen will work on soft shadow mapping to make LFS looks really nice Smile
Quote from nacim :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 ?

Not really.
Depends how often you delete/create new objects, you may either use some clever allocation to reuse the same 0..max indices for all objects (LFS actually has max_objects capped, so it can allocate single vector to hold them all), or ... switch off your common sense ... just move around the tail of vector every frame, omitting deleted objects. If you delete them all at one go, it's just O(N), and with the object max around 1k, it's faster to move around those 1k bytes, than handling a dereferenced linked list with O(1) insert/delete!

Because the 1k mem move is within one, maybe two, cache pages, the linked list with dynamic allocation will inevitably span over 4+ pages over time, and at that point you can do probably whole frustum culling + object delete + vector update in the same amount of time as the cache-miss penalties took.

As long as you stay withing cache page boundary, you can do hundreds of operations for free. Once your memory access pattern is not predictable for CPU, and requires many pages, you are at least hundreds time slower, or even thousands, if you miss even the top level cache, and you actually have to really fetch the data from RAM.
For CPU it's similar thing, as when human is watching loading data from HDD... Big grin Takes like ages...
-
(Be2K) DELETED by Scawen : spam / reply to spam
-
(Scawen) DELETED by Scawen : spam / reply to spam
I get a "Can not create swap file" error everytime I try to switch it to Oculus mode in the 3D setting of LFS. I reinstalled from scratch and have the same issue. Any ideas?
Hi cmorosco, maybe the exact message was "Could not create swap textures" ?

Normally when I see that, the Oculus Runtime needs to be restarted.

Oculus Configuration Utility... Tools... Service... Stop Runtime... Yes.
Then Open the Configuration Utility again to restart the Runtime.
Scawen, that fixed it. Thanks!
Quote from Ped7g :[explanation]

Well, I guess your explanation were a bit far for my current knowledge, but after reading this post several times, I think I finally got it, so thanks for learing me this kind of stuff ! Thumbs up

But now, I have another question (yep, again, never stop learning) : If the max object number is fixed, isn't that better to use an array instead of a dynamic vector ? Smile

@Scawen : I think Sleep of VSync is also needed for exit credits screen, CPU is currently at max on core 0 on credits screen (too much power needed for credits Big grin).
Quote from nacim :But now, I have another question (yep, again, never stop learning) : If the max object number is fixed, isn't that better to use an array instead of a dynamic vector ? Smile

It's just an array of these:

struct ObjectDrawInfo
{
int ODIViewSize; // the real ViewSize or zero if it should not be drawn in this config
Vec ODIViewCentre;
};

Quote from nacim :I think Sleep of VSync is also needed for exit credits screen, CPU is currently at max on core 0 on credits screen (too much power needed for credits Big grin).

Good point, thanks
@Scawen : Thanks, but quote name and refering post is not mine while it's my post lol. ^^
Vec is a simple struct of 3 floats right ? Smile
Fixed the quote name! Big grin I made a mistake when editing the quote, because your quote had a quote in it!

Vec actually is 3 ints. In LFS the positions of objects are int (fixed point) so that they have the same granularity regardless of their distance from the origin.
I suspect a small bug has been introduced with the "Sky texture is now drawn in mirrors" improvement. The wooden barriers reflect the sky textures. I couldn't reproduce it with 0.6H
Attached images
lfs_00000002.jpg
lfs_00000003.jpg
One more strange bug found. When I connect to host (with no cars on track) sky isn't shown initially. To reproduce this I need non-empty host, so that its not in the lobby screen.

To get sky working I need to join with a car.
Attached images
lfs_00000033.jpg
lfs_00000034.jpg
lfs_00000035.jpg
lfs_00000037.jpg
Quote from Scawen :Vec actually is 3 ints. In LFS the positions of objects are int (fixed point) so that they have the same granularity regardless of their distance from the origin.

But in DirectX, 1 unit is quite big, so do you apply a factor to theses int positions after that to get the "real" position ? Uhmm

Quote from vitaly_m :

Nice one, I like the last screenshot, makes me remember LFS Night Mod. Big grin
Quote from sicotange :I suspect a small bug has been introduced with the "Sky texture is now drawn in mirrors" improvement. The wooden barriers reflect the sky textures. I couldn't reproduce it with 0.6H

I've fixed that in my version. It's objects with an alpha overlay not drawing the alpha overlay if there is a shadow cast near them.

Quote from vitaly_m :One more strange bug found. When I connect to host (with no cars on track) sky isn't shown initially. To reproduce this I need non-empty host, so that its not in the lobby screen.

To get sky working I need to join with a car.

Thanks, good find.

Quote from nacim :
Quote from Scawen :Vec actually is 3 ints. In LFS the positions of objects are int (fixed point) so that they have the same granularity regardless of their distance from the origin.

But in DirectX, 1 unit is quite big, so do you apply a factor to theses int positions after that to get the "real" position ? Uhmm

It is metres times 65536. The high 16 bits are the whole metres and the low 16 bits are the sub-metres. So the smallest possible increment in position is 1/65536 m (around 1/66 of a mm). This notation can represent values from -32768 to 32768 m.
Quote :Translations :

Updated Italian, Romanian, Chinese and Turkish translations

I'm interested how this done. There is any chance to edit my nation language translation also ? And what i need to do for this ? Just open topic in other section and make a request of language ? And some of future test patch will contain new shadow system or any improvement of it ?

Sorry to ask here.
sti228 : Do you use the Georgian alphabet? If so, I don't think we can support Georgian at the moment. I think that would have to wait until some time in the future if we changed to the Unicode system or something like that.

We can only support the code pages you see on this link (excluding Hebrew and Arabic because they require reverse direction).
https://msdn.microsoft.com/en-us/goglobal/bb964654.aspx
Quote from Scawen :sti228 : Do you use the Georgian alphabet? If so, I don't think we can support Georgian at the moment. I think that would have to wait until some time in the future if we changed to the Unicode system or something like that.

We can only support the code pages you see on this link (excluding Hebrew and Arabic because they require reverse direction).
https://msdn.microsoft.com/en-us/goglobal/bb964654.aspx

Yes, i try translate buy myself and letters don't appeared in game (only characters). Ok, i understand. Thank you for reply.
Quote from vitaly_m :To get sky working I need to join with a car.

Also sky disappears if you enter SHIFT+U mode then change texture resolution.

The new sky creation function call was positioned badly. Now fixed in my version.
Quote from Scawen :It is metres times 65536. The high 16 bits are the whole metres and the low 16 bits are the sub-metres. So the smallest possible increment in position is 1/65536 m (around 1/66 of a mm). This notation can represent values from -32768 to 32768 m.

Okay, this range gives you way much than the necessary to work with. But what is the real use, what do you mean by "the same granularity regardless of their distance from the origin" exactly, I'm not sure to get the point about this. Uhmm
Take float for example. It lose precision as numbers get larger. Low numbers can provide good fidelity for sure (1.234567 m), but if number is large enough you'll get barely any resolution (123456.7 m) ~ 0.1 m
Yes, as Daniel's example demonstrates.

Fixed point - same number of digits, decimal point in the same place for all possible values.
Floating point - same number of digits, decimal point moves up and down.

In floating point, in effect some of the bits specify the location of the 'decimal point' and the other bits are the actual digits.

Anyway, fixed point (which is just an integer to the compiler) gives you the same resolution (granularity) over their entire range.

So, in LFS's 16.16 fixed point system, there are 65536 possible locations between 0m and 1m.
There are also 65536 possible locations between 10000m and 10001m.
This is not the case at all if you use floating point.
I understand what you mean now (and BTW, why float are so called float). Thanks for these very interesting informations. Smile
I'll try to use it on my code as well now Big grin
Means LFS doesn't suffer from (for example) Assetto's craziness of wobbling scenery and vehicles when you're far from 0,0...
Quote from Scawen :It is metres times 65536. The high 16 bits are the whole metres and the low 16 bits are the sub-metres. So the smallest possible increment in position is 1/65536 m (around 1/66 of a mm). This notation can represent values from -32768 to 32768 m.

You can literally fit an entire city in that space. At what point does the engine say "no more, please!" and crash? I've LOVE to fit my entire city from Google Maps export into that space. It'd be fantastic for driver training with an Oculus Rift. Have people "respond" to calls within the game, have to use the real street directions. I'd really love to work on this ... I just need a little more information from you Scawen on the circuit format. Smile.
This thread is closed

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