Jump to content
The Dark Mod Forums

Modular Building Techniques


Recommended Posts

Hey, I'm just getting in to the DR editor so these question may seem obvious to you so please pardon me for being daft :)

 

 

As to .ASE creation, directory tree placement, import and export, etc. I was looking for this information in a wiki or something but can't locate it so I'm guessing it has to be gleaned from experimentation?

 

Is there a link somewhere that has this information?

 

I've found this and this, though there aren't really any specifics as to .ASE import/export process other than very general information.

 

I have some questions on this process:

 

1) Do you have to select the geometry and then "Scripts > Convert to ASE" prior to "Scripts > Export ASE"? If not, what is "Convert to ASE" because at least in the editor it doesn't seem to change the model or do anything though I'm sure it does which is why I'm asking.

 

2) Can the geometry selected for ASE export be anywhere on your current map or does it need translated to the origin (corner bottom, center, etc) prior to export?

Reason I ask this is because it was mentioned that you should create a map or a series of maps that contain different types of architecture. Do you need to keep the Origin area clear for "new module" creation

and then after the model is exported, translate the particular model away from the origin OR does the option under "Scripts > Export ASE > just check the box for "center objects at 0,0,0 origin" take care of that so

the model can be anywhere on your map and that will give it a center origin on export? (I realize this should not be done for models that rotate or have a rotational point/axis)

 

3) How do you "Import ASE"? There is no option in any of the menus for this so I'm guessing this is done through the normal "right-click > create model" process? If this is the case then when we export ASE models and it asks the directory path where we want to export it, we have to pick one of the .pk4s like "tdm_models01.pk4 > models > darkmod > <yourfoldernameforyourASEstuff>"? I don't see any way to point the model viewer at other relevant directories so the ASE have to be in this .pk4?

 

4) How do we export ASE models to a directory that is in .pk4 compressed archive? Are all of the .pk4s in our Doom3/darkmod directory supposed to be unpacked in to their directory structure? Will the model viewer know where to find stuff then or are we just suppose to create the directory outside of the .pk4 in the darkmod directory?

 

5) Is there a way to do this WITH lighting or entities in place in the module? I realize the light vertex may have to be moved to correct rotational errors but can this be done? Will prefab work for this if not ASE? (I realize you don't want the same rooms with the same entities all over the place in your level however if the objects can all be placed at once, some deleted, rotated, translated, etc, some added in after import, this can still save large chunks of time)

 

Kinda thinking along the lines of "kitchen_ensemble" or "bedroom_ensemble" SETS of entities/models where you have typical bedroom stuff, 1 or 2 beds, nightstand, desk, rug, candles, speakers, lights, etc. and they're in a packed group, maybe a single 8grid row/column apart, all at origin 0 for the floor of the room -- and you can just import the SET and then move/rotate/delete or add other pieces to add uniqueness. Like doing a group import of a kitchen package one time and then situating stuff where you want it and then adding in some individual flavor. Is this possible?

 

 

Thanks.

 

 

 

EDIT: I answered #3 & #4, I created a directory "Doom3 > darkmod > models > darkmod > <yourmodelfoldername>" BUT I had to restart DarkRadiant before the directory would show up in the model editor. After restart my directory structure now appears in DR and I can export to and import from that folder so I've answered the fourth question there.

Edited by Lux
Link to post
Share on other sites
  • Replies 102
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I went back to experimenting with this, and using strictly model facades instead of trying to make an entire map 'block'. The results have been a lot more impressive. I've created a series of facade

Obsttorte was interested in what I learned while making the LQD with the modular building technique, so I'll write some words about it here. What is modular building? It is about reusing every piece

Had a few hours to spare today.   Why not build modules from a reference? It is difficult to invent cool-looking architecture if you are not a trained architect. That's why mappers need to shamelessly

Posted Images

BUT I had to restart DarkRadiant before the directory would show up in the model editor.

Or you use File -> reload models :smile:

2.) Yes, it can be anywhere. The script takes the center of the highlighted object as origin.

5.) Use prefabs for this purpose.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to post
Share on other sites

The script takes the center of the highlighted object as origin.

 

Only when you check the box right? This isn't default behavior is it?

 

5.) Use prefabs for this purpose.

 

Thank you.

Link to post
Share on other sites

Yep, check the box. If you are using linux you can use my updated version of the script. You can find it on bugs.thedarkmod.com. It provides the option to keep the origin of a func_static if only one is exported.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to post
Share on other sites

@ Capela: Here is an example of the Modular Building Technique

 

rightful20130524061206.jpg

 

rightful20130524061236.jpg

 

What I've done is create a corridor with some detailed arches inside it. I new I would need another corridor later on in my map so I cloned it. In theory I now have two corridors for the time and effort of one. To avoid bland repetition I have given each corridor different textures, furnishings and decorations. This only took a few minutes. As you can see all the furniture and decorations are just copy and paste jobs.

 

I have also tried to keep all modules the same size so they fit together perfectly eg 150x150. However in the examples shown the modules are rectangular. So all I did was double the length so it is now 300x150.

 

Ok i see what you mean. Sometimes i like to ge way from the map im working and do something like a bulding or some facades that will decide later if i use it or not, and thats work that others can use if they wanted ofcourse. If the community embrasse this kinda a project, we need some kind of rules i think, as you mention the 150x150 size grid for example, a comon site for people put their work so others could download it..etc....So what is your opinion about this.!!!

Link to post
Share on other sites

I've kept to the 150x150 grid size very loosely. Some rooms are smaller and some are larger. A gap in between modules? No problem. Time for a narrow corridor to join the two. Modules overlapping? Just delete part of the overlapping module. I find this gives my museum a more organic feel and makes it feel less blocky.

 

So while sticking to a grid size does make life easier, I see no reason to stick to it religiously.

"I believe that what doesn't kill you simply makes you... stranger"

 

The Joker

Link to post
Share on other sites
  • 4 weeks later...

That's what I did with my cathedral in the city area of VFAT1.

 

post-3947-0-07025600-1371625196_thumb.jpg

 

It's only made up of three parts. The entrance, the main body of the cathedral and a tower for the corners. You save lots of time and see pleasing results in a just a few hours. Easy.

 

And yes, Google street view is the mappers best friend. However, if you have the time and money I recommend going to a nice historical city for a weekend break. Not only is this fun but nothing can beat seeing a nice old building in person and taking your own personal pictures.

"I believe that what doesn't kill you simply makes you... stranger"

 

The Joker

Link to post
Share on other sites
  • 2 weeks later...

I have two questions.

 

1. How do you actually scale the built-in models?

 

I've tried with 'Rotate and scale...' but the scale options are disabled when selecting a model.

 

2. How do you make 1D surfaces for decals?

 

I tried with thinnest possible cube (0.125) but it leaves odd edges around.

tzl1l.png

Link to post
Share on other sites

1) You do not scale the models. You choose a grid size 128 or something else and stick with it. I mean, the modules are 128 units wide, for example.

 

2) You use patches for decals.

Clipper

-The mapper's best friend.

Link to post
Share on other sites

1) You do not scale the models. You choose a grid size 128 or something else and stick with it. I mean, the modules are 128 units wide, for example.

 

 

I used a standard model of doorframe and tried all mansion door models that fit the color of the frame, but none of them fits the frame, so how do I fix that?

tzl1l.png

Link to post
Share on other sites

1 - You can scale the included models using the "rotation" spawnarg. For example "rotation" "0.5 0 0 0 0.5 0 0 0 0.5" scales the model to half size in the xyz directions. You have to be careful with it, though, since the shadow mesh doesn't get scaled, and the renderer might think the scaled model isn't visible on the screen, so it disappears.

Link to post
Share on other sites
  • 5 months later...

Great stuff! Other noobies might want to have a look, maybe add to important editing list? Now I am wondering, where should I look learn how to convert from func_static to .ase? And then to make skins? On the wiki I found articles about modelling and skins, but with Blender. Is it possible to make everything from DR (provided it is simple geometry, you don't need Blender)? Thanks.

  • Like 1

Jared, is that you ?

Must be rats...

Link to post
Share on other sites

DR has an ase exporter.

It as easy as

 

1) make model in DR.

2) choose your new model

3) scripts/export ase

4) choose location to save it

5) file/reload models

6) insert model and find you new ase model.

 

To make skin, you basically make a skins folder in you darkmod folder

make a filename.skin

The contents of the file should be like this:

skin hammer_invisible
{
model  models/darkmod/weapons/hammer.lwo
models/weapons/hammer textures/common/nodraw
models/weapons/hammerhead textures/common/nodraw
}

 

This a skin called hammer_invisible.

It works for model called models/darkmod/weapons/hammer.lwo

 

It replaces the following materials with texture/common/nodraw:

models/weapons/hammer

models/weapons/hammerhead

 

You could easily do a golden hammer, but replacing the texture/common/nodraw with textures/darkmod/metal/flat/gold01

 

You could explore the lich_queens_demise.pk4 for examples of AI skinning (the lich queen and the invisible ghosts) or module skinning (window modules with dark or lit windows.)

  • Like 2

Clipper

-The mapper's best friend.

Link to post
Share on other sites

Is there a trick to making modular prefabs that mix models and brushwork? I'm trying to make some modular buildings that mix the two, but then I can't seem to rotate them without the models getting out of place.

Link to post
Share on other sites

Not that I know of. Why make a mix of models and brushwork?

 

Either make modular .ase models or just func_statics, that capture a feature of the house, like shown in

http://forums.thedar...post__p__313678

 

Then mash them together. func_statics allow you to adjust the pieces later, but you lose the memory benefits of models, and you are prone to object corruption if that bug still exists.

 

I would stick to .ase models, then build the majority of the house with those. Later, you can hide defects or add a layer of hand-crafted func_static pieces, or even better, more ase models.

 

The whole idea of modular building is to save effort: every single piece you build, you design so that you can simply clone it for more, and you save time and effort, once you begin to have a comprehensive collection of good modules. The downside of the technique is that one needs more discipline, must learn how to design good modules and how to hide or avoid defects like texture seams and overlapping modules (z-fighting).

Clipper

-The mapper's best friend.

Link to post
Share on other sites

Well, brushwork has the benefit of being extremely easy to modify with different textures, whereas making uvmaps and alternate skins for models is far more time-consuming. What I'm trying to do is make a series of mix and match modules for tudor buildings, where each floor is modular, so I can quickly construct a cityscape by stacking different modules. At the moment, I have one model version of the bottom floor for decorative buildings, and a model/brush version that can be used for buildings that can be entered (it has a working door, frex). The layers above that are currently a mix of brushwork (walls/beams&windows) and models (brackets and supports).

 

But when I load up one of the mid-levels and then rotate it, the support beams underneath get all shifted around.

 

How would you recommend handling something like that?

post-9-0-02927900-1386523771_thumb.jpg

Link to post
Share on other sites

I would recommend not making floors modular, but making FACADES modular. That way you could build a building of any shape.

 

The support beams could be a module sized attachment. By this I mean, making a single facade module, let's say 128x128 units. Then make a beam module that fits this particular module and can just be placed on it.

 

Look here, a quick mockup

ZxxjBhn.png

128x128 facade pieces with plaster texture. The support beam module is the one with wood texture.

Caulk denotes a corner module, that makes the facade modules fit together.

 

Hopefully this makes sense. I have not made exterior modules, only interior, but it should work in principle. You just need to think about the module design.

Clipper

-The mapper's best friend.

Link to post
Share on other sites
But when I load up one of the mid-levels and then rotate it, the support beams underneath get all shifted around.

 

This was the first pain point I learned, the usual design method of copy/modify can't be done here. The first prefab I loaded into DR essentially exploded in all different directions when I turned it.

 

As crippling as it sounds, until such time as DR gains the ability to rotate around a common axis, it seems faster to build everything uniquely, then to spend time trying to build an element, then have to rebuild the element (and hopefully not miss a piece that got misplaced) every time you try to use it.

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to post
Share on other sites

I used a standard model of doorframe and tried all mansion door models that fit the color of the frame, but none of them fits the frame, so how do I fix that?

There is a door prefab fitting into the default doorframes (96x48). Use the skin spawnarg to swap the texture.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to post
Share on other sites
  • 4 weeks later...

DR has an ase exporter.

It as easy as

 

1) make model in DR.

2) choose your new model

3) scripts/export ase

4) choose location to save it

5) file/reload models

6) insert model and find you new ase model.

 

I'm having trouble getting this to work. I can export an ase but how do I do step 6 (find your ase model)? When I right-click->Create Model I don't get a file browser, I get the DR entity explorer which is organised by def files. My saved .ase hasn't magically appeared yet no matter where I try to save it. Sure I must be missing something basic...

 

EDIT: Also, my .ase file is 6x the size of the map I exported it from! Does it embed the textures too? If so, how to avoid ballooning a map with multiple copies of textures used in several .ases?

 

EDIT2: I see my first question was answered on the first post on this page. Missed that last night, I'll go try it again.

Edited by SteveL
Link to post
Share on other sites
  • 11 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...