New version 0.8.9 is out!

From the changelog: "- New engine load calculation (for audio mixing) takes rpm, calculates throttle at which that rpm would be 'idle' and compares to the current throttle. If throttle is really depressed more, load is present."

This really has improved the engine sound as well, at least with the cars I have tried.. a V8 now sounds more like a V8 :)
 
only a question. Stereo, can your particle_f.cg be a billboard shader for 3d clouds with faking ilumination?
inclouds.jpgIt's only a group of quad faces with the same shader than yours. I don't know why,but when I put on some object don't work like the 'real particle shader'. Do you know something about it?
 
Well, it needs to have the right normal map in order to work the same way. And the shader doesn't handle the billboard part, that's how Racer is placing them before the shader is applied.
 
The normal map and the ilumination is ok, the problem is the billboard,only rotates low angles. But, like you said, it's not the cg file. This can be good for clouds shadows on the objects and no more sky texture dependent. I was reading about it, but the only problem is : I am a noob here on cg shaders writing. LOL But it's ok , thanks mate.
 
From the changelog: "- New engine load calculation (for audio mixing) takes rpm, calculates throttle at which that rpm would be 'idle' and compares to the current throttle. If throttle is really depressed more, load is present."

This really has improved the engine sound as well, at least with the cars I have tried.. a V8 now sounds more like a V8 :)

Yep, it does seem to be that bit better now!

A worthwhile change :D

Dave
 
  • Robbos

The plopping you get with smoke for example, is not because the alpha doesn't fade gradually. It does, but there are many billboards being spawned, many billboards behind each other.
When their life is pretty much the same, they'll also die at pretty much the same time, causing the plopping.
The fact that all these billboards are behind each other creates a performance penalty due to all of the alpha blending. Especially when the particles fill the screen.
This can be avoided somewhat by limiting the size (or growth). Of course, some still look better when they are large.

Here's the list of all particles.ini options (some might not yet be available in the beta 0.89 build, so please be patient while work is being done on a new build).

Note that the turbulence influence is not available, you can get some "randomness" by setting a startvelocity_var

Code:
particleSystemName
{
    ; Max nr Of Particles
    max=10
    particles_per_spawn=1
    max_spawns_per_second=30
    ; velocity out of the emitter in m/s
    startvelocity=0 0 -1 
    ; variance in m/s
    startvelocity_var=0 0 0.2
    ; lifetime in seconds
    life=3
    ; variance in seconds
    life_var=1
    ; size of a particle in meters
    size=0.5
    size_var=0.2
    ; grow or shrink particles
    growth=0
    growth_var=0
    ; max alpha=1 = fully opaque at start.
    max_alpha=1
    ; Alphafade determines how fading will happen
    ; linear is the default, no or none will have max_alpha for the entire life of the particle
    alphafade=no
    
    texture=data/images/texturename.tga
    
    ; Other shaders can be applied. The defaults are particles_v.cg and particles_f.cg
    ; Use other shaders when you don't want certain functions like lighting,
    ; or when you want to add new non-standards
    vertex_shader=particles_spark_v.cg
    fragment_shader=particles_spark_f.cg
    
  influences
  {
    ; name of an existing particleInfluence (in c++)
    ; value: 1=default, 0-1= less influence, 1-inf=more influence
    airfriction=0.1
    wind=0
    gravity=1
  }
}

You can define your own collision particles in particles.ini.
In the upcoming version, you'll be able to add a few (or at least one) particlesystem(s) to materialpairs in data/physics/materials.ini. Spawning happens when you scratch against something anyway, so just make sure the car's collision model gets a material property.

Sparks are the default collision particle system, but if you're not happy with that, it is interchangeable.
 
The plopping you get with smoke for example, is not because the alpha doesn't fade gradually. It does, but there are many billboards being spawned, many billboards behind each other.
When their life is pretty much the same, they'll also die at pretty much the same time, causing the plopping.
The fact that all these billboards are behind each other creates a performance penalty due to all of the alpha blending. Especially when the particles fill the screen.
This can be avoided somewhat by limiting the size (or growth). Of course, some still look better when they are large.

Here's the list of all particles.ini options (some might not yet be available in the beta 0.89 build, so please be patient while work is being done on a new build).

Looks like the spawn limits and alpha fade aren't being used yet, I guess I'll wait for a new build.


Collision model's material property (to give an object a specific material) would be something like this?
Code:
shader_hull
{
  layer0
  {
    map=something.tga
    material=metal
  }
}
 
like this:

Code:
shader_hull
{
  material=metal
  layer0
  {
    map=something.tga

  }
}
You will have to delete your collision cache !!!! It needs to be rebuild... dont forget !!!
To make sure your car has a material, set the material in every shader to make sure it gets set (is fixed in next release)
Robbos is the guy who built the particle system. (And also a finalist in microsoft's imagine cup for game design this year--and also last years--, which he will surely win !! )
 
The plopping you get with smoke for example, is not because the alpha doesn't fade gradually. It does, but there are many billboards being spawned, many billboards behind each other.
When their life is pretty much the same, they'll also die at pretty much the same time, causing the plopping.
The fact that all these billboards are behind each other creates a performance penalty due to all of the alpha blending. Especially when the particles fill the screen.
This can be avoided somewhat by limiting the size (or growth). Of course, some still look better when they are large.

Does this mean in the new version that we won't get the massive FPS drop (if the particle system is setup correctly) when looking at particles?
I was driving around Carlswood and noticed my fps go from 120 down to 20 because of particles spawning, from your description it sounds like that's the problem. With proper management, would this drop be (almost) eliminated?
 
I am having some annoying problems with 089..

i am using luthobu non-cg racer.ini.

using this same car in 088, it runs fine, firm, hard susp setup like stock one


and in 089, i got a strange car, soft like a boat, high roll body, and low sound volume. why?

 
  • Robbos

camsinny, you can definitely reduce the overhead of particles. There are a few things I'd still like to do different because I know they are performance hoggers.

For example: don't set your max particles too high (for memory consumption), but not too low either (for cpu usage).
Since particles always should be able to spawn (even if you reached max) the system will search for the particle with the least life left. If this search needs to be done on an array of five particles, then big deal, but if it needs to be done on a list of 1000 particles, and you spawn a lot, then performance will drop.
So make sure you don't set the life too long, the size/growth too high and in the new version, you can limit the spawnrate, but then at high speeds, you want smoke for example to spawn enough! Otherwise you get gaps between spawned particles and that doesn't look convincing at all.
The system is set up to give some more control to the user, instead of pure hardcoded particles, but that also means you must watch out for performance when setting its values. If you can configure the system to look good but with improved framerate, then be sure to post the new particles.ini!
 
Welcome to Racer Robbos. :)
It's good to see Ruud let some other people in on the coding fun.
I love what you've done with particles already, I hope you don't mind a couple of suggestions...

It would be great to see tire smoke tied to tire heating, like we have for brakes. I think it (spawn rate and alpha) should fade in as the tire gets hotter.
The velocity for the "z" direction is currently tied to the world instead of the car, it looks a bit odd when the car turns.
I've noticed that smoke in real life has a sort of "stickiness" to it, in that it wants to linger around a car body before it is dragged off by wind or air resistance. Any thoughts?

I look forward to the cool things you have planned. :cool:

Alex Forbin
 

Latest News

How long have you been simracing

  • < 1 year

    Votes: 223 14.7%
  • < 2 years

    Votes: 155 10.2%
  • < 3 years

    Votes: 151 10.0%
  • < 4 years

    Votes: 117 7.7%
  • < 5 years

    Votes: 216 14.2%
  • < 10 years

    Votes: 179 11.8%
  • < 15 years

    Votes: 119 7.8%
  • < 20 years

    Votes: 81 5.3%
  • < 25 years

    Votes: 66 4.4%
  • Ok, I am a dinosaur

    Votes: 210 13.8%
Back
Top