Jump to content


- - - - -

Even More Realism


  • Please log in to reply
58 replies to this topic

#1 dario

dario

    Denny Hulme

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 216 posts
  • Gender:Male
  • Interests:gpl
  • Sim interest:GPL

Posted May 25 2012 - 06:46 AM

Hi. I was just wondering if it is possible to recreate the actual starts from 60s. when the cars were crawling before start and that huge smoke that was due to wheelspin

#2 Pete Gaimari

Pete Gaimari

    Denny Hulme

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,075 posts
  • Gender:Male
  • Location:Colorado
  • Interests:Racing and Muzzleloader Hunting

Posted May 25 2012 - 09:36 AM

Not sure about the crawling. It gets you a black flag now. The smoke is sure there with humans racing. The AI never do. They have total traction on acceleration and braking. I never liked that.

I guess I didn't help much. :(

Edited by Pete Gaimari, May 25 2012 - 09:37 AM.

When i'm sliding. I'm smiling Posted Image

#3 John Woods

John Woods

    Be Somebody

  • GPLLinks Team
  • PipPipPipPipPipPipPipPipPipPip
  • 992 posts
  • Gender:Male
  • Interests:Improbable side of possibility
  • Sim interest:GPL

Posted May 25 2012 - 10:20 AM

Maybe a very high end 'puter with DX11 could do a realistic smoke filled start, but doubt GPL  and DX7-9 could pull it off without a monster hit on frame rate, lots of clippy stuttering, maybe even CTD or lockup on lesser computers. Also, likely would take some very major editing and lots of code invention. AI are controlled, iirc, by track files on a per track section basis. So to have them crawl might/would require changing every track to make it work, even if it is possible otherwise.
:2c:

Edited by John Woods, May 25 2012 - 10:23 AM.

the line is faster than the foot

V. R. Metaphysical Aesthetics

The Practice Room

#4 MECH

MECH

    Double poly killer

  • Super Moderator
  • 1,880 posts
  • Gender:Male
  • Location:Here ->
  • Interests:My Girlfriend
  • Sim interest:GPL

Posted May 25 2012 - 11:14 AM

View PostJohn Woods, on May 25 2012 - 10:20 AM, said:

AI are controlled, iirc, by track files on a per track section basis. So to have them crawl might/would require changing every track to make it work, even if it is possible otherwise.
:2c:
As far as I know you can set the wheelspin amount in the gplai.ini file of each mod.
They won't cause smoke but get slower of the grid.
I used it to even out the odds because they can be very quick and kill a pole position with this advantage.
There is no parameter for this in a track file. There are a couple other parameters like the one to influence the position changes during a couple of track sections.
Cheers,

Martin

GPL utilities 3dostrn,GPLRecord,GPLMixdrivers, GPLCarswitcher and the GPL Comic-book of Monza check my website

#5 Pete Gaimari

Pete Gaimari

    Denny Hulme

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,075 posts
  • Gender:Male
  • Location:Colorado
  • Interests:Racing and Muzzleloader Hunting

Posted May 25 2012 - 11:31 AM

I see wheelspin is set to 0.50. What did you change it to?
When i'm sliding. I'm smiling Posted Image

#6 MECH

MECH

    Double poly killer

  • Super Moderator
  • 1,880 posts
  • Gender:Male
  • Location:Here ->
  • Interests:My Girlfriend
  • Sim interest:GPL

Posted May 25 2012 - 11:57 AM

View PostPete Gaimari, on May 25 2012 - 11:31 AM, said:

I see wheelspin is set to 0.50. What did you change it to?

I have it at 0.5 but that's not the parameter you should change ;)

Here's a document i once saved from RSC with some tips on how to adjust ai:

In the GPL_AI.INI file, you can...

1) Delay their reaction time by editing the following line in the [ Behavior ] section:

base_race_start_hiatus = 18.0000 
; base time (in ticks) of driver reaction at start of race

2) Cause them to spin their wheels a little longer by editing 
the following two lines in the [ Physics ] section:

max_ws_interval = 108.000000 
; max time(ticks) to stop wheelspin
min_ws_interval = 54.000000 
; min time(ticks) to stop wheelspin

Values are in 'ticks'; each tick = 1/36 of a second.

Traveller is right. 
These are the lines in the [ physics ] section of my gpl_ai.ini:

max_ws_interval = 540.000000 ; max time(ticks) to stop wheelspin
min_ws_interval = 216.000000 ; min time(ticks) to stop wheelspin
wheelspin_min_adj_coeff = 0.50000 ; max grip reduction from wheelspin

The first two give the ai a little more realistic wheel spin. 
The 3rd line affects how quickly they accelerate off the line.
The greater the number the quicker the little bastards are.
I had mine set at .9 and even when I had the pole I would end up
 in 5th or 6th by the first turn, so I reset it to .5.
It may actually be too slow. I just had a race at Snetterton 
starting in the #2 spot in the Honda. 
I got the jump on everyone at the start and ended 
up with about a 4 second lead at the end of the 1st lap. 
I might try .6 next. Hope this helps you.

Change n_ai_cars = -1.000 to 0.000 to drive alone!


Edited by MECH, May 25 2012 - 12:00 PM.

Cheers,

Martin

GPL utilities 3dostrn,GPLRecord,GPLMixdrivers, GPLCarswitcher and the GPL Comic-book of Monza check my website

#7 Pete Gaimari

Pete Gaimari

    Denny Hulme

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,075 posts
  • Gender:Male
  • Location:Colorado
  • Interests:Racing and Muzzleloader Hunting

Posted May 25 2012 - 01:16 PM

Thanks. I'll mess around with it.
When i'm sliding. I'm smiling Posted Image

#8 Lee200

Lee200

    Denny Hulme

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 854 posts
  • Gender:Male
  • Sim interest:GPL

Posted May 25 2012 - 02:25 PM

Martin is right.

There are actually 3 settings that you can adjust to vary the AI acceleration off the line.  For the Sports Cars, we used:

base_race_start_hiatus = 18
max_ws_interval = 72
min_ws_interval = 36

These are measured in ticks where 1 tick equals 1/36th of a second.  So 18/36 would give a race start hiatus or delay of .5 secs; etc.

I don't know how to vary the amount of visible tire smoke.

#9 John Woods

John Woods

    Be Somebody

  • GPLLinks Team
  • PipPipPipPipPipPipPipPipPipPip
  • 992 posts
  • Gender:Male
  • Interests:Improbable side of possibility
  • Sim interest:GPL

Posted May 26 2012 - 06:29 AM

Wish I was smart, because I really really hate being wrong.
If I was smart, I wouldn't jump up and hopelessly "discuss" fine points of GPL tech with the Absolute Gurus of Grand Prix Legends.
Nonetheless, sad silly idiot that I am, have to point out the following which was copied from Ed Solheim's GPLEA Guide to Track Building. (So everyone knows, I have never finished a track, just sort of started some with miserable results).

This first quote is only included so those who chance to read this and wonder will know why, on some beta tracks, the AI parade around in a single file slow-motion dance:
"It's important to notice that the number of records in the LP-files is dependent upon the length of the track.  Should the number of records in the LP-files be incorrect, GPL will simply ignore the files completely and you'll end up with the AI's "coasting" around the track in the middle of the road at 40mph or so..."
So okay, now you know.

Here's some excerpts from the parts about creating track LP and INI files: (Note boldface applied to some "keywords").

"GPL uses 1 record per 'tick' [1 'tick' = 1/36th of a second], so if you change the track-length [after making the LP files], you're screwed and have to start making these files all over again."
Also note down below in this post, that "Unit's are meters per tick [a setting of 1.000 = 80 mph]."

Of course I have no idea what this means, but it seems there is some correlation between AI times and distance that is specified by these tick-related entries. Which makes me wonder whether there is any relationship to 1/36sec ticks and 36fps? And then, wondering whether changing the tick value to 1/60sec would make AI work at 60fps?
Oh well, wish I was smart, because I am sure that's too easy, so it must be really dumb.

Nonetheless, onward thru the fog.
Still quoting the GPLEA guide.

"Race.LP:
This file controls the speed and line the AI's use for "normal" driving/lapping ["alone"] around the track.

Pass1.LP:
Controls the AI's line and speed when passing [and possible being passed (on the right-side)] a car on the *left* side of the track.

Pass2.LP:
Controls the AI's line and speed when passing [and possible being passed (on the left-side)] a car on the *right* side of the track.

Each LP-file contains X number of records [one for each "tick"] and each record has 5 fields of data.  These are [in correct order]:

1) Longitudinal speed
2) Lateral Speed
3) Lateral Position
4) Yaw Velocity
5) Waypoints (or "flags")

SPEED MODIFIER:
The SPEED MODIFIER is used to speed up the AI's at specific places around the track, probably at places where they are too slow etc. So if you make some AI's and they turn out to be a bit slow at certain spots you can use this modifier to speed them up.
The modifier is scaleable - i.e. you use the two topmost bits to adjust how much faster you want to make them. So, one speed modifier can look like this: 0x02000000 (this only speed them up a "tad") or you can make one that looks like this: 0xDF000000 which make them go a lot faster.  The MODIFIER must be present in all the records you want to "speed up" (look at the Kyalami AI-files and you'll get the idea).

The SPEED MODIFIER can also be combined with any of the other flags - like this: 0x3C010000 (MODIFIER and TIRE WARMUP) or 0x08000400 (MODIFIER + CLEAR NO PASS ZONE) "

Track.ini AI behavior specifications

"[ statistics ]
reference_value = 500.0 ; "base" AI laptime in seconds

The comment says it all I guess.. input-data is seconds and is a reference to base laptime (in seconds) for the AI.

[ ai_track ]

Now.. this is where things get nasty... getting these bits correct is a must if you want the AI's to behave correctly.  I'll explain one setting at the time.

end_start_behavior_section = 5.000000 ;

This is what controls the AI's behaviour at the start of the race... the AI's will shuffle for position and race side-by-side up to the *start* of this track section, and then - room permitting - they'll fall back to their normal behaviour.

track_global_hype_scaling = 0.8 ;

A really cheap way of speeding up or slowing down the AI.  Again, it's a scalar value.  Set this to 1.0 and they will drive at normal pace.  If they are a little fast, make it 0.95 or so, and if they are a little slow, make it 1.05 or so.

track_start_speed_limit = 1.231 ;

Only seen this one at Zandvoort.  What is does is put an upper limit on the speed the AI's will reach during their start-behaviour. Unit's are meters per tick [a setting of 1.000 = 80 mph] - and this "limit" will be enforced until the AI's reach the "end_start_behavior_section" as defined earlier in this file.  I assume this is used at tracks where there is a huge difference between the speed defined in the race.lp file and the speed you can achieve from a standing start - such as at Zandy."

So, please, note that I am not AWG, (Arguing with Gurus). Just as usual, guessing with wild abandon and asking questions.

Morning, Everyone.

Edited by John Woods, May 26 2012 - 06:36 AM.

the line is faster than the foot

V. R. Metaphysical Aesthetics

The Practice Room

#10 Lee200

Lee200

    Denny Hulme

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 854 posts
  • Gender:Male
  • Sim interest:GPL

Posted May 26 2012 - 07:20 AM

Ed's Track Building Guide, although old, still contains some very good stuff.

The only minor difference I've found is that the number of records in the .lp files is based on the track's 3D length (which is normally longer than the 2D length) and a fixed distance of 3 meters per record.  So if a track is 3,000 meters long, it will have 1,000 records.  The number of records is NOT based on 1 record per tick which would imply the number of records varies depending on the car speed which it doesn't.

I've never quite broken the code on how to compute a track's 3D versus 2D length.  AIEdit does it OK as does RPY2LP.

#11 Phil

Phil

    Tazio Nuvolari

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 173 posts
  • Gender:Not Telling
  • Interests:I have no preference
  • Sim interest:I have no preference

Posted May 26 2012 - 04:31 PM

View PostLee200, on May 26 2012 - 07:20 AM, said:

I've never quite broken the code on how to compute a track's 3D versus 2D length.
I'm curious, is the problem calculating the arc length of the cubic functions? Or interpreting the trace data?

#12 Jim Pearson

Jim Pearson

    Denny Hulme

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 70 posts
  • Gender:Male
  • Location:Down Under
  • Interests:Trackmaking, Bike Road Racing, Links Golf, Long Distance Walking.

Posted May 26 2012 - 05:22 PM

View PostPhil, on May 26 2012 - 04:31 PM, said:

View PostLee200, on May 26 2012 - 07:20 AM, said:

I've never quite broken the code on how to compute a track's 3D versus 2D length.
I'm curious, is the problem calculating the arc length of the cubic functions? Or interpreting the trace data?

Actually, Nigel Pattinson's AIEdit already does this. Clever fellow Nige!

However, the difference 2D to 3D may be minute for many tracks. Here is an example of one longish one.

Attached Files



#13 Lee200

Lee200

    Denny Hulme

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 854 posts
  • Gender:Male
  • Sim interest:GPL

Posted May 27 2012 - 07:20 AM

Jim, you're right that many tracks have a 2D and 3D length that are practically the same, but there are others where there is a big difference.  For example at the original Nurby, there is a difference of 45 meters which would cause a difference of 15 records.

I was in error earlier when I said that the number of records is based on the 3D track length.  It is actually based on the 2D track length.  As you know, the 3D track length is easily obtained by adding up the segment lengths found in the .trk file.

Phil, yes I've tried using the center trace altitude deltas to correct the 3D length for 2D, but have failed to come up with the correct algorithm to do so.  If anyone knows how to do this, please let me know.

Attached Files


Edited by Lee200, May 27 2012 - 07:23 AM.


#14 Ginetto

Ginetto

    GPL track editor

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,506 posts
  • Gender:Male
  • Location:Lombardia, Italia
  • Interests:Mountain
  • Sim interest:GPL

Posted May 27 2012 - 08:26 AM

For sure is not that the 3D length is the length of the track considering the elevations while the 2D length is the track flat.
Increasing the elevation of a section by 120 meters, both 2D and 3D length doesn't change one bit and, in this case, this is still smaller than 2D lenght.

Attached Files

  • Attached File  A.jpg   51.36K   53 downloads
  • Attached File  B.jpg   39.13K   49 downloads

Edited by Ginetto, May 27 2012 - 08:29 AM.

Done these tracks
Working on Stardust, Nassau, Paramount Ranch +others

#15 paul skingley

paul skingley

    Denny Hulme

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 404 posts
  • Gender:Male
  • Sim interest:GPL

Posted May 27 2012 - 08:26 AM

I think GPL will only produce dust or smoke for 3-4 cars at any one time.
So unless there are some changes to the core I dont think you will ever get the smoke screen from half the field that the original poster is asking about.



paul




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Sim Racing Links