Racer v0.8.29 released!

Ruud

RACER Developer
For a happy New Year, v0.8.29 ;)

Get it at http://www.racer.nl/download/racer0.8.29.zip (75Mb)
** BEFORE using, set racer.ini's mastervolume to 255 to get a bit of sound

Changelist:
- Added surface 'forbidden' field (in special.ini); if set to 1 (default=0) it will reset your
car to the road if you set racer.ini's assist.time_allowed_offroad. See http://www.racer.nl/reference/tracks_surfaces.htm
- Car and track version checking is now updated to '090'. If your track/car doesn't match this
compatibility info, you'll get a warning in QLOG. All content must be updated!
- Autoclutch RPM now only really hunts for max torque in 1st gear. Other gears are the old way (more subtle).
- 'Ini' tool can now modify references ('ini wheel0.pacejka pacejka_front' for example).
- Clutch mechanism revised since some clutch-controlling subsystems (gearbox/anti-stall/controls)
would not mix correctly, giving hard jerks when shifting up/down.
- Added dbg_car.max_brake_reduction (=0.2) which determines the minimum brake torque reduction when wheels stop spinning.
- Added car.ini engine.launch_control to specify autoclutch_rpm=0 behavior in 1st gear.
- Added X-tree shaders for nicer X-tree shading, see http://www.racer.nl/tutorial/xtrees.htm
- Cg parameters Kd, Ka, Ke and Ks (diffuse/ambient/emission/specular) expanded to pass RGBA instead of just RGB.
Not used in the Cg shaders yet though; the use is a bit unclear still.
- Minimap painting was bad when car select screen was called first. Same for mirrors.
- Minimap paint could cause statistics paint to become transparent
- Added 'graph step 0 1 clutch' option to visualize clutch behavior.
- Wheel heat shader gives more light
- View elements get lit at night.
- panorama_f.cg had a syntax error.
- Just loading a controller profile would save it if controllers were missing.
- Newton.dll is back, since that got rid of NaN errors when colliding cars with the track. It's also Newton 2.29 now.
- Added 'timing.pause_every_step' to optionally step through each iteration
- Fixed a bunch of replay sound issues (engine/horn/indicatorLeft/indiRight/hazard). Replays are now definitely
incompatible with older replays; also may change before v0.9 comes out to fix further things (gearwhine?).
- The NoCG version was giving a lot of QLOG warnings.
 
Yes, welcome to the new stable version since 2003 (v0.5.0). ;-) Since soooo much has changed, really all content out there is outdated. Normally I'd try to get compatibility but the 2003 version is just not up to par and impossible to try to get compatible. So indeed, all content needs upgrading. v0.9 is hopefully out within a month so that things can begin to be updated (the problems are getting smaller).
I'll need to update racerdownloads.com for example to specify compatibility with v0.9.

Note also that I'm using SVN to branch v0.9. I'm using this with other versions that we use commercially; this means I can continue to work on another branch, but still do minor changes/fixes to the v0.9 branch. So small things can always be patched later. My v0.9 wishes left are these:

# Bug: Tire smoke flies off
# Controls with 2 controllers - 2nd isn't detected
# Finish throttle_on/throttle_off.
# Flare rotation not used. Check alpha=1 to really fill in.
# MP Shift-F (autoreset) keeps car from driving off, if quickstart=1 it should be able to drive
# Replays a bit better (particles?)

Nice wish list :D

Need to tinker with 29 and see if the controller confusion is any better. Last night I wanted to drive with the mouse to check some trees (had unplugged wheel), but I dare not go and even try use the interface in case it reset my controls (again :D )

Throttle off and on will be nice too... though I'd also like to see pitch factor/offset per sample too if it's at all possible. That said, if turbo stuff is coming soon, with associated sound samples etc, then I'm happy to wait :D

ALL that said on sounds, I'd really like those to go "HDR"... it's so hard to get a car sounding 'right'... mainly noticeable from car to track cameras where the mix of volumes that made sense in the cars cockpit (gear whine, wind noise etc), simply make no sense from a track cameras point of view, and it ruins the immersion of the replay.
HDR sounds should alleviate loads of issues, we can use real audio falloff (rather than a fudge factor number), and dB values/measurements are REALLY easy to get hold of for real cars too :D

Thats my v0.9.5 wish list ;) :D

Turbo and audio HDR... :D

Dave
 
Ruud have you noticed a problem with Z-fighting in the tire smoke @ higher alpha levels? I think that's what I'm seeing, I tried to eliminate all other causes that may have been caused by the particles.ini and still have the same result.

Oh in regards to the replay fix: first of all thanks :) and I noticed that the scraping sounds are not working.

Alex Forbin
 
Quick , Cheap and dirty tool to 'convert' ALL your cars to 090:

Cut text as shown, create an empty text file (notepad does it quite well) and copy inside the text below.
Rename as 'convt_cars090.cmd' or whatever you like, put where racer *.exes are folder and simply double click on it.
First creates a copy or CAR.INI as CAR.BAK and then assigns to car.version the new standard value "090".
You can use all your cars in half a minute.

--------START HERE ----------------
@echo off
dir data\cars\*. /b >cars.lst
for /f %%i in (cars.lst) do (
copy data\cars\%%i\car.ini data\cars\%%i\car.bak
ini data\cars\%%i\car.ini car.version "090"
)
del cars.lst
pause
--------STOP HERE ----------------


HAPPY NEW YEAR FOR EVERYBOOOOOOODY!!!!
 
Hmmmm, Ruud.

How are the new trees designed to work then?

Still no culling and 4 quads, and no flipped coords allowed? Or can I use a 2 quad X tree and flip to my hearts content?

Can I use an atlas and use the scale in the shader with the new shader?

Does it need to be a 0.25 scale, or a 4 scale? How can I easily test if the scale value is working or not?


Also, if I want some variation in the trees, and have a 4x4 atlas, can I use say the top left texture for one quad of the X, and use a different texture (say top right of the texture), for the other quad of the X, thus having the tree look different from all angles? Will it still light ok in that instance?



Also, sunny 0/1 shows that the tree appearance isn't using the sunny variable. If I set sunny 0, the trees are still lit from the sunny side.

What was sunny added for, since it just seems to do the same as scaling sun diffuse from the value it's at to zero and back again.
Does it have an actual purpose yet?




Just right now I'm kinda struggling to get my trees all working as I expect them to, with some having clear lighting discrepancies over them (ie, opposing faces of the X that I can see lit quite differently), and then some seem to light up from one side, and some from the other etc etc...

All just bog standard X trees right now, with UVW's scattered from around a 4x4 atlas on each tree, but no flipping (except the automatic flipping because of no culling)

Thanks

Dave
 
Another issue I think.

My wall which is using this shader:

vf_bump
{
vertex_shader
{
file=standard_bump_v.cg
}
fragment_shader
{
file=standard_bump_f.cg
}
}

shader_wall~vf_bump
{
specular=0 0 0 0
shininess=6
cast_shadow=1
tangents=1
layer0
{
map=texture\wall_01.tga
depthwrite=1
alpha_to_coverage=1
alphafunc=gequal 128
wrap_t=clamp_to_edge
}
layer1
{
compression=0
mode=linear
map=texture\wall_nrm_01.tga
wrap_t=clamp_to_edge
}
}

Seems to be getting lighting from the sun when the sun is behind it. Sunny 0, goes dark, sunny 1, goes light again. Sun diffuse 0, goes dark, sun diffuse 10, goes light again.



Not sure what is going on there... hmmmm...


Dave
 
But if you double sunny, then it's only the same as doubling sun diffuse as far as I can tell.

Or half sunny (0.5), and it's the same as doing sun diffuse /2


Why sunny didn't just alter the curve for sun diffuse (a multiplier) is confusing... unless of course the plan is to do other stuff with it.




Anyway, these trees. They work really nicely now, I think.

They are kind of like a 'facing' billboard, but it's only the lighting that is facing. The roundness number is nice too, I've found 0.75 about perfect here.

The ONE downside. I can't seem to get the scale working, so my texture atlas trees all look wrong... which does make it hard to judge how the effect is going to work on my large wooded roadside areas already... (looks weird so far, only had this working on the one tree so far)

Ruud, is there any chance of showing how this syntax on scale should work or anything, or even if this approach should work?

I've tried scale=0.25 and scale=4, under the head of the shader, and under the layer0 part. But no luck getting the same appearance as the same texture outside of an atlas.

shader_tree_broadleaf~vf_xtree
{
shininess=16
specular=0 0 0 0
cull=none
;scale=0.25
;scale=4
layer0
{
map=texture\tree_broadleaf.tga
depthwrite=1
alpha_to_coverage=1
alphafunc=gequal 128
;scale=0.25
;scale=4
}
}

We REALLY need to be able to run this from an atlas as from what I'm reading on nVidia docs, texture swaps are really bad on these kinds of objects (loads of them, with loads of relatively large textures)

I don't want to invest any time in doing things like this the wrong way. It's an easy job to set up the UVW's on a few base trees then copy them around, but swapping LOADS later will be a nightmare :D

Thanks

Dave
 
LSD diffs recently got a fix for braking behavior. Most tire models will struggle with donuts since Pajecka, for example, is really only targeted at low angles. An extract from a real .tir file:Slipangle is in radians, so you can see that it only really defines -17..+17 degrees of slipangle. That's where trouble and creativity come in. I'll be looking into other tire models next year to see if we could make a bit more sense at extreme situations. The main things to tweak (globally for now) are these in racer.ini:

; Maximum slip length for combined slip calculations (5=understeery, 15=snap oversteers)
max_slip_len=6.0
; Maximum tan(slipAngle); default is 0.75 (+/- 36 degrees), 20.0 (87 degrees) seems to work better
max_tan_sa=20.0

The max_slip_len affects combined slip (except when using MF5.2 tires); the max_tan_sa is quite high now. 'max_tan_sa' being high might mean that the Pacejka forces get unrealistically low at extreme slip angles, thus giving a very skiddy feeling. Try setting it to 0.36 for example (tan(20 deg)=0.36). Should keep tires from entering a really skiddy territory.
Tires are a complex area though, and difficult.

Oki, but that doesn't really explain why it used to work perfectly in the earlier betas. It doesn't seem to be the tire either, as you can do a 180 turn, but then it's like the diff can't take it and stop locking. Even with full locking diff it behaves like a worn out diff that can only take a certain amount of load before giving up. So allthough tires may be an issue, I'm not convinced they are the main factor here.

I will try some old tire models as well as your settings for racer.ini and see if that helps :)
 
Dave: It does not do scaling in the one that comes with 0.8.29; try this:
standard_xtree_scale_f.cg
Code:
//
// Standard - X tree fragment with diffuse gradient (light direction) - basic version (no round normals)
// 27-12-2010: Created!
//

#include "atmosphere.cg"
#include "lighting.cg"
#include "shadowmapping.cg"

float3 unScale(float3 n, float scale, float uDirection, float roundNess) {
	n.x = fmod(n.x*scale,1);
	n.y = fmod(n.y*scale,1);
	if(uDirection<0)
		n.x=roundNess*(1-2*n.x);
	else
		n.x=roundNess*(n.x*2-1);
	//n.y=1-IN.tc0.y*2;
	n.y=roundNess*(n.y*2-1);
	return normalize(n);
}

// Vertex to pixel shader structure
struct v2p
{
  float3 Position       : TEXCOORD4; //POSITION;
  float3 normal         : TEXCOORD5;
  float3 RayleighColor	: TEXCOORD2;
  float3 MieColor       : TEXCOORD3;
  float3 tc0            : TEXCOORD0;
  float3 Direction      : TEXCOORD1;
  float  extinction     : TEXCOORD6;
};

void main(
  // In
  in v2p IN,

  // Out
  out float4 outColor : COLOR0,
#ifdef CSM_MRT
  out float4 outShadow: COLOR1,
#endif

  // Constants
  uniform sampler2D baseMap : TEXUNIT0,
  uniform float3    lightDirection,
  uniform float3    lightColor,
  uniform float3    lightAmbient,
  uniform float3    eyePosW,
  uniform float     atmosRayleigh,
  uniform float     atmosMie,
  uniform float3    Ke,
  uniform float3    Ka,
  uniform float3    Kd,
  uniform float3    Ks,
  uniform float     shininess,
#ifdef CSM
  // shadow mapping
	uniform sampler2D    shadowArray  : TEXUNIT7,
  uniform float4x4     smTexMatArray[SM_MAX_SPLITS],
  uniform float smSplits,
#endif
  uniform float     sunny,
  uniform float     exposure,
  uniform float		scale
)
{
  float3 skyColor;
  float3 normal; //=float3(0,1,0);        // Fixed normal to get even lighting

#ifdef CSM
  // Output shadowing info using original 3D model's normal (overrule?)
  // Use original normal to avoid funny shadowing!
  //float shadow=GetShadowFactor(IN.Position, normal,shadowArray, smTexMatArray, smSplits, lightDirection);
  //float shadow=GetShadowFactor(IN.Position, IN.normal,shadowArray, smTexMatArray, smSplits, lightDirection)*sunny;

  // Don't catch shadows
  float shadow=1;
  //outShadow.rgb = IN.normal;
#else
  const float shadow=1;
#endif

  // Tree matrix
  float3 up=float3(0,1,0);
  //float3 fwd=IN.normal;
  float3 fwd=normalize(IN.Direction);
  float3 side=cross(up,fwd);
  //float3 side=cross(fwd,up);
  float3x3 mat=float3x3(side,up,fwd);
  float3 lightDirTreeSpace;

  // Subtle light fall-through - not a complete cylinder. 1.0=full, 0=flat
  const float roundNess=0.5;
  // Make a normal that defines a sort of cylinder
  float3 n;
  // Detect U direction along polygon
  float uDirection=ddx(IN.tc0.x);

  //if(uDirection<0)n.x=roundNess*(1-2*fmod(IN.tc0.x,1));
  //else            n.x=roundNess*(IN.tc0.x*2-1);

  //n.y=1-IN.tc0.y*2;
 // n.y=roundNess*(IN.tc0.y*2-1);

  // Forward to the eye
 // n.z=1;

 // n=normalize(n);

  n.xy = IN.tc0.xy;
  n.z = 1;
  n = unScale(n,scale,uDirection,roundNess);

  // Rotate into tree space
  normal=mul(n,mat);

  // Get sky gradient color
  skyColor.rgb=GetSkyColor(lightDirection,IN.Direction,IN.RayleighColor,IN.MieColor,atmosRayleigh,atmosMie,lightColor,lightAmbient);

  // Get base texture color
  float4 baseCol=tex2D(baseMap,IN.tc0);
//baseCol=float4(1,1,1,1);

  // Lighting
  float3 ambient,diffuse,specular;
  LightingSun(Ke,Ka,Kd,Ks,shininess,lightDirection,lightColor,lightAmbient,IN.Position,normal,eyePosW,
    ambient,diffuse,specular);
  float3 sdColor=baseCol*diffuse+specular;
  float3 ambientColor=baseCol*(ambient+Ke);
  //baseCol.rgb=baseCol*(ambient+Ke)+baseCol*diffuse+specular;

  // HDR toning of sky (for LDR shaders)
  //skyColor.rgb=1.0-exp(-exposure*skyColor.rgb);

#ifdef CSM_MRT
  // Mix sky with texture color based on atmospheric influence
  outColor.rgb=lerp(skyColor,ambientColor,IN.extinction);
  //outShadow.rgb=lerp(skyColor,sdColor,IN.extinction);
  outShadow.rgb=sdColor*IN.extinction;
  outShadow.a=shadow;

  // Blending
  outColor.a=baseCol.a;
  outShadow.a=1;
#else
  // Mix sky with texture color based on atmospheric influence
  outColor.rgb=lerp(skyColor,ambientColor+sdColor*shadow,IN.extinction);
//outColor.rgb=IN.normal;
//outColor.rgb=side;
//outColor.rgb=normal;
//outColor.rgb=n.y;
//outColor.rgb=lightDirection;
//outColor.rgb=gradColor;
//if(front)outColor.rgb=float3(0,10,0); else outColor.rgb=float3(10,0,0);
//outColor.rgb*=5;
//outColor.rgb=n.x;
//outColor.rgb=n.y*5;
//float v=ddx(IN.tc0.x); if(v>0)outColor.rgb=float3(0,10,0); else outColor.rgb=float3(10,0,0);
//outColor.rgb=IN.tc0.x*5;
//outColor.rgb=IN.tc0.y;
//outColor.rgb=float3(0,10,0);
  // Blending
  outColor.a=baseCol.a;
//outColor.a=1;
#endif
}

Scale = 4 -> 4 textures in each direction
 
Dave: It does not do scaling in the one that comes with 0.8.29; try this

Nice work :D

They look very nice now... perfect even.

trees_03.jpgtrees_01.jpgtrees_02.jpg


With nice quality textures (512x512), and nice shading, I can live with X type trees here... they are just so fast and nice looking generally. It's so hard to make a 3d tree look like the tree it's meant to, but with 2d you can really make a tree look like the one it's meant to do, which is a big thing for me.

Please note that lots of the trees trunks don't centralise, these are just tests. The finals will be tidied up etc, but it's a nice proof of concept I think :D


Just amazed how fast it is, it doesn't seem to have slowed it down at all really having these trees in, which is a relief as there are lots more to come...

Just getting most of the trees put in at this stage to determine what you can and can't, or won't see, because of the trees being in the way etc :D


Thanks for that Stereo :)


I'll post up my few atlases and shaders one I'm happy with them... only really good for UK/Europe based tracks I guess since most of the trees are ash, sycamore, poplar, birch kinda stuff, but I'll have spent ages on them so well worth others using as they look great here imo!
Better than scrounging the limited stuff off the internet which is a bit lacking for decent game use imo.

Dave
 
Any quick way to improve FPS? My FPS is pretty bad now......nearly unplayable.


EDIT


How the heck do I get the sun to stop being so bright? I turned off motion blur (which tripled my FPS) but now the sun is so bright, I can't see the course unless I turn the time to midnight-6am.
 
Bug after running carlswood with 1 lambo ai car the Qlog is:
(INFO): [racer/3616] Loading track 'carlswood_nt'
(WARN): [racer/3616] PNewtonGeom:LoadTree; 'data/tracks/carlswood_nt/cache/trackcollision.bin' was generated by a different Newton version. File: 2.26 RacerNewton: 2.29. Load fails.

Also have to press a different car camera key before key 0 will work on ai 2nd car.
Then run carlswood with 1 lambo, no ai car, Qlog ok, key 0 is ok.
Then run a different track then run carlswood again no qlog error, key 0 bad
This appears after running carlswood in tracked. Tracked appears to change Newton version.
Ai needs fixing, thanks Mr Whippy. Not meant to be disparaging.

Qlog problems with tracked:
(INFO): [tracked/228] Loading track 'carlswood_nt'
(WARN): [tracked/228] PNewtonGeom:LoadTree; 'data/tracks/carlswood_nt/cache/trackcollision.bin' was generated by a different Newton version. File: 2.29 RacerNewton: 2.26. Load fails.

Bug: Can't see the slide show images in the GUI, just fix the menu_overlay.tga image alpha so it is tramsparent or semi-transparent.

Bug: Tracked changes "Alternative with light sky" variable in special.ini file to bright white!
sky=8.076190 8.076190 8.076190 0.000000
 
Any quick way to improve FPS? My FPS is pretty bad now......nearly unplayable.


EDIT


How the heck do I get the sun to stop being so bright? I turned off motion blur (which tripled my FPS) but now the sun is so bright, I can't see the course unless I turn the time to midnight-6am.

Play around with the exposure settings.
 
2o6, what track are you using?

Any screenshots.

You really shouldn't be having too many issues now if the content is right. Changing Racer defaults which are now approaching being right is a bad move really imo.

Does Carlswood and the Lambo look ok to you (ie default content?)

Try turn off the shadow blurring, that gives me about 15% fps boost and I can't really see any difference in quality.

Run a lower resolution?

Iirc, turning off motion blur isn't really turning off motion blur, but some key variable in the CSM pipeline, which will probably mean CSM isn't working, so everything is rendering as if it's in the sun (no ambient pass)


Try defaults first.

Are you running live env mapping?

envmap
{
; Enable old-style spherical environment mapping?
enable=1
; Live updating of track environment map? (very costly)
live_track=1

Are you running with CSM on?

shadowmapping
{
; Enable shadow mapping? If enabled, changes the Cg shader directory to
; data/renderer/shaders_hdr_csm (!) instead of data/renderer/shaders_hdr
enable=1


Both those will make important differences to fps speed first, without making things work incorrectly.

What FPS are you getting with out of the box settings on Carlswood with the Lambo, and what visual problems in that environment?

Dave
 
Another Quick, Cheap and Dirty 'tool' to ERASE on all tracks stored collision caché.
Put into racer folder, as a textfile name 'erase_collision.cmd' or something like that, and clck on it!

---------START----------------------
dir /b data\tracks\*. >track.lst
for /f %%i in (track.lst) do (
if exist data\tracks\%%i\cache (rd data\tracks\%%i\cache /s /q)
)
del track.lst
racer.exe
---------STOP----------------------

Best regards!
 

Latest News

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top