Racer v0.8.37 released

Ruud

RACER Developer
Just in time for X-mas. ;)

Get the new version at http://www.mediafire.com/?hc44aiq5izp4iqi
Then get the racer.exe/pdb which fixes reflections at www.racer.nl/temp/racer0838_alpha.7z

At some point we're going to have to call it v0.9rc1, since this one does a little tweaking to the graphics intensities (energy conserving) and sets cast_shadow to 0 by default. Most shadows will disappear; a huge fps boost until you put shadows back in shader files (.shd).

Merry Christmas!
Ruud

The changelist for v0.8.37:
- Added views.ini keep_aspect property to maintain aspect ratio for static images. See http://www.racer.nl/tutorial/dials.htm
- dyn_standard_reflect_window_f.cg now uses alpha as reflectiveness as well; opaque parts get less reflection
- TrackEd's AutoAseToDof has improved error messages on bad submaterial usage.
- TrackEd: some (progress) dialogs never appeared. Copy flags to group didn't work.
- TrackEd now colorizes the Collide and Surface flags in Props mode (F4) for easy tweaking of flags.
- standard_bump_detail_f.cg had a hardcoded 12x scale; now it uses the scale defined in the .shd file
- The garage track is not shown in the 'Select Track' screen anymore.
- Added log.events.host/port settings for remote racer tracking (niche usage).
- Lidar data (track.rld files) can now be sorted and driven on. Pro use only.
- Added car pitch/roll in body AND world coordinates in the Ctrl-9 debug screen.
- Added 'analyse shaders' command to check all shaders (track.shd/car.shd).
- The shaders default 'reflect' value for each layer is now 0 (was 1).
- Final tweaks in the shading system; energy conservation for diffuse and specular. For diffuse colors, this
means diffuse colors are divided by PI (assuming diffuse colors are kept between 0 and 1), and specular
colors are being corrected with (n+6)/8*PI.
See also http://www.rorydriscoll.com/2009/01/25/energy-conservation-in-games/
- Timers are now in microsecond accuracy using QueryPerformanceTimer(). Multicore machine issues?
- Profiling is more accurate due to the better timer accuracy. More graphics divisions added.
- Shader cast_shadow property by default is now 0; it's better to explicitly define shadow-casting materials
since you don't need a lot of shaders to cast shadows to still get a good image.
You *will* need to add cast_shadow=1 lines for shaders that you want to cast shadows.
- Depth texture setup optimized for shadowmapping; quite a big fps increase.
- Added look/left right controls (look_left, look_right) to dynamically look left or right (Q/W by default)
- In your controller file you can add global.left_right_look_velocity to set left/right look velocity (default=250)
- In your controller file you can add global.left_right_look_max to set the max left/right look angle (default=45)
 
Thanks a lot for the quick fix, Ruud - much appreciated :)

As for the closing duration, I normally don't run through the main menu (which is indeed quicker), so it basically affects me all the time hence the curiousity.



I've got another crash here when attempting to load Some1's Mount Autobahn track - it worked fine in v0.8.36 still, but 37/38 don't seem to like it:

Code:
0x00B0DD82 [newton]: (filename not available): NewtonMeshGetIndirectVertexStreams
0x0C9301E0 [(module-name not available)]: (filename not available): (function-name not available)
0x19300060 [(module-name not available)]: (filename not available): (function-name not available)

Is that something on our side? I haven't seen this message on the other tracks dozen or so tracks I tried in v0.8.37/38 so far. I already had Racer create a fresh cache file for the collisions, to no avail.

Hi Cosmo,
I've seen some explosive physics issues when hitting things as well as being able to fall through the ground if the car rolls over. This reminds me of a problem we had when the suspension was reworked and we needed bump/rebound stops or the car would fall through the ground.
In regards to your Racer exit strategy, I just use alt+F4. Works fast everytime. :)

Alex Forbin
 
I've been fiddling with specular via mipmapped reflection maps. So far I've got some good results but I need to rub out some of the constants before I can post it. So that eg. the wheels work again (as they're mostly lit by specular)

9Vq0h.jpg

top: mipmapped
bottom: single color spec hilight (I have it tuned a little brighter since specular= works differently, but this is just a basic comparison)

So far I'd say it adds a lot, in terms of not blowing out in the white when most of the sky is blue/yellow... just need to figure out the formulas for the constants involved (and I have no idea what the factor will be to make it 'realistic' since specular hilights aren't using the same maths)

Also makes heavily specular reliant paints look much more awesome, eg. a gold shade:
JsJQl.jpg
 
Ok, I'm more happy with the code now.
old:
Code:
  float3 litColor=baseCol*diffuse+specular*reflectiveNess;
  float3 shadowColor=baseCol*(ambient+Ke);
new:
Code:
    float3 fakespec = texCUBElod(envMap,float4(R,1+7*pow(1.01,-shininess)))*Ks;
  float3 litColor=baseCol*diffuse;
  float3 shadowColor=baseCol*(ambient+Ke) + fakespec*reflectiveNess;
note: 'R' may be 'IN.R' - depends if the code calculates it earlier or not. If it has an error just switch it.

Essentially this goes into any shader that includes specular light. (I stuck it in dyn_bump_reflect_f and reflect_f since the RX7 uses those)

For a release version, I'd probably replace shininess with a specular.mipmap variable, and just use that directly. This tries to give somewhat of backward compatibility on shininess, which is why it calculates 1+7*pow(1.01,-shininess) instead of just saying mipmap=5 or whatever. In reality it's just picking a bias close to what the user wants.
This still uses a couple constants.
7: maximum bias, pretty much related to the envmap size.
1.01: falloff exponent, I chose this to make 'shininess' behave similarly to before, though I didn't get it exactly the same curve.

The specular= lighting is probably gonna be a lot too bright when you make this change - I cut it to about 1/4 what it was on the RX-7's wheels. For conservation of energy, diffuse+ambient+specular should be less than 1 in each colour channel. Really what this is doing is creating an intermediate step between diffuse light and reflected light - which is the blurred version of the reflected light, corresponding to surface roughness.

depending on texturing style, it might also be useful to have a separate shader that implements it like this:
Code:
[code]    float3 fakespec = texCUBElod(envMap,float4(R,1+7*pow(1.01,-shininess)))*Ks;
  float3 litColor=baseCol*diffuse;
  float3 shadowColor=baseCol*(ambient+Ke + fakespec*reflectiveNess);
That is, multiplying the texture map into specular lighting as well. This would be useful if you want specular colours to match the materials they're on.


Concretely, after performing the above change on dyn_standard_reflect_f.cg and dyn_standard_bump_reflect_f.cg, and updating the RX7's shaders,
so96J.jpg

Early morning Carlswood.
wheels: specular=.15 .15 .15, shininess=16
body: specular=.06 .06 .06, shininess=12
You can see the orange of the cone both in the side of the car and the front wheel, which is one of the more colorful things around Carlswood. It's fairly subtle though, more obvious when in motion.
 
Cool! I've been wanting head tracking for a while. :)
I find my intelligence a bit lacking however, when it comes to your explanation on how to implement this most excellent feature, the posted link has me baffled! I'm still looking for this "404" section in the controller.ini.
After further study I've come to the conclusion that it must have something to do with your "mothers site". I'll call her and see if she knows how to activate this feature. ;)

See the attached test_trackir.txt (rename to test_trackir.ini and put it in data/controls). Then set ini.controls to test_trackir.ini. It works like the mouse currently (I should get the official TrackIR SDK, but then I also need a more recent TrackIR device; the one I have is years old, although it still works on XP SP3).
That should get you started.
 

Attachments

  • test_trackir.txt
    3.8 KB · Views: 316
ok i cant get the game to load past the menu...with the mipmapping bit, worked fine before..now? nada, nothing zip bugger all..i've attached QLog

That's the thing; it complains about texCUBElod() not being supported on your card. What gfxcard do you have? And driver version?
 
Ati radeon hd 5570,
8.850.0.0
i cant get the shaders to work anyways,

and asking for help is like getting blood out of a stone..if you took onboard my ideas about having a program along side, racer that allows you to set the transparencies shinyness etc that'd make the game alot easier to edit for..i've tried your modeler app, but doesnt seem to work for me, the template shd, gets all messed up...have a think about it ruud..
 
Can't load your newest track Roggel in 36 or 37, Ruud :(

Code:
OS-Version: 5.1.2600 (Service Pack 3) 0x100-0x1
 
0x0217A021 [atioglxx]: (filename not available): (function-name not available)
0x01B4E301 [atioglxx]: (filename not available): (function-name not available)

For your final version, I would really concentrate in optimizing the code, because other games, such as Shift1 or F1 2010, can do live env mapping, CSM, surround config via SoftTH etc... I'm running latest Racer with CSM, 2400x600 (3 screens), live env mapping, mirrors all on & I get on average 26 fps on LiL Lake. Theoretically, it should be possible to double resolution for the same fps, I suppose.

I noticed some weird effects when live env map on the body paint where the backfires seems to be appearing randomly...please check it out

Also, there are 'bugs' with TKC (track keyframes cameras) & splined tracks, when the car isn't on the track, the TKC gets deactivated & none of the other cameras is triggered. Please, make a mix of both cameras types, the ones with the radius + the TKC, you know we love 'interpolations' stuff !

Finally, consider replaying movables collisions + animations + scripts for your final version. :)

& fixing the vertex damage shader for ATI GPUs + the night life texture ...
 
I'm not sure exactly what you mean; what did you do to trigger the problem? Do you have a reference link perhaps?

It usually happens on a new track with data generated by tracked. Tracked will make a camera 0 but will set the flag=0 instead of
flag=1-4. It only appears to be a problem with non-keyframe cameras.
Here is an example...

Code:
  cam0
  {
    pos
    {
      x=-42.659027
      y=4.525313
      z=-70.067322
    }
    pos2
    {
      x=-17.442284
      y=2.964434
      z=-72.083504
    }
    posdolly
    {
      x=0.000000
      y=0.000000
      z=0.000000
    }
    rot
    {
      x=0.000000
      y=0.000000
      z=0.000000
    }
    rot2
    {
      x=0.000000
      y=0.000000
      z=0.000000
    }
    radius=20.000000
    group=0.000000
    zoom_edge=20.000000
    zoom_close=30.000000
    zoom_far=20.000000
    flags=1                 <----------------------------------- Set to zero for "funkycam" ;)
    src
    {
      k=0.000000
      mass=1.000000
    }
    dst
    {
      k=0.000000
      mass=1.000000
    }
    cube
    {
      edge=0.000000 0.000000 0.000000
      close=0.000000 0.000000 0.000000
      far=0.000000 0.000000 0.000000
    }
    keyframes
    {
      count=0
    }
  }


Alex Forbin
 
See the attached test_trackir.txt (rename to test_trackir.ini and put it in data/controls). Then set ini.controls to test_trackir.ini. It works like the mouse currently (I should get the official TrackIR SDK, but then I also need a more recent TrackIR device; the one I have is years old, although it still works on XP SP3).
That should get you started.

Cooool! Thanks Ruud, really cool stuff and it works great with the mouse. I will give extra feedback tonight with the trackIR in mousemode.

Alex Forbin
 
It doesn't run anymore? There are some functions, like processor number fetching, that I'd like to use in Win7 even, but refrain because they were not there in XP... Win2000 is not explicitly supported no.

Yeah, it's calling for some dependencies that aren't in Windows 2000, so I guess I will have to upgrade. Oh well.
 
Qlog when vertex damaging is =1 on ATI cards in 0.8.37...

Code:
Thu Dec 29 09:54:11 (INFO): [racer/3876] Loading car 'camaro_ss'
Thu Dec 29 09:54:11 (WARN): [racer/3876] DGPUShaderManager:MakeObject(dyn_standard_bump_reflect_damaged_v.cg): can't create CG vertex shader program
Thu Dec 29 09:54:11 (WARN): [racer/3876] DGPUShader::LoadAndCreateFromFile[data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg]: The compile returned an error.
Thu Dec 29 09:54:11 (WARN): [racer/3876]  data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(74) : warning C7011: implicit cast from "float4" to "float3"
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(78) : warning C7011: implicit cast from "float4" to "float3"
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(57) : error C3004: function "float4 tex2D(sampler2D, float2);" not supported in this profile
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(57) : error C3004: function "float4 tex2D(sampler2D, float2);" not supported in this profile
Thu Dec 29 09:54:24 (FATAL): [racer/3876] DGPUShaderManager:MakeObject(dyn_standard_bump_reflect_damaged_v.cg): can't create CG vertex shader program
The compile returned an error.
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(74) : warning C7011: implicit cast from "float4" to "float3"
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(78) : warning C7011: implicit cast from "float4" to "float3"
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(57) : error C3004: function "float4 tex2D(sampler2D, float2);" not supported in this profile
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(57) : error C3004: function "float4 tex2D(sampler2D, float2);" not supported in this profile
Thu Dec 29 09:54:24 (INFO): [racer/3876] Crash detected - attempting to recover some data before displaying the crash dialog
Thu Dec 29 09:54:27 (FATAL): [racer/3876] Exception 0xC0000005, flags 0, Address 0x00416212
(this dialog text is stored in QLOG.txt)
 
OS-Version: 5.1.2600 (Service Pack 3) 0x100-0x1
 
0x00416212 d:\source\trunk\dev\src\libs\qlib\qdebug.cpp (line 382): QCrash()
0x004075AD d:\source\trunk\dev\src\libs\qlib\qmessage.cpp (line 537): qfatal()
0x0044E0B4 d:\source\trunk\dev\src\libs\d3\dgpushader.cpp (line 811): DGPUShader::LoadAndCreateFromFile()
0x0044E33F d:\source\trunk\dev\src\libs\d3\dgpushader.cpp (line 202): DGPUShaderManager::MakeObject()
0x005CD54B [racer]: (filename not available): _getch
/code]

Can't you use another Cg tex2D function to get it working on ATIs ?
 
You could try tex2D(vDamageMap,IN.tc0, ddx(IN.tc0), ddy(IN.tc0)) - and the same edit for controlMap.
Or more extremely tex2D(vDamageMap,IN.tc0, 1.0/1024f, 1.0/1024f)
I don't know if that'd help but it might.
 
You could try tex2D(vDamageMap,IN.tc0, ddx(IN.tc0), ddy(IN.tc0)) - and the same edit for controlMap.
Or more extremely tex2D(vDamageMap,IN.tc0, 1.0/1024f, 1.0/1024f)
I don't know if that'd help but it might.

Thx Stereo for trying to help, I edited the Cg dmg variable in the vertex program, still some crashes...
The 1st solution when float4 dmg = tex2D(vDamageMap, IN.tc0, ddx(IN.tc0), ddy(IN.tc0)) + controlMap;

Code:
Thu Dec 29 11:17:16 (INFO): [racer/2156] Loading car 'camaro_ss'
Thu Dec 29 11:17:16 (WARN): [racer/2156] DGPUShaderManager:MakeObject(dyn_standard_bump_reflect_damaged_v.cg): can't create CG vertex shader program
Thu Dec 29 11:17:16 (WARN): [racer/2156] DGPUShader::LoadAndCreateFromFile[data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg]: The compile returned an error.
Thu Dec 29 11:17:16 (WARN): [racer/2156]   data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(77) : warning C7011: implicit cast from "float4" to "float3"
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(80) : warning C7011: implicit cast from "float4" to "float3"
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(60) : error C1115: unable to find compatible overloaded function "tex2D(sampler2D, float2, float2, float2)"
Thu Dec 29 11:17:18 (FATAL): [racer/2156] DGPUShaderManager:MakeObject(dyn_standard_bump_reflect_damaged_v.cg): can't create CG vertex shader program
The compile returned an error.
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(77) : warning C7011: implicit cast from "float4" to "float3"
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(80) : warning C7011: implicit cast from "float4" to "float3"
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(60) : error C1115: unable to find compatible overloaded function "tex2D(sampler2D, float2, float2, float2)"
Thu Dec 29 11:17:18 (INFO): [racer/2156] Crash detected - attempting to recover some data before displaying the crash dialog
Thu Dec 29 11:17:19 (FATAL): [racer/2156] Exception 0xC0000005, flags 0, Address 0x004161D2
(this dialog text is stored in QLOG.txt)
 
The 2nd solution :
Code:
Thu Dec 29 10:56:19 (INFO): [racer/2772] Loading car 'camaro_ss'
Thu Dec 29 10:56:19 (WARN): [racer/2772] DGPUShaderManager:MakeObject(dyn_standard_bump_reflect_damaged_v.cg): can't create CG vertex shader program
Thu Dec 29 10:56:19 (WARN): [racer/2772] DGPUShader::LoadAndCreateFromFile[data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg]: The compile returned an error.
Thu Dec 29 10:56:19 (WARN): [racer/2772]  data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(73) : warning C7011: implicit cast from "float4" to "float3"
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(77) : warning C7011: implicit cast from "float4" to "float3"
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(59) : error C1115: unable to find compatible overloaded function "tex2D(sampler2D, float2, float, float)"
Thu Dec 29 10:56:21 (FATAL): [racer/2772] DGPUShaderManager:MakeObject(dyn_standard_bump_reflect_damaged_v.cg): can't create CG vertex shader program
The compile returned an error.
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(73) : warning C7011: implicit cast from "float4" to "float3"
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(77) : warning C7011: implicit cast from "float4" to "float3"
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(59) : error C1115: unable to find compatible overloaded function "tex2D(sampler2D, float2, float, float)"
Thu Dec 29 10:56:21 (INFO): [racer/2772] Crash detected - attempting to recover some data before displaying the crash dialog
Thu Dec 29 10:56:22 (FATAL): [racer/2772] Exception 0xC0000005, flags 0, Address 0x004161D2
(this dialog text is stored in QLOG.txt)
 
Whoops, I misread the specs.

2nd should be more like
float4((tex2D(controlMap,IN.tc0,float2(1.0/1024f,1.0/1024f), float2(1.0/1024f,1.0/1024f))
This compiles fine on my 460GTX, though I didn't have the layers set up so I can't say if it worked as intended.
 
Hm just looking at the official Texture Maps functions, there isn't much choice....
Trying it with float4 dmg = tex2D(controlMap, float2(IN.tc0), float2(1.0/1024f,1.0/1024f), float2(1.0/1024f,1.0/1024f));

Code:
The compile returned an error.
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(79) : warning C7011: implicit cast from "float4" to "float3"
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(82) : warning C7011: implicit cast from "float4" to "float3"
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(64) : error C1115: unable to find compatible overloaded function "tex2D(sampler2D, float2, float2, float2)"
Thu Dec 29 11:41:07 (INFO): [racer/1348] Crash detected - attempting to recover some data before displaying the crash dialog
Thu Dec 29 11:41:08 (FATAL): [racer/1348] Exception 0xC0000005, flags 0, Address 0x004161D2
(this dialog text is stored in QLOG.txt)
 
Qlog when vertex damaging is =1 on ATI cards in 0.8.37...

Code:
Thu Dec 29 09:54:11 (INFO): [racer/3876] Loading car 'camaro_ss'
Thu Dec 29 09:54:11 (WARN): [racer/3876] DGPUShaderManager:MakeObject(dyn_standard_bump_reflect_damaged_v.cg): can't create CG vertex shader program
data/renderer/shaders/dyn_standard_bump_reflect_damaged_v.cg(57) : error C3004: function "float4 tex2D(sampler2D, float2);" not supported in this profile

Can't you use another Cg tex2D function to get it working on ATIs ?

Damage shaders do texture lookups in the vertex shaders, which is a relatively new feature. I won't support damage anyway for v0.9, but this would require a gfxcard that supports this feature. Looks like a standard SM3.0 feature; see ftp://download.nvidia.com/developer/Papers/2004/Vertex_Textures/Vertex_Textures.pdf
 

Latest News

How long have you been simracing

  • < 1 year

    Votes: 210 14.2%
  • < 2 years

    Votes: 154 10.4%
  • < 3 years

    Votes: 149 10.0%
  • < 4 years

    Votes: 113 7.6%
  • < 5 years

    Votes: 214 14.4%
  • < 10 years

    Votes: 177 11.9%
  • < 15 years

    Votes: 118 8.0%
  • < 20 years

    Votes: 80 5.4%
  • < 25 years

    Votes: 64 4.3%
  • Ok, I am a dinosaur

    Votes: 205 13.8%
Back
Top