Bouncing camera suspension

Bouncing camera suspension

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Bouncing camera suspension

Post by AF »

We've all noticed our cameras bobbing up and down with the terrain, on some maps for than others, for example Azure rampart.

I had an idea on how to solve this annoyance somewhat, I havent had time to really think out the how to implement btu I'm sure others will pick up.

ImageImage

The red line is the height the camera will follow, not the actual terrain, thus it will attempt to level out the differences. When you see a scene in a movie or on tv with a high cliff, by the time you reach the cliffs foot you're at the full height of the cliff and still rising.

Of course some consideration will be needed for water levels.
Durandal
Posts: 126
Joined: 05 May 2005, 16:27

Post by Durandal »

I wasn't aware that this was a problem ?
User avatar
FizWizz
Posts: 1998
Joined: 17 Aug 2005, 11:42

Post by FizWizz »

neato! I have an idea too, for implementing, but I'm not any C+ code-wielding hax0r so maybe it won't work. It'd be great if I had visuals for this too, but bear with me.
What if while in the loading sequence, the game takes the heightmap, and blurs or averages the height values of points/pixels with those of surrounding points/pixels, and then recombines them with the original heightmap to give your camera an independent heightmap?
Another idea, but it's a variation on the same theme: Take the heightmap during the loading sequence, reduce the resolution of it like x2 or x4 or x8, and then bring it back up to normal resolution, using some algorithm or function to average the height values so that you get the same heightmap, but with really smoothed terrain, and use that for the camera's heightmap.
I hope some of that makes sense to someone.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Post by SinbadEV »

heck... if freaking planes flew like that my life would be a lot happier

ALSO, maybe TA view should just use a static height and let US do the zooming in and out... only pushing us up if we are going to get behind the ground
Last edited by SinbadEV on 13 Sep 2005, 20:15, edited 1 time in total.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I'd say that was a good idea, perhaps if it levelled the heightmap, like reducing contrast in an image, then raised it so that the highest point was the same as the highest on the original map but with the zoom level added.

And durandal, on some maps there is no problem at all, it's on maps where there are stark differences between heights, such as near sheer cliffs, or on maps such as azure rampart where the camera bounces as your going over the interconnecting parts as it crosses over the much lower altitude water.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

I have to agree with sinbad. I'd much perfer the plane AI fixed so it could go over mountains properly then major tweaks to the already quite workable camera. I kindof acctually like to zip bouncing along the ground. If you want to crest mountains helicopter style do it manually.
Post Reply

Return to “Engine”