I'm creating a 3D space game using Ogre3D for graphics with C++ and one of the features is to be able to freely wander around spaceship interiors, but I am lost with how to implement it. Here is what I can think of so far:

  • A single model of the spaceship that has an interior modelled too, but somehow double-sided and double-normalled? Not sure if this is possible!
  • Two models, one of the spaceship outside and one of the interior with flipped normals, when in game the interior model is placed inside the spaceship mesh, but that wouldn't be very flexible (different spaceship sizes, hull thickness etc)
  • Two models, when a player enters the space ship the screen fades and their view is switched to the inside model where the windows are live render textures of their respective place on the outside part of the spaceship, but it wouldn't be very optimised (rendering to several textures) and wouldn't have the gameplay aesthetic of smoothly entering or exiting (possibly via explosion) the ship

So, GameDev, how would you approach this?

  • 2
    \$\begingroup\$ Can you explain more about how you want to implement this? Can the player seamlessly exit the ship? If the door/hatch is open, can they see the exterior and the interior? \$\endgroup\$ – MichaelHouse Jan 22 '13 at 19:25
  • 1
    \$\begingroup\$ That's the question, Byte56, I'd like to have the player seamlessly exit and enter the ship but it depends on the type of implementation. \$\endgroup\$ – jshxe Jan 22 '13 at 19:47
  • 2
    \$\begingroup\$ How big is the ship? When you say one or two models, do you mean one or two meshes? I'd imagine you'd have to use many meshes to build a ship of some size. Unless you're talking about a pod. \$\endgroup\$ – user24821 Jan 22 '13 at 20:26
  • 1
    \$\begingroup\$ There are many ships, of different sizes, ranging from little pods to giant cruisers, but by models I mean the overall shape of the ship, whether that be the inside shape or the outside shape. If that makes any sense. @Erik \$\endgroup\$ – jshxe Jan 22 '13 at 20:41
  • \$\begingroup\$ StarQuest Online has this already. \$\endgroup\$ – user29138 Apr 3 '13 at 14:45

The first option is what I would use. One model for everything. It's totally possible to have an interior and exterior of a model. Just like it's possible to have concave shapes. There's no double normals or double sided faces. Imagine a slice out of a crappy ship like this:

enter image description here

(I have no idea why the floor isn't flat, I only realized that after I posted it...)

Black lines are faces, red lines are normals. The surfaces wrap around. This allows you to have different hull thicknesses, blocking off interiors where the engines are, stuff like that. The doors are easy to place as separate parts (since you'll probably want to be able to move them anyway).

  • 5
    \$\begingroup\$ (who needs flat floors when there is no gravity!) \$\endgroup\$ – Roy T. Jan 22 '13 at 21:43
  • \$\begingroup\$ I didn't think this was possible, but come to think of it, of course it is! Great illustration, thank you. \$\endgroup\$ – jshxe Jan 23 '13 at 0:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.