🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Far away objects and horizon in an open world game

Started by
14 comments, last by Nagle 2 years, 7 months ago

hplus0603 said:
because mountains or large objects that stick up over the horizon still need to be rendered in silhouette against the sky.

You could flatten mountains with distance (always thought about this but never tried - wonder if some games did it).

Edit: Would also work with a flat world. In vertex shader we could bend all stuff down to a huge sphere, so when rotating camera the trick remains consistent.
I forgot about this idea over the years, but maybe still useful today in certain cases.

Advertisement

hplus0603 said:
Typically, you'll render the silhouette into a billboard that's smeared across the far edge of the terrain block.

Is this below kind of what you mean?

@hplus0603

hplus0603 said:

planet spherical you won't have to worry about the horizon

Done that! Turns out, you still have a horizon problem, because mountains or large objects that stick up over the horizon still need to be rendered in silhouette against the sky.

I mean you can put up a sky dome the same way you normally do, assuming you don't need to go to space. There is also the option with a light scattering sky shader. The point I was making is you won't have any visible end of land problems. You can just cull anything below the horizon. I actually have it running right now culling nothing. With infinite LOD you can get away with that but I figure I'll save a lot of memory when I start culling again. I have it turned off for debugging, since if there are any discontinuities in the mesh they will be detected if nothing is culled.

Also, some physics engines very much don't like gravity being a different vector for different objects, and many current physics engines don't let you use double precision, which is needed for an actual planet-scale simulation (i e, anything bigger than 8x8x8 kilometers volume.)

I actually have a sweep sphere algorithm that's implemented in double. I suppose whether that's good enough depends on what kind of game you are doing. I just give the spheres a little slop (sort of an error buffer) and correct their position after every move to make the character stand upright again. That works well enough since you are only doing a fraction of a millimeter correction on a frame. So as long as your slop is enough there is no chance of getting into the mesh geometry.

JoeJ said:
wonder if some games did it

Some games did it (grow mountains as you move closer) and I never liked it.

Back in the Voodoo 3D accelerator days, you had to do all kinds of tricks to make anything run at all, but those days are luckily long gone – even the lowest-end Intel Integrated graphics is miles ahead of those primitives.

enum Bool { True, False, FileNotFound };

I'm facing this problem for my Second Life / Open Simulator viewer. SL/OS is terrible with distance. The world just stops beyond the “draw distance”. Beyond that, the system draws procedural water. There's no sense of place in open terrain. You can't see distant mountains or buildings at all.

Since the world is divided into 256x256 meter “regions”, I want to make billboard impostors for each region. Probably the usual 8 views, plus straight down, rendered with an orthographic camera. Update them once a week or so. The effect won't be perfect, but with some blur and fog, it should be OK.

Something experimental I want to try is keeping the Z-depth info for each pixel of each impostor, and using that when loading it into the scene so impostors and 3D objects can coexist somewhat. Not sure how well that will work out.

Z-impostors were a thing around 20 years ago, but were not very successful. People were trying to use them at much closer range, like room size, and the illusion didn't hold up. I'll never use them closer than 100m or so, which should produce fewer artifacts.

This topic is closed to new replies.

Advertisement