Released Lamborghini Gallardo 5.0, version 2

Hi all,

First off, read this post, it contains important information.



I really like the original Gallardo, but the time to do it justice with a full new model and textures is just not viable for me right now. So I've simply taken the old T-Shine/TtR Gallardo and given it a nice big V0.9 upgrade!

Also some of these old cars are still quite cool looking and it's nice to update them and enjoy them. I can also spend more time making fun features instead to make the cars more enjoyable.


lamborghini_gallardo_v2.jpg


Download link:
http://www.certainpixels.co.uk/racer/lamborghini_gallardo_v2.zip

You also need a copy of this shader which needs to be placed in the racer\data\renderer\shaders folder:
http://www.certainpixels.co.uk/racer/standard_glow_f.zip


So what I've done:
  • New shaders and tweaked textures, new textures from the ground up in some places
  • Completely new car.ini/physics/pacejka etc
  • New sounds
  • Config tool so you can easily choose gearbox type, paint type, and a few police car skins
  • New wheel blur models/textures created
  • Wobbly engine, wow!
Most of the scripts if you care to look have lots of annotations to see what they do and why.

TCS is switchable via the T key, and is done via scripting more like a real TCS system.

ABS is operated via scripting.

AWD is operated via scripting, and closely approximates the behaviour of the real Gallardo AWD system (though it's still a fudge based on the power_gearing system underneath)

With the E-gear gearbox selected if you disable TCS and select neutral the car will enter launch control mode, floor it in neutral when stood still and when the revs reach 6000rpm+ the car will take-off down the road nicely.

The car comes with E-gear gearbox selected and Arancio Atlas paint colour.

If you select the police car skins, the flashing lights can be activated with the Q key.

I'd like to have done more with these just to try something new but it gets really heavy going. As the annotations in the script point out, we really need to just turn the opacity or visibility on/off rather than move objects around! It'd make life much easier.
Also no easy way to run our own sounds (again would be nice to add generic sounds (like generic models) and call them from scripts. Ie, sirens etc.

Also note most scripts are in qscript not Onyx. Onyx currently doesn't play nicely over network or with AI cars because Onyx can only reference car indexes. When Onyx finally gets finished then these scripts can mostly be moved over to Onyx from qscript.

Unfinished elements, the wing mirror glass and body indicators are not coloured properly due to the way I've done the car paint. If I go any further with this car I may as well have just started again from scratch, so it's got it's weak areas because of the way it was built all those years ago... but I can't really notice those problems most of the time.

If it's a big issue then you can always make your own fscommand script (for those that know how) to use one of the old textures from the car and adjust the car.shd appropriately.

The headlights I'm not 100% happy with (when turned on), again, I didn't want to get into touching the original body.dof at all so they look a bit iffy up close but in driving/replays they look fine.



The most important thing is that these cars get used and actually enjoyed driving on some fun tracks, so enjoy!

Full credits are in the car readme.txt

Thanks go out to the original car contributors, and Comso for helping me out with this one... new car.ini layout logic and just generally driving it and making me do a better job or correcting details! Also it's QLOG friendly so Boomer should be happy ;) :D

The car was developed for RC5c, I'll update it to newer versions as reliable generally bug-free versions arrive!

Cheers

Dave
 
Hi Dave,

Thank you for the release. Config tool looks great, works well in Linux. When the car starts in Racer, it throws a message about missing shader: dyn_standard_bump_reflect_trans_f.cg

Could you post it or let us know if there another shader we can modify to get what we need?
Thanks..
 
Doh! A bug already haha.

If you already have the car, in the car.shd file change this entry:

If you have yet to download the car, then this has been fixed in the download now.

Code:
vf_wheel
{
  vertex_shader
  {
    file=dyn_standard_bump_reflect_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_bump_reflect_trans_f.cg
  }
}

To this:

Code:
vf_wheel
{
  vertex_shader
  {
    file=dyn_standard_bump_reflect_v.cg
  }
  fragment_shader
  {
    ;file=dyn_standard_bump_reflect_trans_f.cg
    file=dyn_standard_bump_reflect_f.cg
  }
}

Cheers

Dave
 
Argghhh...

Sorry to all those downloading and getting errors. I should have tested on a blank Racer install!

I've updated the first post with a link to the missing shader.

Basically it's just the usual shader but with emission multiplied by the alpha channel. Nothing fancy...




I need to figure out why the car.shd cg file linking to a car folder isn't working (maybe it's been removed to stop people making un-maintainable content!?)

I'm pretty sure we used to be able to put custom shaders in the car folder but it doesn't seem to work any more, thus we need to provide them for users to download into their own renderer/shaders folder!

Cheers

Dave
 
You do need to edit the cg to make it work there, for example if the path to the shader is
\data\cars\mazda_rx7\cg\dyn_standard_reflect_window2_f.cg
Code:
#include "../../../renderer/shaders/atmosphere.cg"
the ../../.. brings it up 3 folder levels to \data, and then it goes into the folder where atmosphere.cg is kept. I haven't tested for certain that this is the exact location for all #includes but it should be obvious if it's not.
Code:
fragment_shader
{
  cg/dyn_standard_reflect_window2_f.cg
}

I was using that same emission with alpha control shader for some RX7 stuff iirc, would probably be a useful default.

That said, haven't tested with 0.9.0 RC5 clean install yet. It did look like this set-up works.
 
The second code you noted is what I used to do and it'd not need the #includes pointing back down the folder tree... but then around 18 months ago maybe I think Ruud removed that support?

It kinda makes sense because cars would soon end up out-dated or not working if Ruud changed shaders that we referenced.

What we need perhaps is a way to get good shaders that we all kinda agree make sense, into the renderer/shaders folder and get maintained... I know Ruud's task increases more and more as we add more shaders but it makes sense to cover off commonly used and popular shaders I guess (ie, they are fundamental basic shaders that any sensible author might use, such as alpha on emission)


I hope everyone is enjoying the Gallardo. Comments are welcome, positive or negative... if I can improve it further I will give it a go!


Cheers

Dave
 
Thanks a lot Dave. It really is a pleasure to drive it. Though the texture work on the interior could do some work. Another thing - the headlights are pretty simple those are lacking some realism. Here's a quick pic to show what i mean. This is of course far from perfection.
4b878c9e9586.jpg
 
So what have you changed there?
It looks like you've added another flare texture over the lens? Using Racer built in flares? Or DIY ones?

It does look better in that shot, but the real test is a fly-by from a replay camera at day time, dusk, and night time, to make sure it 'looks' realistic in all conditions etc :D

Ideally you'd spend a lot of time with all these details but it'd be better to start again if you care that much.


I'm glad you like to drive it though. I think the interior is pretty low poly but it works ok for me considering when the car was made.
Usually I'm looking at the RPM gauge only, the rest of the time I'm looking out the window hehe :D

Dave
 
No, those are DIY. I admit, those are not looking great, I have added light reflection on the plastic thing under the headlight lens plus In real life i think the light spot from the headlight is lighting up the headlight glass too.
As an example - Some1's Corvette C6
 
Yeah ideally we really want a shader in this situation that has a control rgb texture for the emission amount/colouring, that simply sits at the end of the normal shader we might use for the headlight interior.
Then we can just turn the emission value on/off (rather than having another model and shader which is kinda inefficient).
Also if we expose the shader emission value to Onyx, we can have a slight soft on/off effect to lights which is quite commonly seen, especially with older car lights!


For the lenses picking up the lighting too, I suppose you could add in some halo/refracting/reflecting shading around the edges, and any desired effects onto the lens.


Just which shaders to use. In theory depending on how creative you wanted to be, you could use a mono channel only for emission amount and scale any colour tinting with the emission values in the shader itself.
So you could use the usual bump_reflect for the headlight interior and use the base maps alpha for emission.
For the lens you could use the glass shader used already on this car, and just add an alpha to one of the textures and use it for emission.

All pretty easy stuff really...


I currently don't really like the lights being an overlay model, we end up needing to use a blend when a blend shader isn't needed, we double the batch count for lights because we do two jobs which could be one instead, offsets and blends can pose problems too since we are having blended shaders under blended lens glass which usually ends in pulling your hair out :D

Model swapping would be better, but that seems messy.

Shader value adjustment seems the most elegant approach in my view, and we can do more creative and realistic looks with that approach too!



Time to pester Ruud on that one. Shaders being tweaked by scripts would be very useful for oodles of things.

Dave
 
I still kind of lost in the past, and all this cg shader stuff is pretty complicated for me, just know the basic stuff.
Meanwhile... I fiddled something more...
84e97a674348.jpg
 
Like those lights foxo! Tried the car, Mr Whippy but had a few issues with it.
Qlog errors etc. for a very nicely modeled car.
Can't load rim gr.tga creating red/blue stub image
Material 'material24' of geode 'data/vars/lamborghini_gaiiardo_v2/interior.dof failed to load image 'rim gr.tga'
No shader found for material 'material24' in 'data/vars/lamborghini_gaiiardo_v2/interior.dof ' (default 'rim gr.tga')
And I get the following in the console and it don't go away but willf allow entries in the console. and then repeats.
Error: system key 'car0.wheel3.rotvel' not found
Error: system key 'car0.wheel2.rotvel' not found
Error: system key 'car0.wheel1.rotvel' not found
Error: system key 'car0.wheel0.rotvel' not found
Error: system key 'car0.wheel3.rotvel' not found
Error: system key 'car0.wheel2.rotvel' not found
Error: system key 'car0.wheel1.rotvel' not found
Error: system key 'car0.wheel0.rotvel' not found
Error: system key 'car0.wheel3.rotvel' not found
Error: system key 'car0.wheel2.rotvel' not found

This was as downloaded and tested on Ver 0903.
 
Cheers for that Boomer.

Hmmm, qlog and other such errors were totally clean. I used DOF Fix and everything haha...

Looks like the interior maybe needs a pass through DOF-Fix again or something?

Would you mind trying to clean the interior.dof with DOF-Fix?


As for those console errors, that is the AWD script it seems... I forgot that was using Onyx reference... arghh!
Since Onyx can't work on a car, only by the car index (or if there is a way to reference it like in qscript I'm not sure how, Ruud?), then things are probably going to become unhappy if you have networked/AI cars trying to use the AWD script, because it won't work basically. We assume the script owner car is car0, but it might not be.

Also, Onyx only had that (wheel speed) added recently, so I should advise that this car is for the most recent Racer version RC5c... assuming that is erring towards V0.9 hehe :D

Qscript doesn't expose wheel speeds, only slip ratio... but that isn't good enough for a nice AWD script unfortunately.


I really hope Ruud will finish up Onyx soon so we can just reference the explicit 'owner' car at the head of a file (though really any script in a cars folder should default to be for JUST that instance of the car imo), then all these issues can be tidied up nicely!


Qscript is quite slow really, I lost about 10% FPS with all the scripts, hence some optimisations, but they still cost about 5% FPS...


Please copy/paste this AWD script entry to get a fixed bias AWD system (which you can adjust still)

Code:
// AWD script for Gallardo and other cars with similar awd system.
// This script uses a fixed bias in cases where Onyx won't play nicely (AI cars, multiplayer etc)
 
rcar $car=get scriptowner car
 
float $finaldrive = 3.82
// Set this to suit your preference, 85% is understeery, 95% oversteery
float $staticbias = 95
 
float $bias_ratio
 
float $powergearing
float $maxtorque
 
float $slipfront
 
while 1
{
    $powergearing = (($finaldrive * (100 - $staticbias)) / $staticbias) / 2
 
    $maxtorque = $staticbias
 
    //
    //Set the diff bias
    //
    set $car wheel 0 powergearing $powergearing
    set $car wheel 1 powergearing $powergearing
 
    set $car maxtorque factor ($maxtorque / 100)
 
    interrupt
}


I hope Ruud returns soon and keeps working on Onyx and gets it finished up. It'd be really nice to be able to draw a line under these things. They are simple things that shouldn't really be hard to do.

Thanks

Dave
 
Thank you for the response, I didn't try it on ver 090 RC5 due to the console error on that version and if I remember correctly that ver doesn't list Qlog errors.

Tried on ver 0905 RC5 and the car runs clean with no errors ot the console stuff. That's what one gets when using a version with a lot of bugs. Running on ver 0903 I got the problems so it's up to Mr Whippy to try it on that ver and make the needed fixes.
 
Oops, just realise I meant RC5c, not d... d was a bit buggy now I remember :D

I could try make an 0903 compatible version, but it's just more time/headache for little gain because you lose out on some nice features (ie, half decent working AWD which this car really benefits from!)

What is broken with RC5c that stops you using it Boomer? I generally find it solid here... well, as solid as any Racer version that has gone before.
They all have some bugs, but the ones in RC5c can go un-noticed I think unless you force them to be apparent?!

I'll agree D is probably bad, hence why I didn't stick with it.

Hmmmm

Dave
 
For some reason I didn't get RC5c, will try to get it. RC5d was the version I tried the car on and there were no Qlog errors just the error that I posted in the 090RC thread. There were a lot of versions for 090RC5 which came fast and furious. The car had Qlog errors on version 0903 which was the best of the 0900-0905 versions imho as it did pick up Qlog errors. I'll check to see what I can find to make your car work with out problems.
 
I foundt ver 090RC5c and tried the car which worked correctly, no errors. Somehow I never noticed that version. Ruud's readme lists ver 0.9.0RC1 thru RC6 but in the RC5 thread there are b, c and d versions. Quite confusing.
 
I hope Ruud returns soon and keeps working on Onyx and gets it finished up. It'd be really nice to be able to draw a line under these things. They are simple things that shouldn't really be hard to do.

Thanks

Dave

" I'm pretty sure Ruud is alive and well, just he's had no free time for Racer for a while as he was moving house.

I have a feeling he'll be popping his head up soon again..."

;)
Alex Forbin
 

Latest News

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top