Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VDrift 2014-09-26 bug fix release
09-26-2014, 12:57 PM (This post was last modified: 09-26-2014 01:17 PM by NaN.)
Post: #1
VDrift 2014-09-26 bug fix release
The release fixes a crash bug in joe loader, I've run into during testing.
Additionally sound distance attenuation has been made less aggressive, and attenuation parameters can be tweaked from VDrift.config now.

Full download
Linux: In order to view links, you must have to reply to this thread.
Windows: In order to view links, you must have to reply to this thread.

Update for 2014-09-22 release
Linux (source only): In order to view links, you must have to reply to this thread.
Windows (vdrift.exe): In order to view links, you must have to reply to this thread.



The new default parameters for sound attenuation in VDrift.config are:
[sound]
attenuation_scale = 0.914607
attenuation_shift = 0.272928
attenuation_exponent = -0.231374
attenuation_offset = -0.28843

The attenuation is a power function y=a*(x-b)^c+d clamped to the range [0, 1]:
attenuation = scale * (distance - shift)^exponent + offset

The parameters are derived using least squares fit to a number of sampling poins using this great website:
In order to view links, you must have to reply to this thread.

To get the old logarithmic attenuation the parameters are:
[sound]
attenuation_scale = 4.8694110473874862E+03
attenuation_shift = -2.3380252855054809E-02
attenuation_exponent = -2.9380304585176599E-05
attenuation_offset = -4.8686554410866866E+03

The 2014-09-22 release attenuation parameters are:
[sound]
attenuation_scale = 0.5
attenuation_shift = 0
attenuation_exponent = -1
attenuation_offset = 0

If you are curious about how the curves look like, take a look here:
In order to view links, you must have to reply to this thread.

The black curve is the new, other two are the old versions. I've used fooplot to place the sampling points and fed them into zunzun solver. I know this is not exactly user friendly, but the user should not really mess with this settings.
Find all posts by this user
Quote this message in a reply
09-27-2014, 10:08 PM
Post: #2
RE: VDrift 2014-09-26 bug fix release
I'm glad you found my zunzun.com web site useful, and thank you for the link. If I might be of any assistance in using the site, or might help with curve fitting in general, please do not hesitate to contact me directly. I will be glad to help anyone interested in this area.

Respectfully,
James Phillips
2548 Vera Cruz Drive
Birmingham, AL 35235

email: zunzun@zunzun.com
Find all posts by this user
Quote this message in a reply
10-04-2014, 06:48 PM (This post was last modified: 10-04-2014 07:02 PM by Timo 6.)
Post: #3
RE: VDrift 2014-09-26 bug fix release
I have uploaded a OS X build (In order to view links, you must have to reply to this thread. However it only runs on 10.9 Mavericks and higher - something OpenGL related crashes it after "Loaded GUI successfully" on older versions. More thorough testing to come.
The main change on the OS X side from the last release is where the settings are stored, so to transfer everything:
* Open Finder
* Select 'Go' in the menu bar
* Hold Option (alt/⌥)
* Select 'Library'
* Copy the VDrift folder from Preferences to Application Support
Also, Mac OS X 10.4 "Tiger" is definitely not supported any more. 10.5 and 10.6 may or not work (when the issue above is fixed), I don't have any facilities to test them.

NaN, could you tag relevant commit on Github for the release - the versioning on OS X uses the tags. Also the links on vdrift.net need updating if joevenzon is around.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-05-2014, 09:59 AM
Post: #4
RE: VDrift 2014-09-26 bug fix release
(10-04-2014 06:48 PM)Timo 6 Wrote: In order to view links, you must have to reply to this thread.I have uploaded a OS X build (In order to view links, you must have to reply to this thread. However it only runs on 10.9 Mavericks and higher - something OpenGL related crashes it after "Loaded GUI successfully" on older versions. More thorough testing to come.
The main change on the OS X side from the last release is where the settings are stored, so to transfer everything:
* Open Finder
* Select 'Go' in the menu bar
* Hold Option (alt/⌥)
* Select 'Library'
* Copy the VDrift folder from Preferences to Application Support
Also, Mac OS X 10.4 "Tiger" is definitely not supported any more. 10.5 and 10.6 may or not work (when the issue above is fixed), I don't have any facilities to test them.

NaN, could you tag relevant commit on Github for the release - the versioning on OS X uses the tags. Also the links on vdrift.net need updating if joevenzon is around.

Feel free to create a separate issue for the crashes. There is one thing you could try, assuming you are hitting gl2 path. In graphics_gl2.cpp lines 312-319 enable a workaround on Windows. Try removing the ifdef.
Find all posts by this user
Quote this message in a reply
10-05-2014, 10:19 AM
Post: #5
RE: VDrift 2014-09-26 bug fix release
Will do when I get some more info. Thanks, I'll try that. Cheers for doing the tag too.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-06-2014, 04:00 PM (This post was last modified: 10-06-2014 04:00 PM by Timo 6.)
Post: #6
RE: VDrift 2014-09-26 bug fix release
The log.txt for the crash is here: In order to view links, you must have to reply to this thread. system crash log here: In order to view links, you must have to reply to this thread. OpenGL 3.3 Core Profile is requested but fails because OS X 10.8 only has 3.2. The call in VertexBuffer::Draw to glDrawElements then fails when trying to show the loading screen.
The crash starts happening at 101ee99, which is when glewExperiment is enabled - disabling it fixes it until glew is replaced in 5206da1. The workaround you suggested don't have any effect I can see.
Let me know if traces would be helpful.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-06-2014, 04:45 PM (This post was last modified: 10-06-2014 04:46 PM by NaN.)
Post: #7
RE: VDrift 2014-09-26 bug fix release
Looking into vertexbuffer.cpp there is another #ifdef _WIN32 (line 351) you would have to remove to enable the workaround, totally forgot about it, sorry.

It would be cool if you could set break points there (BindSegmentBuffer function), to see if you are hitting the use_vao path or the fallback (vbo).

Essentially, I'd like to know what gl calls have been made before DrawElements.
Find all posts by this user
Quote this message in a reply
10-06-2014, 05:35 PM
Post: #8
RE: VDrift 2014-09-26 bug fix release
Even removing that ifdef as well nothing changes. It never gets to BindSegmentBuffer.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-06-2014, 05:41 PM
Post: #9
RE: VDrift 2014-09-26 bug fix release
(10-06-2014 05:35 PM)Timo 6 Wrote: In order to view links, you must have to reply to this thread.Even removing that ifdef as well nothing changes. It never gets to BindSegmentBuffer.

Weird, at some point before it has to. Could you try to get a gl call trace?
Find all posts by this user
Quote this message in a reply
10-06-2014, 05:50 PM (This post was last modified: 10-06-2014 06:05 PM by Timo 6.)
Post: #10
RE: VDrift 2014-09-26 bug fix release
In order to view links, you must have to reply to this thread.

Removing the if in 325 (which is evaluates to false otherwise) and letting it go in to BindSegmentBuffer I can see use_vao is true and bind_ibo is false.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-07-2014, 10:16 AM
Post: #11
RE: VDrift 2014-09-26 bug fix release
The trace seems to end before getting to drawing.

bind_ibo is set by the workaround, which expects "Intel" (gaphics_gl2.cpp line 316) but gets "Intel Inc." Try commenting out the ifdefs and also the vendor check, to make sure bind_ibo is set to true.

In vertexbuffer.cpp line 325, what are the values of: vbuffer, age, s.vbuffer, s.vcount, s.age?
Find all posts by this user
Quote this message in a reply
10-07-2014, 05:57 PM (This post was last modified: 10-07-2014 05:57 PM by Timo 6.)
Post: #12
RE: VDrift 2014-09-26 bug fix release
At line 325 In order to view links, you must have to reply to this thread.
bind_ibo is indeed true with the workaround and graphics_gl2.cpp line 317 commented out.

Btw, I noticed log.txt already has 'ERROR: OpenGL error "invalid operation" during: render output end' by this stage, don't know if that's important.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-08-2014, 09:14 AM
Post: #13
RE: VDrift 2014-09-26 bug fix release
(10-07-2014 05:57 PM)Timo 6 Wrote: In order to view links, you must have to reply to this thread.At line 325 In order to view links, you must have to reply to this thread.
bind_ibo is indeed true with the workaround and graphics_gl2.cpp line 317 commented out.

Btw, I noticed log.txt already has 'ERROR: OpenGL error "invalid operation" during: render output end' by this stage, don't know if that's important.

Seems like it fails to create a vertex array. You can verify it by setting a break point at vertexbuffer.cpp lines 88-89

glGenVertexArrays shoud set ob.varray to a nonzero value. Per OpenGL spec the function is allowed to return zero though, which means it failed...

I think I'll have to add a check for currently bound vao/vbo into the draw function (or simply disable vertex arrays for GL2+ drivers).
Find all posts by this user
Quote this message in a reply
10-08-2014, 01:32 PM
Post: #14
RE: VDrift 2014-09-26 bug fix release
I've pushed some code to handle this failure case.
Find all posts by this user
Quote this message in a reply
10-09-2014, 03:26 PM (This post was last modified: 10-09-2014 03:28 PM by Timo 6.)
Post: #15
RE: VDrift 2014-09-26 bug fix release
Getting lots (and lots) of 'ERROR: OpenGL error "invalid operation" during: before FBO begin' (gl2/deferred.conf) or 'ERROR: OpenGL error "invalid operation" during: render output end' (gl2/basic.conf) in log.txt, but apart from that it seem to be working well Smile

EDIT: There's a 'ERROR: OpenGL error "invalid operation" during: Texture ID generation' just after the car loads as well.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)