How do you make a room

Started by
17 comments, last by kingpinzs 20 years, 10 months ago
Fox, did you even read AP''s question, your response is irrelevant.

Besides using a modelling package and loading models, a simpler, but more tedious, method is manually defining the vertices. If you can draw a cube, inside the cube, define two coplanar quads inside that make a wall, leaving some space between them, to represent a door, and there you go.

- Andrew
Advertisement
Try downloading Milkshape. It is a good graphical modeling tool. You can build walls, ceilings, floors, doors, etc. to get the "room" you want.

You can download export tools that let you export the output to the .x file format, which you can then load into a DirectX mesh object and render it.
Foxes response wasn''t irrelevant. It would probably work; it''s just not a very good way to do it. The most significant reason is that it just doesn''t scale when you start adding more rooms or more detail to a given room. I think the switching of cull-modes would also get extremely confusing. In order to get any kind of performance, you''ll also need to think about frustum culling objects/rooms outside the view of the camera.

I agree with the other recommendations. Look into one of the common indoor modeling formats like quake''s BSP maps. There''s lots of loaders out there with source. You may have a hard time finding a Direct3d version, but it''s not hard to port from OpenGL.

bpopp (bpopp.net)
foxes response IS irrelevant

the original poster asked about creating two rooms and joining them together

and fox starts talking about skyboxes

how is a skybox two rooms joining together?


How would you cut a hole in the side of the cube was basically what was being asked
Not to nitpick, but he did ask how to make a room *or* two rooms connected together. Two inside-out cubes (which is essentially a skybox) with an alpha masked door texture in one would allow you to give the appearance of two joined rooms. The exterior of the second cube would be culled from the outside so you could view it''s interior from the first cube through the alphamasked doorway. Again, definitely not the way to go, but it would probably work as long as you weren''t worried about collision detection, frustum culling, etc.
This is what I under stand.

Choice 1) make a big cube and put the camera inside the cube.

So then how to I combine big cubes together to make more then one room?

Also the cube faces need to be facing inward. Then texture the polygons.

Choice 2) draw and load a 3d model

Is there any other way to make a room?
how do I put objects inside a box?



King, sounds like you need to work through some very basic tutorials on rendering objects, positioning the camera, etc. Something like "putting objects in a box" is all a matter of scaling and positioning meshes, specifying vertices and normals to get the textures where you need them to be, and positioning the camera. Making a "door" involves creating a mesh that is the shape you want, either with a 3D editor or by specifying vertices by hand.

These are all basic concepts. Search this site and others for beginner''s tutorials. I used Andy Pike a long time ago (www.andypike.com, I think), and he had a good tutorial on setting up DirectX, drawing and lighting boxes, rotating them, etc.

Once you have the basics of creating and rendering meshes down, you will know how to create the room you want.
So i just put a meash inside another to add objects.

So lets see here. First I make a skybox, make a terrain, put in cubes inside out and add meashes to the inside and out side the box then I put in object meashes then texture them.

That makes sence.

Thanks for the help
Nonono.. forget choice 1. It''s not a choice. I was just defending fox in saying that it COULD be done. It''s probably not a viable solution for what you want.

Do a search on Google for "BSP Tutorial" and you should find more than enough information to get you started.

This topic is closed to new replies.

Advertisement