emoose / OutRun2006Tweaks

Turning and spinning and spinning and turning, woah!
MIT License
21 stars 0 forks source link

Stage drawing/pop-in issues #1

Open emoose opened 3 weeks ago

emoose commented 3 weeks ago

Some parts of stages only seem to draw when the camera is close enough to them, disabling the culling/LOD code doesn't seem to improve this at all.

eg. on the first beach stage, right before the branching highway there's some buildings on the right, some reason the bottom concrete parts of these (and some signs around it) only start drawing once camera is close enough.

In footage of PC version you can see the concrete foundation of the buildings appears into view as the camera approaches: https://youtu.be/md_wmaeRI74?t=82

The footage shows the whole thing doesn't just pop-in, but seems to slowly draw more of the concrete as camera gets nearer, with a visible seam between the drawn/undrawn part - probably shows that this isn't some kind of model loading issue but something wrong with the drawing instead. (though there is a small part of the concrete which does visibly pop-in too...)

Meanwhile, footage of PS2 version seems to show them being drawn from far away fine: https://youtu.be/fHyDuxjnEv0?t=179

Messing with the camera's far Z can kinda replicate this, you can set far Z to something really close like 200 and you'll see that models close by will have parts drawn and parts invisible, unfortunately increasing this far Z doesn't seem to help fix the buildings issue though.

emoose commented 3 weeks ago

Ah increasing the camera near-Z value actually helps with this, apparently low near-Z values (like the 0.1 value game uses) can reduce precision of depth buffer for distant objects, hm...

E: released 0.2 which increases znear to 1.0 to improve precision, fixes a lot of the stage issues I'd noticed, though changing znear can affect the in-car-camera, so added some checks to try and stop that.

(wonder if changing z-buffer format can help at all, tried messing with it but game didn't seem to want to start after changing from D3DFMT_D24S8...)

Sadly even with this improved z-buffer fix some objects still seem to have pop-in issues, eg. metal supports on the bridges have a pretty obvious pop-in issue, also still has issues with occluded buildings/track having obvious pop-in too.

Think those are tied to the actual stage loading instead of camera though, need to test some more with it. (E: seems so, fixing camera to one spot shows bridge popping in as the car travels, very likely stage loading related...)