A newer version. Get it at http://www.mediafire.com/?dm4nkc5bnn3j96n The latest patch (textures in subfolders) can be found at http://www.mediafire.com/file/g5i0mkhzbkcejmh/racer0_8_42exe.7z (exe/pdb only) The changelist: - User camera offset and angles now take an approach relative to the camera. It might take a while to get used to it compared to the old method. - User camera offset/angle works with fixed & free (SMD) car cameras. - Selecting graphics options and then doing a race would not have any controllers loaded. - Look left/right works again (although not set by default; go into Controls) - Onyx classes now supports member functions (no constructors yet) - Added Onyx mouse functions to get coordinates & buttons (see data/scripts/onyx/include/racer.oxs). - Added timing.fixed_time_step for ultrasmooth graphics; set vsync=1 and fixed_time_step to 0.016666 for example for a 60Hz screen. May go wrong when Triple Buffering is turned on though. - Shadowmap rendering pass will now invert culling (instead of turning culling off entirely). - TrackEd's Split function would generate bad DOFs if more than 21,845 (or perhaps 65,536?) vertices were present in a single cell. Now it will generate multiple DOFs, each containing at most 21,000 vertices. - Replay exporting development using DirectShow (instead the ancient VideoForWindows) to get better video files. May requires openglfilter.ax to be registered (run 'regsvr32 /s openglfilter.ax'). See http://www.racer.nl/index.php?jump=tutorial/replays.htm - Replay export using DirectShow (replay.video.type=2) now requests a filename (intermediately generates replay_TEMP.avi/wav). - Replay format changed; now stores the driver names as well and can display those in replays (if show_names=1 in racer.ini). The format is incompatible with previous replay formats. - Added replay.auto_save, replay.database.dir for more control on saving replays - Added support for custom reflection maps in tracks, see http://www.racer.nl/index.php?jump=tutorial/reflection_map_creation.htm - audio.frequency was unused for a long time. It became apparent when writing replays where timing was off due to 48kHz vs 44.1kHz discrepancies. For an interesting experiment, download http://www.mediafire.com/file/04t1dvj6tl2qyvb/WORLD.7z and put the files in data/tracks/carlswood_nt. Very alpha stuff.
Textures don't load from subfolders anymore - ie, the shader call "map=txt/brakelight.tga" isn't working and qlog reports "can't load 'data/cars/69ccz28/txt/txt/brakelight.tga'". This applies to both cars and tracks. Hope it's a quick fix, because I'm not too keen on changing around all my content structures just to have a decent picture again and do proper testing ^^
Indeed, a result from the cubemap's trackmap*.tga syntax. Fixed in http://www.mediafire.com/file/3x1myuflxvu8esk/racer0_8_41exe.7z
Nice to see a new version! Ruud, what happened to the plans of getting the 0.9 final out? A stable enough platform for modders to base their content on?
I downloaded the 0.8.41 .exe and cubemaps still don't work in subfolders. Code: Thu Jun 07 14:24:41 (WARN): [racer/4156] QImage ctor: can't load 'DATA/TRACKS/CARLSWOOD_NT/CUBESKY/CUBESKY/SKY_lt.tga' If the file's actually in /cubesky/cubesky/sky_lt.tga, it still fails though. Code: Thu Jun 07 14:26:14 (WARN): [racer/5068] QImage ctor: can't load 'CUBESKY/CUBESKY/SKY_lt.tga' Anyway, maybe this'll be of interest: a sky that uses a cubemap instead of textures. (note that it ignores texture coordinates of the skybox dof) (skybox texture from http://reije081.home.xs4all.nl/skyboxes/images/skyboxsun5deg.png ) cube_sky_f.cg Code: // // Sky shading - single cloud texture // #include "atmosphere.cg" // Vertex to pixel shader structure struct v2p { float4 Position : POSITION; //float3 Color : COLOR; float4 RayleighColor : TEXCOORD2; float4 MieColor : TEXCOORD3; float3 tc0 : TEXCOORD0; float3 Direction : TEXCOORD1; }; void main( // In in v2p IN, // Out out float4 outColor : COLOR0, #ifdef CSM_MRT out float4 outShadow: COLOR1, #endif // Constants uniform samplerCUBE dayMap : TEXUNIT0, uniform float3 eyePosW, uniform float3 lightDirection, uniform float3 lightColor, uniform float3 lightAmbient, uniform float atmosRayleigh, uniform float atmosMie, uniform float exposure, uniform float clouds, uniform float sunny, uniform float3 Kd, uniform float3 Ka ) { float3 skyColor; skyColor=GetSkyColorAtm(lightDirection,IN.Direction,IN.RayleighColor,IN.MieColor,atmosRayleigh,atmosMie,lightColor,lightAmbient,sunny); // Add textures //float4 dayCol=tex2D(dayMap,IN.tc0); float4 dayCol = texCUBE(dayMap,IN.Direction); // Cloud cover modifies alpha dayCol.a=CloudCoverAlpha(dayCol.a,clouds); // Atmosphere outside float3 atmosColor=skyColor; // Clouds are much closer than the outer atmosphere float3 cloudColor=dayCol.rgb; // General light cloudColor*=(lightColor*Kd+lightAmbient*Ka); //cloudColor*=clouds; // Mix of inner & outer atmosphere float3 mixColor; float mixClouds,mixAtmos; // Determine mix of atmosphere and inner ring of objects (clouds) mixClouds=dayCol.a; mixAtmos=max(1.0-mixClouds,0); mixColor=mixClouds*cloudColor+mixAtmos*atmosColor; // Output #ifdef CSM_MRT outColor.rgb=finalColor.rgb+dayCol.rgb*dayCol.a; outColor.a=1; outShadow.rgba=float4(0,0,0,0); #else outColor.rgb=mixColor; // No blending normally outColor.a=dayCol.a; #endif } Use as fragment shader - put your cubemap into layer0 in the track. (for the screenshot I bypassed the rest of the shader and just wrote outColor=dayCol*50.0; - with transparent clouds that wouldn't be necessary) Avoids the stretching issues with UV mapped skies, just do up a tesselated half-sphere so that the atmosphere has enough points to work with. Can also go below the horizon pretty easily.
Scripts still require "reload scripts" command from the console to work. Did you see any reason why my scripts shouldn't work Ruud? Alex Forbin P.S. Nevermind I didn't read the post in the old thread first.
Funny thing, with the same settings as before (copied racer.ini from my old 0.8.34), it's very CPU-intensive. When I press Ctrl+6, I can see that 75% of CPU time is used for the mirrors, as opposed to 10% for main rendering. If I turn off mirror texture with F4, it goes back to normal.
Somethings changed with AI in this version, the applied throttle isn't as smooth as before, and the Lambo & other cars seem to spin out in places they didn't do before.
I tried your 2 scripts (paint/physics); named them both genmodels.rsx, and it worked in one go. Can you provide me with an entire car that doesn't work at once in v0.8.40?
You're totally right. It might be better to branch off this version to v0.9 and fix tiny things from there, instead of keeping all things on the trunk. I know from experience that that only always adds more side effects. I have these showstoppers currently: Backfire particle normal is ignored I've just noticied two bugs, first, when i do a lap, then i've the ghost car, and when i turn on the lights of my car, it's done to the ghost car and not mine Lambo car_ghost.shd Selcar car is too low Shader loading from subfolder also working for envmaps
Another frustrating bug are the skid marks which sometimes aren't correctly projected to the surface. It also appears some of them are incorrectly generated in wrong places. Could be cool to have them baked somehow & reused/assembled afterwards. About replays, would be nice to have a 'pause' button, just pressing P while replay is on, will just slower the motion...
Although not a showstopper, but I would be great if the static car shadow (ambient shadow) was also properly "shadered" - meaning that it would get the fog (mie or whatever) applied to it and that it would be correctly z-sorted.
That's an issue yes. The strange thing is that my FPS seems to stick at 60, even with Adaptive V-Sync + Triple Buffering. I would have expected it to go above 60, because of all the rendering going on invisibly in the 2 backbuffers. So when I tested vsync+TB+fixed_time_step=0.01667 once, it worked, but I don't get why. Also, setting Adaptive V-sync programmatically is an unknown to me, hopefully this will become clear. So for now it can only be set in the nVidia control panel. A nice thing would be to get slightly faster monitors, say 100Hz, for less control lag, and just use adaptive or true v-sync and use fixed_time_step. That is the ultimate smooth method. Perhaps I should try a 120Hz 3D monitor one day.
Not sure when the first happens, although I have seen flying skidmarks here & there. In the replays, SPACE is stop. It might be nicer to have SPACE=start & stop in fact, which is what most GUI's seem to use.
Indeed, I've fixed this already, haven't posted an exe yet. I might do that in combination with some other files to get trunk/doors working in Onyx (I added some functions). See also http://www.racedepartment.com/forum/threads/movable-doors-trunk-in-onyx.52125/ Your image also shows the downside of 8-bit envmaps; the dynamic range. Perhaps I should add some kind of curve which is the reverse of the tonemapping, to get back at 16-bits somehow. The sun in the envmap shown is quite grayish.
Nice work Ruud! A bit of a shame about the LDR envmap's... I suppose that if we end up at position "envmap" then chances are the scene will be exposed consistently, so the envmap will represent what we would generally see. I guess they are also faster and smaller in memory vs HDR data... and blurring them also gives us some flexibility for creating certain effects like faking soft reflections on track-side objects! I know this sounds crazy, but it might be cool to simply store certain track camera locations and render the env-maps at load time (set to the current TOD) in the HDR format that live envmaps use. In theory the system to generate envmaps with 16bits is in place, you just need to do a lot more at render time to a variety of locations. You could even add a blur factor too perhaps. So just store a load of xyz coords, a reference name, and a blur amount maybe, and even perhaps an update rate (so we could update them every 1 minute or so so they worked with TOD)?! Then reference them from the shaders... we never even have to touch/see them just like the car envmap... Maybe something for the future! Stereo, I like the idea of a cube map system for clouds. Storing the data that way is more efficient (much less waste than a circle with empty edges), and also no stretching. I believe the Racer sky should move towards the mie/ray 'dome' for all the colouring and appearance from day to night and so on... the current 'clear day' in Racer looks great imo... then the cube-map can do the clouds only... ideally with normal mapping data and alpha doing opacity... the rgb should be a function of how they are lit and their opacity. That way we can have dark clouds (opaque), light clouds (half transparent alpha), and they also get nice tints at sunset, or whatever else (rather than being white all the time as is currently the case) As for the moon/stars on the night, I guess even they could be programmed in to the sky.shd file?! Hmmmmm Dave
Yeah it is, I did a quick and dirty hack dayCol = tan(1.5*dayCol); // 1.5 is a lower bound on pi/2, which is 1.57something which curves it up nicely and looks much better, albeit I have no idea whether it's realistic. (the seam in the texture is my fault, I think)