Issues involving large cylindrical / spherical interiors

Started by
14 comments, last by Fingers_ 18 years, 11 months ago
I'm exploring what it would take to render a game environment set within the interior of a large cylinder, toroid and sphere. The environments would be large enough to hold structures, water and terrain, as in these examples: Bernal Sphere 1 Bernal Sphere 2 Toroidal Station Interior 1 Toroidal Station Interior 2 O'Neil Cylinder 1 O'Neil Cylinder 2 I have a rudimentary understanding of some of the technologies behind normal outdoor environments, but I'm looking to gain a better understanding of what I'm up against before I go any further. Does anyone know of strategies that might be employed to tackle these types of environments? Any references or papers I might read to get a better understanding of what would have to be involved? I have a few ideas, but don't yet know enough to ask the right questions. Thanks for any input.
--------------------Just waiting for the mothership...
Advertisement
I'm curious, what sort of things are you wondering about? I can think of a few things that might come up. For example one might want to employ a visibility scheme particularly suited to this sort of environment. There's also the issue of mapping essentially 2-dimensional movement to the interior surface. Large-scale visibility issues aside, with environments of that size and complexity you'd also have some serious level-of-detail issues to deal with. Physics simulation would have to take into account a variable gravity vector. Terrain would be interesting. Most terrain methods are based on regular heightmaps, so you'd probably want to find a way to map a heightmap to the interior of the surface. Similarly with water. For spatial subdivision you'd probably want to think about what scheme would best handle the unusual distribution of objects. And so on.

Anyway, you may have already thought about all that and are really asking about something else...
The sphere can probably be rendered just like an ordinary planet, just upside down.
The toroidal and cylindrical worlds are topologically equivalent to a square (except the borders which are wrapping). So you can use the standard techniques like ROAM, SOAR and geometry clipmaps.


BTW: There's a Star Trek NG episode where they meet Scotty in such a "Bernal Sphere" (although they call it a Dyson Sphere). The toroidal thing reminds me of the Ringworld novels by Larry Niven (IIRC).

.. or like Rendez-vous with Rama, by A.C.Clarke for the cylindrical world.

For my planet renderer, i basically use displacement mapping to map a cube surface onto a spherical one. I'm internally processing the LOD Terrain algorithm on a square surface, which is then displaced to simulate a curved one. In the case of a planet, i have six base squares (left, right, top, bottom, front, back).

If i place the camera "inside" the planet instead of outside, i get a "Bernal Sphere" for free - nothing to do, maybe just invert the heightmaps to appear upside-down, as Lutz said. I had a screenshot of that somewhere when i was experimenting, but couldn't find it now.

I could easily imagine how to do a cylindrical world, just by changing the way the mapping from the square to the curved surface is done. A toroidal world might be a bit harder, but i think it could be done if i could find a good approximation of the iner toroidal surface by a set of squares, all perfectly matching.

All in all, if you can solve the "planet rendering" problem, you shouldn't have too much troubles to render these kind of atypical environments.

Y.
Have a look at "3D Game Engine Architecture". The Wild Magic Terrain paging scheme uses a toroidal model. Better yet, just go to WildMagic Engine and have a look around at the source.

I think this is exactly what you are looking for. Just turn the geometry inside out. Hope that helps.

J
did you ever play startopia?

http://www.rakrent.com/rtsc/html/star00.htm


It achieved a similar effect to the one your were saying.
[happy coding]
Quote:Original post by Lutz
The toroidal thing reminds me of the Ringworld novels by Larry Niven (IIRC).

Well, the ringworld was somewhat bigger iirc ^^

Toroidal space station was an idea of Wernher von Braun, created in 1946 or so. It gets almost to the point where one can't make a semi-realistic game in space setting without mentioning von Braun at least once... ;s
I'd like two make two completely graphics unrealted points: first, presumably this is meant to be one of those sci-fi space stations which generate gravity by spinning. If so, they can't be built in the shape of a sphere. Cylinders and tori work fine howerver. Secondly, realistic physics: I don't know much about rotating frames of reference but there's a thing called the Coriolis force which means for instance when you throw a ball it's trajectory will not be a parabola as it would on Earth (yes there's a Coriolis force on Earth too but it's a lot smaller than gravity).

Other than that I'd say you're main problem is level-of-detail management, since you'll be able to see nearly everything. This might be a very good use of impostors actually.
Thanks for the feedback. Immediately, it seems like the most pressing problem with rendering these environments would be the level of detail problem. With the Bernal Sphere and O'neil Cylinder, you should be able to see and identify structures and terrain well into the distance as well as above or to the sides of you.

I've been investigating imposters, but I really don't know enough yet to know how effective they'd be here (if I understand them correctly, aren't imposters essentially a bitmap of a rendered object?). Imposters seem like they would work quite well when the area to be viewed is so far away that the eye doesn't expect perspective shifts. For "ceiling" of the Bernal Sphere and O'neil Cylinder, this could work quite well.

For the toroidal station, I was thinking that the ceiling offers a natural limit on the level of detail because it clips the environment (although it seems this savings would be proportional to the dimensions of the inside of the torus).

Does anyone know what else I should be considering here? Or where I might do more research (possibly more tailored to this problem?)? Thanks for the references so far.
--------------------Just waiting for the mothership...
Quote:Original post by Ysaneya
For my planet renderer, i basically use displacement mapping to map a cube surface onto a spherical one. I'm internally processing the LOD Terrain algorithm on a square surface, which is then displaced to simulate a curved one. In the case of a planet, i have six base squares (left, right, top, bottom, front, back).


I've read about a technique where you continuously subdivide the faces of a square to eventually get a sphere. Is this basically what you're doing?

Quote:
If i place the camera "inside" the planet instead of outside, i get a "Bernal Sphere" for free - nothing to do, maybe just invert the heightmaps to appear upside-down, as Lutz said.


Doesn't your framerate necessarily go down dramatically if you do this? I've read that if you want to render something as detailed as a planet you have to do a lot of culling of faces that can't be seen (like the back side of the planet). But inside the sphere, if you were on one side and looked "up" (to the opposite side) you'd see a ton of detail, wouldn't you?


Quote:
I could easily imagine how to do a cylindrical world, just by changing the way the mapping from the square to the curved surface is done. A toroidal world might be a bit harder, but i think it could be done if i could find a good approximation of the iner toroidal surface by a set of squares, all perfectly matching.

All in all, if you can solve the "planet rendering" problem, you shouldn't have too much troubles to render these kind of atypical environments.


Well, if nothing else, you definitely give me some hope here. [smile] But I need to do a lot more research before I can see the links. In my head I can imagine the switch from sphere to cylinder, but I'm really having trouble translating the idea of a square to a torus.

--------------------Just waiting for the mothership...

This topic is closed to new replies.

Advertisement