Optimizing Shadows in GTR2

From Simwiki.net
Jump to navigation Jump to search

https://www.simracing.org.uk/smf/index.php?topic=3264.0 https://www.simracing.org.uk/smf/index.php?action=printpage;topic=3264.0

SimRacing.org.uk
SimRacing In General => GTR2 => Topic started by: Rich_A on July 13, 2007, 11:40:50 PM +0100

Title: Track editing
Post by: Rich_A on July 13, 2007, 11:40:50 PM +0100
I discovered to today that it's possible to edit the tracks and remove the shadows that kill frames and at the same time keep the shadows for things like bridges and overhead objects. I edited donnington and I managed to save 40 frames or something stupid just by removing a few cast shadow lines in the .trk file. And now I can use shadows on full and have them go over cars as they go under bridges and also into my cockpit like it was in GTR1. Search for "cast" in the .trk file and then you can see which building you could disable the shadows for.

For example ..

{
  VisGroups=(4)
  MeshFile=OBJ_BRIDGE_START.gmt CollTarget=True HATTarget=False ShadowCaster=(Dynamic, Solid, 128, 512)
}

Would be

{
  VisGroups=(4)
  MeshFile=OBJ_BRIDGE_START.gmt CollTarget=True HATTarget=False
}

If you didn't want that object to cast a shadow. Also I'm sure that the number of volumetric lights can be reduced in the .trk file so that frames are still good at night and not half of what they are during the day. It may also be possible to change the lighting to non volumetric.

Title: Re: Track editing
Post by: Rich_A on July 14, 2007, 01:14:39 AM +0100
BTW this topic is intended for whoever is editng the tracks here, Shark isn't it? Don't go changing the .trk file if you're a client because it will cause a mismatch!

If you like I can send you the .trk file I've done for Donington.

Title: Re: Track editing
Post by: Rich_A on August 05, 2007, 03:47:58 PM +0100
Hey if you like I will do trk files for all tracks you run in season 6 so that everyone can use full shadows? I'll mostly disable all building shadows which are the ones that can half frames and then all that will be left are shadows for bridges. It may even be possible to edit the trk file so that frames are unaffected at night too. I'll need a schedule and then I'll need to know which tracks you'd like to run at night?

Title: Re: Track editing
Post by: Dave 'Gizmo' Gymer on August 05, 2007, 08:28:01 PM +0100
Short answer - no idea yet.

Title: Re: Track editing
Post by: Rich_A on August 06, 2007, 12:48:36 AM +0100
OK well as soon as you know the schedule I'll make the trk files, it won't take me more than an hour or two. Each track will have to have it's own UKGTR folder though I don't know if that's a problem. You can keep the file sizes down by linking to the default track directories. Yes I notice that is what you've done for the season 5 track pack, so the file size is going to be small even if there is a folder for each track in the schedule. If you don't have much space I can host it no problem.

Hm, I wonder how to switch a volumetric light into a non volumetric light. I could do with a GTR1 trk file because all lights in GTR1 are non volumetric. Can someone who has GTR1 installed send me a PM then I'll send you my email address so that you can send me the GTR1 trk file.

I've edited the shadows for Donington and Barcelona already. It's so nice being able to use full shadows and then have a flicker of shadow go over the cars and into my cockpit too. I managed to almost double the full shadow frame rates when compared to the default trk files.

Title: Re: Track editing
Post by: Simon Gymer on August 06, 2007, 08:35:56 AM +0100
Have you tested this is ok with low and high resolution track textures and that they work without issue in online races too?

Title: Re: Track editing
Post by: Rich_A on August 06, 2007, 04:33:28 PM +0100
Well the trk file points to the gtr files so if you point it to the default track gtr files it will use them. As long as everyone has the track pack installed it will work. I'll do a tester one for your donington track so you can see how it works.

The trk file is sort of an options file for DX relating to each gmt file. So can someone send me a GTR1 trk file because my copy is damaged, doesn't install?

Title: Re: Track editing
Post by: Rich_A on August 07, 2007, 08:46:52 PM +0100
Here's my version of Donington taken from a fun race we did. It's the exact same version except I copied the paths from your 4UKGTR_Donington. Donington is not a great example because it doesn't use too many shadows but the frames are significantly better and you can see the shadows from the bridges. So try it if you like and then I'll need the schedule for season 6 and also any night races you might be doing. I can't edit the night lighting until I get a GTR1 trk file if indeed there even is one, I try and ask on RSC too. Don't forget to backup before dropping in.

4UKGTR_Donington.rar (http://www.eoaa.org/downloads/GTR2/tracks/4UKGTR_Donington.rar)

Title: Re: Track editing
Post by: Rich_A on August 08, 2007, 02:53:25 PM +0100
For this each track is going to have to have it's own folder so there will have to be a few bare minimum files. Changing the AIW means a handful of files must be copied and renamed. That won't take five minutes but perhaps that's something you'd prefer to do i.e. putting it together?

Title: Re: Track editing
Post by: Simon Gymer on August 08, 2007, 09:27:36 PM +0100
I'm happy to package any more new tracks into a new UKGTR track pack, but I won't personally be doing anymore editing myself.

Title: Re: Track editing
Post by: Rich_A on August 09, 2007, 12:24:48 AM +0100
Not sure what you mean ..

You don't want to rename some files and put them in UKGTR folders? I can maybe do it, all it needs is one line to be renamed in the AIW and then half a dozen other files would need to be copied in and renamed. If you don't want to do that I'll see if I have enough time to do it but I can't guarantee that I will.

When the schedule is there and we know what races are at night if any, I will attempt to start it then and see how I get on. To keep the work load down perhaps it's better to only include Endurance events in the pack.

Title: Re: Track editing
Post by: Simon Gymer on August 09, 2007, 08:14:13 AM +0100
If someone else creates a new track (or tracks) all zipped up ready to go I will create the new InstallShield track pack for them.

Title: Re: Track editing
Post by: Dave 'Gizmo' Gymer on August 09, 2007, 08:45:48 AM +0100
Remind me again what the point is? For lazy people who don't want to turn shadows down to get their frame rates up? :P

Title: Re: Track editing
Post by: Rich_A on August 09, 2007, 02:58:44 PM +0100
Well you have to use Full shadows to make the shadows go over the cars and into cockpit anything less than full and that doesn't happen. And using Full usually drops frames by half but I can edit the trk file so that they only drop by 2 - 5 frames when compared to using medium shadows. So essentially the frames will be the same as when using medium except there will be shadows on the ground for bridges which also go over the cars and into the cockpit.

Also the night lighting can drop frames into the teens so there's no way I'll be racing at night if something is not done about the night lighting but that is something I'd have to look into by using a GTR1 trk file.

Title: Re: Track editing
Post by: Dave 'Gizmo' Gymer on August 09, 2007, 03:30:22 PM +0100
Seems like a lot of trouble to go to for not a lot of benefit. Fine if we're piggybacking onto some other track changes but not something earth shattering... ;)

Title: Re: Track editing
Post by: Rich_A on August 09, 2007, 05:25:45 PM +0100
Well sure but it's something I really don't mind doing and it won't take me long at all. And as I said before the file sizes will be small perhaps only 1.5mb per track. I can host the track pack no problem at all ..

Let me see how I get on with it when the schedule is made, you can give me deadline and then I'll try my best to get it done for then. Nothing to loose.

The only con is that the safety car won't work but if you're still doing those pit limiter starts that won't be a problem.

Title: Re: Track editing
Post by: Rich_A on August 29, 2007, 05:10:24 PM +0100
Sorry guys I'm not going to have enough time to do this but I will continue to share my findings.


Powered by SMF 1.1.21 | SMF © 2015, Simple Machines