[Feature Request]: Free cam hack?
Describe the feature you'd like to see added
I tried for a bit using Cheat Engine. I narrowed it down to some float values that I thought might be the camera, but changing them didn't affect the viewport. This is probably outside of the scope of the project, but I'll make this to just bring the idea up. If anyone wants to help find the memory addresses, that'd be helpful.
I mostly want it to just recreate the title eyecatch in HD. Although, ghosts are most likely culled, so you'd have to record your inputs and play it back while fly camming?
Some kind of free cam would be useful for getting higher-res screenshots for various UI elements like track previews, music album art, etc.
Do have a couple camera addrs mapped out:
79FE10+F8 = CamPos.X
79FE10+FC = CamPos.Y
79FE10+100 = CamPos.Z
780248 = pause_flag
Change pause_flag to 1 and then you should be able to adjust the CamPos addrs without the game overwriting them
Angle should be at 79FE10+128 / 79FE10+12C / 79FE10+130 afaik but haven't tried changing that.
FOV should be at 79FE10+AC but I think game might still overwrite that every frame, could probably use CE's "what writes this address" and then use Replace button on the insns it finds to stop that.
Sweet! I'll try that tomorrow, thanks. Can you upload the .ct file in case I mess it up?
Can you upload the .ct file in case I mess it up?
Sure: OR2006C2C.CT.txt Remove .txt extension, github didn't like it as .ct
Might be able to setup hotkeys in CE to move the camera around with numpad or something as well, haven't added anything for that here though.
Setting observer_flag to 4 will trigger the goal screen, in O2SP it'll start one of the ending cutscenes as well, haven't tried using this camera stuff with that yet though.
Works fine so far, thanks! I'll try and take screenshots later for menus etc. if no one else does.
Forgot to add 0x8447F8 (4 bytes) = navipub_disp_flg to the table, setting that to 0 might hide some more of the HUD, iirc it only works with the original O2 huds though, things added in C2C might not be affected
Ah, the HUD's no big deal, I've been meaning to hide the rest of it anyway with blank textures. A CE hotkey to turn it off would be useful though, I'll try that later.
Seems there's a lot more camera modes built into the game too, like the birds-eye view that was available in chihiro beta:
and some neat side/behind views:
If you add 0x484BAD (1 byte) to CE and change value to 0x1E it should expand the change view button so you can go through all 30 modes with it.
(0x0079FE10+0x34A (1 byte) lets you set the camera view directly, 3 should be the birds-eye view)
Might be neat to bind that behind view to a button somehow...
30?! That's cool, but the game culls everything that's behind you if I recall so it might look freaky. Good for quick screenshots at least, and maybe recording alt-angle footage for an attract screen remake. I'll try it later, thanks.
I gave it a go. A lot of them seem like duplicate placeholder camera angles (including one that points at the sky for some reason), so the proper ones can be mapped out and added to the table. I wonder if these can be added to Tweaks without the use of CE. I don't think I encountered 30 angles though, but I was also mashing through the duplicate ones so maybe there were.
Found that changing 44DF95 (2 bytes, hexadecimal) from D003 to D231 can mostly disable the games level culling, a lot of models will still be missing faces that aren't normally shown to the camera though.
There's also some issue with that causing LOD models to get drawn on some stages, seems to be on top of parts of the level you can see from later areas (eg. in palm beach, the starting area is some ugly LOD'd version since the turns a little later would cause that to get drawn)
Hopefully might have a better distance-increase tweak added soon.
I don't suppose you've found anything to hide the driver and girlfriend's models?
IIRC the driver would disappear when save got corrupt, changing 7C2400 (4 bytes) to something invalid might hide it.
Or changing 0x514E60 (byte) to 0xC3 should stop char models from being drawn
0x46BD30 (byte) to 0xC3 should be able to hide player car as well (0x4AE0F0 to 0xC3 for other cars, not sure if it affects all of them though)
That works, thanks. I'm not sure if we need screenshots of the cars anymore, but the next step would be to completely hide the environment so it's just a car floating in an empty void.
44DE10 -> C3 should hide stage 4521C0 -> C3 for sky 40CBC0 -> C3 for lens flare
Something still renders in far distance with those though, at least on palm beach stage, weird
E: ah might be bunki, 44F120 -> C3 should disable both that + stage
The bird's view is quite fun to play and it would be interesting to have a "look behind" button to toggle to the "view 24" and back when release.
I wonder if it'd be possible to modify the camera angles while keeping the camera anchored to the car? To recreate scenes such as when it whips around the car (11 seconds, timestamped video).
https://www.youtube.com/watch?v=E4ZMFPKP6vQ&t=11s
The bird's view is quite fun to play and it would be interesting to have a "look behind" button to toggle to the "view 24" and back when release.
I'm also interested in a rearview button, so I tried to make it in CE via hotkey, but I wasn't able to get it working properly (can't figure out how to keep the camera anchored to the car while changing its position). Most of the unused camera angles are duplicates, so it'd be cool to replace those with more alternate camera angles.
Data for each of the camera modes should be at 0x818FE8, with each mode taking 0x34 bytes, should be able to change some of the variables for them (all floats)
0x818FE8+(0x34*cameraModeNum)+0x00 = camPosX
0x818FE8+(0x34*cameraModeNum)+0x04 = camPosY
0x818FE8+(0x34*cameraModeNum)+0x08 = camPosZ
0x818FE8+(0x34*cameraModeNum)+0x0C = camLookX (rotation)
0x818FE8+(0x34*cameraModeNum)+0x10 = camLookY
0x818FE8+(0x34*cameraModeNum)+0x14 = camLookZ
0x818FE8+(0x34*cameraModeNum)+0x24 = camFOV
Should work in CE if you replace the cameraModeNum with the camera id iirc, there's some other data for the camera in that 0x34 I haven't mapped out yet too (maybe something to do with aspect ratio?)
Should work in CE if you replace the cameraModeNum with the camera id iirc, there's some other data for the camera in that 0x34 I haven't mapped out yet too (maybe something to do with aspect ratio?)
It's been a couple weeks and I've entirely forgotten how to try this (not sure if I got it working properly in the first place). For camPosX for example, do I make a new float group and then put 0x818FE8+(0x34*cameraModeNum)+0x00 in the address, with cameraModeNum being 1-30?
Yep, you might need to convert the camera mode num you want to use to hexadecimal first though (windows calculator has a programmer mode which you can enter numbers in to convert) Might need to delete the parenthesis too since CE seems to have issues with those, if CE still doesn't accept it try deleting the 0x parts as well. camPos should be relative to the car hopefully, so maybe can find some nice angles with it.
Cool, thanks, I'll mess around with it again tomorrow and post any interesting camera angles that we can maybe replace the duplicate dummy ones with.
Hooray! Thanks for spoonfeeding me.
https://streamable.com/meoph8
Any idea if the camera's collision culling can also be disabled? I somehow got the camera right next to the girlfriend's window facing forward that wasn't culled, but I forgot to save it or even take a screenshot. It was a cool angle, trying to recreate it.
A side effect of rear-facing camera angles is that traffic doesn't spawn, so unless that's also modified somehow you can't use it on Outrun mode etc
The bird's view is quite fun to play and it would be interesting to have a "look behind" button to toggle to the "view 24" and back when release.
Does it work well in tunnels?
The camera simply clips out the ceiling.
Here are screenshots of all the camera angles.
https://imgur.com/a/VcX1SVL
4, 5, 6, 7, 12, 13, 14, 15, 16, 20, 21, 29, 30 are redundant angles that can be replaced.
The titlescreen video seems to have a custom camera angle where it follows the car, but is anchored in one spot for recording drive-by shots. I wonder if it's possible to recreate that. Maybe if nothing else, just cranking the angle adjustment hotkey up really high on a macro'd playback would work. The angle transition in the titlescreen is really smooth and fast, though, not sure how to do that.
Rear cam test.
https://streamable.com/54xgw4
Here's my current camera angles table, only added one besides the rear cam so far. Press ctrl+8 to set the values of angle 29 and 30. Rearcam hotkey is set to /, I haven't tested it on all the cars yet but it seemed okay on the larger cars. It might still clip when going up a hill or something though.
Unfortunately, it seems like cars aren't affected by the DrawDistanceBehind value, so online racers get culled after a few feet. So, this rearcam is kinda pointless as it is unless the cars can have their culling range increased.