Hello,
Recently I faced a challenge of modelling a building which has both the exterior and interior walls (as in, you can walk in and around it).
I have come up with a way of doing this but it seems terribly inefficient.
For one, it's pretty hard to navigate the interior, so I had to split the model into two meshes (exterior shell and interior), which I'm not sure is a smart idea.
I'm also not sure how to approach the initial design. I started with a cube which I shaped into a building, duplicated it, inverted the polys, scaled them down and that's how I created the interior. Then some fun with the knife tool and I ended up with what is shown below:
![buildingm.png](http://img806.imageshack.us/img806/509/buildingm.png)
Furthermore, I have little to no idea how the edge flow should work here.
Rather than abandon the project, I decided to research and ask some questions on the forum. Should be a fun learning experience.
Do you have some advice? Are there any tutorials for this (I couldn't find any)?
Replies
For the record, the engine I'd be using for this project would most likely be UDK (and I don't want to build the house using solids).
Different styles of lighting models, transform cost, physics and many other factors determine the best way to create a model.
But for UDK it may work ok. It's not the best way to do work though as it's tedious going backwards and forwards every time you want to change the position of a wall.
Usually you'd build your walls out of modular pieces that you re-use.
Should I go modular even if it means building modular pieces that are only going to be used once? If so, how would that improve my efficiency?
And if I am right with doing it this way, how to do it better? How does everyone else approach the subject of non-modular buildings with interiors?
Initially you need to think about the engine your using(which I see you have done), what kind of building your making, which era its from and what gametype your shooting for.
These are questions you need to ask yourself, and then go back through similar games and observe the transition from interior to exterior. Fallout/Oblivion for example load on entry, where as other similar open world games either heavily restrict interiors or offer incredibly simplistic layouts.
Once you have asked yourself some of the above questions, you will either arrive at some of the answers yourself or be able to ask specific questions and receive more specific answers.
So you could build your block out with BSP and run around, make sure things are proportioned right, export that and use it as a guideline when building your structure.
Unreal handles collision in a few ways. If you build using BSP then collision is handled automatically. Your model at the moment is so simple that you could make it using BSP and collision would just work. You could then get some modular meshes and tack them on for extra detail.
If you're set on not using BSP, you can go one of two ways: make your mesh in one or more pieces (inside/outside if you want) and then make a collision mesh (http://udn.epicgames.com/Three/CollisionReference.html shows you how). Or you can do it the modular way and have each building sub-part have its own collision.
What you choose does come down to what type of game you want to target, but if you're looking at a FPS then you're probably going to have a decent polycount and so want to make it modular. Making it modularly is good because it means you can only render what parts of the building are in front of you, and a smaller object will cast smaller and simpler shadows which can sometimes be culled.
The issue of collision detection is something I did not think about. Great point.
To be more specific, I'm planning on making a small short game. The building would be something like a cottage and the way you interact with it will be very similar to this month's Ludum Dare entry "Stratum".
I'm planning on having an extensive maze under the building, which I would definitely build modular but this building is, at least in theory, supposed to be not entirely symmetrical and thus not really have a lot of reusable pieces in it. Furthermore, its supposed complexity (when I'm finished with it) would be impossible to achieve with BSP.
As for looking at how others did it, they usually went the easy way (like Bethesda) and made the interiors a separate "level", which is something I cannot do for this project.
Still, from what I gather from your responses, I should still break it into pieces (if not for collision detection then for iteration time).
Could you give me some more tips on the best way to cut it up (as in what pieces)? Should I break it into 4 walls, the ceiling and floor? Maybe try and break each wall into smaller pieces? Or just stick with the inside/outside shell layout that I started with?
Btw. if you're wondering about the size of the building, the small cube in the top pic is supposed to be the player.
Well what is the cottage supposed to look like? At the moment what you have doesn't look much like a cottage - it looks more like a modern building.
The design of the building will determine where it's easiest to break the building up.
You might need horizontal/vertical support beams, windows, doors, their casings, maybe some different wall panels, furniture props, lightsources, walls that divide your building into rooms, cellar doors that lead to your maze e.t.c.
Hull you have at the moment is quite rough. BPS geometry will do just fine for now. You can replace it with static meshes after you get everything more or less sorted and working.
How does the architecture affect how I should break it up?
Even considering the rough model on the pic, how would I go about dividing that?
And yes, I know I could achieve that through BSP. I made it simple on purpose, so that it's easier to talk about breaking it up. Imagine it's more complex.
You should really get a concept (even someone else's) and post it and ask how you would break that specific model up.
If your house is a placeholder then this whole thread is basically "how do I plan to do something when I don't know what that thing is". There's no single rule, unfortunately. It mostly changes based on what thing you're doing.
Look at these images:
http://forgestd.com/images/stories/projects/crysis2/gallery/crysis2_construction_hut.jpg
http://thejayzone.com/pics/crysis/crysis2_3.png
http://forgestd.com/images/stories/projects/crysis2/gallery/crysis2_prism_room.jpg
The construction hut might very well be just a single mesh. It's really simple, and if there's only a single texture used then the mesh would be rendered in a single draw call.
The fabric tent is probably a few different meshes. Excluding the obvious deco like furniture and those railings, the door and the big pipe and light would likely be separate meshes, and the fabric and metal frame may also be separate. Though, they might not be. Also, the sloped walls and ceiling might be one mesh while the flat wall is another. That'd let you modularly construct your building to be different sizes.
The library would have a whole lot of modular chunks. The railings and lights would be modular and probably each separate bookshelf would be, as well.
Open up UDK and open some of the sample maps that come with it. If you've got any other games installed with editors then do the same with them. It's one of the best ways to learn awesome tips on how pros solved problems before you.
Some of the reasons i consider when making environment assets modular are,
- will breaking the asset down further save resources through instancing?
- will the environment contain other similar cottages that would greatly gain from the addition of variation?
- will design or other artists be using your cottage set to make other creative things?
So as you can see its not always about making the asset cheaper to render, sometimes its about giving people lego blocks to play with or to easily add variation to an environment. My advice is to not break things up to much and overcomplicate things, as smaller sets are less assets for an artist to manage. And although these points don't all apply in your current situation its always worth considering them.If you were to attach a reference image i would be happy to give you a few examples of how it could be broken up, a simple google ref image will be easier to work with than your rough model.
Consider this glass cottage thingy:
http://www.asaltulis.com/wp-content/uploads/2009/08/Small-Glass-Cottage-Watervilla-Kortenhoef1.jpg
And that house:
http://www.facebook.com/photo.php?fbid=174268699298142&set=a.174268695964809.43139.100001450393875&type=1&theater
The first pic is likely what I'm going to end up with as the design of the building (inspiration-wise), although I'd like to know how to approach a house like that.
Would I build the outer shell and then separate each room into its own mesh? If so, should I keep them separate when exporting or export them as one model? If I should export them as one model, should I weld all the vertices? etc. etc.
for the second version you would probably want to make separate walls and roof pieces and copy those around.
What's the best way to handle that?
You can throw, doors, windows, trims onto that same sheet. Anything that you may use to put together your modular set.
so its either more textures (material id's) and file names that make sense, or fit other models on that same sheet and maximize the overall uv space and lower the number of texture fetches, well crap thats a no brainer then
The Watervilla Kortenhoef, interesting building to say the least. I found a few images that seemed to have varying floor plans, so I just went with something that loosely resembled your initial reference image.
sprunghunt pretty much summed up much of this with his reply, however to elaborate i have added a few variations. Working from the top down you can see progressively larger modular pieces are used in varying ways to arrive at a similar result.
I mistakenly did a work up of the smaller beach cottage to begin with,
which is think is a pretty funky little building and a pretty good example of a different building using similar concepts. Mostly these all snap together pretty easy and could be changed up with some shader magic and or roof changes.
From left to right
Leftmost - again if you only plan to have one of these or variation isnt an issue then just make the building and the interior. Sure it will have several textures and the collision will be complex, but who cares.
2nd - separate off the roof so you can switch things up a bit, watch out for the connecting staircase as it will need to match on all possible combinations.
3rd - make different separate interiors, depending on your situation this could work although the ceiling space with a roof like this is pretty restrictive. More importantly you can lod the interior independently of your exterior - which is pretty important if you have a suburban street full of these.
Rightmost - different interiors with separate ground/roof, this gives you more options but again you need to keep an eye on where the interior stars connect to the 2nd floor. Although with this layout you could have roof sections with no interior space, this also lets you lod interior sections independently of each other and the exterior.
Mostly my experience lays with creating buildings without interiors, which with a small set of parts/textures
can be combined very quickly to create a large selection of different buildings.
Mostly i find adding an interior to a traditional building is like opening a pretty messy can of worms. The difference in creation time and resource requirements are massive, especially when you consider interior props/texture sets, collision, camera headaches, lods, etc...
I would love to hear some varying opinions on how others approach interiors in situations like this? perhaps there are less wormy solutions?
Additionally all the assets shown here are at a greybox level of completion, i would expect these assets to go through at least a detail, texture and optimisation pass before considered final.
If the house is built inside max with modularity in mind, it's easy for you or another artist to build varients off of that.
As far as collision, I guess it's no big deal since we only have to restrict the camera and what players can click on - I've always had to hand build really simple collision, I found it tough when I was new but nowadays I can build the collision mesh for a large structure in about 10-15 minutes.
Cheers Justin, nice to have another perspective on this - sounds like a practical and realistic way to work within a production environment.