Forums

Full Version: Magic addresses
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
I'll be out of commission tonight. So it'll have to wait until tomorrow. But the end is in sight.
OK, got the camera offset, I think this needs cam scaling as well.

Video: https://youtu.be/lHHbwPXjzb0
[Image: A005.CamOffsetComparison.png]

And with RReady set to full screen:[Image: A005.CamOffset.16.9.png]
With the camera offset and scaling:

video: https://youtu.be/Cx1Kz7Rgxj0

[Image: ICR2.CamOffsetAndScaling.png]
That looks really promising! Keep up the good work
Great work! It looks like there are no hubs though.
(09-26-2025, 10:47 PM)samsepi0l Wrote: [ -> ]Great work! It looks like there are no hubs though.

Hubcaps? That's still not final. I think I'll have to crop the view vertically. When that happens, the dash will move forward. I could probably reuse the existing cockpit image with scaling but the outer edges of the mirrors aren't there. One step at a time guess.
I can see your screenshot is 3840x2160 resolution which is a nice 16:9, but the way ICR2 is rendered means it wont properly fit a larger aspect.

At the normal 640x480 resolution ICR2 only actually renders the top half of the screen, in a box that is 640x308. I've highlighted it red here:

[Image: image.png]


So for a wider aspect it would be necessary to either stretch the render point further behind the cockpit, or to crop at the same 308 pixels (if its 480 high). 

If you kept the same 480 high resolution, for a 16:9 ratio it would be 854x480 as the whole window resolution. The rendered part of the screen would take up the top 308 pixels of the screen, but display an additional 107 pixels on each side, for a resolution of 854x308, something like this:

[Image: image.png]

I think in order to make the effect convincing the rendering would need to be extended lower than 308 pixels, but i dont know what is possible.
(09-27-2025, 02:34 AM)jxeboy Wrote: [ -> ]I can see your screenshot is 3840x2160 resolution which is a nice 16:9, but the way ICR2 is rendered means it wont properly fit a larger aspect.

At the normal 640x480 resolution ICR2 only actually renders the top half of the screen, in a box that is 640x308. I've highlighted it red here:

[Image: image.png]


So for a wider aspect it would be necessary to either stretch the render point further behind the cockpit, or to crop at the same 308 pixels (if its 480 high). 

If you kept the same 480 high resolution, for a 16:9 ratio it would be 854x480 as the whole window resolution. The rendered part of the screen would take up the top 308 pixels of the screen, but display an additional 107 pixels on each side, for a resolution of 854x308, something like this:

[Image: image.png]

I think in order to make the effect convincing the rendering would need to be extended lower than 308 pixels, but i dont know what is possible.

I'm still in an exploratory phase. The camera can be moved further back. I also need to see if the clipping zone can be negative so coordinates that aren't in the region (0,0-640,480) are rendered. If the clipping can be extended, the viewport can be widened without moving the camera. I'll be working on this for at least a few weeks at least. Wider aspect ratios should also be possible.
The game doesn't like the clipping parameters changed.

This needs a lot more work. I was able to move the camera offset a lot further back, but there it was just stretched, there was no new detail and the projection produces a nasty vanishing point effect, which isn't what's needed. I need to find the viewport projection and set it to render at 16:9 by altering the field of view angle. It's a bit like looking for a needle in a haystack. There are multiple candidates, but I don't know if it works it out computationally instead of using a constant.
@jxeboy, what would you say the vertical field of view is as an angle? It should be somewhere between half of 30 to 45 degrees. I don't think you can work it out from the resolution. I'm trying to find out where the game sets up its projection. If I can tweak it at the source, it may be possible to find do anamorphic widescreen in a 640x480 view. I need to find the angle in there. It's not computed anywhere, I tracked all the trig functions, so it should be hardcoded (I hope). The cotangent of half this angle is needed, assuming, it works with a fixed horizontal size instead of a vertical one. Find the cotangent and where it's used, find the fixed horizontal range. it could also be inverted with a fixed vertical view and a horizontal angle. In either case it needs to be found.

Current the viewport projection is set to a 4:3 view, zooming in is a cheap fix and there's a limit as to how effective it would be, also it would limit the precision of the zoomed in view's coordinate range.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26