Monday, March 29, 2010

Good Quality - Good Performance

Not a tutorial but some tips to get the best quality with best performance.

1. Shader
Usually i never use bump mapping. Sometimes on buildings but thats very specific.
In my opinion it looks very unreal on road. Best road shader is "Specular Map T1". You can use "T1 add t2 "too, but if you work with transparent edges from road to grass with the same shaders as road, you can't use "t1 add t2" because this shader does not support transparent settings (scr alpha + inv scr alpha).
My grass shaders are always "t1 mul t2". Some tracks have specular shaders on gras but it kills the performance and looks not very real in my opinion!

2. High Quality meshes/textures
Try to keep the number of polies under 1000 by gmt, then it doesn't mather how high poly your track is. Of course you have to operate smart with the lodout setting in the export area.
For the textures: For sure you can use big textures with 2048 size but try to have as less as possible big textures.
Many tracks have 1000textures but a lot of them are useless. Try to do a texture which you can use for more objects, like buildings or poles for example.

3.LOD out
This setting is one of the most important. Try to use this setting on every object you have (especialy the high quality objects). With "tools->measure distance" tool in max, you can measure the distance from the place where the object should pop up, to the object. I hate tracks where you almost see everything is popping up. Try to let them popping up in an area you cannot see it from your carview. The LOD out settings are very important for high quality objects or transparent objects like trees.

Note: It's very difficult on kart tracks because the most time you see everything of the track. But the most kart tracks are small so there are not so much textures/polygons like on a f1 track for example.

4. Shadows
Never let a high quality object cast shadow. Use a copy of the object and do a smart LODout distance and use for this copy in the *.scn file "Shadowobject" and not "Render=False". This will save a lot of fps.
Correct:
Instance=building01_shadow
{
MeshFile=building01_shadow.gmt CollTarget=False HATTarget=False ShadowObject=(Dynamic, Solid, 512, 512)

Wrong:
Instance=building01_shadow
{
Render=False
MeshFile=building01_shadow.gmt CollTarget=False HATTarget=False Shadowcaster=(Dynamic, Solid, 512, 512)
}

Use dynamic only on bridges or on some buildings. I see on many tracks that all shadow instances have dynamic, especially cones, thats useless and fps killing!

5. Materials
Try to keep the number of materials by "ball" under 100 in the material editor. Usually i have 4 Balls:
Main track (road, gras, walls....)
Buildings (Pitbuilding, skyscraper....)
objects (cones, signs, tirewalls....)
nature (trees, palms, 3dgrass....)

Sometimes mip maps bias killes fps too. At the most objects you have to use "-1" thats the standart. At road (especially for the white lines) you have to use -3 or -4. I see many tracks which have bad mip maps and the objects and roads looks very blurry.
If you use chroma color you have to set a very high negative mip map like -5 or -6, thats why transparent (scr alpha + inv scr alpha) is a better solution (usually i use -2 mip maps). But as you could read on my trees tutorial it's sometimes a bit difficult because of the "seeing other transparent objects trough" bug.


Those points are the most important fps optimizing tips you hopefully can use on your tracks. If you have questions mail me (moe16@hotmail.de) or give a comment :)

manolo

3 comments:

  1. Hi,
    This fantastic thank you.
    I was wondering if you could add any other track
    tips to get that realistic look and feel.

    Thanks again

    ReplyDelete
  2. Great page, really useful, thanks mate.

    ReplyDelete