rd3d7v2.dll GPL Direct3D7 Rasterizer DLL roglv2.dll GPL OpenGL Rasterizer DLL Introduction ------------ rd3d7v2.dll and roglv2.dll are intended as replacements for the current GPL rastd3d7.dll and rastogl.dll respectively. The main aim has been to avoid some of the bugs that the current rasterizers have, but a couple of new features have also been added. Installation ------------ The installer will save backup copies of your app.ini and core.ini files under names like backupDnn_nn_nnnnTnn_nn_nn_xxx.ini, with D... and T... being the date and time. App.ini will be updated to make rdvd7v2 the current rasterizer, and core.ini will be updated with the default option settings. If you decide to revert to the previous rasterizer you'll need to restore the backed up versions of those ini files. Core.ini Options ---------------- You'll need to comment out your current options (with semicolons) and substitute these lines [ Int Profile Values ] Value0 = RasterV2:Device:0 value1 = RasterV2:TossBiggestMips:0 value2 = RasterV2:MaxMipSize:0 value3 = RasterV2:MirrorSize:0 value4 = RasterV2:DirectMirrorRendering:1 value5 = RasterV2:DrawMethod:1 ; 0=Basic, 1=ZBuffer, 2=SeparateThread value6 = RasterV2:ZBufferType:1 ; 0=Basic, 1=Grouping, 2=ExtremeGrouping value7 = RasterV2:AnisotropicFiltering:8 value8 = RasterV2:TrilinearFiltering:1 value9 = RasterV2:LODBias:0 value10 = RasterV2:32Bit:1 value11 = RasterV2:Width:0 value12 = RasterV2:Height:0 value13 = RasterV2:FogDensity:1000 value14 = RasterV2:VSync:0 [ RasterV2 ] Device = 0 TossBiggestMips = 0 MaxMipSize = 0 MirrorSize = 0 DirectMirrorRendering = 1 DrawMethod = 1 ZBufferType = 1 AnisotropicFiltering = 8 TrilinearFiltering = 1 LODBias = 0 32Bit = 1 Width = 0 Height = 0 FogDensity = 1000 VSync = 0 To configure the rasterizers, only change the second, 'RasterV2' section. Option Meanings --------------- In addition to my brief descriptions, the original D3D rasterizer readme has more in depth treatment for its own options, most of which are either identical or similar to something here. The main exceptions are that I've left out the AlphaThreshold and TransparentMipsDrawOrder options, since setting those to anything other than 1 introduces drawing artifacts. Device Use this to choose between multiple 3D graphics cards if you have them. If you don't get the one you want with this set to 0, try increasing it by 1 until you get the desired card. This has no effect on the OpenGL rasterizer. TossBiggestMips This discards the top (biggest) one or more mip bitmaps, giving a fuzzier look but requiring less texture memory. The effect of TossBiggestMips=1 is identical to the old TossHighestMip=1 setting. However you can also use higher numbers for a stronger effect. MaxMipSize This is an alternative to TossBiggestMips, with a similar effect. However it discards all mip levels bigger than the size you specify, e.g. MaxMipSize=256 limits the mip levels that are used to 256x256 or less. MirrorSize Controls the size of the bitmap used when generating mirror views. The default size is 256. Smaller sizes will give fuzzier mirrors but might give a performance boost. Larger sizes might give more detailed mirrors, but at some point you probably won't see any difference. This option replaces the old DoubleMirrorResWidth and DoubleMirrorResHeight options. Set to a power of 2. DirectMirrorRendering DirectMirrorRendering=1 should be faster. Leave it at this setting if everything is working, but if you have problems with your mirrors, or your overall view becomes mirror-sized and located in the top left corner, try setting it to 0. This is not supported on the OpenGL rasterizer. DrawMethod This performs a similar function to the old DisableZBuffer setting. Setting it to 0 uses simple back-to-front drawing without a Z buffer, and is equivalent to DisableZBuffer=1. Setting it to 1 uses a Z buffer, and is approximately like the old DisableZbuffer=0. If you set it to 2, you get a new multithreaded back-to-front drawing method. Drawing with a Z Buffer (method 1) is likely to be faster than method 0 as long as a Z buffer is supported by the hardware. Likewise method 2 is almost certain to be faster then method 0 if you have more than one processor or a dual core processor. Which of 1 and 2 is quicker is hard to predict, so try both. For me they're about the same. Method 0 is the simplest, so if you're experiencing problems it may be worthwhile trying that. Method 2 is not supported on the OpenGL rasterizer. ZBufferType This is only relevent if using a Z buffer (DrawMethod=1). The Z buffer method is quick for two conflicting reasons. Firstly it can draw opaque polygons in a front-to-back order, which allows it to avoid some processing on polygons when they turn out to be behind something that's already been drawn. Secondly, since it's already altering the draw order from the default GPL back-to-front order, it can group similar polygons together, which reduces the amount of communication it needs to do with D3D, and may lessen the load on the graphics hardware. Unfortunately there's no ideal drawing order - if you go strictly front-to-back you can't do any grouping, and vice versa. ZBufferType gives you control over these options. Setting it to 0 gives a strict front-to-back order with no grouping, setting it to 2 goes all out for grouping, and 1 is somewhere in between (and is most similar to the original rasterizer). In the tests I've done on D3D grouping is much more beneficial than front-to-back ordering, so 1 or 2 is likely to be quickest. 2 is probably slower on OpenGL. AnisotropicFiltering Affects how textures are applied to oblique surfaces. Higher numbers should give a sharper display, but possibly with some performance hit, and with diminishing returns. Your graphics card imposes a maximum limit. Set to a power of 2, 2 or greater. Trilinear Filtering Trilinear filtering also affects the sharpness of textures. Normally leave at 1, but you might get a performance benefit from disabling it. LODBias LODBias controls which mip level is used - positive numbers favour smaller levels and fuzzier textures, while negative numbers favour larger levels and sharper textures. There may be a performance difference, but the main point of the option is to get it looking how you want. 100 is equivalent to one mip level. You might find that you need to use different values for this rasterizer compared to the old one. Anisotropic filtering interacts with this, so if you change that you might need to change this too. For me the default value is about right for D3D, but -50 or -100 is preferable for OpenGL. 32Bit Enabling this does all the rendering in 32 bits, rather than 16. It should look a little better, and might eliminate the banding effects you can sometimes see in the sky. It may or may not have a performance hit, and in some cases it's actually quicker. For OpenGL this setting acts as more of a hint than a requirement. Width, Height Together these specify a screen resolution that will appear in the menu in addition to the standard resolutions. It will however only appear if your system supports that resolution. FogDensity A new feature in this rasterizer is fog support - see the fog section for details. FogDensity controls how dense the fog is - smaller values produce less dense fog, larger values increase it. VSync Updates the screen in synchronisation with the vertical blanking interval, to avoid 'tearing' as one frame is replaced by the next. There may be a performance hit to using this option, or it might not do anything at all. This is not supported on the OpenGL rasterizer. Fog --- Fog was always supported in GPL, but neither the D3D nor OpenGL rasterizers supported it and it was never used. To add fog you need the following lines in track.ini. [ fog ] type = 1 density = 1.0 fog_r = 150 fog_g = 175 fog_b = 200 The type should always be 1. Setting the type to 0 disables fog, just like not having the fog section at all. You can set the type to 2, but you'll get the same effect by setting type to 1 and increasing the density. Density controls the strength of the fog effect. 1.0 should give a light fog, by around 4 or 5 it should be quite heavy, and at 9 or 10 you should barely be able to see where you are going. If necessary adjust the FogDensity option to get these results. fog_r, fog_g, and fog_b control the colour of the fog in terms of its red, green and blue components. Each is a number from 0-255. Screen Resolution ----------------- In addition to being able to add your desired resolution in core.ini, the current desktop resolution is also added to the selectable resolution list. Limitations ----------- Running GPL in a window is not supported. Currently this is incompatible with Pribluda - keep your fingers crossed for a Pribluda update. Ex Bugs ------- The current rasterizers had some bugs that this one doesn't. These are - D3D Polygons not being drawn at high load unless the ZBuffer was disabled. Text corruption. Menu flickering. Driving screen showing as small box in top left corner or similar, with recent NVidia drivers. Player.bmp colors were incorrect. OpenGL Visible polygon lines in the sky with some drivers. Usage Notes ----------- With Nvidia cards the OpenGL rasterizer requires triple buffering to be turned off in the Nvidia Control Panel, otherwise you'll get menu flickering. Acknowledgements ---------------- Many thanks to the following for suggestions and testing, and apologies in advance to anyone I've inadvertently left off. Special thanks to Bernd Nowak for the installer ! akamal Lee Bowden dangermouse Dave Fletcher Klaus Hörbrand Bernd Nowak Paul Skingley Paul Thurston Steffen Weitzdörfer Contact ------- If you encounter any problems, you can either email me at npattinson@ihug.co.nz or make a post in the GPL section of RSC http://www.racesimcentral.com .