Forums

Full Version: ICR2 Rendition view distance estimation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
I'm trying to work out what the view distance is in the forward direction is  using the Riverside '82 track.

Unfortunately the games doesn't pass z-coordinate data or use an z-buffer. It does pass perspective correction coordinates which is 1/z for making sure textures don't warp or distort.

For the Riverside '82, the range is:
z-min 3936.465087890625, z-max 65535.9921875

For a Rendition board the valid z-range is [0-65536) (65536 is an unattainable ceiling, z has to be less than this). x is in [0,639] and y is in [0, 479]. So the actual physical distances are unknown.

The cockpit is a sprite, but the nearest object drawn in the cockpit view is 3936 units ahead for an entire lap of the track with the cockpit view. I'm guessing this the distance to the wheel. I don't know how long the car is, but could somebody knowledgeable, work out roughly how far ahead that is in feet or meters or fully grown elephants.

Thanks! I know you guys have much better things to do.
have you tried starting australia track and press f10 twice to see from above and drive to first quantas sign and check what happens with view discance before and after the sign.

it looks more like it is not distance related but nuber of objects/textures related maybe
(07-03-2025, 10:31 PM)robertmo Wrote: [ -> ]have you tried starting australia track and press f10 twice to see from above and drive to first quantas sign and check what happens with view discance before and after the sign.

it looks more like it is not distance related but nuber of objects/textures related maybe

You could be right. But this should be tweakable. On  the Australia level, it should be possible to increase the number of detailed mip maps used. There's no frame rate issue here at least wqith 8 cars visible.
I may be able to provide some insight - but Pavel (and probabaly SK) know a bunch more than me.

I am not nearly a technical expert with this but my 5 years of track-making is useful here.

Draw distance is figured out and handled in the 3d file. You can include objects in each track section and make them turn on earlier or later. In most of the tracks I make I try and make the objects turn on much earlier since our computers are now more powerful and can handle it. Riverside was started by Pavel and mostly finished by me (I made the objects) so with that respect it is my style that way. There is more going on in the 3d file with the track sections that Pavel is much sharper than I am (and probably SK too).

If you are doing research on the way the original tracks work- you might want to pick one of the default ovals. They would be much more representative of how the game normally draws things.
(07-04-2025, 12:45 AM)samsepi0l Wrote: [ -> ]I may be able to provide some insight - but Pavel (and probabaly SK) know a bunch more than me.

I am not nearly a technical expert with this but my 5 years of track-making is useful here.

Draw distance is figured out and handled in the 3d file.  You can include objects in each track section and make them turn on earlier or later.  In most of the tracks I make I try and make the objects turn on much earlier since our computers are now more powerful and can handle it.  Riverside was started by Pavel and mostly finished by me (I made the objects) so with that respect it is my style that way.  There is more going on in the 3d file with the track sections that Pavel is much sharper than I am (and probably SK too). 

If you are doing research on the way the original tracks work- you might want to pick one of the default ovals.  They would be much more representative of how the game normally draws things.

Ah ok that explains it. I'm still looking for the perspective matrix for the aspect ratio.
The distance is a fixed number of track subsectors in both directions related to the car position, but I don't remember the exact number (it's in one of my over 500 posts). All objects are drawn, which are referenced in the visible subsectors, regardless of their physical distance.
Possible ways to increase the distance
1. Put far objects into multiple subsectors, to make them visible longer.
2. Increase the length of the track subsectors. For this, a modification of the trk23d tool would be necessary.
3. Figuring out the final parts of the 3d file, which I still don't understand, and which could influence the drawing distance, if it's not hard coded.
Agree with everyone that draw distance is coded in the 3do file.

However, I suspect some information about distance is passed to Rendition. Because otherwise how does the fog effect, and particularly the Alt-W "rainy" mode, know when something is far away to make its color look faded?
(07-04-2025, 01:34 AM)Dennis Wrote: [ -> ]The distance is a fixed number of track subsectors in both directions related to the car position, but I don't remember the exact number (it's in one of my over 500 posts). All objects are drawn, which are referenced in the visible subsectors, regardless of their physical distance.
Possible ways to increase the distance
1. Put far objects into multiple subsectors, to make them visible longer.
2. Increase the length of the track subsectors. For this, a modification of the trk23d tool would be necessary.
3. Figuring out the final parts of the 3d file, which I still don't understand, and which could influence the drawing distance, if it's not hard coded.
found this:
https://www.icr2.net/forum/showthread.ph...6#pid11806
There's also the switch distance option in the 3d file to switch the textures or entire objects on and off, depending on the physical distance. The game engine calculates it for sure.
The 3d position of the objects is known. If we know the 3d position of the car, the distance can be calculated with Pythagoras.
(07-04-2025, 02:18 AM)checkpoint10 Wrote: [ -> ]Agree with everyone that draw distance is coded in the 3do file.

However, I suspect some information about distance is passed to Rendition. Because otherwise how does the fog effect, and particularly the Alt-W "rainy" mode, know when something is far away to make its color look faded?

There's a per vertex fog value ranging from 0-255 which does a linear blend between the textured, lit colour and the fog colour. The fog value is divided by 255.0 to decide the interpolation factor.
Pages: 1 2 3 4