New version 0.8.9 is out!



0.6.6.5 old gpu Last normal "non-Cg" old engine, 0.8.8.1, 0.8.9 (ATI) non-"nvidia"-cg?

_______________________________________

0.8.9 non-cg prefer only non-cg: cars and tracks + fps / 2 .
 
Every texture requires a shader when using old cars/tracks with v 0.8.9 or you will get lots and lots of Qlog errors!

Noted that motion_bly.bloom must be enabled to get shadows and ther are items that should not be changed or you'll get problems.

Car shaders need a lot of work to get working correctly!

Just my 2 cents!
 
After messing a fair bit, a car that is well made in the first place is pretty easy to update for newer versions.

Problems are cars/tracks that just had an excessive quantity of shaders with mainly duplicated information, rather than a logical minimal system with new shaders only where really necessary.

Most cars have glossy paint, matte parts, chrome, rubber, glass, and then maybe a few specials like brake discs... yet many cars end up having a new one for each bit of glass... it may work out quicker to do it like that from a creative time point of view, saves making a nice texture to control ALL glass for example, but it's not so great in Racers world where we evolve :D


OK I'd done some reading and had a few shaders to re-create (alpha control on reflectivity cg file), but once that was done my M3 took all of 2 mins to update to the latest shaders, because all the subtle material controls were done in the mapping originally anyway...


I'll try get a car released, with a decent FAQ on how it's made, on a good best practice method for others to reference. By no means will I pretend I am 100% right, but just as a guide... I think if you look back at what Stecki used to do his work still looks excellent today, and that is where I draw my inspiration/level of quality from... do the job right in mesh/textures, and it'll look good and work well anywhere :D





I just can't wait for documentation now. The new scripting/coding sounds really interesting, and so do the exhaust backfires and things... just need the info on how to do them :D

Dave
 
Random thought: Can we get any path variables for the cg shader directory in car.ini? In future I think it's better if cars & tracks have custom shaders in data/car/cg/ folder (easier to install/package, etc. than expecting people to un-zip into 2 places), but then they're referring to the default shaders with "../../../renderer/shaders_hdr/lighting.cg" and so forth. It doesn't allow for hdr/ldr/csm hdr shader sets to be chosen by racer.ini.

I'm beginning to think customer shaders like these are very likely to fail quickly. Except perhaps for v0.9 which should be final (it should be v1.0 really) for some time.
One thing we did when doing CSM is split ambient and diffuse+specular lighting details into 2 intermediate buffers (all shaders write to COLOR0 and COLOR1). That's a bit like deferred shading. In the fullscreen postprocess shader we take those colors again, and depending on the shadow state, draw only ambient or (in lit parts) add diffuse and specular.
That was a pretty big change, and judging by what graphics cards are doing, I wouldn't be surprised if we need 3 or 4 buffers and go even more in the direction of deferred shading. Custom shaders will quickly go out of date I'm afraid beyond v0.9.0 final.
 
I'll try get a car released, with a decent FAQ on how it's made, on a good best practice method for others to reference. By no means will I pretend I am 100% right, but just as a guide... I think if you look back at what Stecki used to do his work still looks excellent today, and that is where I draw my inspiration/level of quality from... do the job right in mesh/textures, and it'll look good and work well anywhere :D

Dave

Wow, it's nice Dave, it will help me a lot. Actually i have completely no idea how to update my shaders, since i never played much using cg (i must admit, cg always try to kill my FPS). I will wait for your release, to use as guide for mine.

BTW, i wanna know if new version of racer support blowoff sound? not a bugged on, like olders, that i made decelerate sound with natural different of accelerate one. It were good, but since 060, we couldnt do it, decelerate and accelerate were mixed. I mean like LFS blowoff sound, when you stop throttle, it drop the pressure and make that sound. Maybe using a script like horn, shiftin, shiftout.. blowoff code.. volume, natural, etc, but one time in each throttle you do. Well, it'd be nice.
 
BTW, i wanna know if new version of racer support blowoff sound? not a bugged on, like olders, that i made decelerate sound with natural different of accelerate one. It were good, but since 060, we couldnt do it, decelerate and accelerate were mixed. I mean like LFS blowoff sound, when you stop throttle, it drop the pressure and make that sound. Maybe using a script like horn, shiftin, shiftout.. blowoff code.. volume, natural, etc, but one time in each throttle you do. Well, it'd be nice.

There's a throttle off sound thing, have a look at brother_david's celica gt-four, it's used on it.
 
It's on http://www.racer.nl/tutorial/gpushader.htm (you may need to refresh the specific frame). It's for trees, which are designed as crosses (normals all pointing sideways) where the lighting is really more expected as if the normal was pointing up. So it ignores the 3D model normals and just uses (0,1,0) (up) for lighting.
Why'd you need a shader for that? GPU shaders should be a little more generic imho. Trees made such a way (two polygon cross) should just be exported from 3ds max with normals pointing up (my exporter plugin can do that). Why not just write a little tool that takes a bunch of dofs and changes the normals to point up?
 
The particles fragment shader refers to a normal map
Code:
uniform sampler2D normalMap 	: TEXUNIT1,
But particles.ini doesn't say where to set this texture.
Is this available right now?


Just hijacking the original texture in the screenshot (using rgb as a normal map, alpha channel for transparency, and giving it a flat 0.8 grey)

Still need to wrap my head around multiplying by the IN.Direction (this is the orientation of the camera and thus the way the smoke's being faced, right) so the normals can look right on more extreme times of day.

Bit of z-fighting with the smoke where older smoke is rendered on top of newer but it's not too noticeable.


I'm seriously thinking about going out and buying a 9800 GT so I can try the CSM:rolleyes: Seems to be under $100 now.
 

Attachments

  • racersmoke2.jpg
    racersmoke2.jpg
    52.1 KB · Views: 216
Dave, I believe I've said it before, but one pretty good way of exploring what has changed, is using a file comparison utility, such as WinDiff (http://www.grigsoft.com/windiff.zip). Just select the old racer folder and new racer folder and do a diff. It will list all files that are new or have been changed and then you can view the differences in changed files.

I use notetable lite http://www.notetab.com the feature are kind of endless for a text editor the features that I mainly use is (in menu)
1. Document - second window ( with only two files opened it lays them out next to each other for quick reviews/edits )
2. automated editing across as many document as you care to open (search - replace - (can replace a line of code over all documents in all files)
( added notes to 2. = needs to be done with caution or can muck up if your not doing it right but very efficent )
3. tools - text satistics ( will tell you if you have the correct number of brackets for example open close brackets in *.ini file ( {} )
4, of course the standard ( search find - find next ) is useful when you add cooments such as I do for example my helicopter changes as shown...
........................................ you can use this code following but only example of how I make
; mdbobbo commented changes
........................................start of code in racer.ini ........................................
helicopter
{
; Mass of helicopter
mass=47 ; mdbobbo was 200
; Spring constant to pull heli above car
k=246 ; mdbobbo was 1
; Damping to keep helicopter from overshooting car location
damping=260 ; mdbobbo was 10
; Height of heli (avoid going to high for clipping and rendering speed)
height=2.4 ; mdbobbo was 50
; Lens
fov=75 ; mdbobbo was 50
; show_dials_2d=1 ; mdbobbo attempting to show dials in helicopter view
}
........................................ end of code in racer.ini........................................

and it's simple way to update the *ini as each racer version comes out just by looking up my ID in search find next with the use of "second document running with the old and the new racer.ini loaded
and that's the freeware version
if you really want to buy the Pro ( can be checked out for a trial period - just turns the pro bit off and keeps running after tril completes)
notetab is fully customisable to your own wishes. but I'm a freeware broker so I've got no need to go ballistic and buy everything I guess.
and indeed neither do most people.
just my 2 cent worth - now where's that penny for my thought hahaha
 
edit: Figured out what was making it crash. I can't use "Select a car" to select a car, as soon as I click one it crashes. First one shows up ok. Back to using Quick Race I guess.

Thanks Stereo I was trying to figure that one out and at first made the selected default car and track with 0.8.9 different than it was to load another track and car first... but I've already found another solution here by still using the Raven game loader with no MENU appearing seems to work fine (= frantic insecure neurotic and emotional) when I've tried it with various track/car combinations ... but point taken
 
Yeah the smoke particles are wrong anyway, and where does the "wind" come from? a track's special.ini? Is this a constant or an expression?
Smoke particles should use bump mapping too, you could get away with using half the particles and have it look even better.
Currently I just don't have the time to play around with stuff like I used to, real life is creeping in too much and I just can't devote hours to figuring out problems that pop up.
Racer has SO MUCH potential...I just wish I had the time to unleash it :(

just a thought about particles that popped into my head .. might not be at all valid mind you, but any help is worth discussing.
NOTE: now that we have moving item such as the new 44 gallon..ish drums in the updated "Badlands_mod_final" can we use the same system for other particles in some fashion to make the particles move independently?
seems to me a way to make particles such as stones and even smoke or "dare I say it snow and rain drop" behave independently too. :chat:
 
Just a short test of new particles_f.cg using hacked up textures for normal mapping.

Smoke really needs to fade out less abruptly still, don't know how to set that.

And I left my volume at 255 so it's very crackly :( just mute it.

particles.ini
Code:
smoke
{
  ; foreach car
  ; Car tire smoke (light; smoke from burning engines uses a different particle system)
  ; Max #particle at once for a system
  max=400
  ; Lifetime and variance (actualLifetime = life-life_var..life+life_var)
  life=3
  life_var=2
  startvelocity=0 1 0
  startvelocity_var=0 0.6 0
  ; Start size
  size=0.9
  size_var=0.3
  ; Growth of particle (m/s)
  growth=0.6
  ;growth=1.5
  growth_var=0.1
  ;growth_var=0.5
  max_alpha=0.2
  ; texture=data/images/smoke.tga
  texture=data/images/smoke_fake_lighting_norm2.tga
  
  influences
  {
    airfriction=2
    wind=0.8
    gravity=-0.15
  }
}

particles_f.cg (this messes up other particles since I'm not using the real normal map, back up your original)
Code:
//Particle shader

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

// Vertex to pixel shader structure
struct v2p
{
  float4 Position       : TEXCOORD4; // POSITION
  float2 uv				: TEXCOORD0;
  float4 color			: COLOR0;
 
  float3 Direction		: TEXCOORD1;
  float4 RayleighColor	: TEXCOORD2;
  float4 MieColor     	: TEXCOORD3;
  
  float  extinction     : TEXCOORD6;
  
  //float4 Position		: POSITION;
  //float2 tc0          	: TEXCOORD0;
  //float2 tc1          	: TEXCOORD4;
  
  //float3 lightDirTS     : TEXCOORD7;    // Light direction in texture space
  //float3 eyePosTS       : TEXCOORD5;    // Eye position in texture space
};

void main
(
  in v2p IN,

  out float4 outColor : COLOR,

  // Constants
  uniform sampler2D baseMap 	: TEXUNIT0,
  uniform sampler2D normalMap 	: TEXUNIT1,
  
  uniform float3    lightDirection,
  uniform float3    lightColor,
  uniform float3    lightAmbient,
  uniform float     atmosRayleigh,
  uniform float     atmosMie,
  
  uniform float3    eyePosW,
  uniform float3    Ke,
  uniform float3    Ka,
  uniform float3    Kd,
  uniform float3    Ks,
  uniform float3    shininess
  // uniform float     exposure
)
{
  float3 skyColor=GetSkyColor(lightDirection,IN.Direction,IN.RayleighColor,IN.MieColor,atmosRayleigh,atmosMie,lightColor,lightAmbient);

  //Lighting is not used -> heavy + particles are flat anyway
  //float3 normal = tex2D(normalMap, IN.uv);
  float3 ambient,diffuse,specular;
  //const float3 normal=float3(0,1,0); 
  float4 normalmap=tex2D(baseMap,IN.uv);
  float3 normal = (normalmap.rgb-0.5)*2.0;
  float2 dir = normalize(float2(IN.Direction.x,IN.Direction.z));
  float2 perpdir = float2(dir.y,-dir.x);
  normal.xz=dir*normal.z+perpdir*normal.x;
  float3 pos = IN.Position.xyz;
  // alter Ka and Kd to change balance for more diffuse smoke
  LightingSun(Ke,Ka,Kd,Ks,shininess,lightDirection,lightColor,lightAmbient,pos,normal,eyePosW,
    ambient,diffuse,specular);
  
    // Get base texture color
  float4 baseCol=float4(0.8,0.8,0.8,tex2D(baseMap,IN.uv).a);  
  float3 tempColor = baseCol*(ambient)+baseCol*diffuse* lightColor;
  //float3 tempColor = baseCol * IN.color;
  
  // Mix sky with texture color based on atmospheric influence
  //outColor.rgb = lightColor.rgb;
  outColor.rgb=lerp(skyColor, tempColor,IN.extinction);
  outColor.a = baseCol.a * IN.color.a;
}
Resave the attached .png as a .tga to use with this.
 

Attachments

  • smoke_fake_lighting_norm2.png
    smoke_fake_lighting_norm2.png
    19.9 KB · Views: 196
The particles fragment shader refers to a normal map
Code:
uniform sampler2D normalMap 	: TEXUNIT1,
But particles.ini doesn't say where to set this texture.
Is this available right now?


Just hijacking the original texture in the screenshot (using rgb as a normal map, alpha channel for transparency, and giving it a flat 0.8 grey)

Still need to wrap my head around multiplying by the IN.Direction (this is the orientation of the camera and thus the way the smoke's being faced, right) so the normals can look right on more extreme times of day.

Bit of z-fighting with the smoke where older smoke is rendered on top of newer but it's not too noticeable.


I'm seriously thinking about going out and buying a 9800 GT so I can try the CSM:rolleyes: Seems to be under $100 now.

Buy a GTS250 1gb =D it's almost the same price and I am having 120 fps with csm,with good config. =D
 

Latest News

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top