Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question
1  
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? –  Byte56 Jan 22 '13 at 19:25
    
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. –  Jishaxe Jan 22 '13 at 19:47
1  
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. –  Erik Jan 22 '13 at 20:26
    
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 –  Jishaxe Jan 22 '13 at 20:41
    
StarQuest Online has this already. –  user29138 Apr 3 '13 at 14:45
show 1 more comment

1 Answer

up vote 12 down vote accepted

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).

share|improve this answer
5  
(who needs flat floors when there is no gravity!) –  Roy T. Jan 22 '13 at 21:43
    
I didn't think this was possible, but come to think of it, of course it is! Great illustration, thank you. –  Jishaxe Jan 23 '13 at 0:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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