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

Wednesday, March 24, 2010

Transparent trees are beautiful trees

My first tutorial will show you how to create transparent trees in 3dsmax.
The most trees in rFactor tracks looks like this:
But we want good looking trees like the ones from Monsum or The Lonely Tracks:

Much smoother especially from far away. It's a little Performance killer but you just have to handle with the Lods at gmt export (more infos soon in my "Good Performance" Tutorial).

Let's start!
Usually the transparent settings are "SRC ALPHA" and "INV SRC ALPHA" in the material settings:

But with this settings you can see every transparent things on the track through the trees:

For this reason you have to create 2 materials with 1 texture first.
Call the first material "Treea" and load your "treea.dds" texture and use simple transparent settings:

Create a 2nd Material called "Treea1", load "treea.dds" and use chroma Color as Transparent:
Black color is okay but set Chroma Blend Pixels from 3 to 0! Otherwise the tree will have black edges.
If you have more tree textures, you have to do the same with them, just call them treeb-treeb1, treec-treec1...just different:

Assign the textures and set "Treea" Material to your Treemesh. Copy the mesh (don't move it!) and set "Treea1" Material to the copy. Attach both meshes and export it with Pointy Normals at gmt export settings and watch the result in the viewer:


Just Beautiful, especially from far away! And don't worry, there will be no flickering.

Note: The nature around the track looks much better if the trees are not all the same. You dont have to do 1000 different tree textures but try to rotate or scale some trees. I've noticed this "problem" at the tracks from zero-g that every tree looks exactly like the other one.
With a good mix your eyes will be happy;)

Good luck and keep modding,

manolo

Monday, March 22, 2010

MTT welcomes you

Welcome to my blog. The main reason for this blog is the bad quality of the most tracks in rFactor. I have 4 years experience of track development with gm2 Engine and worked for several Game Developers. I also created many tracks in my free time for me and my friends (never released for several reasons). I will show some screens or videos in future (there is a less chance that they ever be released).
You can also mail or comment here if you have a wish for a tutorial. I'm not a fan of BTB or 3dsimed so the tutorials will be only helpful if you work with max or may work with max in future.
But i will also post some tutorials you may can use for 3dsimed or general performance work!

Stay tuned and keep modding;)

mAn°l0